aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international
diff options
context:
space:
mode:
authorGlenn Morris2019-03-09 10:07:46 -0800
committerGlenn Morris2019-03-09 10:07:46 -0800
commit3b63afd73b541ea559aa58edc1901c8b30e2af40 (patch)
treea68afec4142bd100f3b6dfa3eb90aa2c0a71b34f /lisp/international
parente1819a254f28a7dcba3c395c345fe237a512e92e (diff)
parent0589de55c465627c16314519568f22daa62ff654 (diff)
downloademacs-3b63afd73b541ea559aa58edc1901c8b30e2af40.tar.gz
emacs-3b63afd73b541ea559aa58edc1901c8b30e2af40.zip
Merge from origin/emacs-26
0589de5 (origin/emacs-26) Fix markup of fake keys in the ELisp manual 82d4b98 Avoid errors in Auto Revert mode a3b1935 Mention empty strings in file name expansion, emacs lisp refe... a38da0d cc-mode.texi: Work around makeinfo alignment bug. Fix proble... 464ee80 Warn against recursive invocations of 'buffer-list-update-hoo... 60b5c10 Provide more details in doc-string of 'delete-windows-on' (Bu... f0be0f1 Improve documentation of 'delete-windows-on' f1bddc7 * lisp/frame.el (make-frame-command): Doc fix. (Bug#34715) 2848623 Avoid undefined behavior in gdb-mi.el dbf1837 * lisp/window.el (fit-frame-to-buffer): Make doc-string more ... 099ef44 Minor spelling and grammar fixes (bug#34756) 52fd400 Minor improvement of documentation of '(when CONDITION . SPEC)' f872b65 Improve documentation of 'auto-coding-functions' 04cad5e Fix visiting XML files with non-Unix EOL format a89fabe Update example major mode code in Elisp manual # Conflicts: # lisp/autorevert.el # lisp/window.el
Diffstat (limited to 'lisp/international')
-rw-r--r--lisp/international/mule.el25
1 files changed, 18 insertions, 7 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 5393958013b..281e5297d63 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1852,9 +1852,12 @@ or nil."
1852 1852
1853Each function in this list should be written to operate on the 1853Each function in this list should be written to operate on the
1854current buffer, but should not modify it in any way. The buffer 1854current buffer, but should not modify it in any way. The buffer
1855will contain undecoded text of parts of the file. Each function 1855will contain the text of parts of the file. Each function
1856should take one argument, SIZE, which says how many characters 1856should take one argument, SIZE, which says how many characters
1857\(starting from point) it should look at. 1857\(starting from point) it should look at. The function might be
1858called both when the file is visited and Emacs wants to decode
1859its contents, and when the file's buffer is about to be saved
1860and Emacs wants to determine how to encode its contents.
1858 1861
1859If one of these functions succeeds in determining a coding 1862If one of these functions succeeds in determining a coding
1860system, it should return that coding system. Otherwise, it 1863system, it should return that coding system. Otherwise, it
@@ -2501,10 +2504,17 @@ This function is intended to be added to `auto-coding-functions'."
2501 (let ((sym-type (coding-system-type sym)) 2504 (let ((sym-type (coding-system-type sym))
2502 (bfcs-type 2505 (bfcs-type
2503 (coding-system-type buffer-file-coding-system))) 2506 (coding-system-type buffer-file-coding-system)))
2504 ;; 'charset' will signal an error in 2507 ;; If the buffer is unibyte, its encoding is
2505 ;; coding-system-equal, since it isn't a 2508 ;; immaterial (it is just the default value of
2506 ;; coding-system. So test that up front. 2509 ;; buffer-file-coding-system), so we ignore it.
2507 (if (and (not (equal sym-type 'charset)) 2510 ;; This situation happens when this function is
2511 ;; called as part of visiting a file, as opposed
2512 ;; to when saving a buffer to a file.
2513 (if (and enable-multibyte-characters
2514 ;; 'charset' will signal an error in
2515 ;; coding-system-equal, since it isn't a
2516 ;; coding-system. So test that up front.
2517 (not (equal sym-type 'charset))
2508 (coding-system-equal 'utf-8 sym-type) 2518 (coding-system-equal 'utf-8 sym-type)
2509 (coding-system-equal 'utf-8 bfcs-type)) 2519 (coding-system-equal 'utf-8 bfcs-type))
2510 buffer-file-coding-system 2520 buffer-file-coding-system
@@ -2556,7 +2566,8 @@ This function is intended to be added to `auto-coding-functions'."
2556 (let ((sym-type (coding-system-type sym)) 2566 (let ((sym-type (coding-system-type sym))
2557 (bfcs-type 2567 (bfcs-type
2558 (coding-system-type buffer-file-coding-system))) 2568 (coding-system-type buffer-file-coding-system)))
2559 (if (and (coding-system-equal 'utf-8 sym-type) 2569 (if (and enable-multibyte-characters
2570 (coding-system-equal 'utf-8 sym-type)
2560 (coding-system-equal 'utf-8 bfcs-type)) 2571 (coding-system-equal 'utf-8 bfcs-type))
2561 buffer-file-coding-system 2572 buffer-file-coding-system
2562 sym)) 2573 sym))