emacs-devel
[Top][All Lists]
Advanced

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

info-look tweak for AS_foo in the presence of autoconf 2.62


From: Thien-Thi Nguyen
Subject: info-look tweak for AS_foo in the presence of autoconf 2.62
Date: Wed, 30 Jul 2008 19:14:21 +0200

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))




reply via email to

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