/[emacs]/emacs/lisp/info.el
ViewVC logotype

Diff of /emacs/lisp/info.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.347 by monnier, Tue Jun 3 19:54:42 2003 UTC revision 1.348 by monnier, Tue Jun 3 20:28:21 2003 UTC
# Line 2903  the variable `Info-file-list-for-emacs'. Line 2903  the variable `Info-file-list-for-emacs'.
2903                (set-marker m nil))))                (set-marker m nil))))
2904    
2905          (goto-char (point-min))          (goto-char (point-min))
2906          (if (and (search-forward "\n* Menu:" nil t)          (when (and (search-forward "\n* Menu:" nil t)
2907                   (not (string-match "\\<Index\\>" Info-current-node))                     (not (string-match "\\<Index\\>" Info-current-node))
2908                   ;; Don't take time to annotate huge menus                     ;; Don't take time to annotate huge menus
2909                   (< (- (point-max) (point)) Info-fontify-maximum-menu-size))                     (< (- (point-max) (point)) Info-fontify-maximum-menu-size))
2910              (let ((n 0)            (let ((n 0)
2911                    cont)                  cont)
2912                (while (re-search-forward "^\\* +\\([^:\t\n]*\\)\\(:[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:.][ \t]*\\)" nil t)              (while (re-search-forward "^\\* +\\([^:\t\n]*\\)\\(:[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:.]\\([ \t]*\\)\\)" nil t)
2913                  (setq n (1+ n))                (setq n (1+ n))
2914                  (if (zerop (% n 3)) ; visual aids to help with 1-9 keys                (if (zerop (% n 3))       ; visual aids to help with 1-9 keys
2915                      (put-text-property (match-beginning 0)                    (put-text-property (match-beginning 0)
2916                                         (1+ (match-beginning 0))                                       (1+ (match-beginning 0))
2917                                         'font-lock-face 'info-menu-5))                                       'font-lock-face 'info-menu-5))
2918                  (add-text-properties (match-beginning 1) (match-end 1)                (add-text-properties (match-beginning 1) (match-end 1)
2919                                       '(font-lock-face info-xref                                     '(font-lock-face info-xref
2920                                         mouse-face highlight                                       mouse-face highlight
2921                                         help-echo "mouse-2: go to this node"))                                       help-echo "mouse-2: go to this node"))
2922                  (when (eq Info-hide-note-references t)                (when (eq Info-hide-note-references t)
2923                    (add-text-properties (match-beginning 2) (match-end 2)                  (put-text-property (match-beginning 2) (match-beginning 4)
2924                                         (list 'display                                     'invisible t)
2925                                               (make-string (max 2 (- 22 (- (match-end 1) (match-beginning 1)))) ? )))                  ;; We need a stretchable space like :align-to but with
2926                    (setq cont (looking-at "[ \t]*[^\n]")))                  ;; a minimum value.
2927                  (if (eq Info-hide-note-references t)                  (put-text-property (match-beginning 4) (match-end 4) 'display
2928                      (while (and (= (forward-line 1) 0)                                     (if (>= 22 (- (match-end 1)
2929                                  (looking-at "\\([ \t]+\\)[^*\n]"))                                                   (match-beginning 0)))
2930                        (add-text-properties (match-beginning 1) (match-end 1)                                         '(space :align-to 24)
2931                                             (list 'display (make-string (+ 22 (if cont 4 2)) ? )))                                       '(space :width 2)))
2932                        (setq cont t))))))                  (setq cont (looking-at "."))
2933                    (while (and (= (forward-line 1) 0)
2934                                (looking-at "\\([ \t]+\\)[^*\n]"))
2935                      (put-text-property (match-beginning 1) (match-end 1) 'display
2936                                         (if cont
2937                                             '(space :align-to 26)
2938                                           '(space :align-to 24)))
2939                      (setq cont t))))))
2940    
2941          (Info-fontify-menu-headers)          (Info-fontify-menu-headers)
2942          (set-buffer-modified-p nil)))))          (set-buffer-modified-p nil)))))

Legend:
Removed from v.1.347  
changed lines
  Added in v.1.348

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26