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 17:44:54 -0400

Index: emacs/lisp/info.el
diff -c emacs/lisp/info.el:1.349 emacs/lisp/info.el:1.350
*** emacs/lisp/info.el:1.349    Tue Jun  3 16:56:59 2003
--- emacs/lisp/info.el  Tue Jun  3 17:44:53 2003
***************
*** 1536,1549 ****
          (error "No cross-reference named %s" footnotename))
        (goto-char (+ (match-beginning 0) 5))
        (setq target
!           (Info-extract-menu-node-name "Bad format cross reference" t)))
      (while (setq i (string-match "[ \t\n]+" target i))
        (setq target (concat (substring target 0 i) " "
                           (substring target (match-end 0))))
        (setq i (+ i 1)))
      (Info-goto-node target)))
  
! (defun Info-extract-menu-node-name (&optional errmessage multi-line)
    (skip-chars-forward " \t\n")
    (let ((beg (point))
        str)
--- 1536,1549 ----
          (error "No cross-reference named %s" footnotename))
        (goto-char (+ (match-beginning 0) 5))
        (setq target
!           (Info-extract-menu-node-name t)))
      (while (setq i (string-match "[ \t\n]+" target i))
        (setq target (concat (substring target 0 i) " "
                           (substring target (match-end 0))))
        (setq i (+ i 1)))
      (Info-goto-node target)))
  
! (defun Info-extract-menu-node-name (&optional multi-line)
    (skip-chars-forward " \t\n")
    (let ((beg (point))
        str)
***************
*** 1567,1572 ****
--- 1567,1575 ----
  (defvar Info-complete-next-re nil)
  (defvar Info-complete-cache nil)
  
+ (defconst Info-node-spec-re "[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:.]"
+   "Regexp to match the text after a : until the terminating `.'.")
+ 
  (defun Info-complete-menu-item (string predicate action)
    ;; This uses two dynamically bound variables:
    ;; - `Info-complete-menu-buffer' which contains the buffer in which
***************
*** 1587,1593 ****
           (concat "\n\\* +" (regexp-quote string) ":") nil t)
        (let ((pattern (concat "\n\\* +\\("
                               (regexp-quote string)
!                              "[^\t\n]*\\):"))
              completions)
          ;; Check the cache.
          (if (and (equal (nth 0 Info-complete-cache) Info-current-file)
--- 1590,1596 ----
           (concat "\n\\* +" (regexp-quote string) ":") nil t)
        (let ((pattern (concat "\n\\* +\\("
                               (regexp-quote string)
!                              "[^\t\n]*?\\):" Info-node-spec-re))
              completions)
          ;; Check the cache.
          (if (and (equal (nth 0 Info-complete-cache) Info-current-file)
***************
*** 2867,2873 ****
                (setq other-tag
                      (cond
                       ((memq (char-before) '(nil ?\. ?! ))
!                       "See "
                       ((memq (char-before) '( ?\( ?\[ ?\{ ?\, ?\; ?\: ))
                        "see ")))
                (goto-char next))
--- 2870,2876 ----
                (setq other-tag
                      (cond
                       ((memq (char-before) '(nil ?\. ?! ))
!                       "See ")
                       ((memq (char-before) '( ?\( ?\[ ?\{ ?\, ?\; ?\: ))
                        "see ")))
                (goto-char next))
***************
*** 2911,2917 ****
                   (< (- (point-max) (point)) Info-fontify-maximum-menu-size))
          (let ((n 0)
                cont)
!           (while (re-search-forward "^\\* 
+\\([^:\t\n]*\\)\\(:[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:.]\\([ \t]*\\)\\)" nil t)
              (setq n (1+ n))
              (if (zerop (% n 3))       ; visual aids to help with 1-9 keys
                  (put-text-property (match-beginning 0)
--- 2914,2923 ----
                   (< (- (point-max) (point)) Info-fontify-maximum-menu-size))
          (let ((n 0)
                cont)
!           (while (re-search-forward (concat "^\\* +\\([^:\t\n]*\\)\\(:"
!                                             Info-node-spec-re
!                                             "\\([ \t]*\\)\\)")
!                                     nil t)
              (setq n (1+ n))
              (if (zerop (% n 3))       ; visual aids to help with 1-9 keys
                  (put-text-property (match-beginning 0)
***************
*** 3129,3134 ****
--- 3135,3141 ----
        (nreverse completions))))
  
  ;;; Info mode node listing
+ ;; FIXME: Seems not to be used.  -stef
  (defun Info-speedbar-buttons (buffer)
    "Create a speedbar display to help navigation in an Info file.
  BUFFER is the buffer speedbar is requesting buttons for."




reply via email to

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