From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: info-look tweak for AS_foo in the presence of autoconf 2.62 Date: Wed, 30 Jul 2008 19:14:21 +0200 Message-ID: <87sktre1le.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1217438283 618 80.91.229.12 (30 Jul 2008 17:18:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jul 2008 17:18:03 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 30 19:18:53 2008 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 1KOFK6-0002Gx-Kd for ged-emacs-devel@m.gmane.org; Wed, 30 Jul 2008 19:18:50 +0200 Original-Received: from localhost ([127.0.0.1]:58644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOFJC-0004ub-80 for ged-emacs-devel@m.gmane.org; Wed, 30 Jul 2008 13:17:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOFIm-0004mL-8F for emacs-devel@gnu.org; Wed, 30 Jul 2008 13:17:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOFIg-0004jk-Uw for emacs-devel@gnu.org; Wed, 30 Jul 2008 13:17:27 -0400 Original-Received: from [199.232.76.173] (port=48441 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOFIg-0004jY-Ii for emacs-devel@gnu.org; Wed, 30 Jul 2008 13:17:22 -0400 Original-Received: from [151.61.143.114] (port=32829 helo=ambire.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KOFIg-0001to-4D for emacs-devel@gnu.org; Wed, 30 Jul 2008 13:17:22 -0400 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1KOFFl-0000br-A8 for emacs-devel@gnu.org; Wed, 30 Jul 2008 19:14:21 +0200 X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:101764 Archived-At: Apparently, Autoconf 2.62 includes AS_HELP_STRING (and other AS_* macros) in info node "(autoconf) M4 Macro Index", so the unqualified (concat "AS_" item) prefixing in the (info-lookup-maybe-add-help :mode 'autoconf-mode ...) form causes `C-h S' to fail to find it. Below is a patch that suppresses AS_ prefixing where such would be redundant. I suppose a failure case would be if Autoconf ever sported a legitimate AS_AS_* macro, but that's unlikely (i hope). Here's a change log entry body: * info-look.el (autoconf-mode :doc-spec): For "(autoconf)M4 Macro Index", if the item already begins with "AS_", don't prefix that string again. I've tested this lightly; seems fine. OK to commit? thi ____________________________________________________________________ *** info-look.el.~1.64.~ 2008-06-24 09:17:55.000000000 +0200 --- info-look.el 2008-07-30 19:00:52.000000000 +0200 *************** *** 755,766 **** ;; M4 Macro Index entries are without "AS_" prefixes, and ;; mostly without "m4_" prefixes. "dnl" is an exception, not ;; wanting any prefix. So AS_ is added back to upper-case ! ;; names, m4_ to others which don't already an m4_. ("(autoconf)M4 Macro Index" (lambda (item) (let ((case-fold-search nil)) (cond ((or (string-equal item "dnl") ! (string-match "^m4_" item)) item) ((string-match "^[A-Z0-9_]+$" item) (concat "AS_" item)) --- 755,769 ---- ;; M4 Macro Index entries are without "AS_" prefixes, and ;; mostly without "m4_" prefixes. "dnl" is an exception, not ;; wanting any prefix. So AS_ is added back to upper-case ! ;; names (if needed), m4_ to others which don't already an m4_. ("(autoconf)M4 Macro Index" (lambda (item) (let ((case-fold-search nil)) (cond ((or (string-equal item "dnl") ! (string-match "^m4_" item) ! ;; Autoconf 2.62 index includes some macros ! ;; (e.g., AS_HELP_STRING), so avoid prefixing. ! (string-match "^AS_" item)) item) ((string-match "^[A-Z0-9_]+$" item) (concat "AS_" item))