Subject: [PATCH] lisp/finder.el: Define used buffer names in variables

From: Jari Aalto <[email-masked]>
Date: Tue, 14 Dec 2010 20:27:48 +0200

Package: emacs
Version: 23.2+1-5.1
Severity: wishlist

Instead of using hardcoded buffer names, define and use variables
`finder-keyword-buffer-name' abd `finder-commentary-buffer-name'.

This patch is against Git:

        1595eb5 2010-12-14  Merge branch 'master' of git://git.sv.gnu.org/emacs

2010-12-14  Jari Aalto  <[email-masked]>

	* finder.el (finder-keyword-buffer-name): New variable.
	(finder-commentary-buffer-name): New variable.
	(finder-list-keywords): Use `finder-keyword-buffer-name'.
	(finder-commentary): Use `finder-commentary-buffer-name'.

-- System Information
Debian Release: squeeze/sid
  APT Prefers testing
  APT policy: (990, testing) (500, unstable) (1, experimental)
Architecture: amd64
Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Fri Sep 17 21:50:19 UTC 2010 x86_64 GNU/Linux
Locale: LANG=en_DK.UTF-8

-- Versions of packages `emacs depends on'.
Depends:
emacs23         23.2+1-5.1      GNU Emacs is the extensible self-documenting 
emacs23-lucid   23.2+1-5.1      GNU Emacs is the extensible self-documenting 
emacs23-nox     23.2+1-5.1      GNU Emacs is the extensible self-documenting 

>From 71ed9690581ba917c6683ce45855dc1b95f573f4 Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email-masked]>
Date: Tue, 14 Dec 2010 20:24:06 +0200
Subject: [PATCH] finder.el: Define used buffer names in variables.
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Instead of using hardcoded buffer names, define and use variables
`finder-keyword-buffer-name' abd `finder-commentary-buffer-name'.

Signed-off-by: Jari Aalto <[email-masked]>
---
 lisp/finder.el |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/lisp/finder.el b/lisp/finder.el
index 655ad53..9bfbdeb 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -35,6 +35,12 @@
 (require 'find-func) ;for find-library(-suffixes)
 (require 'finder-inf nil t)
 
+(defconst finder-keyword-buffer-name "*Finder*"
+  "Name of the byffer displayed by `finder-list-keywords'.")
+
+(defconst finder-commentary-buffer-name "*Finder-package*"
+  "Name of the byffer displayed by `finder-commentary'.)
+
 ;; These are supposed to correspond to top-level customization groups,
 ;; says rms.
 (defvar finder-known-keywords
@@ -293,9 +299,9 @@ not `finder-known-keywords'."
 (defun finder-list-keywords ()
   "Display descriptions of the keywords in the Finder buffer."
   (interactive)
-  (if (get-buffer "*Finder*")
-      (pop-to-buffer "*Finder*")
-    (pop-to-buffer (get-buffer-create "*Finder*"))
+  (if (get-buffer finder-keyword-buffer-name)
+      (pop-to-buffer finder-keyword-buffer-name)
+    (pop-to-buffer (get-buffer-create finder-keyword-buffer-name))
     (finder-mode)
     (let ((inhibit-read-only t))
       (erase-buffer)
@@ -342,7 +348,7 @@ FILE should be in a form suitable for passing to `locate-library'."
     (or str (error "Can't find any Commentary section"))
     ;; This used to use *Finder* but that would clobber the
     ;; directory of categories.
-    (pop-to-buffer "*Finder-package*")
+    (pop-to-buffer finder-commentary-buffer-name)
     (setq buffer-read-only nil
           buffer-undo-list t)
     (erase-buffer)
@@ -422,7 +428,7 @@ finder directory, \\[finder-exit] = quit, \\[finder-summary] = help")))
 Delete the window and kill all Finder-related buffers."
   (interactive)
   (ignore-errors (delete-window))
-  (let ((buf "*Finder*"))
+  (let ((buf finder-keyword-buffer-name))
     (and (get-buffer buf) (kill-buffer buf))))
 
 
-- 
1.7.2.3