Mercurial > emacs
comparison lisp/help-macro.el @ 12423:ee433b44920d
(make-help-screen): Handle help-event-list.
Handle backspace like delete.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 29 Jun 1995 02:50:01 +0000 |
parents | 29493ce2d1ca |
children | 83f275dcd93a |
comparison
equal
deleted
inserted
replaced
12422:3999c7e35227 | 12423:ee433b44920d |
---|---|
110 ;; Make the HELP key translate to C-h. | 110 ;; Make the HELP key translate to C-h. |
111 (if (lookup-key function-key-map key) | 111 (if (lookup-key function-key-map key) |
112 (setq key (lookup-key function-key-map key))) | 112 (setq key (lookup-key function-key-map key))) |
113 (setq char (aref key 0))) | 113 (setq char (aref key 0))) |
114 (setq char ??)) | 114 (setq char ??)) |
115 (if (or (eq char ??) (eq char help-char)) | 115 (if (or (eq char ??) (eq char help-char) |
116 (memq char help-event-list)) | |
116 (progn | 117 (progn |
117 (setq config (current-window-configuration)) | 118 (setq config (current-window-configuration)) |
118 (switch-to-buffer-other-window "*Help*") | 119 (switch-to-buffer-other-window "*Help*") |
119 (and (fboundp 'make-frame) | 120 (and (fboundp 'make-frame) |
120 (not (eq (window-frame (selected-window)) | 121 (not (eq (window-frame (selected-window)) |
123 config nil)) | 124 config nil)) |
124 (erase-buffer) | 125 (erase-buffer) |
125 (insert help-screen) | 126 (insert help-screen) |
126 (help-mode) | 127 (help-mode) |
127 (goto-char (point-min)) | 128 (goto-char (point-min)) |
128 (while (or (memq char (cons help-char '(?? ?\C-v ?\ ?\177 delete ?\M-v))) | 129 (while (or (memq char (append help-event-list |
130 (cons help-char '(?? ?\C-v ?\ ?\177 delete backspace ?\M-v)))) | |
129 (eq (car-safe char) 'switch-frame) | 131 (eq (car-safe char) 'switch-frame) |
130 (equal key "\M-v")) | 132 (equal key "\M-v")) |
131 (condition-case nil | 133 (condition-case nil |
132 (progn | 134 (progn |
133 (if (eq (car-safe char) 'switch-frame) | 135 (if (eq (car-safe char) 'switch-frame) |
134 (handle-switch-frame char)) | 136 (handle-switch-frame char)) |
135 (if (memq char '(?\C-v ?\ )) | 137 (if (memq char '(?\C-v ?\ )) |
136 (scroll-up)) | 138 (scroll-up)) |
137 (if (or (memq char '(?\177 ?\M-v delete)) | 139 (if (or (memq char '(?\177 ?\M-v |
140 delete backspace)) | |
138 (equal key "\M-v")) | 141 (equal key "\M-v")) |
139 (scroll-down))) | 142 (scroll-down))) |
140 (error nil)) | 143 (error nil)) |
141 (let ((cursor-in-echo-area t) | 144 (let ((cursor-in-echo-area t) |
142 (overriding-local-map local-map)) | 145 (overriding-local-map local-map)) |