1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00

(info-insert-file-contents): Set default-directory

around call to shell-command-on-region.

(Info-find-node, Info-restore-point, Info-search,
Info-forward-node, Info-backward-node): Use string-equal, not equal,
to compare node names.
This commit is contained in:
Richard M. Stallman 1995-04-24 15:31:19 +00:00
parent fd89878d16
commit e90d12719b

View File

@ -164,7 +164,8 @@ Do the right thing if the file has been compressed or zipped."
(setq decoder nil)) (setq decoder nil))
(insert-file-contents fullname visit) (insert-file-contents fullname visit)
(if decoder (if decoder
(let ((buffer-read-only nil)) (let ((buffer-read-only nil)
(default-directory (file-directory fullname)))
(shell-command-on-region (point-min) (point-max) decoder t))))) (shell-command-on-region (point-min) (point-max) decoder t)))))
;;;###autoload (add-hook 'same-window-buffer-names "*info*") ;;;###autoload (add-hook 'same-window-buffer-names "*info*")
@ -278,7 +279,8 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
(set-marker Info-tag-table-marker nil) (set-marker Info-tag-table-marker nil)
(goto-char (point-max)) (goto-char (point-max))
(forward-line -8) (forward-line -8)
(or (equal nodename "*") ;; Use string-equal, not equal, to ignore text props.
(or (string-equal nodename "*")
(not (search-forward "\^_\nEnd tag table\n" nil t)) (not (search-forward "\^_\nEnd tag table\n" nil t))
(let (pos) (let (pos)
;; We have a tag table. Find its beginning. ;; We have a tag table. Find its beginning.
@ -303,7 +305,8 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
(setq Info-current-file (setq Info-current-file
(if (eq filename t) "dir" (if (eq filename t) "dir"
(file-name-sans-versions buffer-file-name))))) (file-name-sans-versions buffer-file-name)))))
(if (equal nodename "*") ;; Use string-equal, not equal, to ignore text props.
(if (string-equal nodename "*")
(progn (setq Info-current-node nodename) (progn (setq Info-current-node nodename)
(Info-set-mode-line)) (Info-set-mode-line))
;; Search file for a suitable node. ;; Search file for a suitable node.
@ -637,7 +640,8 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
"If this node has been visited, restore the point value when we left." "If this node has been visited, restore the point value when we left."
(while hl (while hl
(if (and (equal (nth 0 (car hl)) Info-current-file) (if (and (equal (nth 0 (car hl)) Info-current-file)
(equal (nth 1 (car hl)) Info-current-node)) ;; Use string-equal, not equal, to ignore text props.
(string-equal (nth 1 (car hl)) Info-current-node))
(progn (progn
(goto-char (nth 2 (car hl))) (goto-char (nth 2 (car hl)))
(setq hl nil)) ;terminate the while at next iter (setq hl nil)) ;terminate the while at next iter
@ -706,7 +710,8 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
(widen) (widen)
(goto-char found) (goto-char found)
(Info-select-node) (Info-select-node)
(or (and (equal onode Info-current-node) ;; Use string-equal, not equal, to ignore text props.
(or (and (string-equal onode Info-current-node)
(equal ofile Info-current-file)) (equal ofile Info-current-file))
(setq Info-history (cons (list ofile onode opoint) (setq Info-history (cons (list ofile onode opoint)
Info-history))))) Info-history)))))
@ -1032,7 +1037,9 @@ N is the digit argument used to invoke this command."
(Info-next) (Info-next)
t) t)
((and (save-excursion (search-backward "up:" nil t)) ((and (save-excursion (search-backward "up:" nil t))
(not (equal (downcase (Info-extract-pointer "up")) "top"))) ;; Use string-equal, not equal, to ignore text props.
(not (string-equal (downcase (Info-extract-pointer "up"))
"top")))
(let ((old-node Info-current-node)) (let ((old-node Info-current-node))
(Info-up) (Info-up)
(let (Info-history success) (let (Info-history success)
@ -1050,7 +1057,10 @@ N is the digit argument used to invoke this command."
(cond ((and upnode (string-match "(" upnode)) (cond ((and upnode (string-match "(" upnode))
(error "First node in file")) (error "First node in file"))
((and upnode (or (null prevnode) ((and upnode (or (null prevnode)
(equal (downcase prevnode) (downcase upnode)))) ;; Use string-equal, not equal,
;; to ignore text properties.
(string-equal (downcase prevnode)
(downcase upnode))))
(Info-up)) (Info-up))
(prevnode (prevnode
;; If we move back at the same level, ;; If we move back at the same level,