From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#19900: 24.4; info-look.el quotes from makeinfo @item Date: Thu, 19 Feb 2015 16:40:47 +1100 Message-ID: <873862zcf4.fsf@blah.blah> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1424324551 10304 80.91.229.3 (19 Feb 2015 05:42:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Feb 2015 05:42:31 +0000 (UTC) To: 19900@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 19 06:42:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YOJsN-0003mw-Tu for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Feb 2015 06:42:16 +0100 Original-Received: from localhost ([::1]:54914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOJsM-0005ep-K2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Feb 2015 00:42:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOJsF-0005cs-H4 for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 00:42:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOJsA-0006Jl-AT for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 00:42:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOJsA-0006Jh-7W for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 00:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YOJsA-0003sX-0m for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 00:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Ryde Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Feb 2015 05:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19900 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.142432447314852 (code B ref -1); Thu, 19 Feb 2015 05:42:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Feb 2015 05:41:13 +0000 Original-Received: from localhost ([127.0.0.1]:48282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOJrJ-0003rO-Vn for submit@debbugs.gnu.org; Thu, 19 Feb 2015 00:41:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47927) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOJrH-0003rF-Lt for submit@debbugs.gnu.org; Thu, 19 Feb 2015 00:41:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOJrF-0005rd-Mk for submit@debbugs.gnu.org; Thu, 19 Feb 2015 00:41:07 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOJrF-0005rZ-JV for submit@debbugs.gnu.org; Thu, 19 Feb 2015 00:41:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOJrC-0005Zf-0I for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 00:41:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOJr6-0005qg-Ry for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 00:41:01 -0500 Original-Received: from nm29-vm1.bullet.mail.bf1.yahoo.com ([98.139.213.144]:45850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOJr6-0005qa-EN for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 00:40:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1424324455; bh=yJjZmXvz9JNbaHXrvXATpV7VnQAHLkyK4mJU8apeX48=; h=From:To:Subject:Date:From:Subject; b=duvOfSPXvd5+0aZYuMMkC3pSSvSOF8G/OJiF1KWA8MOcCpaF9PJ5LCskimua12xRYVEik80DvwIytI+hpMQt8b+0RpOrA1U1yLYf0O/gsdGj6VfP3KwrHC4h7vwcEO1pRcwD7ZImV/pGXeNAESLt/xIB/ue86hdKoVq5M1I0NebyfL7rRXAxSyu5o41Z93VGVqhfUDDQx56RJCURMCjtg0Phy8Xt9zINJeyj/BHSxaAi2eOafi0H0bxtBdreM13xRIHkJTs4mXFCc/8CeglKjWWPWEDUkNNItZ60D3mYNyB2dCr6WxKBvB1r4CKImweKQqAY2ckF7e+JCUxNkzp+MQ== Original-Received: from [98.139.214.32] by nm29.bullet.mail.bf1.yahoo.com with NNFMP; 19 Feb 2015 05:40:55 -0000 Original-Received: from [98.139.211.206] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 19 Feb 2015 05:40:55 -0000 Original-Received: from [127.0.0.1] by smtp215.mail.bf1.yahoo.com with NNFMP; 19 Feb 2015 05:40:55 -0000 X-Yahoo-Newman-Id: 555840.79682.bm@smtp215.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: v8I1FKQVM1m4sQgd3TLCE4dIScRvmQA0oXcPACqBMoEKNd8 lphPMyWW3xpScRPGhPbO6OKBtYrs.Fb7U568jeuI4CSQxs4Txsb4wS.AehR6 WAxy_ZhnVgCkgsmFzNvTmWdIs.xVGQThh2Rl0kqOU8lRFzook.4yJ7GSOD0D bapu0r0c.Oki5laZXOkR_ztTggc7h_JMrLNh_88EieB6i2ldDhdhDd9thOR6 GgFpc_HKqQ6L2neJb2AjNtfCC4ZPtorKkic5wxIL6XYokf8Nq33.OxUfhHIg KbeTT63rvuTi6Ebw9xmRAlfOkb1J3O1J7WeUIHLSsK5rbAjX01YD7W6HdPzS ndrp9YETbzARI3zMwWg9i1cph9rwd0hW3O9Ur6KzvSEFWtMNz4dX8Q1fX.oG EB7a0aYqg4vpqtOqzgWakhve36R26Tyo45dU6bj2nmeF4du.QSVFix9iTcQg ee8v499Nod7zG9csgYHlyYVK22iCVb_PpbgAlCVeMeMOoJMc5UyjC.DXCmzo amtKakIehMn.2Vg.5YjBbdnyEh3TbZbPxxU6uvkzSEnXXaQqaok993aYgMmC 4TjNHAr5TAFvsoOJ35ICdGBqrYom4BMMu9vNJpOYkU9ir3soiQ2aCDa1LOu5 N1V1U2s1x5ROWG0Vegf7KJU042iTXjCA2rIc8lWLGeG43r40eIRwkCiA1Uaq p3gyEqh3uC4OMKvYUjpb8oJYoAi17_pB.HNYS_lcgB.d9t47GTcqAEKogRm. e0x9k2Fk3riH0MYHnMkGDvj0lLIqYkjBxmPkSNtGhALqISTVKF4tLXQWSq4R EoQ-- X-Yahoo-SMTP: U8NKAo6swBAxDIMUovTitGGHebxdYQBZ5A-- User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99577 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Recent makeinfo on @item generates forward quote 'foo' rather than backquote `foo' which it used to. info-look.el doesn't match the forward 'foo' in various places which are @table (as opposed to @defun etc). For example with the glibc manual, M-x c-mode DBL_MAX # type this C-h S # and look it up => goes to "Floating Point Parameters" node, but does not go down to the DBL_MAX entry I suggest adding ' to the prefix regexps of relevant doc specs. The latex-mode bit is a further small change to its suffix to match \frac and \sqrt of the latex2e.info. 2015-02-19 Kevin Ryde * info-look.el (c-mode, bison-mode, makefile-mode) (makefile-automake-mode, texinfo-mode, autoconf-mode, awk-mode) (latex-mode, emacs-lisp-mode, sh-mode, cfengine-mode): Match both `foo' and 'foo' for @item and similar. (emacs-lisp-mode): U+2018,U+2019 in emacs.info and elisp.info too. (latex-mode): Match multi-arg \frac{num}{den} or \sqrt[root]{n} in suffix regexp --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=info-look.el.diff --- info-look.el.orig 2015-02-15 09:09:49.433538275 +1100 +++ info-look.el 2015-02-19 16:33:54.393204587 +1100 @@ -704,6 +704,11 @@ ;;; Initialize some common modes. +;; Past makeinfo generated backquote `foo' for @item, where now circa +;; version 5.2 it generates 'foo'. Doc specs with patterns to match items +;; like that (and sometimes within text from @code) have [`'] to work any +;; .info files. + (info-lookup-maybe-add-help :mode 'c-mode :topic 'symbol :regexp "\\(struct \\|union \\|enum \\)?[_a-zA-Z][_a-zA-Z0-9]*" @@ -716,12 +721,12 @@ ;; suffix "\\>" is not used because that sends DBL_MAX to ;; DBL_MAX_EXP ("_" is a non-word char) ("(libc)Variable Index" nil - "^\\([ \t]+-+ \\(Variable\\|Macro\\): .*\\<\\|`\\)" + "^\\([ \t]+-+ \\(Variable\\|Macro\\): .*\\<\\|[`']\\)" "\\( \\|'?$\\)") ("(libc)Type Index" nil "^[ \t]+-+ Data Type: \\<" "\\>") ("(termcap)Var Index" nil - "^[ \t]*`" "'")) + "^[ \t]*[`']" "'")) :parse-rule 'info-lookup-guess-c-symbol) (info-lookup-maybe-add-help @@ -733,7 +738,7 @@ :mode 'bison-mode :regexp "[:;|]\\|%\\([%{}]\\|[_a-z]+\\)\\|YY[_A-Z]+\\|yy[_a-z]+" :doc-spec '(("(bison)Index" nil - "`" "'")) + "[`']" "'")) :parse-rule "[:;|]\\|%\\([%{}]\\|[_a-zA-Z][_a-zA-Z0-9]*\\)" :other-modes '(c-mode)) @@ -741,7 +746,7 @@ :mode 'makefile-mode :regexp "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z][_a-zA-Z0-9-]*" :doc-spec '(("(make)Name Index" nil - "^[ \t]*`" "'")) + "^[ \t]*[`']" "'")) :parse-rule "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z0-9-]+") (info-lookup-maybe-add-help @@ -756,15 +761,15 @@ :doc-spec '( ;; "(automake)Macro Index" is autoconf macros used in ;; configure.ac, not Makefile.am, so don't have that here. - ("(automake)Variable Index" nil "^[ \t]*`" "'") + ("(automake)Variable Index" nil "^[ \t]*[`']" "'") ;; In automake 1.4 macros and variables were a combined node. - ("(automake)Macro and Variable Index" nil "^[ \t]*`" "'") + ("(automake)Macro and Variable Index" nil "^[ \t]*[`']" "'") ;; Directives like "if" are in the "General Index". ;; Prefix "`" since the text for say `+=' isn't always an ;; @item etc and so not always at the start of a line. - ("(automake)General Index" nil "`" "'") + ("(automake)General Index" nil "[`']" "'") ;; In automake 1.3 there was just a single "Index" node. - ("(automake)Index" nil "`" "'")) + ("(automake)Index" nil "[`']" "'")) :other-modes '(makefile-mode)) (info-lookup-maybe-add-help @@ -775,7 +780,7 @@ (lambda (item) (if (string-match "^\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\( .*\\)?$" item) (concat "@" (match-string 1 item)))) - "`" "[' ]"))) + "[`']" "[' ]"))) (info-lookup-maybe-add-help :mode 'm4-mode @@ -821,7 +826,7 @@ ;; macros (eg. AC_PROG_CC). Ensure this is after the autoconf ;; index, so as to prefer the autoconf docs. ("(automake)Macro and Variable Index" nil - "^[ \t]*`" "'")) + "^[ \t]*[`']" "'")) ;; Autoconf symbols are M4 macros. Thus use M4's parser. :parse-rule 'ignore :other-modes '(m4-mode)) @@ -846,7 +851,7 @@ ;; Built-in functions (matches to many entries). ((string-match "^[a-z]+$" item) item)))) - "`" "\\([ \t]*([^)]*)\\)?'"))) + "[`']" "\\([ \t]*([^)]*)\\)?'"))) (info-lookup-maybe-add-help :mode 'perl-mode @@ -885,16 +890,18 @@ ;; From http://home.gna.org/latexrefman "(latex2e)Command Index" "(latex)Command Index") - nil "`" "\\({[^}]*}\\)?'"))) + ;; \frac{NUM}{DEN} etc can have more than one {xx} argument. + ;; \sqrt[ROOT]{num} and others can have square brackets. + nil "[`']" "\\({[^}]*}|\\[[^]]*\\]\\)*'"))) (info-lookup-maybe-add-help :mode 'emacs-lisp-mode :regexp "[^][()`',\" \t\n]+" :doc-spec '(;; Commands with key sequences appear in nodes as `foo' and ;; those without as `M-x foo'. - ("(emacs)Command Index" nil "`\\(M-x[ \t\n]+\\)?" "'") + ("(emacs)Command Index" nil "[`'\u2018]\\(M-x[ \t\n]+\\)?" "['\u2019]") ;; Variables normally appear in nodes as just `foo'. - ("(emacs)Variable Index" nil "`" "'") + ("(emacs)Variable Index" nil "[`'\u2018]" "['\u2019]") ;; Almost all functions, variables, etc appear in nodes as ;; " -- Function: foo" etc. A small number of aliases and ;; symbols appear only as `foo', and will miss out on exact @@ -976,9 +983,9 @@ ;; bash has "." and ":" in its index, but those chars will probably never ;; work in info, so don't bother matching them in the regexp. :regexp "\\([a-zA-Z0-9_-]+\\|[!{}@*#?$]\\|\\[\\[?\\|]]?\\)" - :doc-spec '(("(bash)Builtin Index" nil "^`" "[ .']") - ("(bash)Reserved Word Index" nil "^`" "[ .']") - ("(bash)Variable Index" nil "^`" "[ .']") + :doc-spec '(("(bash)Builtin Index" nil "^[`']" "[ .']") + ("(bash)Reserved Word Index" nil "^[`']" "[ .']") + ("(bash)Variable Index" nil "^[`']" "[ .']") ;; coreutils (version 4.5.10) doesn't have a separate program ;; index, so exclude extraneous stuff (most of it) by demanding @@ -1026,7 +1033,7 @@ item)) ;; This gets functions in evaluated classes. Other ;; possible patterns don't seem to work too well. - "`" "("))) + "[`']" "("))) (info-lookup-maybe-add-help :mode 'Custom-mode --=-=-= Content-Type: text/plain In GNU Emacs 24.4.1 (i586-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2014-12-20 on brahms, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11604000 Configured using: `configure --build i586-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp --build i586-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp --with-x=yes --with-x-toolkit=lucid --with-toolkit-scroll-bars --without-gconf --without-gsettings 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro' --=-=-=--