entered into RCS

This commit is contained in:
Jim Blandy 1992-08-04 04:15:43 +00:00
parent 0b030df78b
commit e8a57935cb
17 changed files with 145 additions and 167 deletions

View file

@ -31,7 +31,7 @@
(if electric-help-map
()
(let ((map (make-keymap)))
(fillarray map 'electric-help-undefined)
(fillarray (car (cdr map)) 'electric-help-undefined)
(define-key map (char-to-string meta-prefix-char) (copy-keymap map))
(define-key map (char-to-string help-char) 'electric-help-help)
(define-key map "?" 'electric-help-help)

View file

@ -117,8 +117,6 @@
;;; Code:
(require 'keypad)
(defvar edt-last-deleted-lines ""
"Last text deleted by an EDT emulation `line-delete' command.")
(defvar edt-last-deleted-words ""
@ -292,26 +290,26 @@ Accepts a prefix argument for the number of paragraphs."
"Set EDT Advance mode so keypad commands move forward."
(interactive)
(setq edt-direction-string " ADVANCE")
(define-key function-keymap "\C-c" 'isearch-forward) ; PF3
(define-key function-keymap "8" 'scroll-window-up) ; "8"
(define-key function-keymap "7" 'next-paragraph) ; "7"
(define-key function-keymap "1" 'forward-to-word) ; "1"
(define-key function-keymap "2" 'next-end-of-line) ; "2"
(define-key function-keymap "3" 'forward-char) ; "3"
(define-key function-keymap "0" 'forward-line) ; "0"
(global-set-key [kp-f1] 'isearch-forward)
(global-set-key [kp-8] 'scroll-window-up)
(global-set-key [kp-7] 'next-paragraph)
(global-set-key [kp-1] 'forward-to-word)
(global-set-key [kp-2] 'next-end-of-line)
(global-set-key [kp-3] 'forward-char)
(global-set-key [kp-0] 'forward-line)
(update-mode-line))
(defun backup-direction ()
"Set EDT Backup mode so keypad commands move backward."
(interactive)
(setq edt-direction-string " BACKUP")
(define-key function-keymap "\C-c" 'isearch-backward) ; PF3
(define-key function-keymap "8" 'scroll-window-down) ; "8"
(define-key function-keymap "7" 'previous-paragraph) ; "7"
(define-key function-keymap "1" 'backward-to-word) ; "1"
(define-key function-keymap "2" 'previous-end-of-line) ; "2"
(define-key function-keymap "3" 'backward-char) ; "3"
(define-key function-keymap "0" 'backward-line) ; "0"
(global-set-key [kp-f3] 'isearch-backward)
(global-set-key [kp-8] 'scroll-window-down)
(global-set-key [kp-7] 'previous-paragraph)
(global-set-key [kp-1] 'backward-to-word)
(global-set-key [kp-2] 'previous-end-of-line)
(global-set-key [kp-3] 'backward-char)
(global-set-key [kp-9] 'backward-line)
(update-mode-line))
(defun edt-beginning-of-window ()
@ -366,13 +364,10 @@ and mark-paragraph for other modes."
(defun edt-emulation-on ()
"Emulate DEC's EDT editor.
Note that many keys are rebound; including nearly all keypad keys.
Use \\[edt-emulation-off] to undo all rebindings except the keypad keys.
Note that this function does not work if called directly from the .emacs file.
Instead, the .emacs file should do \"(setq term-setup-hook 'edt-emulation-on)\"
Then this function will be called at the time when it will work."
Use \\[edt-emulation-off] to undo all rebindings except the keypad keys."
(interactive)
(advance-direction)
(edt-bind-gold-keypad) ;Must do this *after* $TERM.el is loaded
(edt-bind-gold-keypad)
(setq edt-mode-old-c-\\ (lookup-key global-map "\C-\\"))
(global-set-key "\C-\\" 'quoted-insert)
(setq edt-mode-old-delete (lookup-key global-map "\177"))
@ -395,33 +390,24 @@ The keys redefined by \\[edt-emulation-on] are given their old definitions."
(define-key lisp-mode-map "\177" edt-mode-old-lisp-delete) ;"Delete"
(global-set-key "\C-j" edt-mode-old-linefeed)) ;"LineFeed"
(define-key function-keymap "u" 'previous-line) ;Up arrow
(define-key function-keymap "d" 'next-line) ;down arrow
(define-key function-keymap "l" 'backward-char) ;right arrow
(define-key function-keymap "r" 'forward-char) ;left arrow
(define-key function-keymap "h" 'edt-beginning-of-window) ;home
(define-key function-keymap "\C-b" 'describe-key) ;PF2
(define-key function-keymap "\C-d" 'delete-current-line);PF4
(define-key function-keymap "9" 'append-to-buffer) ;9 keypad key, etc.
(define-key function-keymap "-" 'delete-current-word)
(define-key function-keymap "4" 'advance-direction)
(define-key function-keymap "5" 'backup-direction)
(define-key function-keymap "6" 'kill-region)
(define-key function-keymap "," 'delete-current-char)
(define-key function-keymap "." 'set-mark-command)
(define-key function-keymap "e" 'other-window) ;enter key
(define-key function-keymap "\C-a" 'GOLD-prefix) ;PF1 ("gold")
(fset 'GOLD-prefix GOLD-map)
(defvar GOLD-map (make-keymap)
"`GOLD-map' maps the function keys on the VT100 keyboard preceeded
by the PF1 key. GOLD is the ASCII the 7-bit escape sequence <ESC>OP.")
(defun define-keypad-key (keymap function-keymap-slot definition)
(let ((function-key-sequence (function-key-sequence function-keymap-slot)))
(if function-key-sequence
(define-key keymap function-key-sequence definition))))
(global-set-key [home] 'edt-beginning-of-window)
(global-set-key [kp-f2] 'describe-key)
(global-set-key [kp-f4] 'delete-current-line)
(global-set-key [kp-9] 'append-to-buffer)
(global-set-key [kp-subtract] 'delete-current-word)
(global-set-key [kp-4] 'advance-direction)
(global-set-key [kp-5] 'backup-direction)
(global-set-key [kp-6] 'kill-region)
(global-set-key [kp-separator] 'delete-current-char)
(global-set-key [kp-decimal] 'set-mark-command)
(global-set-key [kp-enter] 'other-window)
(global-set-key [kp-f1] 'GOLD-prefix)
;;Bind GOLD/Keyboard keys
@ -465,28 +451,28 @@ by the PF1 key. GOLD is the ASCII the 7-bit escape sequence <ESC>OP.")
;Bind GOLD/Keypad keys
(defun edt-bind-gold-keypad ()
(define-keypad-key GOLD-map ?u 'edt-line-to-top-of-window) ;"up-arrow"
(define-keypad-key GOLD-map ?d 'edt-line-to-bottom-of-window) ;"down-arrow"
(define-keypad-key GOLD-map ?l 'backward-sentence) ;"left-arrow"
(define-keypad-key GOLD-map ?r 'forward-sentence) ;"right-arrow"
(define-keypad-key GOLD-map ?\C-a 'mark-section-wisely) ;Gold "PF1"
(define-keypad-key GOLD-map ?\C-b 'describe-function) ;Help "PF2"
(define-keypad-key GOLD-map ?\C-c 'occur) ;Find "PF3"
(define-keypad-key GOLD-map ?\C-d 'undelete-lines) ;Und Line "PF4"
(define-keypad-key GOLD-map ?0 'open-line) ;Open L "0"
(define-keypad-key GOLD-map ?1 'case-flip-character) ;Chgcase "1"
(define-keypad-key GOLD-map ?2 'delete-to-eol) ;Del EOL "2"
(define-keypad-key GOLD-map ?3 'copy-region-as-kill) ;Copy "3"
(define-keypad-key GOLD-map ?4 'move-to-end) ;Bottom "4"
(define-keypad-key GOLD-map ?5 'move-to-beginning) ;Top "5"
(define-keypad-key GOLD-map ?6 'yank) ;Paste "6"
(define-keypad-key GOLD-map ?7 'execute-extended-command) ;Command "7"
(define-keypad-key GOLD-map ?8 'indent-or-fill-region) ;Fill "8"
(define-keypad-key GOLD-map ?9 'replace-regexp) ;Replace "9"
(define-keypad-key GOLD-map ?- 'undelete-words) ;UND word "-"
(define-keypad-key GOLD-map ?, 'undelete-chars) ;UND Char ","
(define-keypad-key GOLD-map ?. 'redraw-display) ;Reset Window "."
(define-keypad-key GOLD-map ?e 'shell-command)) ;"ENTER"
(define-key GOLD-map [up] 'edt-line-to-top-of-window)
(define-key GOLD-map [down] 'edt-line-to-bottom-of-window)
(define-key GOLD-map [left] 'backward-sentence)
(define-key GOLD-map [right] 'forward-sentence)
(define-key GOLD-map [kp-f1] 'mark-section-wisely)
(define-key GOLD-map [kp-f2] 'describe-function)
(define-key GOLD-map [kp-f3] 'occur)
(define-key GOLD-map [kp-f4] 'undelete-lines)
(define-key GOLD-map [kp-0] 'open-line)
(define-key GOLD-map [kp-1] 'case-flip-character)
(define-key GOLD-map [kp-2] 'delete-to-eol)
(define-key GOLD-map [kp-3] 'copy-region-as-kill)
(define-key GOLD-map [kp-4] 'move-to-end)
(define-key GOLD-map [kp-5] 'move-to-beginning)
(define-key GOLD-map [kp-6] 'yank)
(define-key GOLD-map [kp-7] 'execute-extended-command)
(define-key GOLD-map [kp-8] 'indent-or-fill-region)
(define-key GOLD-map [kp-9] 'replace-regexp)
(define-key GOLD-map [kp-subtract] 'undelete-words)
(define-key GOLD-map [kp-separator] 'undelete-chars)
(define-key GOLD-map [kp-decimal] 'redraw-display)
(define-key GOLD-map [kp-enter] 'shell-command))
;; Make direction of motion show in mode line
;; while EDT emulation is turned on.

View file

@ -954,7 +954,7 @@ Various hooks for customization:
(setq mode-line-buffer-identification "GNUS: List of Newsgroups")
(setq mode-line-process nil)
(use-local-map gnus-Group-mode-map)
(buffer-flush-undo (current-buffer))
(buffer-disable-undo (current-buffer))
(setq buffer-read-only t) ;Disable modification
(run-hooks 'gnus-Group-mode-hook))
@ -1729,7 +1729,7 @@ Various hooks for customization:
(cons (list 'gnus-show-threads " Thread") minor-mode-alist)))
(gnus-Subject-set-mode-line)
(use-local-map gnus-Subject-mode-map)
(buffer-flush-undo (current-buffer))
(buffer-disable-undo (current-buffer))
(setq buffer-read-only t) ;Disable modification
(setq truncate-lines t) ;Stop line folding
(setq selective-display t)
@ -3216,7 +3216,7 @@ is non-nil. The hook is intended to customize Rmail mode."
(digbuf (get-buffer-create gnus-Digest-buffer))
(mail-header-separator ""))
(set-buffer digbuf)
(buffer-flush-undo (current-buffer))
(buffer-disable-undo (current-buffer))
(setq buffer-read-only nil)
(erase-buffer)
(insert-buffer-substring artbuf)
@ -3652,7 +3652,7 @@ Various hooks for customization:
(setq page-delimiter gnus-page-delimiter)
(make-local-variable 'mail-header-separator)
(setq mail-header-separator "") ;For caesar function.
(buffer-flush-undo (current-buffer))
(buffer-disable-undo (current-buffer))
(setq buffer-read-only t) ;Disable modification
(run-hooks 'gnus-Article-mode-hook))
@ -4617,7 +4617,7 @@ ROT47 will be performed for Japanese text in any case."
(kill-buffer file-buffer))
(error "Output file does not exist")))
(set-buffer tmpbuf)
(buffer-flush-undo (current-buffer))
(buffer-disable-undo (current-buffer))
(erase-buffer)
(insert-buffer-substring artbuf)
(gnus-convert-article-to-rmail)
@ -4655,7 +4655,7 @@ ROT47 will be performed for Japanese text in any case."
(tmpbuf (get-buffer-create " *GNUS-output*")))
(save-excursion
(set-buffer tmpbuf)
(buffer-flush-undo (current-buffer))
(buffer-disable-undo (current-buffer))
(erase-buffer)
(insert-buffer-substring artbuf)
;; Append newline at end of the buffer as separator, and then
@ -4724,7 +4724,7 @@ Run gnus-Open-server-hook just before opening news server."
;; If no server name is given, local host is assumed.
(if (string-equal gnus-nntp-server "")
(setq gnus-nntp-server (system-name)))
(cond ((string= gnus-nntp-server) "::")
(cond ((string= gnus-nntp-server "::")
(require 'nnspool)
(gnus-define-access-method 'nnspool)
(message "Looking up local news spool..."))
@ -5701,7 +5701,7 @@ If optional argument RAWFILE is non-nil, the raw startup file is read."
;; Prepare .newsrc buffer.
(set-buffer (find-file-noselect newsrc-file))
;; It is not so good idea turning off undo.
;;(buffer-flush-undo (current-buffer))
;;(buffer-disable-undo (current-buffer))
;; Load quick .newsrc to restore gnus-marked-assoc and
;; gnus-killed-assoc even if gnus-newsrc-assoc is out of date.
(condition-case nil
@ -5895,7 +5895,7 @@ If optional argument RAWFILE is non-nil, the raw startup file is read."
(save-buffer))
;; Quickly loadable .newsrc.
(set-buffer (get-buffer-create " *GNUS-newsrc*"))
(buffer-flush-undo (current-buffer))
(buffer-disable-undo (current-buffer))
(erase-buffer)
(gnus-gnus-to-quick-newsrc-format)
(let ((make-backup-files nil)

View file

@ -43,7 +43,7 @@
;;; Code:
(require 'comint)
(require 'tags)
(require 'etags)
;; ======================================================================
;; the overloading mechanism
@ -196,9 +196,9 @@ and source-file directory for your debugger."
"Run sdb on program FILE in buffer *gud-FILE*.
The directory containing FILE becomes the initial working directory
and source-file directory for your debugger."
(interactive "fRun sdb on file: ")
(if (not (and (boundp 'tags-file-name) (file-exists-p tags-file-name)))
(error "The sdb support requires a valid tags table to work."))
(interactive "fRun sdb on file: ")
(gud-overload-functions '((gud-debugger-startup . gud-sdb-debugger-startup)
(gud-marker-filter . gud-sdb-marker-filter)
(gud-visit-file . gud-sdb-visit-file)
@ -525,20 +525,20 @@ Obeying it means displaying in another window the specified file and line."
(defun gud-read-address()
"Return a string containing the core-address found in the buffer at point."
(save-excursion
(let ((pt (dot)) found begin)
(setq found (if (search-backward "0x" (- pt 7) t)(dot)))
(let ((pt (point)) found begin)
(setq found (if (search-backward "0x" (- pt 7) t)(point)))
(cond (found (forward-char 2)
(setq result
(buffer-substring found
(progn (re-search-forward "[^0-9a-f]")
(forward-char -1)
(dot)))))
(point)))))
(t (setq begin (progn (re-search-backward "[^0-9]") (forward-char 1)
(dot)))
(point)))
(forward-char 1)
(re-search-forward "[^0-9]")
(forward-char -1)
(buffer-substring begin (dot)))))))
(buffer-substring begin (point)))))))
(defun send-gud-command (arg)
@ -559,7 +559,7 @@ member of gud-commands."
(if (stringp comm) (format comm addr) (funcall comm addr))))
(t (setq comm addr)))
(switch-to-buffer current-gud-buffer)
(goto-char (dot-max))
(goto-char (point-max))
(insert-string comm)))
;;; gud.el ends here

View file

@ -382,7 +382,7 @@ If there is byte at the target address move to the last byte in that line."
"Move vertically down ARG lines [16 bytes] (up if ARG negative) in hexl-mode.
If there is no byte at the target address move to the last byte in that line."
(interactive "p")
(hexl-goto-address (let ((address (+ (hexl-current-address) (* arg 16)) t))
(hexl-goto-address (let ((address (+ (hexl-current-address) (* arg 16))))
(if (and (< arg 0) (< address 0))
(progn (message "Out of hexl region.")
(setq address

View file

@ -398,7 +398,7 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\""
((< (point-max) 30000)
(message "%s too small to bother tagifying" file))
(t
(Info-tagify file))))
(Info-tagify))))
(let ((loss-name " *problems in info file*"))
(message "Checking validity of info file %s..." file)
(if (get-buffer loss-name)

View file

@ -100,7 +100,8 @@
(defun kermit-send-input-cr ()
"Like \\[comint-send-input] but end the line with carriage-return."
(interactive)
(comint-send-input "\r"))
(comint-send-input)
(comint-send-string (get-buffer-process (current-buffer)) "\r"))
;; This is backwards of what makes sense, but ...
(define-key shell-mode-map "\n" 'kermit-send-input-cr)
@ -127,11 +128,11 @@ In this state, use LFD to send a line and end it with a carriage-return."
(set-buffer (process-buffer proc))
(goto-char beg)
(insert-before-markers str)
(while (re-search-backware "[\r\C-a]+" beg t)
(while (re-search-backward "[\r\C-a]+" beg t)
(replace-match "")))))
(defun kermit-clean-on ()
"Delete all null characters and ^M's from the kermit output."
"Delete all null characters and ^M's from the kermit output.
Note that another (perhaps better) way to do this is to use the
command `kermit | tr -d '\\015''."
(interactive)

View file

@ -114,8 +114,8 @@
(defun ledit-setup ()
"Set up key bindings for the Lisp/Emacs interface."
(if (not ledit-mode-map)
(progn (setq ledit-mode-map (make-sparse-keymap))
(lisp-mode-commands ledit-mode-map)))
(progn (setq ledit-mode-map (nconc (make-sparse-keymap)
shared-lisp-mode-map))))
(define-key ledit-mode-map "\e\^d" 'ledit-save-defun)
(define-key ledit-mode-map "\e\^r" 'ledit-save-region)
(define-key ledit-mode-map "\^xz" 'ledit-go-to-lisp)

View file

@ -430,7 +430,7 @@ Returns a list of the form (FULL-NAME CANONICAL-ADDRESS)."
(save-excursion
(set-buffer extraction-buffer)
(buffer-flush-undo extraction-buffer)
(buffer-disable-undo extraction-buffer)
(set-syntax-table address-syntax-table)
(widen)
(erase-buffer)
@ -697,7 +697,7 @@ Returns a list of the form (FULL-NAME CANONICAL-ADDRESS)."
(set-buffer canonicalization-buffer)
(buffer-flush-undo canonicalization-buffer)
(buffer-disable-undo canonicalization-buffer)
(set-syntax-table address-syntax-table)
(setq case-fold-search nil)
@ -1081,7 +1081,7 @@ Returns a list of the form (FULL-NAME CANONICAL-ADDRESS)."
)
(save-excursion
(set-buffer variant-buffer)
(buffer-flush-undo variant-buffer)
(buffer-disable-undo variant-buffer)
(set-syntax-table address-text-syntax-table)
(widen)
(erase-buffer)

View file

@ -173,4 +173,6 @@ DEFINITION can be one or more mail addresses separated by commas."
(rplacd tem definition)
(setq mail-aliases (cons (cons name definition) mail-aliases)))))
(provide 'mailalias)
;;; mailalias.el ends here

View file

@ -16,6 +16,9 @@
;;; Code:
(require 'mailalias)
(require 'sendmail)
;; (setq send-mail-function 'post-mail-send-it)
(defun post-mail-send-it ()

View file

@ -63,21 +63,21 @@
(defun medit-zap-define-to-mdl ()
"Return to MDL with surrounding or previous toplevel MDL object."
(indetarctive)
(medit-save-defun)
(medit-go-to-mdl))
(interactive)
(medit-save-define)
(medit-goto-mdl))
(defun medit-zap-region-mdl (start end)
"Return to MDL with current region."
(interactive)
(medit-save-region start end)
(medit-go-to-mdl))
(medit-goto-mdl))
(defun medit-zap-buffer ()
"Return to MDL with current buffer."
(interactive)
(medit-save-buffer)
(medit-go-to-mdl))
(medit-goto-mdl))
(defun medit-goto-mdl ()
"Return from Emacs to superior MDL, sending saved code.

View file

@ -120,29 +120,12 @@
(define-key gomoku-mode-map "\C-cr" 'gomoku-human-resigns) ; C-C R
(define-key gomoku-mode-map "\C-ce" 'gomoku-emacs-plays) ; C-C E
;; Key bindings for "function" keys. If your terminal has such
;; keys, make sure they are declared through the function-keymap
;; keymap (see file keypad.el).
;; One problem with keypad.el is that the function-key-sequence
;; function is really slow, so slow that you may want to comment out
;; the following lines ...
(if (featurep 'keypad)
(let (keys)
(if (setq keys (function-key-sequence ?u)) ; Up Arrow
(define-key gomoku-mode-map keys 'gomoku-move-up))
(if (setq keys (function-key-sequence ?d)) ; Down Arrow
(define-key gomoku-mode-map keys 'gomoku-move-down))
(if (setq keys (function-key-sequence ?l)) ; Left Arrow
(define-key gomoku-mode-map keys 'gomoku-move-left))
(if (setq keys (function-key-sequence ?r)) ; Right Arrow
(define-key gomoku-mode-map keys 'gomoku-move-right))
;; (if (setq keys (function-key-sequence ?e)) ; Enter
;; (define-key gomoku-mode-map keys 'gomoku-human-plays))
;; (if (setq keys (function-key-sequence ?I)) ; Insert
;; (define-key gomoku-mode-map keys 'gomoku-human-plays))
)))
(define-key gomoku-mode-map [up] 'gomoku-move-up)
(define-key gomoku-mode-map [down] 'gomoku-move-down)
(define-key gomoku-mode-map [left] 'gomoku-move-left)
(define-key gomoku-mode-map [right] 'gomoku-move-right)
(define-key gomoku-mode-map [kp-enter] 'gomoku-human-plays)
(define-key gomoku-mode-map [insert] 'gomoku-human-plays))
(defun gomoku-mode ()
"Major mode for playing Gomoku against Emacs.

View file

@ -54,34 +54,29 @@
;; because the compiler will convert them to constants, which should
;; eval faster than symbols.
;;
;; The (require) wrapping forces the compiler to eval these macros at
;; compile time. This would not be necessary if we did not use macros
;; inside of macros, which the compiler doesn't seem to check for.
;;
;; Don't change any of the life-* macro constants unless you thoroughly
;; understand the `life-grim-reaper' function.
(require
(progn
(defmacro life-life-char () ?@)
(defmacro life-death-char () (1+ (life-life-char)))
(defmacro life-birth-char () 3)
(defmacro life-void-char () ?\ )
(defmacro life-life-string () (char-to-string (life-life-char)))
(defmacro life-death-string () (char-to-string (life-death-char)))
(defmacro life-birth-string () (char-to-string (life-birth-char)))
(defmacro life-void-string () (char-to-string (life-void-char)))
(defmacro life-not-void-regexp () (concat "[^" (life-void-string) "\n]"))
(defmacro life-life-char () ?@)
(defmacro life-death-char () (1+ (life-life-char)))
(defmacro life-birth-char () 3)
(defmacro life-void-char () ?\ )
;; try to optimize the (goto-char (point-min)) & (goto-char (point-max))
;; idioms. This depends on goto-char's not griping if we underrshoot
;; or overshoot beginning or end of buffer.
(defmacro goto-beginning-of-buffer () '(goto-char 1))
(defmacro maxint () (lsh (lsh (lognot 0) 1) -1))
(defmacro goto-end-of-buffer () '(goto-char (maxint)))
(defmacro life-life-string () (char-to-string (life-life-char)))
(defmacro life-death-string () (char-to-string (life-death-char)))
(defmacro life-birth-string () (char-to-string (life-birth-char)))
(defmacro life-void-string () (char-to-string (life-void-char)))
(defmacro life-not-void-regexp () (concat "[^" (life-void-string) "\n]"))
;; try to optimize the (goto-char (point-min)) & (goto-char (point-max))
;; idioms. This depends on goto-char's not griping if we underrshoot
;; or overshoot beginning or end of buffer.
(defmacro goto-beginning-of-buffer () '(goto-char 1))
(defmacro maxint () (lsh (lsh (lognot 0) 1) -1))
(defmacro goto-end-of-buffer () '(goto-char (maxint)))
(defmacro increment (variable) (list 'setq variable (list '1+ variable)))
(defmacro increment (variable) (list 'setq variable (list '1+ variable)))
'life))
;; list of numbers that tell how many characters to move to get to
;; each of a cell's eight neighbors.
@ -98,6 +93,7 @@
(defun abs (n) (if (< n 0) (- n) n))
;;;###autoload
(defun life (&optional sleeptime)
"Run Conway's Life simulation.
The starting pattern is randomly selected. Prefix arg (optional first
@ -107,12 +103,13 @@ generations (this defaults to 1)."
(or sleeptime (setq sleeptime 1))
(life-setup)
(life-display-generation sleeptime)
(while t
(let ((inhibit-quit t))
(life-grim-reaper)
(life-expand-plane-if-needed)
(life-increment-generation)
(life-display-generation sleeptime))))
(catch 'life-exit
(while t
(let ((inhibit-quit t))
(life-grim-reaper)
(life-expand-plane-if-needed)
(life-increment-generation)
(life-display-generation sleeptime)))))
(fset 'life-mode 'life)
(put 'life-mode 'mode-class 'special)
@ -267,7 +264,10 @@ generations (this defaults to 1)."
(defun life-display-generation (sleeptime)
(goto-char life-window-start)
(recenter 0)
(sit-for sleeptime))
;; Redisplay; if the user has hit a key, exit the loop.
(or (eq t (sit-for sleeptime))
(throw 'life-exit nil)))
(defun life-extinct-quit ()
(life-display-generation 0)

View file

@ -28,6 +28,8 @@
;;;
;;; 9-dec-86 Jeff Peck, Sun Microsystems Inc. <peck@sun.com>
(require 'cl)
(defvar sc::cursors nil "List of known cursors")
(defmacro defcursor (name x y string)
@ -96,7 +98,7 @@ Otherwise, ICON should be a vector or the name of a vector of [x y 32-chars]"
(defun sc::pic-ins-at-mouse (char)
"Picture insert char at mouse location"
(mouse-move-point *mouse-window* (min 15 *mouse-x*) (min 15 *mouse-y*))
(move-to-column-force (1+ (min 15 (current-column))))
(move-to-column (1+ (min 15 (current-column))) t)
(delete-char -1)
(insert char)
(sc::goto-hotspot))

View file

@ -70,7 +70,7 @@ performance.")
(if terminal-map
nil
(let ((map (make-keymap)))
(fillarray map 'te-pass-through)
(fillarray (car (cdr map)) 'te-pass-through)
;(define-key map "\C-l"
; '(lambda () (interactive) (te-pass-through) (redraw-display)))
(setq terminal-map map)))
@ -80,7 +80,7 @@ performance.")
nil
(let ((map (make-keymap)))
;(fillarray map 'te-escape-extended-command-unread)
(fillarray map 'undefined)
(fillarray (car (cdr map)) 'undefined)
(let ((s "0"))
(while (<= (aref s 0) ?9)
(define-key map s 'digit-argument)
@ -127,7 +127,7 @@ performance.")
(if terminal-more-break-map
nil
(let ((map (make-keymap)))
(fillarray map 'te-more-break-unread)
(fillarray (car (cdr map)) 'te-more-break-unread)
(define-key map (char-to-string help-char) 'te-more-break-help)
(define-key map " " 'te-more-break-resume)
(define-key map "\C-l" 'redraw-display)

View file

@ -126,8 +126,8 @@
;; An^stata^u tri `autoload' kaj tri | Instead of three `autoload' and
;; `global-set-key' vi povas uzi la | three `global-set-key' you can use
;; jenon en via dataro ~/.emacs, por | the following in your file
;; memstare ^car^gi la modalon: | ~/.emacs, to automatically load
;; | the mode:
;; memstare ^car^gi la modalon: | ~/.emacs, to automatically load
;; | the mode:
;; (global-set-key "\C-x6"
;; '(lambda () (interactive)
@ -138,24 +138,25 @@
;; Se vi ^satus havi la dukolumnajn | If you'd like to have the
;; ordonojn je funkciklavo <f2>, vi | two-column commands on function
;; povas uzi la jenon en via dataro | key <f2>, you can use the
;; ~/.emacs: | following in your file ~/.emacs:
;; ~/.emacs: | following in your file ~/.emacs:
;; (define-key function-keymap "\^b"
;; '(lambda () (interactive)
;; (load-library "two-column")
;; (define-key function-keymap "\^b" tc-mode-map)
;; (call-interactively
;; (cdr (assq (read-char) tc-mode-map)))))
;; (global-set-key [f2] (function
;; (lambda ()
;; (interactive)
;; (load-library "two-column")
;; (global-set-key [f2] tc-mode-map)
;; (call-interactively
;; (cdr (assq (read-char) tc-mode-map))))))
;; In addition to two-column editing of text, for example for writing a
;; bilingual text side-by-side as shown below in the file's prolog, other
;; interesting uses have been found for this minor mode:
;;
;;
;; You can separate the columns with {+} C-x 6 u or <f2> u if you prefer
;; any string that pleases you, by {+} handles these with a prefix argument
;; setting tc-separator. For {+} that enables you to declare the
;; example "{+} " if you like to {+} desired length of such a string.
;; You can separate the columns with {+} C-x 6 u or <f2> u if you prefer
;; any string that pleases you, by {+} handles these with a prefix argument
;; setting tc-separator. For {+} that enables you to declare the
;; example "{+} " if you like to {+} desired length of such a string.
;; amuse yourself.
;;
;;