From 95bdccb782fbeb97cc2cc12a64635d6d5f85475f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 18 Jul 2012 05:33:09 -0400 Subject: [PATCH 1/8] * lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end of narrowed buffer. Fixes: debbugs:11966 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cperl-mode.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1faebf5b083..1534eb2725d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-07-18 Stefan Monnier + + * progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end + of narrowed buffer (bug#11966). + 2012-07-09 Stefan Monnier * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 2c258fb446a..58cbf26496d 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -3498,7 +3498,8 @@ Works before syntax recognition is done." (if end ;; Do the same for end, going small steps (save-excursion - (while (and end (get-text-property end 'syntax-type)) + (while (and end (< end (point-max)) + (get-text-property end 'syntax-type)) (setq pos end end (next-single-property-change end 'syntax-type nil (point-max))) (if end (progn (goto-char end) From d0b822e38a065063011d1e3d23e052958b02aaf7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 18 Jul 2012 07:44:13 -0400 Subject: [PATCH 2/8] * lisp/userlock.el, emacs-lisp/map-ynp.el: Declare part of `emacs' package. * lisp/progmodes/bug-reference.el, lisp/misearch.el: Provide themselves. Fixes: debbugs:11915 --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/map-ynp.el | 1 + lisp/misearch.el | 2 +- lisp/progmodes/bug-reference.el | 3 +++ lisp/userlock.el | 1 + 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1534eb2725d..0790df5c25a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2012-07-18 Stefan Monnier + * userlock.el, emacs-lisp/map-ynp.el: Declare part of `emacs' package. + * progmodes/bug-reference.el, misearch.el: Provide themselves + (bug#11915). + * progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end of narrowed buffer (bug#11966). diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index cc4e642daf8..e7806440bf3 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -5,6 +5,7 @@ ;; Author: Roland McGrath ;; Maintainer: FSF ;; Keywords: lisp, extensions +;; Package: emacs ;; This file is part of GNU Emacs. diff --git a/lisp/misearch.el b/lisp/misearch.el index 22021bac570..b175f526e93 100644 --- a/lisp/misearch.el +++ b/lisp/misearch.el @@ -379,5 +379,5 @@ whose file names match the specified wildcard." (provide 'multi-isearch) - +(provide 'misearch) ;;; misearch.el ends here diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 015b9a9ceaf..613f002fc73 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -30,6 +30,8 @@ ;; Two minor modes are provided. One works on any text in the buffer; ;; the other operates only on comments and strings. +;;; Code: + (defvar bug-reference-map (let ((map (make-sparse-keymap))) (define-key map [mouse-2] 'bug-reference-push-button) @@ -154,4 +156,5 @@ the mode if ARG is omitted or nil." (widen) (bug-reference-unfontify (point-min) (point-max))))) +(provide 'bug-reference) ;;; bug-reference.el ends here diff --git a/lisp/userlock.el b/lisp/userlock.el index 8a4159aafc0..705d9588249 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -4,6 +4,7 @@ ;; Maintainer: FSF ;; Keywords: internal +;; Package: emacs ;; This file is part of GNU Emacs. From e32a12b5ec3af62d3a152f5924128b34fbb85c99 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 19 Jul 2012 09:15:06 +0800 Subject: [PATCH 3/8] * emacs.texi: Update ISBN. --- doc/emacs/ChangeLog | 4 ++++ doc/emacs/emacs.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 0d31e64b307..5430883abd0 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2012-07-19 Chong Yidong + + * emacs.texi: Update ISBN. + 2012-06-29 Chong Yidong * maintaining.texi (Basic VC Editing, VC Pull, Merging): diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index aaeeda24d45..1e34cdfd2b9 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -94,7 +94,7 @@ developing GNU and promoting software freedom.'' Published by the Free Software Foundation @* 51 Franklin Street, Fifth Floor @* Boston, MA 02110-1301 USA @* -ISBN 978-0-9831592-2-3 +ISBN 978-0-9831592-3-0 @sp 2 Cover art by Etienne Suvasa; cover design by Matt Lee. From 23dc774492e25ee2191ffa4ee966216649dddbc1 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 19 Jul 2012 11:33:08 +0800 Subject: [PATCH 4/8] Avoid two crashes involving windows on dead frames. * window.c (Fwindow_absolute_pixel_edges) (Fdelete_other_windows_internal): Signal an error if the window is on a dead frame. Fixes: debbugs:11984 --- src/ChangeLog | 6 ++++++ src/window.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 716ebbadab6..8ad531db846 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-07-19 Chong Yidong + + * window.c (Fwindow_absolute_pixel_edges) + (Fdelete_other_windows_internal): Signal an error if the window is + on a dead frame (Bug#11984). + 2012-07-14 Eli Zaretskii Remove FILE_SYSTEM_CASE. diff --git a/src/window.c b/src/window.c index f93f58f9b72..ae8d209df74 100644 --- a/src/window.c +++ b/src/window.c @@ -484,9 +484,7 @@ for future use. */) (Lisp_Object window, Lisp_Object limit) { register struct window *w = decode_any_window (window); - w->combination_limit = limit; - return w->combination_limit; } @@ -800,6 +798,8 @@ of just the text area, use `window-inside-absolute-pixel-edges'. */) { register struct window *w = decode_any_window (window); int add_x, add_y; + + CHECK_LIVE_FRAME (w->frame); calc_absolute_offset (w, &add_x, &add_y); return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), @@ -2568,6 +2568,7 @@ window-start value is reasonable when this function is called. */) Mouse_HLInfo *hlinfo; w = decode_any_window (window); + CHECK_LIVE_FRAME (w->frame); XSETWINDOW (window, w); f = XFRAME (w->frame); @@ -2581,6 +2582,7 @@ window-start value is reasonable when this function is called. */) /* ROOT must be an ancestor of WINDOW. */ { r = decode_any_window (root); + CHECK_LIVE_FRAME (r->frame); pwindow = XWINDOW (window)->parent; while (!NILP (pwindow)) if (EQ (pwindow, root)) From 542dfbde7049873d438079fd6835c8b4a46ebd80 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 20 Jul 2012 19:36:41 +0800 Subject: [PATCH 5/8] * progmodes/cc-langs.el (c-symbol-start): Include char _. Fixes: debbugs:11986 --- lisp/ChangeLog | 4 ++++ lisp/progmodes/cc-langs.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0790df5c25a..87df9b17349 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-07-20 Leo Liu + + * progmodes/cc-langs.el (c-symbol-start): Include char _ (bug#11986). + 2012-07-18 Stefan Monnier * userlock.el, emacs-lisp/map-ynp.el: Declare part of `emacs' package. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 493f3db0961..78be8ac2cc4 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -578,7 +578,7 @@ keyword. It's unspecified how far it matches. Does not contain a \\| operator at the top level." t (concat "[" c-alpha "_]") java (concat "[" c-alpha "_@]") - objc (concat "[" c-alpha "@]") + objc (concat "[" c-alpha "_@]") pike (concat "[" c-alpha "_`]")) (c-lang-defvar c-symbol-start (c-lang-const c-symbol-start)) From fe1a523fd9cecbaabc3215b030848f25f15a9c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 21 Jul 2012 03:59:49 +0800 Subject: [PATCH 6/8] Backport: Recognize Objective-C methods also in c-defun-name Fixes: debbugs:7879 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cc-cmds.el | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87df9b17349..bb5590b1c39 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -11,6 +11,11 @@ * progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end of narrowed buffer (bug#11966). +2012-07-14 Jan Djärv + + * progmodes/cc-cmds.el (c-defun-name): Recognize Objective-C methods + also (Bug#7879). + 2012-07-09 Stefan Monnier * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 9cf20ccb516..9c8c5633b80 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1826,6 +1826,15 @@ with a brace block." ;; DEFFLAGSET(syslog_opt_flags,LOG_PID ...) ==> syslog_opt_flags (match-string-no-properties 1)) + ;; Objective-C method starting with + or -. + ((and (derived-mode-p 'objc-mode) + (looking-at "[-+]\s*(")) + (when (c-syntactic-re-search-forward ")\s*" nil t) + (c-forward-token-2) + (setq name-end (point)) + (c-backward-token-2) + (buffer-substring-no-properties (point) name-end))) + (t ;; Normal function or initializer. (when (c-syntactic-re-search-forward "[{(]" nil t) From 3646bcd6b8d321bbcf08bf8204ad92bdd3f1f0da Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 21 Jul 2012 05:18:52 +0800 Subject: [PATCH 7/8] * lisp/progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly. Fixes: debbugs:7879 --- lisp/ChangeLog | 3 +++ lisp/progmodes/cc-cmds.el | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb5590b1c39..f305d971a0f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-07-20 Leo Liu + * progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly. + (Bug#7879) + * progmodes/cc-langs.el (c-symbol-start): Include char _ (bug#11986). 2012-07-18 Stefan Monnier diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 9c8c5633b80..3ec7386ece0 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1826,14 +1826,16 @@ with a brace block." ;; DEFFLAGSET(syslog_opt_flags,LOG_PID ...) ==> syslog_opt_flags (match-string-no-properties 1)) - ;; Objective-C method starting with + or -. - ((and (derived-mode-p 'objc-mode) - (looking-at "[-+]\s*(")) - (when (c-syntactic-re-search-forward ")\s*" nil t) - (c-forward-token-2) - (setq name-end (point)) - (c-backward-token-2) - (buffer-substring-no-properties (point) name-end))) + ;; Objc selectors. + ((assq 'objc-method-intro (c-guess-basic-syntax)) + (let ((bound (save-excursion (c-end-of-statement) (point))) + (kw-re (concat "\\(?:" c-symbol-key "\\)?:")) + (stretches)) + (when (c-syntactic-re-search-forward c-symbol-key bound t t t) + (push (match-string 0) stretches) + (while (c-syntactic-re-search-forward kw-re bound t t t) + (push (match-string 0) stretches))) + (apply 'concat (nreverse stretches)))) (t ;; Normal function or initializer. From 2c73e345cc666982dbcb9d73e4fdd5a3348d19bc Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 21 Jul 2012 09:41:48 +0800 Subject: [PATCH 8/8] Use match-string-no-properties instead in c-defun-name for consistency. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cc-cmds.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f305d971a0f..9cda817fab6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-07-21 Leo Liu + + * progmodes/cc-cmds.el (c-defun-name): Use + match-string-no-properties instead for consistency. + 2012-07-20 Leo Liu * progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly. diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 3ec7386ece0..daa2e455c28 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1832,9 +1832,9 @@ with a brace block." (kw-re (concat "\\(?:" c-symbol-key "\\)?:")) (stretches)) (when (c-syntactic-re-search-forward c-symbol-key bound t t t) - (push (match-string 0) stretches) + (push (match-string-no-properties 0) stretches) (while (c-syntactic-re-search-forward kw-re bound t t t) - (push (match-string 0) stretches))) + (push (match-string-no-properties 0) stretches))) (apply 'concat (nreverse stretches)))) (t