X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Finfo.el;h=a83a578971c335a6383843b8b12f142d457170d7;hb=02f6299e149f2fbedd2b39392e115d5122b8577f;hp=bc8f7653a84cc0b3b0e4bde72a88f67b223aff6f;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/info.el b/lisp/info.el index bc8f765..a83a578 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -393,7 +393,7 @@ file. An example might be something like: :type '(repeat directory) :group 'info) -(defcustom Info-auto-generate-directory 'if-missing +(defcustom Info-auto-generate-directory 'if-outdated "*When to auto generate an info directory listing. Possible values are: nil or `never' never auto-generate a directory listing, @@ -699,7 +699,8 @@ further (recursive) error recovery. TRYFILE is ??" Info-current-subfile nil Info-current-file-completions nil Info-index-alternatives nil - buffer-file-name nil) + buffer-file-name nil + buffer-file-truename nil) (erase-buffer) (if (string= "dir" (file-name-nondirectory filename)) (Info-insert-dir) @@ -1033,8 +1034,9 @@ actually get any text from." (setq lbuffers (cdr lbuffers))) (message "Composing main Info directory...done")) (setq Info-dir-contents (buffer-string))) - (setq default-directory Info-dir-contents-directory) - (setq buffer-file-name (caar Info-dir-file-attributes))) + (setq default-directory (file-name-as-directory Info-dir-contents-directory)) + (setq buffer-file-name (caar Info-dir-file-attributes) + buffer-file-truename (file-truename buffer-file-name))) (defmacro Info-directory-files (dir-file &optional all full nosort files-only) "Return a list of Info files living in the same directory as DIR-FILE. @@ -1087,8 +1089,8 @@ optional arguments." (null (Info-directory-files file 'all))) (if (not (find-buffer-visiting file)) (if (not (file-exists-p file)) - (if (or (eq Info-auto-generate-directory 'always) - (eq Info-auto-generate-directory 'if-missing)) + (if (or (memq Info-auto-generate-directory + '(always if-missing if-outdated))) (Info-build-dir-anew (file-name-directory file))) (if (or (eq Info-auto-generate-directory 'always) (and (eq Info-auto-generate-directory 'if-outdated) @@ -1405,7 +1407,8 @@ invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"." (throw 'foo t))))) (or (equal Info-current-subfile lastfilename) (let ((buffer-read-only nil)) - (setq buffer-file-name nil) + (setq buffer-file-name nil + buffer-file-truename nil) (widen) (erase-buffer) (Info-insert-file-contents (Info-suffixed-file @@ -1510,10 +1513,11 @@ versions of NAME. Only the suffixes are tried." (format (cdr (car suff)) file) (concat (cdr (car suff)) " < " file)))) (message "%s..." command) - (call-process shell-file-name nil t nil "-c" command) + (call-process shell-file-name nil t nil shell-command-switch command) (message "") (when visit - (setq buffer-file-name file) + (setq buffer-file-name file + buffer-file-truename (file-truename buffer-file-name)) (set-buffer-modified-p nil) (clear-visited-file-modtime))) (insert-file-contents file visit)))) @@ -2008,7 +2012,7 @@ NAME may be an abbreviation of the reference name." ;; Kludge. ;; Allow dots in node name not followed by whitespace. (re-search-forward - (concat "\\(([^)]+)[^." + (concat "\\(([^)]+)[^.," (if multi-line "" "\n") "]*\\|\\([^.,\t" (if multi-line "" "\n") @@ -2268,7 +2272,7 @@ Give a blank topic name to go to the Index node itself." (interactive "sIndex topic: ") (let ((pattern (format "\n\\* \\([^\n:]*%s[^\n:]*\\):[ \t]*%s" (regexp-quote topic) - "\\(.*\\)\\.[ t]*\\([0-9]*\\)$")) + "\\(.*\\)\\.[ \t]*\\([0-9]*\\)$")) node) (message "Searching index for `%s'..." topic) (Info-goto-node "Top") @@ -2430,7 +2434,8 @@ This command is designed to be used whether you are already in Info or not." (if fn (format " (default %s)" fn) "")) - obarray 'fboundp t)) + obarray 'fboundp t + nil nil (and fn (symbol-name fn)))) (list (if (equal val "") fn (intern val))))) (save-window-excursion @@ -3034,7 +3039,7 @@ The locations are of the format used in Info-history, i.e. \(FILENAME NODENAME BUFFERPOS\)." (let ((where '()) (cmd-desc (concat "^\\* " (regexp-quote (symbol-name command)) - ":\\s *\\(.*\\)\\.$"))) + ":\\s *\\(.*\\)\\."))) (save-excursion (Info-find-node "XEmacs" "Command Index") ;; Take the index node off the Info history. @@ -3103,7 +3108,7 @@ The locations are of the format used in Info-history, i.e. (forward-char 1) (insert "\n") (just-one-space) - (backward-delete-char 1) + (delete-backward-char 1) (setq p (point) len 0)))) (toggle-read-only 1)