emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/info.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/info.el
Date: Tue, 03 Jun 2003 15:54:42 -0400

Index: emacs/lisp/info.el
diff -c emacs/lisp/info.el:1.346 emacs/lisp/info.el:1.347
*** emacs/lisp/info.el:1.346    Wed May 28 18:53:08 2003
--- emacs/lisp/info.el  Tue Jun  3 15:54:42 2003
***************
*** 107,113 ****
    "List of directories to search for Info documentation files.
  If nil, meaning not yet initialized, Info uses the environment
  variable INFOPATH to initialize it, or `Info-default-directory-list'
! if there is no INFOPATH variable in the environment.
  
  When `Info-directory-list' is initialized from the value of
  `Info-default-directory-list', and Emacs is installed in one of the
--- 107,114 ----
    "List of directories to search for Info documentation files.
  If nil, meaning not yet initialized, Info uses the environment
  variable INFOPATH to initialize it, or `Info-default-directory-list'
! if there is no INFOPATH variable in the environment, or the
! concatenation of the two if INFOPATH ends with a colon.
  
  When `Info-directory-list' is initialized from the value of
  `Info-default-directory-list', and Emacs is installed in one of the
***************
*** 161,167 ****
                 (other :tag "Replace only tag" tag))
    :group 'info)
  
! (defcustom Info-mode-hook '(turn-on-font-lock)
    "Hooks run when `info-mode' is called."
    :type 'hook
    :group 'info)
--- 162,171 ----
                 (other :tag "Replace only tag" tag))
    :group 'info)
  
! (defcustom Info-mode-hook
!   ;; Try to obey obsolete Info-fontify settings.
!   (unless (and (boundp 'Info-fontify) (null Info-fontify))
!     '(turn-on-font-lock))
    "Hooks run when `info-mode' is called."
    :type 'hook
    :group 'info)
***************
*** 595,602 ****
  FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the position
  where the match was found, and MODE is `major-mode' of the buffer in
  which the match was found."
!   (let ((case-fold-search case-fold)
!       found-mode guesspos found-anchor)
      (save-excursion
        (set-buffer (marker-buffer marker))
        (goto-char marker)
--- 599,605 ----
  FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the position
  where the match was found, and MODE is `major-mode' of the buffer in
  which the match was found."
!   (let ((case-fold-search case-fold))
      (save-excursion
        (set-buffer (marker-buffer marker))
        (goto-char marker)
***************
*** 733,740 ****
                                (if (stringp nodename)
                                    (regexp-quote nodename)
                                  "")
!                               "\\) *[,\t\n\177]"))
!               (nodepos nil))
  
            (catch 'foo
  
--- 736,742 ----
                                (if (stringp nodename)
                                    (regexp-quote nodename)
                                  "")
!                               "\\) *[,\t\n\177]")))
  
            (catch 'foo
  
***************
*** 1107,1114 ****
    "Display images in current node."
    (save-excursion
      (let ((inhibit-read-only t)
!         (case-fold-search t)
!         paragraph-markers)
        (goto-char (point-min))
        (while (re-search-forward
              "\\(\0\b[[]image\\(\\(?:[^\b]\\|[^\0]+\b\\)*\\)\0\b[]]\\)"
--- 1109,1115 ----
    "Display images in current node."
    (save-excursion
      (let ((inhibit-read-only t)
!         (case-fold-search t))
        (goto-char (point-min))
        (while (re-search-forward
              "\\(\0\b[[]image\\(\\(?:[^\b]\\|[^\0]+\b\\)*\\)\0\b[]]\\)"
***************
*** 1128,1137 ****
               start (point) `(display ,image rear-nonsticky (display)))))))
      (set-buffer-modified-p nil)))
  
- (defvar Info-header-line nil
-   "If the info node header is hidden, the text of the header.")
- (put 'Info-header-line 'risky-local-variable t)
- 
  (defun Info-select-node ()
  "Select the info node that point is in.
  Bind this in case the user sets it to nil."
--- 1129,1134 ----
***************
*** 1167,1173 ****
                            (point-max)))
        (if Info-enable-active-nodes (eval active-expression))
        (Info-fontify-node)
-       (setq Info-header-line (get-text-property (point-min) 'header-line))
        (Info-display-images-node)
        (run-hooks 'Info-selection-hook)))))
  
--- 1164,1169 ----
***************
*** 1321,1327 ****
    (when (equal regexp "")
      (setq regexp (car Info-search-history)))
    (when regexp
!     (let ((found ()) current
          (onode Info-current-node)
          (ofile Info-current-file)
          (opoint (point))
--- 1317,1323 ----
    (when (equal regexp "")
      (setq regexp (car Info-search-history)))
    (when regexp
!     (let ((found ())
          (onode Info-current-node)
          (ofile Info-current-file)
          (opoint (point))
***************
*** 1529,1535 ****
    (unless footnotename
      (error "No reference was specified"))
  
!   (let (target beg i (str (concat "\\*note " (regexp-quote footnotename)))
               (case-fold-search t))
      (while (setq i (string-match " " str i))
        (setq str (concat (substring str 0 i) "[ \t\n]+" (substring str (1+ 
i))))
--- 1525,1531 ----
    (unless footnotename
      (error "No reference was specified"))
  
!   (let (target i (str (concat "\\*note " (regexp-quote footnotename)))
               (case-fold-search t))
      (while (setq i (string-match " " str i))
        (setq str (concat (substring str 0 i) "[ \t\n]+" (substring str (1+ 
i))))
***************
*** 1550,1556 ****
  (defun Info-extract-menu-node-name (&optional errmessage multi-line)
    (skip-chars-forward " \t\n")
    (let ((beg (point))
!       str i)
      (while (not (looking-at ":*[,.;() \t\n]"))
        (skip-chars-forward "^:")
        (forward-char 1))
--- 1546,1552 ----
  (defun Info-extract-menu-node-name (&optional errmessage multi-line)
    (skip-chars-forward " \t\n")
    (let ((beg (point))
!       str)
      (while (not (looking-at ":*[,.;() \t\n]"))
        (skip-chars-forward "^:")
        (forward-char 1))
***************
*** 1579,1586 ****
    ;; also look for menu items in subsequent nodes as long as those
    ;; nodes' names match `Info-complete-next-re'.  This feature is currently
    ;; only used for completion in Info-index.
!   (save-excursion
!     (set-buffer Info-complete-menu-buffer)
      (let ((completion-ignore-case t)
          (case-fold-search t)
          (orignode Info-current-node)
--- 1575,1581 ----
    ;; also look for menu items in subsequent nodes as long as those
    ;; nodes' names match `Info-complete-next-re'.  This feature is currently
    ;; only used for completion in Info-index.
!   (with-current-buffer Info-complete-menu-buffer
      (let ((completion-ignore-case t)
          (case-fold-search t)
          (orignode Info-current-node)
***************
*** 2010,2016 ****
    (if (equal Info-current-file "dir")
        (error "The Info directory node has no index; use m to select a 
manual"))
    (let ((orignode Info-current-node)
-       (rnode nil)
        (pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ \t]+\\([^.\n]*\\)\\.[ 
\t]*\\([0-9]*\\)"
                         (regexp-quote topic)))
        node
--- 2005,2010 ----
***************
*** 2495,2502 ****
    (setq Info-tag-table-buffer nil)
    (make-local-variable 'Info-history)
    (make-local-variable 'Info-index-alternatives)
!   (make-local-variable 'Info-header-line)
!   (setq header-line-format (if Info-use-header-line 'Info-header-line))
    (set (make-local-variable 'tool-bar-map) info-tool-bar-map)
    ;; This is for the sake of the invisible text we use handling titles.
    (make-local-variable 'line-move-ignore-invisible)
--- 2489,2498 ----
    (setq Info-tag-table-buffer nil)
    (make-local-variable 'Info-history)
    (make-local-variable 'Info-index-alternatives)
!   (setq header-line-format
!       (if Info-use-header-line
!           '(:eval (get-text-property (point-min) 'header-line))
!         nil)) ; so the header line isn't displayed
    (set (make-local-variable 'tool-bar-map) info-tool-bar-map)
    ;; This is for the sake of the invisible text we use handling titles.
    (make-local-variable 'line-move-ignore-invisible)
***************
*** 2630,2637 ****
      ;; Bind Info-history to nil, to prevent the index nodes from
      ;; getting into the node history.
      (let ((Info-history nil)
!         (exact nil)
!         node found)
        (Info-goto-node (Info-extract-menu-node-name))
        (while
          (progn
--- 2626,2632 ----
      ;; Bind Info-history to nil, to prevent the index nodes from
      ;; getting into the node history.
      (let ((Info-history nil)
!         node)
        (Info-goto-node (Info-extract-menu-node-name))
        (while
          (progn
***************
*** 2893,2900 ****
                  (goto-char (match-beginning 1))
                  (insert other-tag)))
              (when (or hide-tag (eq Info-hide-note-references t))
!               (setq paragraph-markers (cons (set-marker (make-marker) start)
!                                             paragraph-markers))))))
  
        (let ((fill-nobreak-invisible t))
          (goto-char (point-max))
--- 2888,2895 ----
                  (goto-char (match-beginning 1))
                  (insert other-tag)))
              (when (or hide-tag (eq Info-hide-note-references t))
!               (push (set-marker (make-marker) start)
!                     paragraph-markers)))))
  
        (let ((fill-nobreak-invisible t))
          (goto-char (point-max))
***************
*** 3030,3043 ****
        (select-frame cf)
        (if completions
          (speedbar-with-writable
!          (while completions
             (speedbar-make-tag-line 'bracket ?+ 'Info-speedbar-expand-node
!                                    (cdr (car completions))
!                                    (car (car completions))
                                     'Info-speedbar-goto-node
!                                    (cdr (car completions))
!                                    'info-xref depth)
!            (setq completions (cdr completions)))
           t)
        nil))))
  
--- 3025,3037 ----
        (select-frame cf)
        (if completions
          (speedbar-with-writable
!          (dolist (completion completions)
             (speedbar-make-tag-line 'bracket ?+ 'Info-speedbar-expand-node
!                                    (cdr completion)
!                                    (car completion)
                                     'Info-speedbar-goto-node
!                                    (cdr completion)
!                                    'info-xref depth))
           t)
        nil))))
  
***************
*** 3056,3065 ****
          (let ((pop-up-frames t)) (select-window (display-buffer buff)))
        (select-frame speedbar-attached-frame)
        (switch-to-buffer buff)))
!     (let ((junk (string-match "^(\\([^)]+\\))\\([^.]+\\)$" node))
!         (file (match-string 1 node))
!         (node (match-string 2 node)))
!       (Info-find-node file node)
        ;; If we do a find-node, and we were in info mode, restore
        ;; the old default method.  Once we are in info mode, it makes
        ;; sense to return to whatever method the user was using before.
--- 3050,3058 ----
          (let ((pop-up-frames t)) (select-window (display-buffer buff)))
        (select-frame speedbar-attached-frame)
        (switch-to-buffer buff)))
!     (if (not (string-match "^(\\([^)]+\\))\\([^.]+\\)$" node))
!       (error "Invalid node %s" node)
!       (Info-find-node (match-string 1 node) (match-string 2 node))
        ;; If we do a find-node, and we were in info mode, restore
        ;; the old default method.  Once we are in info mode, it makes
        ;; sense to return to whatever method the user was using before.
***************
*** 3096,3105 ****
      (if (not (equal major-mode 'Info-mode))
        (Info-mode))
      ;; Get the node into this buffer
!     (let ((junk (string-match "^(\\([^)]+\\))\\([^.]+\\)$" nodespec))
!         (file (match-string 1 nodespec))
!         (node (match-string 2 nodespec)))
!       (Info-find-node file node))
      ;; Scan the created buffer
      (goto-char (point-min))
      (let ((completions nil)
--- 3089,3097 ----
      (if (not (equal major-mode 'Info-mode))
        (Info-mode))
      ;; Get the node into this buffer
!     (if (not (string-match "^(\\([^)]+\\))\\([^.]+\\)$" nodespec))
!       (error "Invalid node specification %s" nodespec)
!       (Info-find-node (match-string 1 nodespec) (match-string 2 nodespec)))
      ;; Scan the created buffer
      (goto-char (point-min))
      (let ((completions nil)
***************
*** 3110,3124 ****
        (re-search-forward "\n\\* \\([^:\t\n]*\\):" nil t)
        (while (re-search-forward "\n\\* \\([^:\t\n]*\\):" nil t)
        (let ((name (match-string 1)))
!         (if (looking-at " *\\(([^)]+)[^.\n]+\\)\\.")
!             (setq name (cons name (match-string 1)))
!           (if (looking-at " *\\(([^)]+)\\)\\.")
!               (setq name (cons name (concat (match-string 1) "Top")))
!             (if (looking-at " \\([^.]+\\).")
!                 (setq name
!                       (cons name (concat "(" thisfile ")" (match-string 1))))
!               (setq name (cons name (concat "(" thisfile ")" name))))))
!         (setq completions (cons name completions))))
        (nreverse completions))))
  
  ;;; Info mode node listing
--- 3102,3117 ----
        (re-search-forward "\n\\* \\([^:\t\n]*\\):" nil t)
        (while (re-search-forward "\n\\* \\([^:\t\n]*\\):" nil t)
        (let ((name (match-string 1)))
!         (push (cons name
!                     (if (looking-at " *\\(([^)]+)[^.\n]+\\)\\.")
!                         (match-string 1)
!                       (if (looking-at " *\\(([^)]+)\\)\\.")
!                           (concat (match-string 1) "Top")
!                         (concat "(" thisfile ")"
!                                 (if (looking-at " \\([^.]+\\).")
!                                     (match-string 1)
!                                   name)))))
!               completions)))
        (nreverse completions))))
  
  ;;; Info mode node listing




reply via email to

[Prev in Thread] Current Thread [Next in Thread]