[Top][All Lists]

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

[PATCH] (woman-always-choose-first-hit): New defcustom.

From: Eric Hanchrow
Subject: [PATCH] (woman-always-choose-first-hit): New defcustom.
Date: Mon, 9 Mar 2009 17:12:57 -0700

From: Eric Hanchrow <address@hidden>

 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."
        ((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
        ;; Multiple files for topic, so must select 1.
        ;; Unread the command event (TAB = ?\t = 9) that runs the command

reply via email to

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