In addition to the problems discussed before on xemacs-beta this also
fixes the problem that if you C-x o out of a set-variable prompt all
the help is screwed.
Luckily a quick grep indicates that help-form is used almost nowhere
in the packages or the base lisp.
1998-09-26 Jan Vroonhof <vroonhof(a)math.ethz.ch>
* minibuf.el (read-from-minibuffer): No longer bind help-form but
make a binding in the local keymap until help-char handling is
inproved.
* help.el (help-keymap-with-help-key): Provide keymap with help
binding.
(help-print-help-form): New helper function.
Index: help.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/help.el,v
retrieving revision 1.26
diff -u -u -r1.26 help.el
--- help.el 1998/07/10 02:49:00 1.26
+++ help.el 1998/09/27 01:46:01
@@ -1416,4 +1416,25 @@
(if cmd (princ " ")))))
(terpri))))))
+;; Stop gap for 21.0 untill we do help-char etc properly.
+(defun help-keymap-with-help-key (keymap form)
+ "Return a copy of KEYMAP with an help-key binding according to help-char
+ invoking FORM like help-form. An existing binding is not overridden.
+ If FORM is nil then no binding is made."
+ (let ((map (copy-keymap keymap))
+ (key (if (characterp help-char)
+ (vector (character-to-event help-char))
+ help-char)))
+ (when (and form key (not (lookup-key map key)))
+ (define-key map key
+ `(lambda () (interactive) (help-print-help-form ,form))))
+ map))
+
+(defun help-print-help-form (form)
+ (let ((string (eval form)))
+ (if (stringp string)
+ (with-displaying-help-buffer
+ (insert string)))))
+
+
;;; help.el ends here
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 01:47:30
@@ -243,6 +243,7 @@
(delete-region (point-min) (point)))
(insert ?~))
+
(defvar read-file-name-map
(let ((map (make-sparse-keymap 'read-file-name-map)))
(set-keymap-parents map (list minibuffer-local-completion-map))
@@ -447,12 +448,14 @@
(insert initial-contents)
(setq current-minibuffer-contents initial-contents
current-minibuffer-point (point))))
- (use-local-map (or keymap minibuffer-local-map))
+ (use-local-map (help-keymap-with-help-key
+ (or keymap minibuffer-local-map)
+ minibuffer-help-form))
(let ((mouse-grabbed-buffer
(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_)
Show replies by date