all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* info-look tweak for AS_foo in the presence of autoconf 2.62
@ 2008-07-30 17:14 Thien-Thi Nguyen
  0 siblings, 0 replies; only message in thread
From: Thien-Thi Nguyen @ 2008-07-30 17:14 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-30 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 17:14 info-look tweak for AS_foo in the presence of autoconf 2.62 Thien-Thi Nguyen

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.