aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2000-11-02 02:14:07 +0000
committerMiles Bader2000-11-02 02:14:07 +0000
commit973a3104fd5cc71116d29d8e52ba033d43aa7606 (patch)
tree02e10fca570123a807c12028cbd860f2645b3933 /lisp
parent50ada0db2b1aa057e06c696778aaa3a612af9474 (diff)
downloademacs-973a3104fd5cc71116d29d8e52ba033d43aa7606.tar.gz
emacs-973a3104fd5cc71116d29d8e52ba033d43aa7606.zip
(info-menu-header): New face.
(Info-fontify-menu-headers): New function. (Info-fontify-node, Info-insert-dir): Call `Info-fontify-menu-headers'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/info.el23
2 files changed, 27 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 358bba3b87e..8467c29b34e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12000-11-02 Miles Bader <miles@lsi.nec.co.jp> 12000-11-02 Miles Bader <miles@lsi.nec.co.jp>
2 2
3 * info.el (info-menu-header): New face.
4 (Info-fontify-menu-headers): New function.
5 (Info-fontify-node, Info-insert-dir): Call `Info-fontify-menu-headers'.
6
3 * info.el (Info-insert-dir): Don't include blank lines at 7 * info.el (Info-insert-dir): Don't include blank lines at
4 beginning of additional dir files (one is added automatically). 8 beginning of additional dir files (one is added automatically).
5 9
diff --git a/lisp/info.el b/lisp/info.el
index e54a579620f..db6b0447464 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -837,6 +837,7 @@ a case-insensitive match is tried."
837 (while buffers 837 (while buffers
838 (kill-buffer (car buffers)) 838 (kill-buffer (car buffers))
839 (setq buffers (cdr buffers))) 839 (setq buffers (cdr buffers)))
840 (if Info-fontify (Info-fontify-menu-headers))
840 (goto-char (point-min)) 841 (goto-char (point-min))
841 (if problems 842 (if problems
842 (message "Composing main Info directory...problems encountered, see `*Messages*'") 843 (message "Composing main Info directory...problems encountered, see `*Messages*'")
@@ -2385,6 +2386,27 @@ the variable `Info-file-list-for-emacs'."
2385 "Face for Info titles at level 4." 2386 "Face for Info titles at level 4."
2386 :group 'info) 2387 :group 'info)
2387 2388
2389(defface info-menu-header
2390 '((((type tty pc))
2391 :underline t
2392 :weight bold)
2393 (t
2394 :inherit variable-pitch
2395 :weight bold))
2396 "Face for headers in Info menus."
2397 :group 'info)
2398
2399(defun Info-fontify-menu-headers ()
2400 "Add the face `info-menu-header' to any header before a menu entry."
2401 (save-excursion
2402 (goto-char (point-min))
2403 (when (re-search-forward "\\* Menu:" nil t)
2404 (put-text-property (match-beginning 0) (match-end 0)
2405 'face 'info-menu-header)
2406 (while (re-search-forward "\n\n\\([^*\n ].*\\)\n\n?[*]" nil t)
2407 (put-text-property (match-beginning 1) (match-end 1)
2408 'face 'info-menu-header)))))
2409
2388(defun Info-fontify-node () 2410(defun Info-fontify-node ()
2389 (save-excursion 2411 (save-excursion
2390 (let ((buffer-read-only nil) 2412 (let ((buffer-read-only nil)
@@ -2456,6 +2478,7 @@ the variable `Info-file-list-for-emacs'."
2456 '(face info-xref 2478 '(face info-xref
2457 mouse-face highlight 2479 mouse-face highlight
2458 help-echo "mouse-2: go to this node"))))) 2480 help-echo "mouse-2: go to this node")))))
2481 (Info-fontify-menu-headers)
2459 (set-buffer-modified-p nil)))) 2482 (set-buffer-modified-p nil))))
2460 2483
2461 2484