From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#19900: 24.4; info-look.el quotes from makeinfo @item Date: Fri, 13 Mar 2015 11:17:08 -0700 Organization: UCLA Computer Science Department Message-ID: <550329A4.2020009@cs.ucla.edu> References: <873862zcf4.fsf@blah.blah> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060304080505010009080204" X-Trace: ger.gmane.org 1426272201 8432 80.91.229.3 (13 Mar 2015 18:43:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Mar 2015 18:43:21 +0000 (UTC) Cc: 19900-done@debbugs.gnu.org, Kevin Ryde To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 13 19:43:07 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 1YWUY3-0001MX-0F for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Mar 2015 19:43:03 +0100 Original-Received: from localhost ([::1]:38107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWUY2-0005RN-Bq for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Mar 2015 14:43:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWUOK-0003ml-Mu for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 14:33:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWU9q-0001zy-MP for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 14:18:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWU9q-0001zt-IO for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 14:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YWU9q-0007KV-Ca for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 14:18:02 -0400 In-Reply-To: <873862zcf4.fsf@blah.blah> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Mar 2015 18:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 19900 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 19900@debbugs.gnu.org, eggert@cs.ucla.edu, user42_kevin@yahoo.com.au Original-Received: via spool by 19900-done@debbugs.gnu.org id=D19900.142627063928103 (code D ref 19900); Fri, 13 Mar 2015 18:18:01 +0000 Original-Received: (at 19900-done) by debbugs.gnu.org; 13 Mar 2015 18:17:19 +0000 Original-Received: from localhost ([127.0.0.1]:45426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YWU98-0007JB-IT for submit@debbugs.gnu.org; Fri, 13 Mar 2015 14:17:19 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:58656) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YWU96-0007Iw-87 for 19900-done@debbugs.gnu.org; Fri, 13 Mar 2015 14:17:17 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 309A4A60051; Fri, 13 Mar 2015 11:17:10 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 74jZZP2T9JLN; Fri, 13 Mar 2015 11:17:08 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 5676539E8016; Fri, 13 Mar 2015 11:17:08 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 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:100454 Archived-At: This is a multi-part message in MIME format. --------------060304080505010009080204 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > Why do you confine U+2018 and U+2019 to Emacs manuals? AFAIK, they > will appear in any manual that has its @documentencoding set to UTF-8. > So I think you can see that in any manual any time. Yes, that sounds right. I installed Kevin's patch with that change; the resulting patch is attached. (This patch uses the characters themselves rather than \uXXXX escapes, for readability.) Thanks for reporting the problem, Kevin. Marking this as done. --------------060304080505010009080204 Content-Type: text/x-patch; name="info-look.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="info-look.patch" diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8ddf9ed..d393190 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2015-03-13 Kevin Ryde + + info-look fixes for Texinfo 5 + * 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 + `foo' and 'foo' and ‘foo’ for @item and similar. + (latex-mode): Match multi-arg \frac{num}{den} or \sqrt[root]{n} in + suffix regexp. + 2015-03-12 Juri Linkov * simple.el (next-line-or-history-element) diff --git a/lisp/info-look.el b/lisp/info-look.el index 1baea46..9cf185e 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -35,6 +35,11 @@ ;; (or CTAN mirrors) ;; Perl: (or CPAN mirrors) +;; Traditionally, makeinfo quoted `like this', but version 5 and later +;; quotes 'like this' or ‘like this’. Doc specs with patterns +;; therefore match open and close quotes with ['`‘] and ['’], +;; respectively. + ;;; Code: (require 'info) @@ -716,12 +721,12 @@ Return nil if there is nothing appropriate in the buffer near point." ;; 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 @@ Return nil if there is nothing appropriate in the buffer near point." :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 @@ Return nil if there is nothing appropriate in the buffer near point." :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,16 @@ Return nil if there is nothing appropriate in the buffer near point." :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 +781,7 @@ Return nil if there is nothing appropriate in the buffer near point." (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 +827,7 @@ Return nil if there is nothing appropriate in the buffer near point." ;; 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 +852,7 @@ Return nil if there is nothing appropriate in the buffer near point." ;; 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 +891,19 @@ Return nil if there is nothing appropriate in the buffer near point." ;; 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 "['`‘]\\(M-x[ \t\n]+\\)?" "['’]") ;; Variables normally appear in nodes as just `foo'. - ("(emacs)Variable Index" nil "`" "'") + ("(emacs)Variable Index" nil "['`‘]" "['’]") ;; 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 +985,9 @@ Return nil if there is nothing appropriate in the buffer near point." ;; 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 +1035,7 @@ Return nil if there is nothing appropriate in the buffer near point." 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 --------------060304080505010009080204--