unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: emacs-devel@gnu.org
Subject: info-look tweak for AS_foo in the presence of autoconf 2.62
Date: Wed, 30 Jul 2008 19:14:21 +0200	[thread overview]
Message-ID: <87sktre1le.fsf@ambire.localdomain> (raw)

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	other threads:[~2008-07-30 17:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sktre1le.fsf@ambire.localdomain \
    --to=ttn@gnuvola.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).