Browse Source

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 years ago
parent
commit
fabc6b6a6c
1 changed files with 5 additions and 0 deletions
  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)
 (defun edit-server-accept (server client msg)
   "Accept a new client connection."
   "Accept a new client connection."
   (let ((buffer (generate-new-buffer edit-server-process-buffer-name)))
   (let ((buffer (generate-new-buffer edit-server-process-buffer-name)))
+    (and (fboundp 'set-buffer-multibyte)
+         (set-buffer-multibyte t)) ; djb
     (buffer-disable-undo buffer)
     (buffer-disable-undo buffer)
     (set-process-buffer client buffer)
     (set-process-buffer client buffer)
     (set-process-filter client 'edit-server-filter)
     (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
   (let ((buffer (generate-new-buffer (if edit-server-url
 					 edit-server-url
 					 edit-server-url
 				       edit-server-edit-buffer-name))))
 				       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))
     (copy-to-buffer buffer (point-min) (point-max))
     (with-current-buffer buffer
     (with-current-buffer buffer
       (not-modified)
       (not-modified)