From: Eshel Yaron Date: Sun, 10 Mar 2024 11:06:57 +0000 (+0100) Subject: Deprecate 'minibuffer-help-form' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6feeb26631cd629be28b7338d1649e711188c37b;p=emacs.git Deprecate 'minibuffer-help-form' --- diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index ba106e5e93b..b8c0b5ac5d6 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi @@ -703,9 +703,6 @@ non-@code{nil} expression while it does input. (The time when you should not do this is when @kbd{C-h} has some other meaning.) Evaluating this expression should result in a string that explains what the input is for and how to enter it properly. - -Entry to the minibuffer binds this variable to the value of -@code{minibuffer-help-form} (@pxref{Definition of minibuffer-help-form}). @end defvar @defvar prefix-help-command diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index c7e445af517..70f2b679399 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2930,12 +2930,6 @@ This is a normal hook that is run whenever a minibuffer is exited. @xref{Hooks}. @end defvar -@defvar minibuffer-help-form -@anchor{Definition of minibuffer-help-form} -The current value of this variable is used to rebind @code{help-form} -locally inside the minibuffer (@pxref{Help Functions}). -@end defvar - @defvar minibuffer-scroll-window @anchor{Definition of minibuffer-scroll-window} If the value of this variable is non-@code{nil}, it should be a window diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index f2631422c62..641016fb622 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -207,13 +207,8 @@ If this contains a %s, that will be replaced by the matching rule." '(require 'finder) ;;'(setq v1 (apply 'vector (mapcar 'car finder-known-keywords))) '(setq v1 (mapcar (lambda (x) (list (symbol-name (car x)))) - finder-known-keywords) - v2 (mapconcat (lambda (x) (format "%12s: %s" (car x) (cdr x))) - finder-known-keywords - "\n")) - ((let ((minibuffer-help-form v2)) - (completing-read "Keyword, C-h: " v1 nil t)) - str ", ") + finder-known-keywords)) + ((completing-read "Keyword, C-h: " v1 nil t) str ", ") & -2 " \;; This program is free software; you can redistribute it and/or modify diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 50453d96252..0348bff2f56 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -979,7 +979,6 @@ the current value of the variable, otherwise `symbol-value' is used. If optional COMMENT argument is non-nil, also prompt for a comment and return it as the third element in the list." (let* ((var (read-variable prompt-var)) - (minibuffer-help-form `(describe-variable ',var)) (val (let ((prop (get var 'variable-interactive)) (type (get var 'custom-type)) diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index 9104feb6219..e776472c541 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -1748,32 +1748,8 @@ values are changed to nil." "Set the Supercite VARIABLE. This function mimics `set-variable', except that the variable to set is determined non-interactively. The value is queried for in the -minibuffer exactly the same way that `set-variable' does it. - -You can see the current value of the variable when the minibuffer is -querying you by typing \\`C-h'. Note that the format is changed -slightly from that used by `set-variable' -- the current value is -printed just after the variable's name instead of at the bottom of the -help window." - (let* ((myhelp - (lambda () - (with-output-to-temp-buffer "*Help*" - (prin1 var) - (if (boundp var) - (let ((print-length 20)) - (princ "\t(Current value: ") - (prin1 (symbol-value var)) - (princ ")"))) - (princ "\n\nDocumentation:\n") - (princ (substring (documentation-property - var - 'variable-documentation) - 1)) - (with-current-buffer standard-output - (help-mode)) - nil))) - (minibuffer-help-form `(funcall #',myhelp))) - (set var (eval-minibuffer (format "Set %s to value: " var))))) +minibuffer exactly the same way that `set-variable' does it." + (set var (eval-minibuffer (format "Set %s to value: " var)))) (defmacro sc-toggle-symbol (rootname) `(defun ,(intern (concat "sc-T-" rootname)) () diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index df2ca6ebd08..f85151840b8 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -790,13 +790,11 @@ See also `mh-reply-show-message-flag', `mh-reply-default-reply-to', and `mh-send'." (interactive (list (mh-get-msg-num t) - (let ((minibuffer-help-form - "from => Sender only\nto => Sender and primary recipients\ncc or all => Sender and all recipients")) - (or mh-reply-default-reply-to - (completing-read "Reply to whom (default from): " - '(("from") ("to") ("cc") ("all")) - nil - t))) + (or mh-reply-default-reply-to + (completing-read "Reply to whom (default from): " + '(("from") ("to") ("cc") ("all")) + nil + t)) current-prefix-arg)) (let* ((folder mh-current-folder) (show-buffer mh-show-buffer) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index df2f63f380b..892a5613c79 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -6122,5 +6122,8 @@ This applies to `completions-auto-update-mode', which see." (defvar completion-regexp-list nil "Unused obsolete variable.") (make-obsolete-variable 'completion-regexp-list nil "30.1") +(defvar minibuffer-help-form nil "Unused obsolete variable.") +(make-obsolete-variable 'minibuffer-help-form 'help-form "30.1") + (provide 'minibuffer) ;;; minibuffer.el ends here diff --git a/lisp/simple.el b/lisp/simple.el index 636c62af3d5..1b715bf7deb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -9860,7 +9860,6 @@ makes it easier to edit it." (read-variable (format-prompt "Set variable" default-var) default-var) (read-variable "Set variable: "))) - (minibuffer-help-form `(describe-variable ',var)) (prop (get var 'variable-interactive)) (obsolete (car (get var 'byte-obsolete-variable))) (prompt (format "Set %s %s to value: " var diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 89cb11b0fe2..20800c67f19 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -290,24 +290,9 @@ It may contain a `%s' which will be replaced by `skeleton-subprompt'. If non-nil second arg INITIAL-INPUT or variable `input' is a string or cons with index to insert before reading. If third arg RECURSIVE is non-nil i.e. we are handling the iterator of a subskeleton, returns empty string if -user didn't modify input. -While reading, the value of `minibuffer-help-form' is variable `help' if that -is non-nil or a default string." +user didn't modify input." (with-suppressed-warnings ((lexical help)) (defvar help)) ;FIXME: Prefix! - (let ((minibuffer-help-form (or (bound-and-true-p help) - (if recursive "\ -As long as you provide input you will insert another subskeleton. - -If you enter the empty string, the loop inserting subskeletons is -left, and the current one is removed as far as it has been entered. - -If you quit, the current subskeleton is removed as far as it has been -entered. No more of the skeleton will be inserted, except maybe for a -syntactically necessary termination." - "\ -You are inserting a skeleton. Standard text gets inserted into the buffer -automatically, and you are prompted to fill in the variable parts."))) - (eolp (eolp))) + (let ((eolp (eolp))) ;; since Emacs doesn't show main window's cursor, do something noticeable (or eolp ;; We used open-line before, but that can do a lot more than we want, diff --git a/src/minibuf.c b/src/minibuf.c index d5cf8bd9f0f..daa3c3ffa94 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -729,11 +729,10 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, minibuf_save_list = Fcons (minibuf_prompt, Fcons (make_fixnum (minibuf_prompt_width), - Fcons (Vhelp_form, - Fcons (Vcurrent_prefix_arg, + Fcons (Vcurrent_prefix_arg, Fcons (Vminibuffer_history_position, Fcons (Vminibuffer_history_variable, - minibuf_save_list)))))); + minibuf_save_list))))); minibuf_save_list = Fcons (Fthis_command_keys_vector (), minibuf_save_list); @@ -751,7 +750,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, minibuf_prompt = Fcopy_sequence (prompt); Vminibuffer_history_position = histpos; Vminibuffer_history_variable = histvar; - Vhelp_form = Vminibuffer_help_form; /* If this minibuffer is reading a file name, that doesn't mean recursive ones are. But we cannot set it to nil, because completion code still need to know the minibuffer is completing a @@ -1144,8 +1142,6 @@ read_minibuf_unwind (void) minibuf_save_list = Fcdr (minibuf_save_list); minibuf_prompt_width = XFIXNAT (Fcar (minibuf_save_list)); minibuf_save_list = Fcdr (minibuf_save_list); - Vhelp_form = Fcar (minibuf_save_list); - minibuf_save_list = Fcdr (minibuf_save_list); Vcurrent_prefix_arg = Fcar (minibuf_save_list); minibuf_save_list = Fcdr (minibuf_save_list); Vminibuffer_history_position = Fcar (minibuf_save_list); @@ -2315,10 +2311,6 @@ If the value is `confirm-after-completion', the user may exit with an doc: /* Non-nil means completing file names. */); Vminibuffer_completing_file_name = Qnil; - DEFVAR_LISP ("minibuffer-help-form", Vminibuffer_help_form, - doc: /* Value that `help-form' takes on inside the minibuffer. */); - Vminibuffer_help_form = Qnil; - DEFVAR_LISP ("minibuffer-history-variable", Vminibuffer_history_variable, doc: /* History list symbol to add minibuffer values to. Each string of minibuffer input, as it appears on exit from the minibuffer,