Subject: [PATCH] ; Resolve a FIXME in rst.el

From: Jörg Bornemann <[email-masked]>
Date: Mon, 12 Feb 2024 22:10:26 +0100

Tags: patch

This patch resolves a trivial FIXME in rst.el.

In GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38,
 cairo version 1.16.0) of 2024-01-18 built on barf
Repository revision: ef01b634d219bcceda17dcd61024c7a12173b88c
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12201009
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --prefix /usr/local --with-x-toolkit=gtk3 --with-xwidgets
 --with-imagemagick --with-json --with-tree-sitter --with-small-ja-dic
 --with-native-compilation'

>From d4cc0fe4ddfe016e76516370d742a67c29b66690 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Bornemann?= <[email-masked]>
Date: Mon, 12 Feb 2024 21:56:42 +0100
Subject: [PATCH] ; Resolve a FIXME in rst.el

* lisp/textmodes/rst.el (rst-define-key): Use :documentation for the
dynamically created docstrings of deprecated bindings.
---
 lisp/textmodes/rst.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 2cd78943883..5fbff4ba888 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -1147,14 +1147,14 @@ rst-define-key
       (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)))))
 
-- 
2.39.2