/[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.302 by rms, Mon Jun 3 22:57:40 2002 UTC revision 1.303 by walters, Sat Jun 8 20:43:25 2002 UTC
# Line 2343  Advanced commands: Line 2343  Advanced commands:
2343    (setq Info-tag-table-marker (make-marker))    (setq Info-tag-table-marker (make-marker))
2344    (make-local-variable 'Info-tag-table-buffer)    (make-local-variable 'Info-tag-table-buffer)
2345    (setq Info-tag-table-buffer nil)    (setq Info-tag-table-buffer nil)
   (set (make-local-variable 'font-lock-category-alist)  
        '((info-menu-header . info-menu-header)  
          (info-header-node . info-header-node)  
          (info-header-xref . info-header-xref)  
          (Info-title-1-face . Info-title-1-face)  
          (Info-title-2-face . Info-title-2-face)  
          (Info-title-3-face . Info-title-3-face)  
          (Info-title-4-face . Info-title-4-face)  
          (info-menu-5 . info-menu-5)  
          (info-xref . info-xref)))  
2346    (make-local-variable 'Info-history)    (make-local-variable 'Info-history)
2347    (make-local-variable 'Info-index-alternatives)    (make-local-variable 'Info-index-alternatives)
2348    (set (make-local-variable 'tool-bar-map) info-tool-bar-map)    (set (make-local-variable 'tool-bar-map) info-tool-bar-map)
# Line 2600  the variable `Info-file-list-for-emacs'. Line 2590  the variable `Info-file-list-for-emacs'.
2590      (goto-char (point-min))      (goto-char (point-min))
2591      (when (re-search-forward "\\* Menu:" nil t)      (when (re-search-forward "\\* Menu:" nil t)
2592        (put-text-property (match-beginning 0) (match-end 0)        (put-text-property (match-beginning 0) (match-end 0)
2593                           'category 'info-menu-header)                           'font-lock-face 'info-menu-header)
2594        (while (re-search-forward "\n\n\\([^*\n ].*\\)\n\n?[*]" nil t)        (while (re-search-forward "\n\n\\([^*\n ].*\\)\n\n?[*]" nil t)
2595          (put-text-property (match-beginning 1) (match-end 1)          (put-text-property (match-beginning 1) (match-end 1)
2596                             'category 'info-menu-header)))))                             'font-lock-face 'info-menu-header)))))
2597    
2598  (defun Info-fontify-node ()  (defun Info-fontify-node ()
2599    ;; Only fontify the node if it hasn't already been done.  [We pass in    ;; Only fontify the node if it hasn't already been done.  [We pass in
# Line 2631  the variable `Info-file-list-for-emacs'. Line 2621  the variable `Info-file-list-for-emacs'.
2621                     (tbeg (match-beginning 1))                     (tbeg (match-beginning 1))
2622                     (tag (buffer-substring tbeg (match-end 1))))                     (tag (buffer-substring tbeg (match-end 1))))
2623                (if (string-equal tag "Node")                (if (string-equal tag "Node")
2624                    (put-text-property nbeg nend 'category 'info-header-node)                    (put-text-property nbeg nend 'font-lock-face 'info-header-node)
2625                  (put-text-property nbeg nend 'category 'info-header-xref)                  (put-text-property nbeg nend 'font-lock-face 'info-header-xref)
2626                  (put-text-property tbeg nend 'mouse-face 'highlight)                  (put-text-property tbeg nend 'mouse-face 'highlight)
2627                  (put-text-property tbeg nend                  (put-text-property tbeg nend
2628                                     'help-echo                                     'help-echo
# Line 2660  the variable `Info-file-list-for-emacs'. Line 2650  the variable `Info-file-list-for-emacs'.
2650          (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$"          (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$"
2651                                    nil t)                                    nil t)
2652            (let* ((c (preceding-char))            (let* ((c (preceding-char))
2653                   (category                   (face
2654                    (cond ((= c ?*) 'Info-title-1-face)                    (cond ((= c ?*) 'Info-title-1-face)
2655                          ((= c ?=) 'Info-title-2-face)                          ((= c ?=) 'Info-title-2-face)
2656                          ((= c ?-) 'Info-title-3-face)                          ((= c ?-) 'Info-title-3-face)
2657                          (t        'Info-title-4-face))))                          (t        'Info-title-4-face))))
2658              (put-text-property (match-beginning 1) (match-end 1)              (put-text-property (match-beginning 1) (match-end 1)
2659                                 'category category))                                 'font-lock-face face))
2660            ;; This is a serious problem for trying to handle multiple            ;; This is a serious problem for trying to handle multiple
2661            ;; frame types at once.  We want this text to be invisible            ;; frame types at once.  We want this text to be invisible
2662            ;; on frames that can display the font above.            ;; on frames that can display the font above.
# Line 2678  the variable `Info-file-list-for-emacs'. Line 2668  the variable `Info-file-list-for-emacs'.
2668            (if (= (char-after (1- (match-beginning 0))) ?\") ; hack            (if (= (char-after (1- (match-beginning 0))) ?\") ; hack
2669                nil                nil
2670              (add-text-properties (match-beginning 1) (match-end 1)              (add-text-properties (match-beginning 1) (match-end 1)
2671                                   '(category info-xref                                   '(font-lock-face info-xref
2672                                     mouse-face highlight                                     mouse-face highlight
2673                                     help-echo "mouse-2: go to this node"))))                                     help-echo "mouse-2: go to this node"))))
2674          (goto-char (point-min))          (goto-char (point-min))
# Line 2692  the variable `Info-file-list-for-emacs'. Line 2682  the variable `Info-file-list-for-emacs'.
2682                  (if (zerop (% n 3)) ; visual aids to help with 1-9 keys                  (if (zerop (% n 3)) ; visual aids to help with 1-9 keys
2683                      (put-text-property (match-beginning 0)                      (put-text-property (match-beginning 0)
2684                                         (1+ (match-beginning 0))                                         (1+ (match-beginning 0))
2685                                         'category 'info-menu-5))                                         'font-lock-face 'info-menu-5))
2686                  (add-text-properties (match-beginning 1) (match-end 1)                  (add-text-properties (match-beginning 1) (match-end 1)
2687                                       '(category info-xref                                       '(font-lock-face info-xref
2688                                         mouse-face highlight                                         mouse-face highlight
2689                                         help-echo "mouse-2: go to this node")))))                                         help-echo "mouse-2: go to this node")))))
2690          (Info-fontify-menu-headers)          (Info-fontify-menu-headers)

Legend:
Removed from v.1.302  
changed lines
  Added in v.1.303

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