Glynn Clements <glynn(a)sensei.co.uk> writes:
Presumably there is some reason why the help-char/help-form stuff
needs to be performed in next-event, but I don't know what it is.
Probably to do handle things like C-x r C-h.
However I find its use in the minibuffer map very ugly. There is no
reason read-from-minibuffer couldn't use a localkeymap with a binding
for C-h.
Like this: (N.B. This could probably be used more generally)
Index: minibuf.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/minibuf.el,v
retrieving revision 1.15
diff -u -u -r1.15 minibuf.el
--- minibuf.el 1998/07/28 06:25:06 1.15
+++ minibuf.el 1998/09/27 00:25:13
@@ -162,6 +162,7 @@
(define-key minibuffer-local-map '[prior] "\M-p")
(define-key minibuffer-local-map "\M-r"
'previous-matching-history-element)
(define-key minibuffer-local-map "\M-s" 'next-matching-history-element)
+(define-key minibuffer-local-map '[(control h)] 'minibuffer-print-help)
(define-key minibuffer-local-must-match-map [next]
'next-complete-history-element)
(define-key minibuffer-local-must-match-map [prior]
@@ -243,6 +244,13 @@
(delete-region (point-min) (point)))
(insert ?~))
+(defun minibuffer-print-help ()
+ (interactive)
+ (let ((string (eval minibuffer-help-form)))
+ (if string
+ (with-displaying-help-buffer
+ (insert string)))))
+
(defvar read-file-name-map
(let ((map (make-sparse-keymap 'read-file-name-map)))
(set-keymap-parents map (list minibuffer-local-completion-map))
@@ -452,7 +460,7 @@
(and minibuffer-smart-completion-tracking-behavior
(current-buffer)))
(current-prefix-arg current-prefix-arg)
- (help-form minibuffer-help-form)
+;; (help-form minibuffer-help-form)
(minibuffer-history-variable (cond ((not _history_)
'minibuffer-history)
((consp _history_)