emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 8485d41: Fix encoding of saving *Help* buffers


From: Eli Zaretskii
Subject: [Emacs-diffs] master 8485d41: Fix encoding of saving *Help* buffers
Date: Thu, 29 Oct 2015 17:38:24 +0000

branch: master
commit 8485d41e1948c8966a19343533988f6d26656037
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix encoding of saving *Help* buffers
    
    * lisp/help-fns.el (describe-function-1): If we use curved quotes,
    set help buffer's buffer-file-coding-system to UTF-8.  (Bug#21780)
---
 lisp/help-fns.el |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 945b4d5..f7d05a4 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -623,7 +623,12 @@ FILE is the file where FUNCTION was probably defined."
                                           real-function key-bindings-buffer)))
             (run-hook-with-args 'help-fns-describe-function-functions function)
             (insert "\n"
-                    (or doc "Not documented."))))))))
+                    (or doc "Not documented."))
+            ;; Avoid asking the user annoyng questions if she decides
+            ;; to save the help buffer, when her locale's codeset
+            ;; isn't UTF-8.
+            (unless (memq text-quoting-style '(straight grave))
+              (set-buffer-file-coding-system 'utf-8))))))))
 
 ;; Add defaults to `help-fns-describe-function-functions'.
 (add-hook 'help-fns-describe-function-functions #'help-fns--obsolete)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]