diff options
author | Glenn Morris <rgm@gnu.org> | 2014-09-14 17:20:21 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-09-14 17:20:21 -0700 |
commit | 11af46027d22daa11d0df7d5032e6925c990dad1 (patch) | |
tree | 4d0d528afaf7449dba3cb73af0745980306c57d0 /lisp | |
parent | 5ce52d05c93e0c006bbd145b938aa9fab7dfcb8d (diff) | |
parent | d4dc0e1691a15efd1ea0a8793cf889e683a37933 (diff) | |
download | emacs-11af46027d22daa11d0df7d5032e6925c990dad1.tar.gz |
Merge from emacs-24; up to 2014-07-09T02:04:12Z!rgm@gnu.org
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 27 | ||||
-rw-r--r-- | lisp/calendar/diary-lib.el | 20 | ||||
-rw-r--r-- | lisp/desktop.el | 4 | ||||
-rw-r--r-- | lisp/image.el | 4 | ||||
-rw-r--r-- | lisp/mouse.el | 17 | ||||
-rw-r--r-- | lisp/window.el | 2 |
6 files changed, 62 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b9990cbe594..9b844bf38cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,30 @@ +2014-09-15 Glenn Morris <rgm@gnu.org> + + * image.el (image-multi-frame-p): Fix thinko - do not force + a delay if none was specified. (Bug#18334) + +2014-09-15 Kan-Ru Chen <kanru@kanru.info> + + * window.el (fit-window-to-buffer): Doc fix. + +2014-09-15 Ivan Shmakov <ivan@siamics.net> (tiny change) + + * desktop.el (desktop-create-buffer): Check that buffers are still live + before burying them (bug#18373). + +2014-09-15 Glenn Morris <rgm@gnu.org> + + * calendar/diary-lib.el (diary-list-entries): + Restore 24.3 display behavior. (Bug#18381) + +2014-09-15 Eli Zaretskii <eliz@gnu.org> + + * mouse.el (mouse-drag-line): On text-mode frames, count the mode + line and header line as 1 pixel. This fixes the 1-"pixel" (row) + discrepancy between window-pixel-edges and mouse events, and + avoids moving mode line up when the mouse click is on the modeline + and no drag is attempted. + 2014-09-14 Daniel Colascione <dancol@dancol.org> * register.el (insert-register): Change default interactive diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 155af0da623..17937c87fc9 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -901,12 +901,20 @@ LIST-ONLY is non-nil, in which case it just returns the list." ;;; (diary-include-other-diary-files) ; recurse ;;; (run-hooks 'diary-list-entries-hook)) (unless list-only - (if (and diary-display-function - (listp diary-display-function)) - ;; Backwards compatibility. - (run-hooks 'diary-display-function) - (funcall (or diary-display-function - 'diary-simple-display)))) + ;; Avoid M-x diary; M-x calendar; M-x diary + ;; clobbering the calendar window. + ;; FIXME this is not the right solution. + (let ((display-buffer-fallback-action + (list (delq + 'display-buffer-in-previous-window + (copy-sequence + (car display-buffer-fallback-action)))))) + (if (and diary-display-function + (listp diary-display-function)) + ;; Backwards compatibility. + (run-hooks 'diary-display-function) + (funcall (or diary-display-function + 'diary-simple-display))))) (run-hooks 'diary-hook))))) (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff))) (or d-incp (message "Preparing diary...done")) diff --git a/lisp/desktop.el b/lisp/desktop.el index 40e6b364e45..360ff48339b 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1375,7 +1375,9 @@ after that many seconds of idle time." ;; Restore buffer list order with new buffer at end. Don't change ;; the order for old desktop files (old desktop module behavior). (unless (< desktop-file-version 206) - (mapc 'bury-buffer buffer-list) + (dolist (buf buffer-list) + (and (buffer-live-p buf) + (bury-buffer buf))) (when result (bury-buffer result))) (when result (unless (or desktop-first-buffer (< desktop-file-version 206)) diff --git a/lisp/image.el b/lisp/image.el index ef39fa7909f..8430d36a627 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -637,8 +637,8 @@ in which case you might want to use `image-default-frame-delay'." (images (plist-get metadata 'count)) (delay (plist-get metadata 'delay))) (when (and images (> images 1)) - (if (or (not (numberp delay)) (< delay 0)) - (setq delay image-default-frame-delay)) + (and delay (or (not (numberp delay)) (< delay 0)) + (setq delay image-default-frame-delay)) (cons images delay))))) (defun image-animated-p (image) diff --git a/lisp/mouse.el b/lisp/mouse.el index a10f4d67593..93bd6283158 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -396,7 +396,16 @@ must be one of the symbols `header', `mode', or `vertical'." ;; Check whether header-line can be dragged at all. (if (window-at-side-p window 'top) (setq draggable nil) - (setq height (/ (window-header-line-height window) 2)) + ;; window-pixel-edges includes the header and mode lines, so + ;; we need to account for that when calculating window growth. + ;; On GUI frames, assume the mouse is approximately in the + ;; middle of the header/mode line, so we need only half the + ;; height in pixels. + (setq height + (cond + ((display-graphic-p frame) + (/ (window-header-line-height window) 2)) + (t (window-header-line-height window)))) (setq window (window-in-direction 'above window t)))) ((eq line 'mode) ;; Check whether mode-line can be dragged at all. @@ -411,7 +420,11 @@ must be one of the symbols `header', `mode', or `vertical'." (eq minibuffer-window (active-minibuffer-window)))))) (setq draggable nil) - (setq height (/ (window-mode-line-height window) 2)))) + (setq height + (cond + ((display-graphic-p frame) + (/ (window-mode-line-height window) 2)) + (t (window-mode-line-height window)))))) ((eq line 'vertical) ;; Get the window to adjust for the vertical case. If the scroll ;; bar is on the window's right or we drag a vertical divider, diff --git a/lisp/window.el b/lisp/window.el index d88f2901197..c19392f1fe9 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7260,7 +7260,7 @@ and header line and a bottom divider, if any. If WINDOW is part of a horizontal combination and the value of the option `fit-window-to-buffer-horizontally' is non-nil, adjust -WINDOW's height. The new width of WINDOW is calculated from the +WINDOW's width. The new width of WINDOW is calculated from the maximum length of its buffer's lines that follow the current start position of WINDOW. The optional argument MAX-WIDTH specifies a maximum width and defaults to the width of WINDOW's |