+2004-10-28 Juri Linkov <juri@jurta.org>
+
+ * info.el (Info-file-list-for-emacs): Add ("Info" . "info")
+ to search `Info-...' commands in `info' manual.
+ (Info-goto-emacs-command-node, Info-goto-emacs-key-command-node):
+ Add 'info-file "emacs" property.
+ (Info-find-emacs-command-nodes): Fix index line number regexp.
+ Set real line number (instead of fake 0) in first element of the
+ returned list.
+ (Info-goto-emacs-command-node): Use line number of first element
+ to set point in the first found Info node.
+
+ * progmodes/grep.el (grep-regexp-alist): Move match highlighting
+ code to `grep-mode-font-lock-keywords'.
+ (grep-mode-font-lock-keywords): Delete grep markers instead
+ of making them invisible.
+
2004-10-28 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
* mail/emacsbug.el (report-emacs-bug): Insert x-server-vendor
(if (match-beginning 5)
(string-to-number (match-string 5))
(buffer-substring (match-beginning 0) (1- (match-beginning 1)))))
-;;; Comment out the next line to use names of cross-references:
+;;; Uncomment next line to use names of cross-references in non-index nodes:
;;; (setq Info-point-loc
;;; (buffer-substring (match-beginning 0) (1- (match-beginning 1))))
)
(message "Tags may have changed. Use Info-tagify if necessary")))
\f
(defvar Info-file-list-for-emacs
- '("ediff" "eudc" "forms" "gnus" "info" ("mh" . "mh-e")
+ '("ediff" "eudc" "forms" "gnus" "info" ("Info" . "info") ("mh" . "mh-e")
"sc" "message" ("dired" . "dired-x") "viper" "vip" "idlwave"
("c" . "ccmode") ("c++" . "ccmode") ("objc" . "ccmode")
("java" . "ccmode") ("idl" . "ccmode") ("pike" . "ccmode")
If COMMAND has no property, the variable `Info-file-list-for-emacs'
defines heuristics for which Info manual to try.
The locations are of the format used in `Info-history', i.e.
-\(FILENAME NODENAME BUFFERPOS\)."
- (let ((where '())
+\(FILENAME NODENAME BUFFERPOS\), where BUFFERPOS is the line number
+in the first element of the returned list (which is treated specially in
+`Info-goto-emacs-command-node'), and 0 for the rest elements of a list."
+ (let ((where '()) line-number
(cmd-desc (concat "^\\* +" (regexp-quote (symbol-name command))
"\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\."
- "\\([ \t]*(line[ \t]*[0-9]*)\\)?$"))
+ "\\(?:[ \t\n]+(line +\\([0-9]+\\))\\)?"))
(info-file "emacs")) ;default
;; Determine which info file this command is documented in.
(if (get command 'info-file)
(cons (list Info-current-file
(match-string-no-properties 2)
0)
- where)))
+ where))
+ (setq line-number (and (match-beginning 3)
+ (string-to-number (match-string 3)))))
(and (setq nodes (cdr nodes) node (car nodes))))
(Info-goto-node node)))
- where))
+ (if (and line-number where)
+ (cons (list (nth 0 (car where)) (nth 1 (car where)) line-number)
+ (cdr where))
+ where)))
+;;;###autoload (put 'Info-goto-emacs-command-node 'info-file "emacs")
;;;###autoload
(defun Info-goto-emacs-command-node (command)
"Go to the Info node in the Emacs manual for command COMMAND.
;; Bind Info-history to nil, to prevent the last Index node
;; visited by Info-find-emacs-command-nodes from being
;; pushed onto the history.
- (let ((Info-history nil) (Info-history-list nil))
- (Info-find-node (car (car where))
- (car (cdr (car where)))))
+ (let ((Info-history nil) (Info-history-list nil)
+ (line-number (nth 2 (car where))))
+ (Info-find-node (nth 0 (car where)) (nth 1 (car where)))
+ (if (and (integerp line-number) (> line-number 0))
+ (forward-line (1- line-number))))
(if (> num-matches 1)
(progn
;; (car where) will be pushed onto Info-history
(if (> num-matches 2) "them" "it")))))
(error "Couldn't find documentation for %s" command))))
+;;;###autoload (put 'Info-goto-emacs-key-command-node 'info-file "emacs")
;;;###autoload
(defun Info-goto-emacs-key-command-node (key)
"Go to the node in the Emacs manual which describes the command bound to KEY.