Selaa lähdekoodia

edit-server.el: do not call `set-buffer-multibyte` in the process buffer

In edit-server-accept, set-buffer-multibyte is called, but it's applied to
whatever buffer was previously active because the call is not wrapped with
`with-current-buffer`. This makes edit-server fail if that previously
active buffer is an indirect buffer (set-buffer-multibyte is illegal in an
indirect buffer).

Rather than add with-current-buffer, though, just remove the call
altogether. It is not necessary for the process buffer to be multibyte.
Dato Simó 10 vuotta sitten
vanhempi
commit
1894a28dc8
1 muutettua tiedostoa jossa 0 lisäystä ja 2 poistoa
  1. 0 2
      edit-server.el

+ 0 - 2
edit-server.el

@@ -352,8 +352,6 @@ non-nil, then STRING is also echoed to the message line."
 (defun edit-server-accept (server client msg)
   "Accept a new client connection."
   (let ((buffer (generate-new-buffer edit-server-process-buffer-name)))
-    (when (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)