Jelajahi Sumber

From: "David J. Biesack" <David.Biesack@sas.com>

Here is a small patch that I have found convenient - it allows the
edit buffer to run in multibyte mode, so that it displays Unicode
characters correctly in Emacs 23. (I often edit wiki pages in which
others have inserted Unicode ellipses ... or left/right double quotes
or em dash. With emacs multibyte enabled, this characters display
correctly instead  of as binary bytes.
Alex Bennee 14 tahun lalu
induk
melakukan
fabc6b6a6c
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      edit-server.el

+ 5 - 0
edit-server.el

@@ -211,6 +211,8 @@ If `edit-server-verbose' is non-nil, then STRING is also echoed to the message l
 (defun edit-server-accept (server client msg)
   "Accept a new client connection."
   (let ((buffer (generate-new-buffer edit-server-process-buffer-name)))
+    (and (fboundp 'set-buffer-multibyte)
+         (set-buffer-multibyte t)) ; djb
     (buffer-disable-undo buffer)
     (set-process-buffer client buffer)
     (set-process-filter client 'edit-server-filter)
@@ -315,6 +317,9 @@ If `edit-server-verbose' is non-nil, then STRING is also echoed to the message l
   (let ((buffer (generate-new-buffer (if edit-server-url
 					 edit-server-url
 				       edit-server-edit-buffer-name))))
+    (with-current-buffer buffer
+      (and (fboundp 'set-buffer-multibyte)
+           (set-buffer-multibyte t))) ; djb
     (copy-to-buffer buffer (point-min) (point-max))
     (with-current-buffer buffer
       (not-modified)