]> git.eshelyaron.com Git - emacs.git/commitdiff
; Resolve a FIXME in rst.el
authorJörg Bornemann <foss@jbornemann.de>
Mon, 12 Feb 2024 20:56:42 +0000 (21:56 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 13 Feb 2024 13:11:41 +0000 (14:11 +0100)
* lisp/textmodes/rst.el (rst-define-key): Use :documentation for the
dynamically created docstrings of deprecated bindings.  (Bug#69087)

Copyright-paperwork-exempt: yes
(cherry picked from commit 6ef8d29f221e010705184092600ac124bd0a14fd)

lisp/textmodes/rst.el

index 2cd78943883010fc60bed4d4337b1f8d5aebb7b2..5fbff4ba88831232bbd26789c737882a5e991021 100644 (file)
@@ -1147,14 +1147,14 @@ as well but give an additional message."
       (unless (fboundp forwarder-function)
         (defalias forwarder-function
           (lambda ()
+            (:documentation
+             (format "Deprecated binding for %s, use \\[%s] instead."
+                     def def))
             (interactive)
             (call-interactively def)
             (message "[Deprecated use of key %s; use key %s instead]"
                      (key-description (this-command-keys))
-                     (key-description key)))
-          ;; FIXME: In Emacs-25 we could use (:documentation ...) instead.
-          (format "Deprecated binding for %s, use \\[%s] instead."
-                  def def)))
+                     (key-description key)))))
       (dolist (dep-key deprecated)
         (define-key keymap dep-key forwarder-function)))))