aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-03-09 22:18:29 -0400
committerStefan Monnier2014-03-09 22:18:29 -0400
commitca70fe789c5ca3940638f43a1e83af88f742e24c (patch)
tree264886ac48065807e246edc3099f2d63bf86a091
parentf11352e68b53f0c9dc810124664691f4b73b8ca3 (diff)
downloademacs-ca70fe789c5ca3940638f43a1e83af88f742e24c.tar.gz
emacs-ca70fe789c5ca3940638f43a1e83af88f742e24c.zip
* lisp/desktop.el (desktop-create-buffer): Don't run activate-mark-hook.
Fixes: debbugs:14430
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/desktop.el47
2 files changed, 29 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3388f211b86..43f285fddc4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * desktop.el (desktop-create-buffer): Don't run activate-mark-hook
4 (bug#14430).
5
12014-03-09 Juri Linkov <juri@jurta.org> 62014-03-09 Juri Linkov <juri@jurta.org>
2 7
3 * ansi-color.el (ansi-color-names-vector): Copy default colors 8 * ansi-color.el (ansi-color-names-vector): Copy default colors
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 69c17015030..0677b8c85dd 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -491,13 +491,13 @@ Handlers are called with argument list
491 491
492Furthermore, they may use the following variables: 492Furthermore, they may use the following variables:
493 493
494 desktop-file-version 494 `desktop-file-version'
495 desktop-buffer-major-mode 495 `desktop-buffer-major-mode'
496 desktop-buffer-minor-modes 496 `desktop-buffer-minor-modes'
497 desktop-buffer-point 497 `desktop-buffer-point'
498 desktop-buffer-mark 498 `desktop-buffer-mark'
499 desktop-buffer-read-only 499 `desktop-buffer-read-only'
500 desktop-buffer-locals 500 `desktop-buffer-locals'
501 501
502If a handler returns a buffer, then the saved mode settings 502If a handler returns a buffer, then the saved mode settings
503and variable values for that buffer are copied into it. 503and variable values for that buffer are copied into it.
@@ -551,15 +551,15 @@ Handlers are called with argument list
551 551
552Furthermore, they may use the following variables: 552Furthermore, they may use the following variables:
553 553
554 desktop-file-version 554 `desktop-file-version'
555 desktop-buffer-file-name 555 `desktop-buffer-file-name'
556 desktop-buffer-name 556 `desktop-buffer-name'
557 desktop-buffer-major-mode 557 `desktop-buffer-major-mode'
558 desktop-buffer-minor-modes 558 `desktop-buffer-minor-modes'
559 desktop-buffer-point 559 `desktop-buffer-point'
560 desktop-buffer-mark 560 `desktop-buffer-mark'
561 desktop-buffer-read-only 561 `desktop-buffer-read-only'
562 desktop-buffer-misc 562 `desktop-buffer-misc'
563 563
564When a handler is called, the buffer has been created and the major mode has 564When a handler is called, the buffer has been created and the major mode has
565been set, but local variables listed in desktop-buffer-locals has not yet been 565been set, but local variables listed in desktop-buffer-locals has not yet been
@@ -1380,20 +1380,21 @@ after that many seconds of idle time."
1380 (eval desktop-buffer-point) 1380 (eval desktop-buffer-point)
1381 (error (message "%s" (error-message-string err)) 1)))) 1381 (error (message "%s" (error-message-string err)) 1))))
1382 (when desktop-buffer-mark 1382 (when desktop-buffer-mark
1383 (if (consp desktop-buffer-mark) 1383 (if (consp desktop-buffer-mark)
1384 (progn 1384 (progn
1385 (set-mark (car desktop-buffer-mark)) 1385 (move-marker (mark-marker) (car desktop-buffer-mark))
1386 (setq mark-active (car (cdr desktop-buffer-mark)))) 1386 ;; FIXME: Should we call (de)activate-mark instead?
1387 (set-mark desktop-buffer-mark))) 1387 (setq mark-active (car (cdr desktop-buffer-mark))))
1388 (move-marker (mark-marker) desktop-buffer-mark)))
1388 ;; Never override file system if the file really is read-only marked. 1389 ;; Never override file system if the file really is read-only marked.
1389 (when desktop-buffer-read-only (setq buffer-read-only desktop-buffer-read-only)) 1390 (when desktop-buffer-read-only (setq buffer-read-only desktop-buffer-read-only))
1390 (dolist (this desktop-buffer-locals) 1391 (dolist (this desktop-buffer-locals)
1391 (if (consp this) 1392 (if (consp this)
1392 ;; an entry of this form `(symbol . value)' 1393 ;; An entry of this form `(symbol . value)'.
1393 (progn 1394 (progn
1394 (make-local-variable (car this)) 1395 (make-local-variable (car this))
1395 (set (car this) (cdr this))) 1396 (set (car this) (cdr this)))
1396 ;; an entry of the form `symbol' 1397 ;; An entry of the form `symbol'.
1397 (make-local-variable this) 1398 (make-local-variable this)
1398 (makunbound this)))))))) 1399 (makunbound this))))))))
1399 1400