summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 30df4bfe5c1..f2e29578f89 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -654,9 +654,11 @@ Do the right thing if the file has been compressed or zipped."
;; Clear the caches of modified Info files.
(let* ((attribs-old (cdr (assoc fullname Info-file-attributes)))
- (modtime-old (and attribs-old (nth 5 attribs-old)))
+ (modtime-old (and attribs-old
+ (file-attribute-modification-time attribs-old)))
(attribs-new (and (stringp fullname) (file-attributes fullname)))
- (modtime-new (and attribs-new (nth 5 attribs-new))))
+ (modtime-new (and attribs-new
+ (file-attribute-modification-time attribs-new))))
(when (and modtime-old modtime-new
(time-less-p modtime-old modtime-new))
(setq Info-index-nodes (remove (assoc (or Info-current-file filename)
@@ -877,10 +879,13 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
(forward-line 1) ; does the line after delimiter match REGEXP?
(re-search-backward regexp beg t))))
-(defun Info-find-file (filename &optional noerror)
+(defun Info-find-file (filename &optional noerror no-pop-to-dir)
"Return expanded FILENAME, or t if FILENAME is \"dir\".
Optional second argument NOERROR, if t, means if file is not found
-just return nil (no error)."
+just return nil (no error).
+
+If NO-POP-TO-DIR, don't try to pop to the info buffer if we can't
+find a node."
;; Convert filename to lower case if not found as specified.
;; Expand it.
(cond
@@ -939,7 +944,8 @@ just return nil (no error)."
(if noerror
(setq filename nil)
;; If there is no previous Info file, go to the directory.
- (unless Info-current-file
+ (when (and (not no-pop-to-dir)
+ (not Info-current-file))
(Info-directory))
(user-error "Info file %s does not exist" filename)))
filename))))
@@ -1877,7 +1883,7 @@ See `completing-read' for a description of arguments and usage."
(lambda (string pred action)
(complete-with-action
action
- (Info-build-node-completions (Info-find-file file1))
+ (Info-build-node-completions (Info-find-file file1 nil t))
string pred))
nodename predicate code))))
;; Otherwise use Info-read-node-completion-table.
@@ -2022,7 +2028,7 @@ If DIRECTION is `backward', search in the reverse direction."
Info-isearch-initial-node
bound
(and found (> found opoint-min) (< found opoint-max)))
- (signal 'user-search-failed (list regexp "(end of node)")))
+ (signal 'user-search-failed (list regexp "end of node")))
;; If no subfiles, give error now.
(unless (or found Info-current-subfile)
@@ -3934,8 +3940,8 @@ If FORK is a string, it is the name to use for the new buffer."
If FORK is non-nil, it is passed to `Info-goto-node'."
(let (node)
(cond
- ((setq node (Info-get-token (point) "[hf]t?tps?://"
- "\\([hf]t?tps?://[^ \t\n\"`‘({<>})’']+\\)"))
+ ((setq node (Info-get-token (point) "\\(?:f\\(?:ile\\|tp\\)\\|https?\\)://"
+ "\\(\\(?:f\\(?:ile\\|tp\\)\\|https?\\)://[^ \t\n\"`‘({<>})’']+\\)"))
(browse-url node)
(setq node t))
((setq node (Info-get-token (point) "\\*note[ \n\t]+"