aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/info-look.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/info-look.el')
-rw-r--r--lisp/info-look.el64
1 files changed, 32 insertions, 32 deletions
diff --git a/lisp/info-look.el b/lisp/info-look.el
index 3f3ea7c2fd4..4bc90c7e5aa 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -328,22 +328,22 @@ If optional argument QUERY is non-nil, query for the help mode."
328 (modes (info-lookup->all-modes topic mode)) 328 (modes (info-lookup->all-modes topic mode))
329 (window (selected-window)) 329 (window (selected-window))
330 found doc-spec node prefix suffix doc-found) 330 found doc-spec node prefix suffix doc-found)
331 (if (or (not info-lookup-other-window-flag) 331 (if (not (eq major-mode 'Info-mode))
332 (eq (current-buffer) (get-buffer "*info*"))) 332 (if (not info-lookup-other-window-flag)
333 (info) 333 (info)
334 (progn 334 (progn
335 (save-window-excursion (info)) 335 (save-window-excursion (info))
336 ;; Determine whether or not the Info buffer is visible in 336 ;; Determine whether or not the Info buffer is visible in
337 ;; another frame on the same display. If it is, simply raise 337 ;; another frame on the same display. If it is, simply raise
338 ;; that frame. Otherwise, display it in another window. 338 ;; that frame. Otherwise, display it in another window.
339 (let* ((window (get-buffer-window "*info*" t)) 339 (let* ((window (get-buffer-window "*info*" t))
340 (info-frame (and window (window-frame window)))) 340 (info-frame (and window (window-frame window))))
341 (if (and info-frame 341 (if (and info-frame
342 (display-multi-frame-p) 342 (display-multi-frame-p)
343 (memq info-frame (frames-on-display-list)) 343 (memq info-frame (frames-on-display-list))
344 (not (eq info-frame (selected-frame)))) 344 (not (eq info-frame (selected-frame))))
345 (select-frame info-frame) 345 (select-frame info-frame)
346 (switch-to-buffer-other-window "*info*"))))) 346 (switch-to-buffer-other-window "*info*"))))))
347 (while (and (not found) modes) 347 (while (and (not found) modes)
348 (setq doc-spec (info-lookup->doc-spec topic (car modes))) 348 (setq doc-spec (info-lookup->doc-spec topic (car modes)))
349 (while (and (not found) doc-spec) 349 (while (and (not found) doc-spec)
@@ -633,11 +633,11 @@ Return nil if there is nothing appropriate in the buffer near point."
633 :mode 'c-mode :topic 'symbol 633 :mode 'c-mode :topic 'symbol
634 :regexp "\\(struct \\|union \\|enum \\)?[_a-zA-Z][_a-zA-Z0-9]*" 634 :regexp "\\(struct \\|union \\|enum \\)?[_a-zA-Z][_a-zA-Z0-9]*"
635 :doc-spec '(("(libc)Function Index" nil 635 :doc-spec '(("(libc)Function Index" nil
636 "^[ \t]+- \\(Function\\|Macro\\): .*\\<" "\\>") 636 "^[ \t]+-+ \\(Function\\|Macro\\): .*\\<" "\\>")
637 ("(libc)Variable Index" nil 637 ("(libc)Variable Index" nil
638 "^[ \t]+- \\(Variable\\|Macro\\): .*\\<" "\\>") 638 "^[ \t]+-+ \\(Variable\\|Macro\\): .*\\<" "\\>")
639 ("(libc)Type Index" nil 639 ("(libc)Type Index" nil
640 "^[ \t]+- Data Type: \\<" "\\>") 640 "^[ \t]+-+ Data Type: \\<" "\\>")
641 ("(termcap)Var Index" nil 641 ("(termcap)Var Index" nil
642 "^[ \t]*`" "'")) 642 "^[ \t]*`" "'"))
643 :parse-rule 'info-lookup-guess-c-symbol) 643 :parse-rule 'info-lookup-guess-c-symbol)
@@ -673,7 +673,7 @@ Return nil if there is nothing appropriate in the buffer near point."
673 (lambda (item) 673 (lambda (item)
674 (if (string-match "^\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\( .*\\)?$" item) 674 (if (string-match "^\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\( .*\\)?$" item)
675 (concat "@" (match-string 1 item)))) 675 (concat "@" (match-string 1 item))))
676 "`" "'"))) 676 "`" "[' ]")))
677 677
678(info-lookup-maybe-add-help 678(info-lookup-maybe-add-help
679 :mode 'm4-mode 679 :mode 'm4-mode
@@ -690,7 +690,7 @@ Return nil if there is nothing appropriate in the buffer near point."
690 ("(autoconf)Autoconf Macro Index" 690 ("(autoconf)Autoconf Macro Index"
691 (lambda (item) 691 (lambda (item)
692 (if (string-match "^A._" item) item (concat "AC_" item))) 692 (if (string-match "^A._" item) item (concat "AC_" item)))
693 "^[ \t]+- \\(Macro\\|Variable\\): .*\\<" "\\>") 693 "^[ \t]+-+ \\(Macro\\|Variable\\): .*\\<" "\\>")
694 ;; M4 Macro Index entries are without "AS_" prefixes, and 694 ;; M4 Macro Index entries are without "AS_" prefixes, and
695 ;; mostly without "m4_" prefixes. "dnl" is an exception, not 695 ;; mostly without "m4_" prefixes. "dnl" is an exception, not
696 ;; wanting any prefix. So AS_ is added back to upper-case 696 ;; wanting any prefix. So AS_ is added back to upper-case
@@ -705,13 +705,13 @@ Return nil if there is nothing appropriate in the buffer near point."
705 (concat "AS_" item)) 705 (concat "AS_" item))
706 (t 706 (t
707 (concat "m4_" item))))) 707 (concat "m4_" item)))))
708 "^[ \t]+- Macro: .*\\<" "\\>") 708 "^[ \t]+-+ Macro: .*\\<" "\\>")
709 ;; Autotest Macro Index entries are without "AT_". 709 ;; Autotest Macro Index entries are without "AT_".
710 ("(autoconf)Autotest Macro Index" "AT_" 710 ("(autoconf)Autotest Macro Index" "AT_"
711 "^[ \t]+- Macro: .*\\<" "\\>") 711 "^[ \t]+-+ Macro: .*\\<" "\\>")
712 ;; This is for older versions (probably pre autoconf 2.5x): 712 ;; This is for older versions (probably pre autoconf 2.5x):
713 ("(autoconf)Macro Index" "AC_" 713 ("(autoconf)Macro Index" "AC_"
714 "^[ \t]+- \\(Macro\\|Variable\\): .*\\<" "\\>") 714 "^[ \t]+-+ \\(Macro\\|Variable\\): .*\\<" "\\>")
715 ;; Automake has index entries for its notes on various autoconf 715 ;; Automake has index entries for its notes on various autoconf
716 ;; macros (eg. AC_PROG_CC). Ensure this is after the autoconf 716 ;; macros (eg. AC_PROG_CC). Ensure this is after the autoconf
717 ;; index, so as to prefer the autoconf docs. 717 ;; index, so as to prefer the autoconf docs.
@@ -788,13 +788,13 @@ Return nil if there is nothing appropriate in the buffer near point."
788 ;; Variables normally appear in nodes as just `foo'. 788 ;; Variables normally appear in nodes as just `foo'.
789 ("(emacs)Variable Index" nil "`" "'") 789 ("(emacs)Variable Index" nil "`" "'")
790 ;; Almost all functions, variables, etc appear in nodes as 790 ;; Almost all functions, variables, etc appear in nodes as
791 ;; " - Function: foo" etc. A small number of aliases and 791 ;; " -- Function: foo" etc. A small number of aliases and
792 ;; symbols appear only as `foo', and will miss out on exact 792 ;; symbols appear only as `foo', and will miss out on exact
793 ;; positions. Allowing `foo' would hit too many false matches 793 ;; positions. Allowing `foo' would hit too many false matches
794 ;; for things that should go to Function: etc, and those latter 794 ;; for things that should go to Function: etc, and those latter
795 ;; are much more important. Perhaps this could change if some 795 ;; are much more important. Perhaps this could change if some
796 ;; sort of fallback match scheme existed. 796 ;; sort of fallback match scheme existed.
797 ("(elisp)Index" nil "^ - .*: " "\\( \\|$\\)"))) 797 ("(elisp)Index" nil "^ -+ .*: " "\\( \\|$\\)")))
798 798
799(info-lookup-maybe-add-help 799(info-lookup-maybe-add-help
800 :mode 'lisp-interaction-mode 800 :mode 'lisp-interaction-mode
@@ -814,14 +814,14 @@ Return nil if there is nothing appropriate in the buffer near point."
814 :ignore-case t 814 :ignore-case t
815 ;; Aubrey Jaffer's rendition from <URL:ftp://ftp-swiss.ai.mit.edu/pub/scm> 815 ;; Aubrey Jaffer's rendition from <URL:ftp://ftp-swiss.ai.mit.edu/pub/scm>
816 :doc-spec '(("(r5rs)Index" nil 816 :doc-spec '(("(r5rs)Index" nil
817 "^[ \t]+- [^:]+:[ \t]*" "\\b"))) 817 "^[ \t]+-+ [^:]+:[ \t]*" "\\b")))
818 818
819(info-lookup-maybe-add-help 819(info-lookup-maybe-add-help
820 :mode 'octave-mode 820 :mode 'octave-mode
821 :regexp "[_a-zA-Z0-9]+" 821 :regexp "[_a-zA-Z0-9]+"
822 :doc-spec '(("(octave)Function Index" nil 822 :doc-spec '(("(octave)Function Index" nil
823 "^ - [^:]+:[ ]+\\(\\[[^=]*=[ ]+\\)?" nil) 823 "^ -+ [^:]+:[ ]+\\(\\[[^=]*=[ ]+\\)?" nil)
824 ("(octave)Variable Index" nil "^ - [^:]+:[ ]+" nil) 824 ("(octave)Variable Index" nil "^ -+ [^:]+:[ ]+" nil)
825 ;; Catch lines of the form "xyz statement" 825 ;; Catch lines of the form "xyz statement"
826 ("(octave)Concept Index" 826 ("(octave)Concept Index"
827 (lambda (item) 827 (lambda (item)
@@ -829,15 +829,15 @@ Return nil if there is nothing appropriate in the buffer near point."
829 ((string-match "^\\([A-Z]+\\) statement\\b" item) 829 ((string-match "^\\([A-Z]+\\) statement\\b" item)
830 (match-string 1 item)) 830 (match-string 1 item))
831 (t nil))) 831 (t nil)))
832 nil; "^ - [^:]+:[ ]+" don't think this prefix is useful here. 832 nil; "^ -+ [^:]+:[ ]+" don't think this prefix is useful here.
833 nil))) 833 nil)))
834 834
835(info-lookup-maybe-add-help 835(info-lookup-maybe-add-help
836 :mode 'maxima-mode 836 :mode 'maxima-mode
837 :ignore-case t 837 :ignore-case t
838 :regexp "[a-zA-Z_%]+" 838 :regexp "[a-zA-Z_%]+"
839 :doc-spec '( ("(maxima)Function and Variable Index" nil 839 :doc-spec '( ("(maxima)Function and Variable Index" nil
840 "^ - [^:]+:[ ]+\\(\\[[^=]*=[ ]+\\)?" nil))) 840 "^ -+ [^:]+:[ ]+\\(\\[[^=]*=[ ]+\\)?" nil)))
841 841
842(info-lookup-maybe-add-help 842(info-lookup-maybe-add-help
843 :mode 'inferior-maxima-mode 843 :mode 'inferior-maxima-mode