aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2012-10-12 11:45:45 +0200
committerEli Zaretskii2012-10-12 11:45:45 +0200
commit0dc9ee4adad0b566c32036a4c201a1de882ac65b (patch)
treea61f585563633f0f38838012771dae63a3cef098 /lisp
parent182b170f7ec712b7f89ada65095aae5bb8fe553e (diff)
parent81749a2374c78d656888b462f3b29301e4cbd1c7 (diff)
downloademacs-0dc9ee4adad0b566c32036a4c201a1de882ac65b.tar.gz
emacs-0dc9ee4adad0b566c32036a4c201a1de882ac65b.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog36
-rw-r--r--lisp/emacs-lisp/bytecomp.el8
-rw-r--r--lisp/emacs-lisp/cl-lib.el3
-rw-r--r--lisp/help-fns.el2
-rw-r--r--lisp/international/eucjp-ms.el1
-rw-r--r--lisp/international/mule-cmds.el15
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/mail/rmailsum.el2
-rw-r--r--lisp/progmodes/python.el14
-rw-r--r--lisp/select.el12
-rw-r--r--lisp/window.el38
11 files changed, 104 insertions, 29 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ef9e06b7d58..7a73f761fa8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,39 @@
12012-10-12 Glenn Morris <rgm@gnu.org>
2
3 * mail/rmailsum.el (rmail-header-summary):
4 Fix 2010-11-26 test for multiline Subject: field. (Bug#12625)
5
62012-10-12 Fabián Ezequiel Gallina <fgallina@cuca>
7
8 * progmodes/python.el (python-mode-map): Replace
9 subtitute-key-definition with proper command remapping.
10 (python-nav--up-list): Fix behavior for blocks on the same level.
11
122012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
13
14 * help-fns.el (describe-function-1): Handle autoloads w/o docstrings.
15
16 * emacs-lisp/bytecomp.el (byte-compile-eval): Adjust to long-ago
17 changes to the format of load-history.
18
19 * international/mule-cmds.el (read-char-by-name): Move let-binding of
20 completion-ignore-case in case that var is buffer-local (bug#12615).
21
222012-10-11 Kenichi Handa <handa@gnu.org>
23
24 * international/eucjp-ms.el: Re-generated.
25
262012-10-10 Kenichi Handa <handa@gnu.org>
27
28 * select.el (xselect--encode-string): If a coding is specified for
29 selection, and that is compatible with COMPOUND_TEXT, use it.
30
312012-10-10 Martin Rudalics <rudalics@gmx.at>
32
33 * window.el (switch-to-buffer-preserve-window-point): New option.
34 (switch-to-buffer):
35 Obey `switch-to-buffer-preserve-window-point' (Bug#4041).
36
12012-10-09 Stefan Monnier <monnier@iro.umontreal.ca> 372012-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
2 38
3 * newcomment.el (comment-start-skip, comment-end-skip, comment-end): 39 * newcomment.el (comment-start-skip, comment-end-skip, comment-end):
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4dd44bb6f22..7534ce5eaca 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -875,13 +875,11 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
875 (byte-compile-cl-file-p (car xs)))) 875 (byte-compile-cl-file-p (car xs))))
876 (dolist (s xs) 876 (dolist (s xs)
877 (cond 877 (cond
878 ((symbolp s)
879 (unless (memq s old-autoloads)
880 (push s byte-compile-noruntime-functions)))
881 ((and (consp s) (eq t (car s))) 878 ((and (consp s) (eq t (car s)))
882 (push (cdr s) old-autoloads)) 879 (push (cdr s) old-autoloads))
883 ((and (consp s) (eq 'autoload (car s))) 880 ((and (consp s) (memq (car s) '(autoload defun)))
884 (push (cdr s) byte-compile-noruntime-functions))))))) 881 (unless (memq (cdr s) old-autoloads)
882 (push (cdr s) byte-compile-noruntime-functions))))))))
885 ;; Go through current-load-list for the locally defined funs. 883 ;; Go through current-load-list for the locally defined funs.
886 (let (old-autoloads) 884 (let (old-autoloads)
887 (while (and hist-nil-new (not (eq hist-nil-new hist-nil-orig))) 885 (while (and hist-nil-new (not (eq hist-nil-new hist-nil-orig)))
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 2eda628e262..122402797e1 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -728,7 +728,8 @@ If ALIST is non-nil, the new pairs are prepended to it."
728;;;###autoload 728;;;###autoload
729(progn 729(progn
730 ;; Make sure functions defined with cl-defsubst can be inlined even in 730 ;; Make sure functions defined with cl-defsubst can be inlined even in
731 ;; packages which do not require CL. 731 ;; packages which do not require CL. We don't put an autoload cookie
732 ;; directly on that function, since those cookies only go to cl-loaddefs.
732 (autoload 'cl--defsubst-expand "cl-macs") 733 (autoload 'cl--defsubst-expand "cl-macs")
733 ;; Autoload, so autoload.el and font-lock can use it even when CL 734 ;; Autoload, so autoload.el and font-lock can use it even when CL
734 ;; is not loaded. 735 ;; is not loaded.
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index ef482f8f0e9..f17b29de720 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -621,7 +621,7 @@ FILE is the file where FUNCTION was probably defined."
621 ;; If the function is autoloaded, and its docstring has 621 ;; If the function is autoloaded, and its docstring has
622 ;; key substitution constructs, load the library. 622 ;; key substitution constructs, load the library.
623 (doc (progn 623 (doc (progn
624 (and (autoloadp real-def) 624 (and (autoloadp real-def) doc-raw
625 help-enable-auto-load 625 help-enable-auto-load
626 (string-match "\\([^\\]=\\|[^=]\\|\\`\\)\\\\[[{<]" 626 (string-match "\\([^\\]=\\|[^=]\\|\\`\\)\\\\[[{<]"
627 doc-raw) 627 doc-raw)
diff --git a/lisp/international/eucjp-ms.el b/lisp/international/eucjp-ms.el
index a16848a0c7c..6e4e1e798b0 100644
--- a/lisp/international/eucjp-ms.el
+++ b/lisp/international/eucjp-ms.el
@@ -2085,4 +2085,3 @@
2085 (setcar x (cdr x)) (setcdr x tmp))) 2085 (setcar x (cdr x)) (setcdr x tmp)))
2086 map) 2086 map)
2087 (define-translation-table 'eucjp-ms-encode map)) 2087 (define-translation-table 'eucjp-ms-encode map))
2088
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 58dd24ec8ea..3431c81df88 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2945,13 +2945,14 @@ at the beginning of the name.
2945This function also accepts a hexadecimal number of Unicode code 2945This function also accepts a hexadecimal number of Unicode code
2946point or a number in hash notation, e.g. #o21430 for octal, 2946point or a number in hash notation, e.g. #o21430 for octal,
2947#x2318 for hex, or #10r8984 for decimal." 2947#x2318 for hex, or #10r8984 for decimal."
2948 (let* ((completion-ignore-case t) 2948 (let ((input
2949 (input (completing-read 2949 (completing-read
2950 prompt 2950 prompt
2951 (lambda (string pred action) 2951 (lambda (string pred action)
2952 (if (eq action 'metadata) 2952 (let ((completion-ignore-case t))
2953 '(metadata (category . unicode-name)) 2953 (if (eq action 'metadata)
2954 (complete-with-action action (ucs-names) string pred)))))) 2954 '(metadata (category . unicode-name))
2955 (complete-with-action action (ucs-names) string pred)))))))
2955 (cond 2956 (cond
2956 ((string-match-p "\\`[0-9a-fA-F]+\\'" input) 2957 ((string-match-p "\\`[0-9a-fA-F]+\\'" input)
2957 (string-to-number input 16)) 2958 (string-to-number input 16))
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index c75a1989e8e..a2cb7cb9ee8 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4707,7 +4707,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order.
4707 4707
4708;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic 4708;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic
4709;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels 4709;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels
4710;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "bef21a376bd5bd59792a20dd86e6ec34") 4710;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "6cafe6b03e187b5836e3c359322b5cbf")
4711;;; Generated autoloads from rmailsum.el 4711;;; Generated autoloads from rmailsum.el
4712 4712
4713(autoload 'rmail-summary "rmailsum" "\ 4713(autoload 'rmail-summary "rmailsum" "\
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index d3a464161cb..612ccbdfd9e 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -785,7 +785,7 @@ the message being processed."
785 (setq pos (point)) 785 (setq pos (point))
786 (forward-line 1) 786 (forward-line 1)
787 (setq str (buffer-substring pos (1- (point)))) 787 (setq str (buffer-substring pos (1- (point))))
788 (while (looking-at "\\s ") 788 (while (looking-at "[ \t]")
789 (setq str (concat str " " 789 (setq str (concat str " "
790 (buffer-substring (match-end 0) 790 (buffer-substring (match-end 0)
791 (line-end-position)))) 791 (line-end-position))))
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 5bf64c18f99..ff805d64024 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -229,15 +229,9 @@
229(defvar python-mode-map 229(defvar python-mode-map
230 (let ((map (make-sparse-keymap))) 230 (let ((map (make-sparse-keymap)))
231 ;; Movement 231 ;; Movement
232 (substitute-key-definition 'backward-sentence 232 (define-key map [remap backward-sentence] 'python-nav-backward-block)
233 'python-nav-backward-block 233 (define-key map [remap forward-sentence] 'python-nav-forward-block)
234 map global-map) 234 (define-key map [remap backward-up-list] 'python-nav-backward-up-list)
235 (substitute-key-definition 'forward-sentence
236 'python-nav-forward-block
237 map global-map)
238 (substitute-key-definition 'backward-up-list
239 'python-nav-backward-up-list
240 map global-map)
241 (define-key map "\C-c\C-j" 'imenu) 235 (define-key map "\C-c\C-j" 'imenu)
242 ;; Indent specific 236 ;; Indent specific
243 (define-key map "\177" 'python-indent-dedent-line-backspace) 237 (define-key map "\177" 'python-indent-dedent-line-backspace)
@@ -1444,7 +1438,7 @@ DIR is always 1 or -1 and comes sanitized from
1444 (save-excursion 1438 (save-excursion
1445 (let ((indentation (current-indentation))) 1439 (let ((indentation (current-indentation)))
1446 (while (and (python-nav-backward-block) 1440 (while (and (python-nav-backward-block)
1447 (> (current-indentation) indentation)))) 1441 (>= (current-indentation) indentation))))
1448 (point)))) 1442 (point))))
1449 (and (> (point) prev-block-pos) 1443 (and (> (point) prev-block-pos)
1450 (goto-char prev-block-pos)))) 1444 (goto-char prev-block-pos))))
diff --git a/lisp/select.el b/lisp/select.el
index d3153a0ce0e..54520704261 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -248,7 +248,17 @@ two markers or an overlay. Otherwise, it is nil."
248 (setq non-unicode t) 248 (setq non-unicode t)
249 (setq eight-bit t))))) 249 (setq eight-bit t)))))
250 str) 250 str)
251 (setq type (if non-unicode 'COMPOUND_TEXT 251 (setq type (if (or non-unicode
252 (and
253 non-latin-1
254 ;; If a coding is specified for
255 ;; selection, and that is
256 ;; compatible with COMPOUND_TEXT,
257 ;; use it.
258 coding
259 (eq (coding-system-get coding :mime-charset)
260 'x-ctext)))
261 'COMPOUND_TEXT
252 (if non-latin-1 'UTF8_STRING 262 (if non-latin-1 'UTF8_STRING
253 (if eight-bit 'C_STRING 263 (if eight-bit 'C_STRING
254 'STRING)))))))) 264 'STRING))))))))
diff --git a/lisp/window.el b/lisp/window.el
index f9761366b62..b033f9c26e3 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5818,6 +5818,26 @@ buffer with the name BUFFER-OR-NAME and return that buffer."
5818 buffer)) 5818 buffer))
5819 (other-buffer))) 5819 (other-buffer)))
5820 5820
5821(defcustom switch-to-buffer-preserve-window-point nil
5822 "If non-nil, `switch-to-buffer' tries to preserve `window-point'.
5823If this is nil, `switch-to-buffer' displays the buffer at that
5824buffer's `point'. If this is `already-displayed', it tries to
5825display the buffer at its pevious position in the selected
5826window, provided the buffer is currently displayed in some other
5827window on any visible or iconified frame. If this is t, it
5828unconditionally tries to display the buffer at its previous
5829position in the selected window.
5830
5831This variable is ignored if the the buffer is already displayed
5832in the selected window or never appeared in it before, or if
5833`switch-to-buffer' calls `pop-to-buffer' to display the buffer."
5834 :type '(choice
5835 (const :tag "Never" nil)
5836 (const :tag "If already displayed elsewhere" already-displayed)
5837 (const :tag "Always" t))
5838 :group 'windows
5839 :version "24.3")
5840
5821(defun switch-to-buffer (buffer-or-name &optional norecord force-same-window) 5841(defun switch-to-buffer (buffer-or-name &optional norecord force-same-window)
5822 "Switch to buffer BUFFER-OR-NAME in the selected window. 5842 "Switch to buffer BUFFER-OR-NAME in the selected window.
5823If the selected window cannot display the specified 5843If the selected window cannot display the specified
@@ -5843,6 +5863,10 @@ If optional argument FORCE-SAME-WINDOW is non-nil, the buffer
5843must be displayed in the selected window; if that is impossible, 5863must be displayed in the selected window; if that is impossible,
5844signal an error rather than calling `pop-to-buffer'. 5864signal an error rather than calling `pop-to-buffer'.
5845 5865
5866The option `switch-to-buffer-preserve-window-point' can be used
5867to make the buffer appear at its last position in the selected
5868window.
5869
5846Return the buffer switched to." 5870Return the buffer switched to."
5847 (interactive 5871 (interactive
5848 (list (read-buffer-to-switch "Switch to buffer: ") nil 'force-same-window)) 5872 (list (read-buffer-to-switch "Switch to buffer: ") nil 'force-same-window))
@@ -5859,7 +5883,19 @@ Return the buffer switched to."
5859 (if force-same-window 5883 (if force-same-window
5860 (user-error "Cannot switch buffers in a dedicated window") 5884 (user-error "Cannot switch buffers in a dedicated window")
5861 (pop-to-buffer buffer norecord))) 5885 (pop-to-buffer buffer norecord)))
5862 (t (set-window-buffer nil buffer))) 5886 (t
5887 (let* ((entry (assq buffer (window-prev-buffers)))
5888 (displayed (and (eq switch-to-buffer-preserve-window-point
5889 'already-displayed)
5890 (get-buffer-window buffer 0))))
5891 (set-window-buffer nil buffer)
5892 (when (and entry
5893 (or (eq switch-to-buffer-preserve-window-point t)
5894 displayed))
5895 ;; Try to restore start and point of buffer in the selected
5896 ;; window (Bug#4041).
5897 (set-window-start (selected-window) (nth 1 entry) t)
5898 (set-window-point nil (nth 2 entry))))))
5863 5899
5864 (unless norecord 5900 (unless norecord
5865 (select-window (selected-window))) 5901 (select-window (selected-window)))