]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix display of obsolete variables in *Help*
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 19 Dec 2024 09:40:52 +0000 (10:40 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:15:41 +0000 (16:15 +0100)
* doc/lispref/variables.texi (Variable Aliases):
Mention `substitute-command-keys' in `make-obsolete-variable'.

* lisp/font-lock.el: Revert last change.

* lisp/help-fns.el (help-fns--var-obsolete):
Apply `substitute-command-keys'.

* lisp/emacs-lisp/byte-run.el (make-obsolete-variable):
Adapt docstring.

(cherry picked from commit 1647086d6a3a560877f386b9d153c01270307f68)

doc/lispref/variables.texi
lisp/emacs-lisp/byte-run.el
lisp/font-lock.el
lisp/help-fns.el

index 0e9124920d114cbd3095c65f4d8f33cf8f87aae1..5010fea24a0712385fe0bcb6723b2c7c08448980 100644 (file)
@@ -2647,10 +2647,10 @@ This function makes the byte compiler warn that the variable
 @var{obsolete-name} is obsolete.  If @var{current-name} is a symbol,
 it is the variable's new name; then the warning message says to use
 @var{current-name} instead of @var{obsolete-name}.  If
-@var{current-name} is a string, this is the message and there is no
-replacement variable.  @var{when} should be a string indicating when
-the variable was first made obsolete (usually a version number
-string).
+@var{current-name} is a string, this is the message (after passing
+through @code{substitute-command-keys}) and there is no replacement
+variable.  @var{when} should be a string indicating when the variable
+was first made obsolete (usually a version number string).
 
 The optional argument @var{access-type}, if non-@code{nil}, should
 specify the kind of access that will trigger obsolescence warnings; it
index 53c62952f96f53a3ad77488ce11b2758628e6778..3e9613e8182130ca8cf54bdbf06dc613310d9243 100644 (file)
@@ -571,7 +571,8 @@ See the docstrings of `defalias' and `make-obsolete' for more details."
                                 &optional access-type)
   "Make the byte-compiler warn that OBSOLETE-NAME is obsolete.
 The warning will say that CURRENT-NAME should be used instead.
-If CURRENT-NAME is a string, that is the `use instead' message.
+If CURRENT-NAME is a string, that is the `use instead' message.  If it
+is a string, it is passed through `substitute-command-keys'.
 WHEN should be a string indicating when the variable
 was first made obsolete, for example a date or a release number.
 ACCESS-TYPE if non-nil should specify the kind of access that will trigger
index 21c290c4e3da06f266e1a72e7b9cf941d1f71c25..dd33c2382fcd7c1662825b1cab9dc28ed040bb9c 100644 (file)
@@ -309,86 +309,86 @@ If a number, only buffers greater than this size have fontification messages."
 
 (make-obsolete-variable
  'font-lock-comment-face
- "use the quoted symbol instead: 'font-lock-comment-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-comment-face" "31.1")
 (defvar font-lock-comment-face         'font-lock-comment-face
   "Face name to use for comments.")
 
 (make-obsolete-variable
  'font-lock-comment-delimiter-face
- "use the quoted symbol instead: 'font-lock-comment-delimiter-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-comment-delimiter-face" "31.1")
 (defvar font-lock-comment-delimiter-face 'font-lock-comment-delimiter-face
   "Face name to use for comment delimiters.")
 
 (make-obsolete-variable
  'font-lock-string-face
- "use the quoted symbol instead: 'font-lock-string-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-string-face" "31.1")
 (defvar font-lock-string-face          'font-lock-string-face
   "Face name to use for strings.")
 
 (make-obsolete-variable
  'font-lock-doc-face
- "use the quoted symbol instead: 'font-lock-doc-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-doc-face" "31.1")
 (defvar font-lock-doc-face             'font-lock-doc-face
   "Face name to use for documentation.")
 
 (make-obsolete-variable
  'font-lock-doc-markup-face
- "use the quoted symbol instead: 'font-lock-doc-markup-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-doc-markup-face" "31.1")
 (defvar font-lock-doc-markup-face       'font-lock-doc-markup-face
   "Face name to use for documentation mark-up.")
 
 (make-obsolete-variable
  'font-lock-keyword-face
- "use the quoted symbol instead: 'font-lock-keyword-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-keyword-face" "31.1")
 (defvar font-lock-keyword-face         'font-lock-keyword-face
   "Face name to use for keywords.")
 
 (make-obsolete-variable
  'font-lock-builtin-face
- "use the quoted symbol instead: 'font-lock-builtin-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-builtin-face" "31.1")
 (defvar font-lock-builtin-face         'font-lock-builtin-face
   "Face name to use for builtins.")
 
 (make-obsolete-variable
  'font-lock-function-name-face
- "use the quoted symbol instead: 'font-lock-function-name-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-function-name-face" "31.1")
 (defvar font-lock-function-name-face   'font-lock-function-name-face
   "Face name to use for function names.")
 
 (make-obsolete-variable
  'font-lock-variable-name-face
- "use the quoted symbol instead: 'font-lock-variable-name-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-variable-name-face" "31.1")
 (defvar font-lock-variable-name-face   'font-lock-variable-name-face
   "Face name to use for variable names.")
 
 (make-obsolete-variable
  'font-lock-type-face
- "use the quoted symbol instead: 'font-lock-type-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-type-face" "31.1")
 (defvar font-lock-type-face            'font-lock-type-face
   "Face name to use for type and class names.")
 
 (make-obsolete-variable
  'font-lock-constant-face
- "use the quoted symbol instead: 'font-lock-constant-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-constant-face" "31.1")
 (defvar font-lock-constant-face                'font-lock-constant-face
   "Face name to use for constant and label names.")
 
 (make-obsolete-variable
  'font-lock-warning-face
- "use the quoted symbol instead: 'font-lock-warning-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-warning-face" "31.1")
 (defvar font-lock-warning-face         'font-lock-warning-face
   "Face name to use for things that should stand out.")
 
 (make-obsolete-variable
  'font-lock-negation-char-face
- "use the quoted symbol instead: 'font-lock-negation-char-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-negation-char-face" "31.1")
 (defvar font-lock-negation-char-face   'font-lock-negation-char-face
   "Face name to use for easy to overlook negation.
 This can be an \"!\" or the \"n\" in \"ifndef\".")
 
 (make-obsolete-variable
  'font-lock-preprocessor-face
- "use the quoted symbol instead: 'font-lock-preprocessor-face" "31.1")
+ "use the quoted symbol instead: \\='font-lock-preprocessor-face" "31.1")
 (defvar font-lock-preprocessor-face    'font-lock-preprocessor-face
   "Face name to use for preprocessor directives.")
 
index 1f3527128b3aedb24c8ae7dcd806387b28b12e67..3c24a290859f1ce8436f8df1df30f27568247d14 100644 (file)
@@ -1779,7 +1779,7 @@ variable.\n")))
       (insert "This variable is obsolete")
       (if (nth 2 obsolete)
           (insert (format " since %s" (nth 2 obsolete))))
-      (insert (cond ((stringp use) (concat "; " use))
+      (insert (cond ((stringp use) (substitute-command-keys (concat "; " use)))
                    (use (format-message "; use `%s' instead."
                                          (car obsolete)))
                    (t "."))