aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-01-22 11:36:45 -0800
committerGlenn Morris2011-01-22 11:36:45 -0800
commit7c82f3e23e37cc848a38b1f8be7149fd672a6393 (patch)
treee721d1d5361deeb04278045331d74e9c7f8b00f0
parent80094035aff85d827e1ef65627974b34ad9fa8df (diff)
parentbd2a4b24c4a591240862704737b5bc696ff67cbf (diff)
downloademacs-7c82f3e23e37cc848a38b1f8be7149fd672a6393.tar.gz
emacs-7c82f3e23e37cc848a38b1f8be7149fd672a6393.zip
Merge from emacs-23
-rw-r--r--lisp/ChangeLog31
-rw-r--r--lisp/comint.el4
-rw-r--r--lisp/emacs-lisp/checkdoc.el4
-rw-r--r--lisp/emacs-lisp/re-builder.el2
-rw-r--r--lisp/progmodes/compile.el6
-rw-r--r--lisp/progmodes/js.el3
-rw-r--r--lisp/subr.el9
-rw-r--r--src/ChangeLog7
-rw-r--r--src/window.c56
9 files changed, 79 insertions, 43 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d82a8e893a8..1106f4b7178 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,33 @@
12011-01-22 Chong Yidong <cyd@stupidchicken.com>
2
3 * emacs-lisp/re-builder.el (reb-mode-map): Fix logic error in
4 "Case sensitive" menu item.
5
62011-01-22 Roland McGrath <roland@frob.com>
7
8 * comint.el (comint-replace-by-expanded-history-before-point): Fix
9 expansion of !$ and !!:N syntax to pick the indicated word (bug#7883).
10
112011-01-22 Stefan Monnier <monnier@iro.umontreal.ca>
12
13 * progmodes/js.el (js--regexp-literal): Count backslashes (bug#7882).
14
152011-01-22 Jari Aalto <jari.aalto@cante.net>
16
17 * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
18 Assume foo(bar) is a manpage reference rather than some unquoted
19 symbol (bug#7705).
20
212011-01-22 Stefan Monnier <monnier@iro.umontreal.ca>
22
23 * subr.el (shell-quote-argument): Properly quote \n (bug#7687).
24 Suggested by Flo <sensorflo@gmail.com>.
25
262011-01-22 Glenn Morris <rgm@gnu.org>
27
28 * progmodes/compile.el (compilation-error-regexp-alist):
29 Fix custom type. (Bug#7812)
30
12011-01-22 Ken Manheimer <ken.manheimer@gmail.com> 312011-01-22 Ken Manheimer <ken.manheimer@gmail.com>
2 32
3 * allout.el (allout-prefixed-keybindings): Bind (prefixed) '#' to 33 * allout.el (allout-prefixed-keybindings): Bind (prefixed) '#' to
@@ -46,7 +76,6 @@
46 * international/mule.el (ctext-pre-write-conversion): Don't hardcode 76 * international/mule.el (ctext-pre-write-conversion): Don't hardcode
47 point-min==1. 77 point-min==1.
48 78
49
502011-01-20 Ken Manheimer <ken.manheimer@gmail.com> 792011-01-20 Ken Manheimer <ken.manheimer@gmail.com>
51 80
52 * allout.el: (allout-institute-keymap): Use fset instead of 81 * allout.el: (allout-institute-keymap): Use fset instead of
diff --git a/lisp/comint.el b/lisp/comint.el
index da722002c20..1912cdcfc44 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1294,7 +1294,9 @@ than the logical beginning of line."
1294 (message "Relative reference exceeds input history size")))) 1294 (message "Relative reference exceeds input history size"))))
1295 ((or (looking-at "!!?:?\\([0-9^$*-]+\\)") (looking-at "!!")) 1295 ((or (looking-at "!!?:?\\([0-9^$*-]+\\)") (looking-at "!!"))
1296 ;; Just a number of args from the previous input line. 1296 ;; Just a number of args from the previous input line.
1297 (replace-match (comint-previous-input-string 0) t t) 1297 (replace-match (comint-args (comint-previous-input-string 0)
1298 (match-beginning 1) (match-end 1))
1299 t t)
1298 (message "History item: previous")) 1300 (message "History item: previous"))
1299 ((looking-at 1301 ((looking-at
1300 "!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?") 1302 "!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?")
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 00f2df9fe02..84c00d0d0ba 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1798,7 +1798,9 @@ Replace with \"%s\"? " original replace)
1798 (let ((found nil) (start (point)) (msg nil) (ms nil)) 1798 (let ((found nil) (start (point)) (msg nil) (ms nil))
1799 (while (and (not msg) 1799 (while (and (not msg)
1800 (re-search-forward 1800 (re-search-forward
1801 "[^-([`':a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^]']" 1801 ;; Ignore manual page refereces like
1802 ;; git-config(1).
1803 "[^-([`':a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^](']"
1802 e t)) 1804 e t))
1803 (setq ms (match-string 1)) 1805 (setq ms (match-string 1))
1804 ;; A . is a \s_ char, so we must remove periods from 1806 ;; A . is a \s_ char, so we must remove periods from
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 07d5b0e52e7..12a66582317 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -243,7 +243,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
243 :help "Quit the RE Builder mode")) 243 :help "Quit the RE Builder mode"))
244 (define-key menu-map [rt] 244 (define-key menu-map [rt]
245 '(menu-item "Case sensitive" reb-toggle-case 245 '(menu-item "Case sensitive" reb-toggle-case
246 :button (:toggle . case-fold-search) 246 :button (:toggle . (null case-fold-search))
247 :help "Toggle case sensitivity of searches for RE Builder target buffer")) 247 :help "Toggle case sensitivity of searches for RE Builder target buffer"))
248 (define-key menu-map [rb] 248 (define-key menu-map [rb]
249 '(menu-item "Change target buffer..." reb-change-target-buffer 249 '(menu-item "Change target buffer..." reb-change-target-buffer
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 25429801298..0c9431d1d9d 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -508,10 +508,8 @@ matched by the whole REGEXP becomes the hyperlink.
508 508
509Additional HIGHLIGHTs as described under `font-lock-keywords' can 509Additional HIGHLIGHTs as described under `font-lock-keywords' can
510be added." 510be added."
511 :type `(set :menu-tag "Pick" 511 :type '(repeat (choice (symbol :tag "Predefined symbol")
512 ,@(mapcar (lambda (elt) 512 (sexp :tag "Error specification")))
513 (list 'const (car elt)))
514 compilation-error-regexp-alist-alist))
515 :link `(file-link :tag "example file" 513 :link `(file-link :tag "example file"
516 ,(expand-file-name "compilation.txt" data-directory)) 514 ,(expand-file-name "compilation.txt" data-directory))
517 :group 'compilation) 515 :group 'compilation)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 27d3dd1ae40..346a77b5810 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1659,12 +1659,11 @@ This performs fontification according to `js--class-styles'."
1659;; below. 1659;; below.
1660(eval-and-compile 1660(eval-and-compile
1661 (defconst js--regexp-literal 1661 (defconst js--regexp-literal
1662 "[=(,:]\\(?:\\s-\\|\n\\)*\\(/\\)\\(?:\\\\/\\|[^/*]\\)\\(?:\\\\/\\|[^/]\\)*\\(/\\)" 1662 "[=(,:]\\(?:\\s-\\|\n\\)*\\(/\\)\\(?:\\\\.\\|[^/*\\]\\)\\(?:\\\\.\\|[^/\\]\\)*\\(/\\)"
1663 "Regexp matching a JavaScript regular expression literal. 1663 "Regexp matching a JavaScript regular expression literal.
1664Match groups 1 and 2 are the characters forming the beginning and 1664Match groups 1 and 2 are the characters forming the beginning and
1665end of the literal.")) 1665end of the literal."))
1666 1666
1667
1668(defconst js-syntax-propertize-function 1667(defconst js-syntax-propertize-function
1669 (syntax-propertize-rules 1668 (syntax-propertize-rules
1670 ;; We want to match regular expressions only at the beginning of 1669 ;; We want to match regular expressions only at the beginning of
diff --git a/lisp/subr.el b/lisp/subr.el
index d36e96e5f89..2a1619c0903 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2461,13 +2461,8 @@ Note: :data and :device are currently not supported on Windows."
2461 "''" 2461 "''"
2462 ;; Quote everything except POSIX filename characters. 2462 ;; Quote everything except POSIX filename characters.
2463 ;; This should be safe enough even for really weird shells. 2463 ;; This should be safe enough even for really weird shells.
2464 (let ((result "") (start 0) end) 2464 (replace-regexp-in-string "\n" "'\n'"
2465 (while (string-match "[^-0-9a-zA-Z_./]" argument start) 2465 (replace-regexp-in-string "[^-0-9a-zA-Z_./\n]" "\\\\\\&" argument)))))
2466 (setq end (match-beginning 0)
2467 result (concat result (substring argument start end)
2468 "\\" (substring argument end (1+ end)))
2469 start (1+ end)))
2470 (concat result (substring argument start))))))
2471 2466
2472(defun string-or-null-p (object) 2467(defun string-or-null-p (object)
2473 "Return t if OBJECT is a string or nil. 2468 "Return t if OBJECT is a string or nil.
diff --git a/src/ChangeLog b/src/ChangeLog
index fcf8218d670..355376a886b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12011-01-22 Martin Rudalics <rudalics@gmx.at>
2
3 * window.c (select_window): New function.
4 (Fselect_window): Call it.
5 (inhibit_point_swap): Variable deleted.
6 (Fset_window_configuration): Call select_window directly.
7
12011-01-22 Jan Djärv <jan.h.d@swipnet.se> 82011-01-22 Jan Djärv <jan.h.d@swipnet.se>
2 9
3 * nsterm.m (constrainFrameRect): Only constrain the first time called. 10 * nsterm.m (constrainFrameRect): Only constrain the first time called.
diff --git a/src/window.c b/src/window.c
index 22e3f3d8818..2feaa275517 100644
--- a/src/window.c
+++ b/src/window.c
@@ -79,12 +79,13 @@ static Lisp_Object next_window (Lisp_Object, Lisp_Object,
79static void decode_next_window_args (Lisp_Object *, Lisp_Object *, 79static void decode_next_window_args (Lisp_Object *, Lisp_Object *,
80 Lisp_Object *); 80 Lisp_Object *);
81static void foreach_window (struct frame *, 81static void foreach_window (struct frame *,
82 int (* fn) (struct window *, void *), 82 int (* fn) (struct window *, void *),
83 void *); 83 void *);
84static int foreach_window_1 (struct window *, 84static int foreach_window_1 (struct window *,
85 int (* fn) (struct window *, void *), 85 int (* fn) (struct window *, void *),
86 void *); 86 void *);
87static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); 87static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object);
88static Lisp_Object select_window (Lisp_Object, Lisp_Object, int);
88 89
89/* This is the window in which the terminal's cursor should 90/* This is the window in which the terminal's cursor should
90 be left when nothing is being done with it. This must 91 be left when nothing is being done with it. This must
@@ -126,11 +127,6 @@ static int sequence_number;
126 127
127static int window_initialized; 128static int window_initialized;
128 129
129/* Set in `set-window-configuration' to prevent "swapping out point"
130 in the old selected window. */
131
132static int inhibit_point_swap;
133
134/* Hook to run when window config changes. */ 130/* Hook to run when window config changes. */
135 131
136static Lisp_Object Qwindow_configuration_change_hook; 132static Lisp_Object Qwindow_configuration_change_hook;
@@ -3497,20 +3493,14 @@ This function runs `window-scroll-functions' before running
3497 return Qnil; 3493 return Qnil;
3498} 3494}
3499 3495
3500/* Note that selected_window can be nil when this is called from 3496/* If select_window is called with inhibit_point_swap non-zero it will
3501 Fset_window_configuration. */ 3497 not store point of the old selected window's buffer back into that
3498 window's pointm slot. This is needed by Fset_window_configuration to
3499 avoid that the display routine is called with selected_window set to
3500 Qnil causing a subsequent crash. */
3502 3501
3503DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0, 3502static Lisp_Object
3504 doc: /* Select WINDOW. Most editing will apply to WINDOW's buffer. 3503select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
3505If WINDOW is not already selected, make WINDOW's buffer current
3506and make WINDOW the frame's selected window. Return WINDOW.
3507Optional second arg NORECORD non-nil means do not put this buffer
3508at the front of the list of recently selected ones and do not
3509make this window the most recently selected one.
3510
3511Note that the main editor command loop selects the buffer of the
3512selected window before each command. */)
3513 (register Lisp_Object window, Lisp_Object norecord)
3514{ 3504{
3515 register struct window *w; 3505 register struct window *w;
3516 register struct window *ow; 3506 register struct window *ow;
@@ -3550,9 +3540,7 @@ selected window before each command. */)
3550 /* Store the current buffer's actual point into the 3540 /* Store the current buffer's actual point into the
3551 old selected window. It belongs to that window, 3541 old selected window. It belongs to that window,
3552 and when the window is not selected, must be in the window. */ 3542 and when the window is not selected, must be in the window. */
3553 if (inhibit_point_swap) 3543 if (!inhibit_point_swap)
3554 inhibit_point_swap = 0;
3555 else
3556 { 3544 {
3557 ow = XWINDOW (selected_window); 3545 ow = XWINDOW (selected_window);
3558 if (! NILP (ow->buffer)) 3546 if (! NILP (ow->buffer))
@@ -3586,6 +3574,25 @@ selected window before each command. */)
3586 return window; 3574 return window;
3587} 3575}
3588 3576
3577
3578/* Note that selected_window can be nil when this is called from
3579 Fset_window_configuration. */
3580
3581DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0,
3582 doc: /* Select WINDOW. Most editing will apply to WINDOW's buffer.
3583If WINDOW is not already selected, make WINDOW's buffer current
3584and make WINDOW the frame's selected window. Return WINDOW.
3585Optional second arg NORECORD non-nil means do not put this buffer
3586at the front of the list of recently selected ones and do not
3587make this window the most recently selected one.
3588
3589Note that the main editor command loop selects the buffer of the
3590selected window before each command. */)
3591 (register Lisp_Object window, Lisp_Object norecord)
3592{
3593 select_window (window, norecord, 0);
3594}
3595
3589static Lisp_Object 3596static Lisp_Object
3590select_window_norecord (Lisp_Object window) 3597select_window_norecord (Lisp_Object window)
3591{ 3598{
@@ -6114,8 +6121,7 @@ the return value is nil. Otherwise the value is t. */)
6114 out point" in the old selected window using the buffer that 6121 out point" in the old selected window using the buffer that
6115 has been restored into it. We already swapped out that point 6122 has been restored into it. We already swapped out that point
6116 from that window's old buffer. */ 6123 from that window's old buffer. */
6117 inhibit_point_swap = 1; 6124 select_window (data->current_window, Qnil, 1);
6118 Fselect_window (data->current_window, Qnil);
6119 XBUFFER (XWINDOW (selected_window)->buffer)->last_selected_window 6125 XBUFFER (XWINDOW (selected_window)->buffer)->last_selected_window
6120 = selected_window; 6126 = selected_window;
6121 6127
@@ -7046,8 +7052,6 @@ syms_of_window (void)
7046 window_scroll_preserve_hpos = -1; 7052 window_scroll_preserve_hpos = -1;
7047 window_scroll_preserve_vpos = -1; 7053 window_scroll_preserve_vpos = -1;
7048 7054
7049 inhibit_point_swap = 0;
7050
7051 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, 7055 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
7052 doc: /* Non-nil means call as function to display a help buffer. 7056 doc: /* Non-nil means call as function to display a help buffer.
7053The function is called with one argument, the buffer to be displayed. 7057The function is called with one argument, the buffer to be displayed.