]> git.eshelyaron.com Git - emacs.git/commitdiff
(server-visit-files): Set server-existing-buffer
authorGerd Moellmann <gerd@gnu.org>
Mon, 9 Apr 2001 14:29:56 +0000 (14:29 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 9 Apr 2001 14:29:56 +0000 (14:29 +0000)
correctly.
(server-visit-files): Run server-visit-hook after going to
line 1 so that the hook can set point as it sees fit.

lisp/ChangeLog
lisp/server.el

index 7aea13e00cf287fb1fc81d9874613ceabe15c39e..656695423f78f1d9b97c6bf980bc16f00f3a914d 100644 (file)
@@ -1,5 +1,10 @@
 2001-04-09  Gerd Moellmann  <gerd@gnu.org>
 
+       * server.el (server-visit-files): Set server-existing-buffer
+       correctly.
+       (server-visit-files): Run server-visit-hook after going to
+       line 1 so that the hook can set point as it sees fit.
+
        * bindings.el (mode-line-modified): Unify help messages.
 
 2001-04-07  Eli Zaretskii  <eliz@is.elta.co.il>
index 54e452f65262bc8829e8b31f6947b7ef75f0ce53..a03e7815db533c1b4b9904f598a0a2055dd552a7 100644 (file)
@@ -1,6 +1,6 @@
 ;;; server.el --- Lisp code for GNU Emacs running as server process.
 
-;; Copyright (C) 1986, 87, 92, 94, 95, 96, 97, 98, 99, 2000
+;; Copyright (C) 1986, 87, 92, 94, 95, 96, 97, 98, 99, 2000, 2001
 ;;      Free Software Foundation, Inc.
 
 ;; Author: William Sommerfeld <wesommer@athena.mit.edu>
@@ -310,20 +310,22 @@ so don't mark these buffers specially, just visit them normally."
                 (obuf (get-file-buffer filen)))
            (push filen file-name-history)
            (if (and obuf (set-buffer obuf))
-               (cond ((file-exists-p filen)
-                      (if (or (not (verify-visited-file-modtime obuf))
-                              (buffer-modified-p obuf))
-                          (revert-buffer t nil)))
-                     (t
-                      (if (y-or-n-p
-                           (concat "File no longer exists: "
-                                   filen
-                                   ", write buffer to file? "))
-                          (write-file filen))))
+               (progn
+                 (cond ((file-exists-p filen)
+                        (if (or (not (verify-visited-file-modtime obuf))
+                                (buffer-modified-p obuf))
+                            (revert-buffer t nil)))
+                       (t
+                        (if (y-or-n-p
+                             (concat "File no longer exists: "
+                                     filen
+                                     ", write buffer to file? "))
+                            (write-file filen))))
+                 (setq server-existing-buffer t)
+                 (goto-line (nth 1 (car files))))
              (set-buffer (find-file-noselect filen))
-             (setq server-existing-buffer t)
+             (goto-line (nth 1 (car files)))
              (run-hooks 'server-visit-hook)))
-         (goto-line (nth 1 (car files)))
          (if (not nowait)
              (setq server-buffer-clients
                    (cons (car client) server-buffer-clients)))