Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!news.larc.nasa.gov!tadguy From: tadguy@abcfd01.larc.nasa.gov (Tad Guy) Newsgroups: comp.sys.amiga.introduction Subject: Re: Emacs for the Amiga 1000 ? (MicroEmacs?) Message-ID: Date: 16 Jan 91 22:46:05 GMT References: <1991Jan15.091854.24428@zorch.SF-Bay.ORG> <1195@tekig7.MAP.TEK.COM> <1991Jan15.192334.19893@convex.com> Sender: news@news.larc.nasa.gov (USENET Network News) Organization: NASA Langley Research Center, Hampton, VA Lines: 239 In-Reply-To: swarren@convex.com's message of 15 Jan 91 19:23:34 GMT swarren@convex.com (Steve Warren) writes: > phils@tekig5.PEN.TEK.COM (Philip E Staub) writes: > > > > (global-set-key "\b" 'delete-backward-char) > > (global-set-key "\C-x?" 'help-for-help) > > (global-set-key "\C-H" 'delete-backward-char) Well, while we're posting GNU Emacs hacks to a totally inappropriate group, this is the `snub of the nose' patch to correct the C-h behavior I use. These patches change the help-command and help-for-help bindings to C-\ instead of C-h. Even the documentation is updated... This is mostly Kyle Jone's work, when he and I were at ODU. It was applied to the emacs we placed on the machines we managed there, and it's now being used somewhat at LaRC. The patch is somewhat thorough... :-) ...tad *** /tmp/,RCSt1a25258 Mon Feb 26 15:17:36 1990 --- lisp/userlock.el Mon Feb 26 15:14:27 1990 *************** *** 84,90 **** (save-window-excursion (let (answer) (while (null answer) ! (message "File has changed on disk; really want to edit the buffer? (y, n or C-h) ") (let ((tem (downcase (let ((cursor-in-echo-area t)) (read-char))))) (setq answer --- 84,90 ---- (save-window-excursion (let (answer) (while (null answer) ! (message "File has changed on disk; really want to edit the buffer? (y, n or ?) ") (let ((tem (downcase (let ((cursor-in-echo-area t)) (read-char))))) (setq answer *** /tmp/,RCSt1a25357 Mon Feb 26 15:18:46 1990 --- lisp/help.el Mon Feb 26 15:14:18 1990 *************** *** 22,31 **** (defvar help-map (make-sparse-keymap) "Keymap for characters following the Help key.") ! (define-key global-map "\C-h" 'help-command) (fset 'help-command help-map) ! (define-key help-map "\C-h" 'help-for-help) (define-key help-map "?" 'help-for-help) (define-key help-map "\C-c" 'describe-copying) --- 22,33 ---- (defvar help-map (make-sparse-keymap) "Keymap for characters following the Help key.") ! (setq help-char ?\C-\\) ! ! (define-key global-map "\C-\\" 'help-command) (fset 'help-command help-map) ! (define-key help-map "\C-\\" 'help-for-help) (define-key help-map "?" 'help-for-help) (define-key help-map "\C-c" 'describe-copying) *************** *** 166,172 **** (print-help-return-message))) (defun help-for-help () ! "You have typed C-h, the help character. Type a Help option: A command-apropos. Give a substring, and see a list of commands (functions interactively callable) that contain --- 168,174 ---- (print-help-return-message))) (defun help-for-help () ! "You have typed \\[help-command], the help character. Type a Help option: A command-apropos. Give a substring, and see a list of commands (functions interactively callable) that contain *************** *** 194,208 **** C-w print information on absence of warranty for GNU Emacs." (interactive) (message ! "A B C F I K L M N S T V W C-c C-d C-n C-w. Type C-h again for more help: ") (let ((char (read-char))) ! (if (or (= char ?\C-h) (= char ??)) (save-window-excursion (switch-to-buffer "*Help*") (erase-buffer) (insert (documentation 'help-for-help)) (goto-char (point-min)) ! (while (memq char '(?\C-h ?? ?\C-v ?\ ?\177 ?\M-v)) (if (memq char '(?\C-v ?\ )) (scroll-up)) (if (memq char '(?\177 ?\M-v)) --- 196,211 ---- C-w print information on absence of warranty for GNU Emacs." (interactive) (message ! "A B C F I K L M N S T V W C-c C-d C-n C-w. Type C-\\ again for more help: ") (let ((char (read-char))) ! (if (or (= char help-char) (= char ??)) (save-window-excursion (switch-to-buffer "*Help*") (erase-buffer) (insert (documentation 'help-for-help)) (goto-char (point-min)) ! (while (or (eq char help-char) ! (memq char '(?? ?\C-v ?\ ?\177 ?\M-v))) (if (memq char '(?\C-v ?\ )) (scroll-up)) (if (memq char '(?\177 ?\M-v)) *** /tmp/,RCSt1a25505 Mon Feb 26 15:20:55 1990 --- lisp/startup.el Mon Feb 26 15:20:47 1990 *************** *** 75,80 **** --- 75,84 ---- (defconst initial-major-mode 'lisp-interaction-mode "Major mode command symbol to use for the initial *scratch* buffer.") + (defconst remind-me-of-emacs-help-key t + "*If this variable is non-nil you will be reminded about the help key at + the beginning of every Emacs session.") + (defun normal-top-level () (if command-line-processed (message "Back to top level.") *************** *** 87,93 **** (and term-setup-hook (funcall term-setup-hook)) (and window-setup-hook ! (funcall window-setup-hook))))) (defun command-line () (let ((args (cdr command-line-args)) --- 91,110 ---- (and term-setup-hook (funcall term-setup-hook)) (and window-setup-hook ! (funcall window-setup-hook)) ! (if remind-me-of-emacs-help-key ! ;; ! ;; go to great lengths to keep the reminder up for a few keystrokes. ! ;; ! (let ((message ! (if (eq (key-binding "\C-\\") 'help-command) ! "Type C-\\ (control-backslash) if you need help." ! (substitute-command-keys ! "Type \\[help-command] if you need help."))) ! char) ! (message message) ! (setq unread-command-char (read-char)) ! (message message)))))) (defun command-line () (let ((args (cdr command-line-args)) *************** *** 170,188 **** Copyright (C) 1988 Free Software Foundation, Inc.\n") ;; If keys have their default meanings, ;; use precomputed string to save lots of time. ! (if (and (eq (key-binding "\C-h") 'help-command) (eq (key-binding "\C-xu") 'advertised-undo) ! (eq (key-binding "\C-h\C-c") 'describe-copying) ! (eq (key-binding "\C-h\C-d") 'describe-distribution) ! (eq (key-binding "\C-h\C-w") 'describe-no-warranty) ! (eq (key-binding "\C-ht") 'help-with-tutorial)) (insert ! "Type C-h for help; C-x u to undo changes. (`C-' means use CTRL key.) ! GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details. ! You may give out copies of Emacs; type C-h C-c to see the conditions. ! Type C-h C-d for information on getting the latest version. ! Type C-h t for a tutorial on using Emacs.") (insert (substitute-command-keys "Type \\[help-command] for help; \\[advertised-undo] to undo changes. (`C-' means use CTRL key.) --- 187,205 ---- Copyright (C) 1988 Free Software Foundation, Inc.\n") ;; If keys have their default meanings, ;; use precomputed string to save lots of time. ! (if (and (eq (key-binding "\C-\\") 'help-command) (eq (key-binding "\C-xu") 'advertised-undo) ! (eq (key-binding "\C-\\\C-c") 'describe-copying) ! (eq (key-binding "\C-\\\C-d") 'describe-distribution) ! (eq (key-binding "\C-\\\C-w") 'describe-no-warranty) ! (eq (key-binding "\C-\\t") 'help-with-tutorial)) (insert ! "Type C-\\ for help; C-x u to undo changes. (`C-' means use CTRL key.) ! GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-\\ C-w for full details. ! You may give out copies of Emacs; type C-\\ C-c to see the conditions. ! Type C-\\ C-d for information on getting the latest version. ! Type C-\\ t for a tutorial on using Emacs.") (insert (substitute-command-keys "Type \\[help-command] for help; \\[advertised-undo] to undo changes. (`C-' means use CTRL key.) *** /tmp/,RCSt1a25803 Mon Feb 26 15:25:22 1990 --- etc/emacs.1 Wed Jan 31 14:50:52 1990 *************** *** 24,38 **** but the facility assumes that you know how to manipulate .I Emacs windows and buffers. ! CTRL-h (backspace ! or CTRL-h) enters the Help facility. Help Tutorial (CTRL-h t) requests an interactive tutorial which can teach beginners the fundamentals of .I Emacs in a few minutes. ! Help Apropos (CTRL-h a) helps you ! find a command given its functionality, Help Character (CTRL-h c) ! describes a given character's effect, and Help Function (CTRL-h f) describes a given Lisp function specified by name. .PP .I Emacs's --- 24,38 ---- but the facility assumes that you know how to manipulate .I Emacs windows and buffers. ! CTRL-\\ (control backslash) ! enters the Help facility. Help Tutorial (CTRL-\\ t) requests an interactive tutorial which can teach beginners the fundamentals of .I Emacs in a few minutes. ! Help Apropos (CTRL-\\ a) helps you ! find a command given its functionality, Help Character (CTRL-\\ c) ! describes a given character's effect, and Help Function (CTRL-\\ f) describes a given Lisp function specified by name. .PP .I Emacs's