unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jari Aalto <jari.aalto@cante.net>
To: 7640@debbugs.gnu.org
Subject: bug#7640: [PATCH] lisp/finder.el: Define used buffer names in variables
Date: Tue, 14 Dec 2010 20:27:48 +0200	[thread overview]
Message-ID: <87mxo843bv.fsf@picasso.cante.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]

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  <jari.aalto@cante.net>

	* 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 


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-finder.el-Define-used-buffer-names-in-variables.patch --]
[-- Type: text/x-diff, Size: 2430 bytes --]

From 71ed9690581ba917c6683ce45855dc1b95f573f4 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
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 <jari.aalto@cante.net>
---
 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))))
 
 \f
-- 
1.7.2.3


             reply	other threads:[~2010-12-14 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 18:27 Jari Aalto [this message]
2012-04-12 19:19 ` bug#7640: [PATCH] lisp/finder.el: Define used buffer names in variables Lars Magne Ingebrigtsen
2012-04-12 20:07   ` bug#7640: [PATCH] lisp/finder.el: Define used buffer names invariables Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxo843bv.fsf@picasso.cante.net \
    --to=jari.aalto@cante.net \
    --cc=7640@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).