emacs-devel
[Top][All Lists]
Advanced

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

info.el


From: Juri Linkov
Subject: info.el
Date: Thu, 04 Aug 2005 03:29:55 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

While updating info.texi, I took the opportunity to fix info.el:

1. Replaced `info' with upper-case `Info' where appropriate.
2. Renamed `info-menu-5' face to `info-menu-star'.
3. Grouped face definitions together.
4. Put the cursor on menu items in the same way as on cross-references,
   i.e. after moving the cursor to the next/previous menu item, skip `* '
   and put the cursor on the first letter of the menu item.
5. Fixed `info-apropos' to work exactly as `index-apropos' in the
   stand-alone Info reader.
6. Moved `w' to before `c' as the primary key mentioned in the Help buffer.
7. Removed `S' binding (`Info-search-case-sensitively') since it is not
   useful anymore with isearch working on the whole Info manual.
8. Added `^' binding to `Info-up' as a similar key binding in the Dired
   mode where it is bound to `dired-up-directory'.

Index: lisp/info.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/info.el,v
retrieving revision 1.437
diff -c -r1.437 info.el
*** lisp/info.el        19 Jul 2005 11:35:34 -0000      1.437
--- lisp/info.el        4 Aug 2005 00:27:15 -0000
***************
*** 25,31 ****
  
  ;;; Commentary:
  
! ;; Note that nowadays we expect info files to be made using makeinfo.
  ;; In particular we make these assumptions:
  ;;  - a menu item MAY contain colons but not colon-space ": "
  ;;  - a menu item ending with ": " (but not ":: ") is an index entry
--- 25,31 ----
  
  ;;; Commentary:
  
! ;; Note that nowadays we expect Info files to be made using makeinfo.
  ;; In particular we make these assumptions:
  ;;  - a menu item MAY contain colons but not colon-space ": "
  ;;  - a menu item ending with ": " (but not ":: ") is an index entry
***************
*** 44,63 ****
  
  
  (defvar Info-history nil
!   "Stack of info nodes user has visited.
  Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).")
  
  (defvar Info-history-forward nil
!   "Stack of info nodes user has visited with `Info-history-back' command.
  Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).")
  
  (defvar Info-history-list nil
!   "List of all info nodes user has visited.
  Each element of the list is a list (FILENAME NODENAME).")
  
  (defcustom Info-enable-edit nil
    "*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit 
the current node.
! This is convenient if you want to write info files by hand.
  However, we recommend that you not do this.
  It is better to write a Texinfo file and generate the Info file from that,
  because that gives you a printed manual as well."
--- 44,63 ----
  
  
  (defvar Info-history nil
!   "Stack of Info nodes user has visited.
  Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).")
  
  (defvar Info-history-forward nil
!   "Stack of Info nodes user has visited with `Info-history-back' command.
  Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).")
  
  (defvar Info-history-list nil
!   "List of all Info nodes user has visited.
  Each element of the list is a list (FILENAME NODENAME).")
  
  (defcustom Info-enable-edit nil
    "*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit 
the current node.
! This is convenient if you want to write Info files by hand.
  However, we recommend that you not do this.
  It is better to write a Texinfo file and generate the Info file from that,
  because that gives you a printed manual as well."
***************
*** 76,86 ****
    "Face for Info node names."
    :group 'info)
  
! (defface info-menu-5
    '((((class color)) :foreground "red1")
      (t :underline t))
    "Face for every third `*' in an Info menu."
    :group 'info)
  
  (defface info-xref
    '((((min-colors 88)
--- 76,132 ----
    "Face for Info node names."
    :group 'info)
  
! (defface info-title-1
!   '((((type tty pc) (class color) (background light))
!      :foreground "green" :weight bold)
!     (((type tty pc) (class color) (background dark))
!      :foreground "yellow" :weight bold)
!     (t :height 1.2 :inherit info-title-2))
!   "Face for info titles at level 1."
!   :group 'info)
! ;; backward-compatibility alias
! (put 'Info-title-1-face 'face-alias 'info-title-1)
! 
! (defface info-title-2
!   '((((type tty pc) (class color)) :foreground "lightblue" :weight bold)
!     (t :height 1.2 :inherit info-title-3))
!   "Face for info titles at level 2."
!   :group 'info)
! ;; backward-compatibility alias
! (put 'Info-title-2-face 'face-alias 'info-title-2)
! 
! (defface info-title-3
!   '((((type tty pc) (class color)) :weight bold)
!     (t :height 1.2 :inherit info-title-4))
!   "Face for info titles at level 3."
!   :group 'info)
! ;; backward-compatibility alias
! (put 'Info-title-3-face 'face-alias 'info-title-3)
! 
! (defface info-title-4
!   '((((type tty pc) (class color)) :weight bold)
!     (t :weight bold :inherit variable-pitch))
!   "Face for info titles at level 4."
!   :group 'info)
! ;; backward-compatibility alias
! (put 'Info-title-4-face 'face-alias 'info-title-4)
! 
! (defface info-menu-header
!   '((((type tty pc))
!      :underline t
!      :weight bold)
!     (t
!      :inherit variable-pitch
!      :weight bold))
!   "Face for headers in Info menus."
!   :group 'info)
! 
! (defface info-menu-star
    '((((class color)) :foreground "red1")
      (t :underline t))
    "Face for every third `*' in an Info menu."
    :group 'info)
+ (put 'info-menu-5 'face-alias 'info-menu-star)
  
  (defface info-xref
    '((((min-colors 88)
***************
*** 101,107 ****
    :group 'info)
  
  (defcustom Info-fontify-visited-nodes t
!   "*Non-nil means to fontify visited nodes in a different face."
    :version "22.1"
    :type 'boolean
    :group 'info)
--- 147,153 ----
    :group 'info)
  
  (defcustom Info-fontify-visited-nodes t
!   "*Non-nil means to fontify references to visited nodes in a different face."
    :version "22.1"
    :type 'boolean
    :group 'info)
***************
*** 165,170 ****
--- 211,217 ----
  
  (defcustom Info-scroll-prefer-subnodes nil
    "*If non-nil, \\<Info-mode-map>\\[Info-scroll-up] in a menu visits subnodes.
+ 
  If this is non-nil, and you scroll far enough in a node that its menu
  appears on the screen, the next \\<Info-mode-map>\\[Info-scroll-up]
  moves to a subnode indicated by the following menu item.  This means
***************
*** 180,186 ****
  (defcustom Info-hide-note-references t
    "*If non-nil, hide the tag and section reference in *note and * menu items.
  If value is non-nil but not `hide', also replaces the \"*note\" with \"see\".
! If value is non-nil but not t or `hide', the reference section is still 
shown."
    :version "22.1"
    :type '(choice (const :tag "No hiding" nil)
                 (const :tag "Replace tag and hide reference" t)
--- 227,234 ----
  (defcustom Info-hide-note-references t
    "*If non-nil, hide the tag and section reference in *note and * menu items.
  If value is non-nil but not `hide', also replaces the \"*note\" with \"see\".
! If value is non-nil but not t or `hide', the reference section is still shown.
! `nil' completely disables this feature."
    :version "22.1"
    :type '(choice (const :tag "No hiding" nil)
                 (const :tag "Replace tag and hide reference" t)
***************
*** 190,196 ****
  
  (defcustom Info-refill-paragraphs nil
    "*If non-nil, attempt to refill paragraphs with hidden references.
! This refilling may accidentally remove explicit line breaks in the info
  file, so be prepared for a few surprises if you enable this feature."
    :version "22.1"
    :type 'boolean
--- 238,244 ----
  
  (defcustom Info-refill-paragraphs nil
    "*If non-nil, attempt to refill paragraphs with hidden references.
! This refilling may accidentally remove explicit line breaks in the Info
  file, so be prepared for a few surprises if you enable this feature."
    :version "22.1"
    :type 'boolean
***************
*** 247,253 ****
  
  (defvar Info-current-subfile nil
    "Info subfile that is actually in the *info* buffer now.
! nil if current info file is not split into subfiles.")
  
  (defvar Info-current-node nil
    "Name of node that Info is now looking at, or nil.")
--- 295,301 ----
  
  (defvar Info-current-subfile nil
    "Info subfile that is actually in the *info* buffer now.
! nil if current Info file is not split into subfiles.")
  
  (defvar Info-current-node nil
    "Name of node that Info is now looking at, or nil.")
***************
*** 357,363 ****
         (not (file-directory-p filename))))
  
  (defun info-insert-file-contents (filename &optional visit)
!   "Insert the contents of an info file in the current buffer.
  Do the right thing if the file has been compressed or zipped."
    (let* ((tail Info-suffix-list)
         (lfn (if (fboundp 'msdos-long-file-names)
--- 405,411 ----
         (not (file-directory-p filename))))
  
  (defun info-insert-file-contents (filename &optional visit)
!   "Insert the contents of an Info file in the current buffer.
  Do the right thing if the file has been compressed or zipped."
    (let* ((tail Info-suffix-list)
         (lfn (if (fboundp 'msdos-long-file-names)
***************
*** 632,643 ****
          filename)))
  
  (defun Info-find-node (filename nodename &optional no-going-back)
!   "Go to an info node specified as separate FILENAME and NODENAME.
  NO-GOING-BACK is non-nil if recovering from an error in this function;
  it says do not attempt further (recursive) error recovery."
    (info-initialize)
    (setq filename (Info-find-file filename))
!   ;; Go into info buffer.
    (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*"))
    ;; Record the node we are leaving.
    (if (and Info-current-file (not no-going-back))
--- 680,691 ----
          filename)))
  
  (defun Info-find-node (filename nodename &optional no-going-back)
!   "Go to an Info node specified as separate FILENAME and NODENAME.
  NO-GOING-BACK is non-nil if recovering from an error in this function;
  it says do not attempt further (recursive) error recovery."
    (info-initialize)
    (setq filename (Info-find-file filename))
!   ;; Go into Info buffer.
    (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*"))
    ;; Record the node we are leaving.
    (if (and Info-current-file (not no-going-back))
***************
*** 647,653 ****
    (Info-find-node-2 filename nodename no-going-back))
  
  (defun Info-on-current-buffer (&optional nodename)
!   "Use the `Info-mode' to browse the current info buffer.
  If a prefix arg is provided, it queries for the NODENAME which
  else defaults to \"Top\"."
    (interactive
--- 695,701 ----
    (Info-find-node-2 filename nodename no-going-back))
  
  (defun Info-on-current-buffer (&optional nodename)
!   "Use the `Info-mode' to browse the current Info buffer.
  If a prefix arg is provided, it queries for the NODENAME which
  else defaults to \"Top\"."
    (interactive
***************
*** 665,671 ****
  ;; makeinfo-buffer) out of the way of normal operations.
  ;;
  (defun Info-revert-find-node (filename nodename)
!   "Go to an info node FILENAME and NODENAME, re-reading disk contents.
  When *info* is already displaying FILENAME and NODENAME, the window position
  is preserved, if possible."
    (pop-to-buffer "*info*")
--- 713,719 ----
  ;; makeinfo-buffer) out of the way of normal operations.
  ;;
  (defun Info-revert-find-node (filename nodename)
!   "Go to an Info node FILENAME and NODENAME, re-reading disk contents.
  When *info* is already displaying FILENAME and NODENAME, the window position
  is preserved, if possible."
    (pop-to-buffer "*info*")
***************
*** 1286,1292 ****
      (set-buffer-modified-p nil)))
  
  (defun Info-select-node ()
!   "Select the info node that point is in."
    ;; Bind this in case the user sets it to nil.
    (let ((case-fold-search t))
      (save-excursion
--- 1334,1340 ----
      (set-buffer-modified-p nil)))
  
  (defun Info-select-node ()
!   "Select the Info node that point is in."
    ;; Bind this in case the user sets it to nil.
    (let ((case-fold-search t))
      (save-excursion
***************
*** 1342,1361 ****
                        ") "
                        (or Info-current-node ""))))))
  
! ;; Go to an info node specified with a filename-and-nodename string
  ;; of the sort that is found in pointers in nodes.
  
  ;; Don't autoload this function: the correct entry point for other packages
  ;; to use is `info'.  --Stef
  ;; ;;;###autoload
  (defun Info-goto-node (nodename &optional fork)
!   "Go to info node named NODENAME.  Give just NODENAME or (FILENAME)NODENAME.
  If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file
  FILENAME; otherwise, NODENAME should be in the current Info file (or one of
  its sub-files).
  Completion is available, but only for node names in the current Info file.
  If FORK is non-nil (interactively with a prefix arg), show the node in
! a new info buffer.
  If FORK is a string, it is the name to use for the new buffer."
    (interactive (list (Info-read-node-name "Go to node: ") current-prefix-arg))
    (info-initialize)
--- 1390,1409 ----
                        ") "
                        (or Info-current-node ""))))))
  
! ;; Go to an Info node specified with a filename-and-nodename string
  ;; of the sort that is found in pointers in nodes.
  
  ;; Don't autoload this function: the correct entry point for other packages
  ;; to use is `info'.  --Stef
  ;; ;;;###autoload
  (defun Info-goto-node (nodename &optional fork)
!   "Go to Info node named NODENAME.  Give just NODENAME or (FILENAME)NODENAME.
  If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file
  FILENAME; otherwise, NODENAME should be in the current Info file (or one of
  its sub-files).
  Completion is available, but only for node names in the current Info file.
  If FORK is non-nil (interactively with a prefix arg), show the node in
! a new Info buffer.
  If FORK is a string, it is the name to use for the new buffer."
    (interactive (list (Info-read-node-name "Go to node: ") current-prefix-arg))
    (info-initialize)
***************
*** 1401,1407 ****
          ;; include it.
          (and (or (null (file-name-extension file))
                   (string-match suffix file))
!              ;; But exclude subfiles of split info files.
               (not (string-match "-[0-9]+\\'" file))
               ;; And exclude backup files.
               (not (string-match "~\\'" file))
--- 1449,1455 ----
          ;; include it.
          (and (or (null (file-name-extension file))
                   (string-match suffix file))
!              ;; But exclude subfiles of split Info files.
               (not (string-match "-[0-9]+\\'" file))
               ;; And exclude backup files.
               (not (string-match "~\\'" file))
***************
*** 1821,1827 ****
                  (concat "\n\\* +\\(" (regexp-quote old-node)
                          ":\\|[^:]+: +" (regexp-quote old-node) "\\)"))
                nil t))
!         (beginning-of-line)
        (goto-char p)
        (Info-restore-point Info-history))))
  
--- 1869,1875 ----
                  (concat "\n\\* +\\(" (regexp-quote old-node)
                          ":\\|[^:]+: +" (regexp-quote old-node) "\\)"))
                nil t))
!         (progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2)))
        (goto-char p)
        (Info-restore-point Info-history))))
  
***************
*** 2010,2016 ****
    "Follow cross reference named FOOTNOTENAME to the node it refers to.
  FOOTNOTENAME may be an abbreviation of the reference name.
  If FORK is non-nil (interactively with a prefix arg), show the node in
! a new info buffer.  If FORK is a string, it is the name to use for the
  new buffer."
    (interactive
     (let ((completion-ignore-case t)
--- 2058,2064 ----
    "Follow cross reference named FOOTNOTENAME to the node it refers to.
  FOOTNOTENAME may be an abbreviation of the reference name.
  If FORK is non-nil (interactively with a prefix arg), show the node in
! a new Info buffer.  If FORK is a string, it is the name to use for the
  new buffer."
    (interactive
     (let ((completion-ignore-case t)
***************
*** 2221,2227 ****
  The menu item should one of those listed in the current node's menu.
  Completion is allowed, and the default menu item is the one point is on.
  If FORK is non-nil (interactively with a prefix arg), show the node in
! a new info buffer.  If FORK is a string, it is the name to use for the
  new buffer."
    (interactive
     (let ((completions '())
--- 2269,2275 ----
  The menu item should one of those listed in the current node's menu.
  Completion is allowed, and the default menu item is the one point is on.
  If FORK is non-nil (interactively with a prefix arg), show the node in
! a new Info buffer.  If FORK is a string, it is the name to use for the
  new buffer."
    (interactive
     (let ((completions '())
***************
*** 2546,2552 ****
      (if (looking-at "\\* Menu:")
        (if recur
            (error "No cross references in this node")
!         (Info-next-reference t)))))
  
  (defun Info-prev-reference (&optional recur)
    "Move cursor to the previous cross-reference or menu item in the node."
--- 2594,2602 ----
      (if (looking-at "\\* Menu:")
        (if recur
            (error "No cross references in this node")
!         (Info-next-reference t))
!       (if (looking-at "^\\* ")
!         (forward-char 2)))))
  
  (defun Info-prev-reference (&optional recur)
    "Move cursor to the previous cross-reference or menu item in the node."
***************
*** 2565,2571 ****
      (if (looking-at "\\* Menu:")
        (if recur
            (error "No cross references in this node")
!         (Info-prev-reference t)))))
  
  (defvar Info-index-nodes nil
    "Alist of cached index node names of visited Info files.
--- 2615,2623 ----
      (if (looking-at "\\* Menu:")
        (if recur
            (error "No cross references in this node")
!         (Info-prev-reference t))
!       (if (looking-at "^\\* ")
!         (forward-char 2)))))
  
  (defvar Info-index-nodes nil
    "Alist of cached index node names of visited Info files.
***************
*** 2799,2823 ****
        (goto-char (point-min))
        (re-search-forward "\\* Menu: *\n" nil t)
        (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t)
!         (add-to-list 'manuals (match-string 1)))
!       (dolist (manual manuals)
          (message "Searching %s" manual)
!         (if (setq nodes (Info-index-nodes (Info-find-file manual)))
!               (condition-case nil
                    (save-excursion
                      (Info-find-node manual (car nodes))
                      (while
                          (progn
                            (goto-char (point-min))
                            (while (re-search-forward pattern nil t)
!                             (add-to-list 'matches
!                                          (list manual
!                                                (match-string-no-properties 1)
!                                                (match-string-no-properties 2)
!                                                (match-string-no-properties 
3))))
                            (setq nodes (cdr nodes) node (car nodes)))
!                       (Info-goto-node node)))
!                 (error nil)))))
        (Info-goto-node (concat "(" current-file ")" current-node))
        (setq Info-history ohist
            Info-history-list ohist-list)
--- 2851,2879 ----
        (goto-char (point-min))
        (re-search-forward "\\* Menu: *\n" nil t)
        (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t)
!         (setq manuals (cons (match-string 1) manuals)))
!       (dolist (manual (nreverse manuals))
          (message "Searching %s" manual)
!         (condition-case err
!             (if (setq nodes (Info-index-nodes (Info-find-file manual)))
                    (save-excursion
                      (Info-find-node manual (car nodes))
                      (while
                          (progn
                            (goto-char (point-min))
                            (while (re-search-forward pattern nil t)
!                           (setq matches
!                                 (cons (list manual
!                                             (match-string-no-properties 1)
!                                             (match-string-no-properties 2)
!                                             (match-string-no-properties 3))
!                                       matches)))
                            (setq nodes (cdr nodes) node (car nodes)))
!                       (Info-goto-node node))))
!           (error
!            (message "%s" (if (eq (car-safe err) 'error)
!                              (nth 1 err) err))
!            (sit-for 1 t)))))
        (Info-goto-node (concat "(" current-file ")" current-node))
        (setq Info-history ohist
            Info-history-list ohist-list)
***************
*** 2827,2834 ****
        (with-current-buffer (get-buffer-create " *info-apropos*")
          (erase-buffer)
          (insert "\n\^_\nFile: apropos, Node: Index, Up: (dir)\n")
!         (insert "* Menu: \nNodes whose indices contain \"" string "\"\n\n")
!         (dolist (entry matches)
            (insert
             (format "* %-38s (%s)%s.%s\n"
                     (concat (nth 1 entry) " [" (nth 0 entry) "]:")
--- 2883,2890 ----
        (with-current-buffer (get-buffer-create " *info-apropos*")
          (erase-buffer)
          (insert "\n\^_\nFile: apropos, Node: Index, Up: (dir)\n")
!         (insert "* Menu: \nNodes whose indices contain `" string "':\n\n")
!         (dolist (entry (nreverse matches))
            (insert
             (format "* %-38s (%s)%s.%s\n"
                     (concat (nth 1 entry) " [" (nth 0 entry) "]:")
***************
*** 3001,3006 ****
--- 3057,3064 ----
    (define-key Info-mode-map "<" 'Info-top-node)
    (define-key Info-mode-map ">" 'Info-final-node)
    (define-key Info-mode-map "b" 'beginning-of-buffer)
+   ;; `w' is for consistency with dired-copy-filename-as-kill.
+   (define-key Info-mode-map "w" 'Info-copy-current-node-name)
    (define-key Info-mode-map "c" 'Info-copy-current-node-name)
    (define-key Info-mode-map "d" 'Info-directory)
    (define-key Info-mode-map "e" 'Info-edit)
***************
*** 3016,3030 ****
    (define-key Info-mode-map "q" 'Info-exit)
    (define-key Info-mode-map "r" 'Info-history-forward)
    (define-key Info-mode-map "s" 'Info-search)
-   (define-key Info-mode-map "S" 'Info-search-case-sensitively)
    ;; For consistency with Rmail.
    (define-key Info-mode-map "\M-s" 'Info-search)
    (define-key Info-mode-map "\M-n" 'clone-buffer)
    (define-key Info-mode-map "t" 'Info-top-node)
    (define-key Info-mode-map "T" 'Info-toc)
    (define-key Info-mode-map "u" 'Info-up)
!   ;; For consistency with dired-copy-filename-as-kill.
!   (define-key Info-mode-map "w" 'Info-copy-current-node-name)
    (define-key Info-mode-map "," 'Info-index-next)
    (define-key Info-mode-map "\177" 'Info-scroll-down)
    (define-key Info-mode-map [mouse-2] 'Info-mouse-follow-nearest-node)
--- 3074,3086 ----
    (define-key Info-mode-map "q" 'Info-exit)
    (define-key Info-mode-map "r" 'Info-history-forward)
    (define-key Info-mode-map "s" 'Info-search)
    ;; For consistency with Rmail.
    (define-key Info-mode-map "\M-s" 'Info-search)
    (define-key Info-mode-map "\M-n" 'clone-buffer)
    (define-key Info-mode-map "t" 'Info-top-node)
    (define-key Info-mode-map "T" 'Info-toc)
    (define-key Info-mode-map "u" 'Info-up)
!   (define-key Info-mode-map "^" 'Info-up)
    (define-key Info-mode-map "," 'Info-index-next)
    (define-key Info-mode-map "\177" 'Info-scroll-down)
    (define-key Info-mode-map [mouse-2] 'Info-mouse-follow-nearest-node)
***************
*** 3039,3045 ****
  
  (easy-menu-define
   Info-mode-menu Info-mode-map
!  "Menu for info files."
   '("Info"
     ["Up" Info-up :active (Info-check-pointer "up")
      :help "Go up in the Info tree"]
--- 3095,3101 ----
  
  (easy-menu-define
   Info-mode-menu Info-mode-map
!  "Menu for Info files."
   '("Info"
     ["Up" Info-up :active (Info-check-pointer "up")
      :help "Go up in the Info tree"]
***************
*** 3174,3185 ****
  
  
  (defun Info-copy-current-node-name (&optional arg)
!   "Put the name of the current info node into the kill ring.
! The name of the info file is prepended to the node name in parentheses.
  With a zero prefix arg, put the name inside a function call to `info'."
    (interactive "P")
    (unless Info-current-node
!     (error "No current info node"))
    (let ((node (concat "(" (file-name-nondirectory
                             (or (and (stringp Info-current-file)
                                      Info-current-file)
--- 3230,3241 ----
  
  
  (defun Info-copy-current-node-name (&optional arg)
!   "Put the name of the current Info node into the kill ring.
! The name of the Info file is prepended to the node name in parentheses.
  With a zero prefix arg, put the name inside a function call to `info'."
    (interactive "P")
    (unless Info-current-node
!     (error "No current Info node"))
    (let ((node (concat "(" (file-name-nondirectory
                             (or (and (stringp Info-current-file)
                                      Info-current-file)
***************
*** 3245,3251 ****
  \\[beginning-of-buffer]       Go to beginning of node.
  
  Advanced commands:
! \\[Info-copy-current-node-name]       Put name of current info node in the 
kill ring.
  \\[clone-buffer]      Select a new cloned Info buffer in another window.
  \\[Info-edit] Edit contents of selected node.
  1 .. 9        Pick first ... ninth item in node's menu.
--- 3301,3307 ----
  \\[beginning-of-buffer]       Go to beginning of node.
  
  Advanced commands:
! \\[Info-copy-current-node-name]       Put name of current Info node in the 
kill ring.
  \\[clone-buffer]      Select a new cloned Info buffer in another window.
  \\[Info-edit] Edit contents of selected node.
  1 .. 9        Pick first ... ninth item in node's menu.
***************
*** 3355,3361 ****
  Allowed only if variable `Info-enable-edit' is non-nil."
    (interactive)
    (or Info-enable-edit
!       (error "Editing info nodes is not enabled"))
    (Info-edit-mode)
    (message "%s" (substitute-command-keys
                 "Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return 
to info")))
--- 3411,3417 ----
  Allowed only if variable `Info-enable-edit' is non-nil."
    (interactive)
    (or Info-enable-edit
!       (error "Editing Info nodes is not enabled"))
    (Info-edit-mode)
    (message "%s" (substitute-command-keys
                 "Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return 
to info")))
***************
*** 3417,3423 ****
                          "\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\."
                          "\\(?:[ \t\n]+(line +\\([0-9]+\\))\\)?"))
        (info-file "emacs"))            ;default
!     ;; Determine which info file this command is documented in.
      (if (get command 'info-file)
        (setq info-file (get command 'info-file))
        ;; If it doesn't say explicitly, test its name against
--- 3473,3479 ----
                          "\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\."
                          "\\(?:[ \t\n]+(line +\\([0-9]+\\))\\)?"))
        (info-file "emacs"))            ;default
!     ;; Determine which Info file this command is documented in.
      (if (get command 'info-file)
        (setq info-file (get command 'info-file))
        ;; If it doesn't say explicitly, test its name against
***************
*** 3526,3576 ****
          (t
           (Info-goto-emacs-command-node command)))))
  
- (defface info-title-1
-   '((((type tty pc) (class color) (background light))
-      :foreground "green" :weight bold)
-     (((type tty pc) (class color) (background dark))
-      :foreground "yellow" :weight bold)
-     (t :height 1.2 :inherit info-title-2))
-   "Face for info titles at level 1."
-   :group 'info)
- ;; backward-compatibility alias
- (put 'Info-title-1-face 'face-alias 'info-title-1)
- 
- (defface info-title-2
-   '((((type tty pc) (class color)) :foreground "lightblue" :weight bold)
-     (t :height 1.2 :inherit info-title-3))
-   "Face for info titles at level 2."
-   :group 'info)
- ;; backward-compatibility alias
- (put 'Info-title-2-face 'face-alias 'info-title-2)
- 
- (defface info-title-3
-   '((((type tty pc) (class color)) :weight bold)
-     (t :height 1.2 :inherit info-title-4))
-   "Face for info titles at level 3."
-   :group 'info)
- ;; backward-compatibility alias
- (put 'Info-title-3-face 'face-alias 'info-title-3)
- 
- (defface info-title-4
-   '((((type tty pc) (class color)) :weight bold)
-     (t :weight bold :inherit variable-pitch))
-   "Face for info titles at level 4."
-   :group 'info)
- ;; backward-compatibility alias
- (put 'Info-title-4-face 'face-alias 'info-title-4)
- 
- (defface info-menu-header
-   '((((type tty pc))
-      :underline t
-      :weight bold)
-     (t
-      :inherit variable-pitch
-      :weight bold))
-   "Face for headers in Info menus."
-   :group 'info)
- 
  (defun Info-escape-percent (string)
    "Double all occurrences of `%' in STRING.
  
--- 3582,3587 ----
***************
*** 3867,3873 ****
                (if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 
1-9 keys
                    (put-text-property (match-beginning 0)
                                       (1+ (match-beginning 0))
!                                      'font-lock-face 'info-menu-5)))
              (when not-fontified-p
                (add-text-properties
                 (match-beginning 1) (match-end 1)
--- 3878,3884 ----
                (if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 
1-9 keys
                    (put-text-property (match-beginning 0)
                                       (1+ (match-beginning 0))
!                                      'font-lock-face 'info-menu-star)))
              (when not-fontified-p
                (add-text-properties
                 (match-beginning 1) (match-end 1)
***************
*** 3961,3967 ****
  
  ;;; Speedbar support:
  ;; These functions permit speedbar to display the "tags" in the
! ;; current info node.
  (eval-when-compile (require 'speedbar))
  
  (defvar Info-speedbar-key-map nil
--- 3972,3978 ----
  
  ;;; Speedbar support:
  ;; These functions permit speedbar to display the "tags" in the
! ;; current Info node.
  (eval-when-compile (require 'speedbar))
  
  (defvar Info-speedbar-key-map nil
***************
*** 4003,4009 ****
  ;;; Info hierarchy display method
  ;;;###autoload
  (defun Info-speedbar-browser ()
!   "Initialize speedbar to display an info node browser.
  This will add a speedbar major display mode."
    (interactive)
    (require 'speedbar)
--- 4014,4020 ----
  ;;; Info hierarchy display method
  ;;;###autoload
  (defun Info-speedbar-browser ()
!   "Initialize speedbar to display an Info node browser.
  This will add a speedbar major display mode."
    (interactive)
    (require 'speedbar)
***************
*** 4144,4150 ****
                "^No `.*' in index$"
                "^No cross-reference named"
                "^No cross.references in this node$"
!               "^No current info node$"
                "^No menu in this node$"
                "^No more items in menu$"
                "^No more nodes$"
--- 4155,4161 ----
                "^No `.*' in index$"
                "^No cross-reference named"
                "^No cross.references in this node$"
!               "^No current Info node$"
                "^No menu in this node$"
                "^No more items in menu$"
                "^No more nodes$"
***************
*** 4171,4177 ****
  (defun Info-restore-desktop-buffer (desktop-buffer-file-name
                                      desktop-buffer-name
                                      desktop-buffer-misc)
!   "Restore an info buffer specified in a desktop file."
    (let ((first (nth 0 desktop-buffer-misc))
          (second (nth 1 desktop-buffer-misc)))
    (when (and first second)
--- 4182,4188 ----
  (defun Info-restore-desktop-buffer (desktop-buffer-file-name
                                      desktop-buffer-name
                                      desktop-buffer-misc)
!   "Restore an Info buffer specified in a desktop file."
    (let ((first (nth 0 desktop-buffer-misc))
          (second (nth 1 desktop-buffer-misc)))
    (when (and first second)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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