From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Hanchrow Newsgroups: gmane.emacs.devel Subject: [PATCH] (woman-always-choose-first-hit): New defcustom. Date: Mon, 9 Mar 2009 17:12:57 -0700 Message-ID: <1236643977-9641-1-git-send-email-eric.hanchrow@gmail.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1236644124 13029 80.91.229.12 (10 Mar 2009 00:15:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Mar 2009 00:15:24 +0000 (UTC) Cc: Eric Hanchrow To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 10 01:16:41 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lgpdc-0004ig-PG for ged-emacs-devel@m.gmane.org; Tue, 10 Mar 2009 01:16:05 +0100 Original-Received: from localhost ([127.0.0.1]:47576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgpcH-0006fa-6F for ged-emacs-devel@m.gmane.org; Mon, 09 Mar 2009 20:14:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lgpah-0005sx-Cb for emacs-devel@gnu.org; Mon, 09 Mar 2009 20:13:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lgpaf-0005rS-Ry for emacs-devel@gnu.org; Mon, 09 Mar 2009 20:13:03 -0400 Original-Received: from [199.232.76.173] (port=50802 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lgpaf-0005rA-Cx for emacs-devel@gnu.org; Mon, 09 Mar 2009 20:13:01 -0400 Original-Received: from smtp61.avvanta.com ([206.124.128.61]:56335 helo=mail.avvanta.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lgpae-0000vY-Nv for emacs-devel@gnu.org; Mon, 09 Mar 2009 20:13:00 -0400 Original-Received: from mail.avvanta.com (localhost.pops.p.blarg.net [127.0.0.1]) by mail.avvanta.com (Postfix) with ESMTP id C1850276D69; Mon, 9 Mar 2009 17:13:04 -0700 (PDT) Original-Received: from localhost.localdomain (q-static-138-125.avvanta.com [206.124.138.125]) by mail.avvanta.com (Postfix) with ESMTP id 79114276CE4; Mon, 9 Mar 2009 17:13:04 -0700 (PDT) X-Mailer: git-send-email 1.6.2.rc1.20.g8c5b X-BlargAV-Status: No viruses detected, BlargAV v1.1 on localhost.pops.p.blarg.net X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109533 Archived-At: From: Eric Hanchrow --- 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