emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] scratch/rfc-mode f766c141ac 22/52: introduce a custom variable


From: Stefan Monnier
Subject: [nongnu] scratch/rfc-mode f766c141ac 22/52: introduce a custom variable to use original buffer names
Date: Wed, 12 Oct 2022 16:29:19 -0400 (EDT)

branch: scratch/rfc-mode
commit f766c141ac1101bff9c74ea961b8e5347358ff66
Author: Nicolas Martyanoff <khaelin@gmail.com>
Commit: Nicolas Martyanoff <khaelin@gmail.com>

    introduce a custom variable to use original buffer names
    
    Based on a suggestion from Stefan Monnier.
---
 rfc-mode.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/rfc-mode.el b/rfc-mode.el
index 37e00c2166..b9fef024cd 100644
--- a/rfc-mode.el
+++ b/rfc-mode.el
@@ -73,6 +73,10 @@
 Assume RFC documents are named as e.g. rfc21.txt, rfc-index.txt."
   :type 'string)
 
+(defcustom rfc-mode-use-original-buffer-names nil
+  "Whether RFC document buffers should keep their original name or not."
+  :type 'boolean)
+
 (defcustom rfc-mode-browser-entry-title-width 60
   "The width of the column containing RFC titles in the browser."
   :type 'integer)
@@ -329,7 +333,8 @@ The buffer is created if it does not exist."
          (document-path (rfc-mode--document-path number)))
     (rfc-mode--fetch-document number document-path)
     (find-file document-path)
-    (rename-buffer buffer-name)
+    (unless rfc-mode-use-original-buffer-names
+      (rename-buffer buffer-name))
     (rfc-mode)
     (current-buffer)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]