aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-07-18 21:43:21 +0300
committerEli Zaretskii2015-07-18 21:43:21 +0300
commit3d139d59fb0c3f4027109d4fac271a8aa52db5fc (patch)
tree25b86badc892f5866c86bda6180680b7c85bef81
parent5d72d5d1f4d105556196d99f0ea3838dfedd2f10 (diff)
downloademacs-3d139d59fb0c3f4027109d4fac271a8aa52db5fc.tar.gz
emacs-3d139d59fb0c3f4027109d4fac271a8aa52db5fc.zip
Fix info-apropos when the default encoding is Latin-N
* lisp/info.el (Info-find-node-2): Reset the buffer's encoding to 'undecided', so that it is set to the encoding of the Info file we are about to insert. Otherwise, 'info-apropos' will fail to find some index nodes in some UTF-8 encoded files, if the buffer's previous encoding is Latin-N or some such.
-rw-r--r--lisp/info.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/info.el b/lisp/info.el
index bcff7ccffd3..48d9d1981af 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1115,6 +1115,10 @@ is non-nil)."
1115 Info-current-file-completions nil 1115 Info-current-file-completions nil
1116 buffer-file-name nil) 1116 buffer-file-name nil)
1117 (erase-buffer) 1117 (erase-buffer)
1118 ;; Erase any memory of the previous coding-system, so that
1119 ;; info-insert-file-contents sets the buffer's encoding to
1120 ;; what the Info file specifies.
1121 (set-buffer-file-coding-system 'undecided t)
1118 (info-insert-file-contents filename nil) 1122 (info-insert-file-contents filename nil)
1119 (setq default-directory (file-name-directory filename)) 1123 (setq default-directory (file-name-directory filename))
1120 (set-buffer-modified-p nil) 1124 (set-buffer-modified-p nil)