aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2014-08-10 17:59:34 -0700
committerGlenn Morris2014-08-10 17:59:34 -0700
commitc7367d2de3343e56171c4fe6d439a3ed5f40d06c (patch)
tree54fe9166f6b4320d9518bbac11e2d575a9fda7c2 /lisp
parent6b7d077506304f440d311fa7b29d210b7a3e121c (diff)
parentf314e84fce8b394da20aa1d69121c74fb34f9a1e (diff)
downloademacs-c7367d2de3343e56171c4fe6d439a3ed5f40d06c.tar.gz
emacs-c7367d2de3343e56171c4fe6d439a3ed5f40d06c.zip
Merge from emacs-24; up to 2014-06-28T23:35:17Z!rgm@gnu.org
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog42
-rw-r--r--lisp/files.el13
-rw-r--r--lisp/info.el4
-rw-r--r--lisp/mouse.el32
-rw-r--r--lisp/simple.el7
-rw-r--r--lisp/window.el18
6 files changed, 75 insertions, 41 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ab1fad7bc34..daf9f28d8fc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,41 @@
12014-08-11 Glenn Morris <rgm@gnu.org>
2
3 * files.el (basic-save-buffer-2): Revert 2013-01-31 change, which
4 chose coding system for writing before backing up, since it causes
5 a more serious problem than the one it solves. (Closes Bug#18141,
6 reopens Bug#13522.)
7
82014-08-11 Martin Rudalics <rudalics@gmx.at>
9
10 * window.el (window-total-size): Make doc-string more self-contained.
11
12 * window.el (display-buffer-below-selected): Restore original
13 behavior if buffer is already displayed in the window below the
14 selected one (Bug#18181).
15
162014-08-11 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * mouse.el (mouse--down-1-maybe-follows-link): Don't convert the down
19 event (bug#18212).
20
212014-08-11 Eli Zaretskii <eliz@gnu.org>
22
23 * info.el (info): Doc fix.
24
252014-08-11 Stefan Monnier <monnier@iro.umontreal.ca>
26
27 * info.el (Info-mode-map): Override a global down-mouse-2 binding
28 (bug#18212).
29
302014-08-11 Eli Zaretskii <eliz@gnu.org>
31
32 * simple.el (default-line-height): A floating-point value of
33 line-spacing means a fraction of the default frame font's height,
34 not of the font currently used by the 'default' face.
35 Truncate the pixel value, like the display engine does.
36 (window-screen-lines): Use window-inside-pixel-edges for
37 determining the window height in pixels. (Bug#18195)
38
12014-08-11 Grégoire Jadi <daimrod@gmail.com> 392014-08-11 Grégoire Jadi <daimrod@gmail.com>
2 40
3 * leim/quail/latin-post.el: Transform " __" into " _". (Bug#18023) 41 * leim/quail/latin-post.el: Transform " __" into " _". (Bug#18023)
@@ -462,8 +500,8 @@
462 (python-shell-output-filter): Fix comment typo. 500 (python-shell-output-filter): Fix comment typo.
463 501
464 Fix Python shell prompts detection for remote hosts. 502 Fix Python shell prompts detection for remote hosts.
465 * progmodes/python.el (python-shell-prompt-detect): Replace 503 * progmodes/python.el (python-shell-prompt-detect):
466 call-process with process-file and make it more robust. 504 Replace call-process with process-file and make it more robust.
467 505
468 Autodetect Python shell prompts. (Bug#17370) 506 Autodetect Python shell prompts. (Bug#17370)
469 * progmodes/python.el: 507 * progmodes/python.el:
diff --git a/lisp/files.el b/lisp/files.el
index 5cff5b11ee9..a9a279b2fa4 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4759,7 +4759,7 @@ Before and after saving the buffer, this function runs
4759;; This returns a value (MODES EXTENDED-ATTRIBUTES BACKUPNAME), like 4759;; This returns a value (MODES EXTENDED-ATTRIBUTES BACKUPNAME), like
4760;; backup-buffer. 4760;; backup-buffer.
4761(defun basic-save-buffer-2 () 4761(defun basic-save-buffer-2 ()
4762 (let (tempsetmodes setmodes writecoding) 4762 (let (tempsetmodes setmodes)
4763 (if (not (file-writable-p buffer-file-name)) 4763 (if (not (file-writable-p buffer-file-name))
4764 (let ((dir (file-name-directory buffer-file-name))) 4764 (let ((dir (file-name-directory buffer-file-name)))
4765 (if (not (file-directory-p dir)) 4765 (if (not (file-directory-p dir))
@@ -4775,14 +4775,6 @@ Before and after saving the buffer, this function runs
4775 buffer-file-name))) 4775 buffer-file-name)))
4776 (setq tempsetmodes t) 4776 (setq tempsetmodes t)
4777 (error "Attempt to save to a file which you aren't allowed to write")))))) 4777 (error "Attempt to save to a file which you aren't allowed to write"))))))
4778 ;; This may involve prompting, so do it now before backing up the file.
4779 ;; Otherwise there can be a delay while the user answers the
4780 ;; prompt during which the original file has been renamed. (Bug#13522)
4781 (setq writecoding
4782 ;; Args here should match write-region call below around
4783 ;; which we use writecoding.
4784 (choose-write-coding-system nil nil buffer-file-name nil t
4785 buffer-file-truename))
4786 (or buffer-backed-up 4778 (or buffer-backed-up
4787 (setq setmodes (backup-buffer))) 4779 (setq setmodes (backup-buffer)))
4788 (let* ((dir (file-name-directory buffer-file-name)) 4780 (let* ((dir (file-name-directory buffer-file-name))
@@ -4864,11 +4856,10 @@ Before and after saving the buffer, this function runs
4864 (logior (car setmodes) 128)))))) 4856 (logior (car setmodes) 128))))))
4865 (let (success) 4857 (let (success)
4866 (unwind-protect 4858 (unwind-protect
4859 (progn
4867 ;; Pass in nil&nil rather than point-min&max to indicate 4860 ;; Pass in nil&nil rather than point-min&max to indicate
4868 ;; we're saving the buffer rather than just a region. 4861 ;; we're saving the buffer rather than just a region.
4869 ;; write-region-annotate-functions may make us of it. 4862 ;; write-region-annotate-functions may make us of it.
4870 (let ((coding-system-for-write writecoding)
4871 (coding-system-require-warning nil))
4872 (write-region nil nil 4863 (write-region nil nil
4873 buffer-file-name nil t buffer-file-truename) 4864 buffer-file-name nil t buffer-file-truename)
4874 (setq success t)) 4865 (setq success t))
diff --git a/lisp/info.el b/lisp/info.el
index 405d6a22449..59501c73534 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -774,8 +774,7 @@ with the top-level Info directory.
774In interactive use, a non-numeric prefix argument directs 774In interactive use, a non-numeric prefix argument directs
775this command to read a file name from the minibuffer. 775this command to read a file name from the minibuffer.
776 776
777A numeric prefix argument N selects an Info buffer named 777A numeric prefix argument of N selects an Info buffer named \"*info*<N>\".
778\"*info*<%s>\".
779 778
780The search path for Info files is in the variable `Info-directory-list'. 779The search path for Info files is in the variable `Info-directory-list'.
781The top-level Info directory is made by combining all the files named `dir' 780The top-level Info directory is made by combining all the files named `dir'
@@ -4009,6 +4008,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
4009 (define-key map "," 'Info-index-next) 4008 (define-key map "," 'Info-index-next)
4010 (define-key map "\177" 'Info-scroll-down) 4009 (define-key map "\177" 'Info-scroll-down)
4011 (define-key map [mouse-2] 'Info-mouse-follow-nearest-node) 4010 (define-key map [mouse-2] 'Info-mouse-follow-nearest-node)
4011 (define-key map [down-mouse-2] 'ignore) ;Override potential global binding.
4012 (define-key map [follow-link] 'mouse-face) 4012 (define-key map [follow-link] 'mouse-face)
4013 (define-key map [XF86Back] 'Info-history-back) 4013 (define-key map [XF86Back] 'Info-history-back)
4014 (define-key map [XF86Forward] 'Info-history-forward) 4014 (define-key map [XF86Forward] 'Info-history-forward)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 2606c8b4ca4..a10f4d67593 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -94,15 +94,14 @@ point at the click position."
94(defun mouse--down-1-maybe-follows-link (&optional _prompt) 94(defun mouse--down-1-maybe-follows-link (&optional _prompt)
95 "Turn `mouse-1' events into `mouse-2' events if follows-link. 95 "Turn `mouse-1' events into `mouse-2' events if follows-link.
96Expects to be bound to `down-mouse-1' in `key-translation-map'." 96Expects to be bound to `down-mouse-1' in `key-translation-map'."
97 (if (or (null mouse-1-click-follows-link) 97 (when (and mouse-1-click-follows-link
98 (not (eq (if (eq mouse-1-click-follows-link 'double) 98 (eq (if (eq mouse-1-click-follows-link 'double)
99 'double-down-mouse-1 'down-mouse-1) 99 'double-down-mouse-1 'down-mouse-1)
100 (car-safe last-input-event))) 100 (car-safe last-input-event))
101 (not (mouse-on-link-p (event-start last-input-event))) 101 (mouse-on-link-p (event-start last-input-event))
102 (and (not mouse-1-click-in-non-selected-windows) 102 (or mouse-1-click-in-non-selected-windows
103 (not (eq (selected-window) 103 (eq (selected-window)
104 (posn-window (event-start last-input-event)))))) 104 (posn-window (event-start last-input-event)))))
105 nil
106 (let ((this-event last-input-event) 105 (let ((this-event last-input-event)
107 (timedout 106 (timedout
108 (sit-for (if (numberp mouse-1-click-follows-link) 107 (sit-for (if (numberp mouse-1-click-follows-link)
@@ -118,19 +117,14 @@ Expects to be bound to `down-mouse-1' in `key-translation-map'."
118 'double-mouse-1 'mouse-1)) 117 'double-mouse-1 'mouse-1))
119 ;; Turn the mouse-1 into a mouse-2 to follow links. 118 ;; Turn the mouse-1 into a mouse-2 to follow links.
120 (let ((newup (if (eq mouse-1-click-follows-link 'double) 119 (let ((newup (if (eq mouse-1-click-follows-link 'double)
121 'double-mouse-2 'mouse-2)) 120 'double-mouse-2 'mouse-2)))
122 (newdown (if (eq mouse-1-click-follows-link 'double)
123 'double-down-mouse-2 'down-mouse-2)))
124 ;; If mouse-2 has never been done by the user, it doesn't have 121 ;; If mouse-2 has never been done by the user, it doesn't have
125 ;; the necessary property to be interpreted correctly. 122 ;; the necessary property to be interpreted correctly.
126 (put newup 'event-kind (get (car event) 'event-kind)) 123 (unless (get newup 'event-kind)
127 (put newdown 'event-kind (get (car this-event) 'event-kind)) 124 (put newup 'event-kind (get (car event) 'event-kind)))
128 (push (cons newup (cdr event)) unread-command-events) 125 (push (cons newup (cdr event)) unread-command-events)
129 ;; Modify the event in place, so read-key-sequence doesn't 126 ;; Don't change the down event, only the up-event (bug#18212).
130 ;; generate a second fake prefix key (see fake_prefixed_keys in 127 nil)
131 ;; src/keyboard.c).
132 (setcar this-event newdown)
133 (vector this-event))
134 (push event unread-command-events) 128 (push event unread-command-events)
135 nil)))))) 129 nil))))))
136 130
diff --git a/lisp/simple.el b/lisp/simple.el
index 5da662c2124..cdff8d7fc3a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5140,7 +5140,7 @@ or the frame."
5140 0) 5140 0)
5141 0))) 5141 0)))
5142 (if (floatp lsp) 5142 (if (floatp lsp)
5143 (setq lsp (* dfh lsp))) 5143 (setq lsp (truncate (* (frame-char-height) lsp))))
5144 (+ dfh lsp))) 5144 (+ dfh lsp)))
5145 5145
5146(defun window-screen-lines () 5146(defun window-screen-lines ()
@@ -5152,10 +5152,9 @@ in the window, not in units of the frame's default font, and also accounts
5152for `line-spacing', if any, defined for the window's buffer or frame. 5152for `line-spacing', if any, defined for the window's buffer or frame.
5153 5153
5154The value is a floating-point number." 5154The value is a floating-point number."
5155 (let ((canonical (window-text-height)) 5155 (let ((edges (window-inside-pixel-edges))
5156 (fch (frame-char-height))
5157 (dlh (default-line-height))) 5156 (dlh (default-line-height)))
5158 (/ (* (float canonical) fch) dlh))) 5157 (/ (float (- (nth 3 edges) (nth 1 edges))) dlh)))
5159 5158
5160;; Returns non-nil if partial move was done. 5159;; Returns non-nil if partial move was done.
5161(defun line-move-partial (arg noerror to-end) 5160(defun line-move-partial (arg noerror to-end)
diff --git a/lisp/window.el b/lisp/window.el
index 03caf831111..a05dddeac9e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1155,8 +1155,17 @@ dumping to it."
1155WINDOW must be a valid window and defaults to the selected one. 1155WINDOW must be a valid window and defaults to the selected one.
1156 1156
1157If HORIZONTAL is omitted or nil, return the total height of 1157If HORIZONTAL is omitted or nil, return the total height of
1158WINDOW, in lines, like `window-total-height'. Otherwise return 1158WINDOW, in lines. If WINDOW is live, its total height includes,
1159the total width, in columns, like `window-total-width'. 1159in addition to the height of WINDOW's text, the heights of
1160WINDOW's mode and header line and a bottom divider, if any.
1161
1162If HORIZONTAL is non-nil, return the total width of WINDOW, in
1163columns. If WINDOW is live, its total width includes, in
1164addition to the width of WINDOW's text, the widths of WINDOW's
1165fringes, margins, scroll bars and its right divider, if any.
1166
1167If WINDOW is internal, return the respective size of the screen
1168areas spanned by its children.
1160 1169
1161Optional argument ROUND is handled as for `window-total-height' 1170Optional argument ROUND is handled as for `window-total-height'
1162and `window-total-width'." 1171and `window-total-width'."
@@ -6440,7 +6449,10 @@ again with `display-buffer-pop-up-window'."
6440This either splits the selected window or reuses the window below 6449This either splits the selected window or reuses the window below
6441the selected one." 6450the selected one."
6442 (let (window) 6451 (let (window)
6443 (or (and (not (frame-parameter nil 'unsplittable)) 6452 (or (and (setq window (window-in-direction 'below))
6453 (eq buffer (window-buffer window))
6454 (window--display-buffer buffer window 'reuse alist))
6455 (and (not (frame-parameter nil 'unsplittable))
6444 (let ((split-height-threshold 0) 6456 (let ((split-height-threshold 0)
6445 split-width-threshold) 6457 split-width-threshold)
6446 (setq window (window--try-to-split-window (selected-window) alist))) 6458 (setq window (window--try-to-split-window (selected-window) alist)))