From: Eric Hanchrow <eric.hanchrow@gmail.com>
To: emacs-devel@gnu.org
Cc: Eric Hanchrow <erich@cozi.com>
Subject: [PATCH] (woman-always-choose-first-hit): New defcustom.
Date: Mon, 9 Mar 2009 17:12:57 -0700 [thread overview]
Message-ID: <1236643977-9641-1-git-send-email-eric.hanchrow@gmail.com> (raw)
From: Eric Hanchrow <erich@cozi.com>
---
lisp/woman.el | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/lisp/woman.el b/lisp/woman.el
index b7b856c..a459f7c 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -654,6 +654,16 @@ of `woman-expand-locale' on `woman-locale' added, where they exist."
;; Non-locale-specific has lowest precedence.
(add-to-list 'lst elem)))))
+(defcustom woman-always-choose-first-hit nil
+ "If t, and we find more than one file for the given topic,
+ simply return the first topic, without prompting. This is
+convenient if you have two sets of man pages for one program, and
+always want to look at just one of them."
+ :type 'boolean
+ :version "23.1" ; added woman-manpath-add-locales
+ :group 'woman-interface
+ :link '(function-link woman-file-name))
+
(defcustom woman-manpath
;; Locales could also be added in woman-expand-directory-path.
(or (woman-manpath-add-locales
@@ -1341,6 +1351,7 @@ cache to be re-read."
(cond
((null files) nil) ; no file found for topic.
((null (cdr files)) (car (car files))) ; only 1 file for topic.
+ (woman-always-choose-first-hit (car (car files))) ; user asked to never be prompted
(t
;; Multiple files for topic, so must select 1.
;; Unread the command event (TAB = ?\t = 9) that runs the command
--
1.6.2.rc1.20.g8c5b
next reply other threads:[~2009-03-10 0:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-10 0:12 Eric Hanchrow [this message]
2009-03-10 18:20 ` [PATCH] (woman-always-choose-first-hit): New defcustom Richard M Stallman
2009-03-11 1:32 ` Stefan Monnier
2009-03-11 16:57 ` Richard M Stallman
2009-03-11 17:03 ` Drew Adams
2009-03-11 23:08 ` xahlee
2009-03-12 4:13 ` Eli Zaretskii
2009-03-14 21:21 ` xahlee
2009-03-14 22:19 ` Eli Zaretskii
2009-03-15 14:08 ` tomas
2009-03-16 9:42 ` Richard M Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1236643977-9641-1-git-send-email-eric.hanchrow@gmail.com \
--to=eric.hanchrow@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=erich@cozi.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.