summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2011-10-28 14:02:04 +0000
committerAlan Mackenzie <acm@muc.de>2011-10-28 14:02:04 +0000
commitbc97a826f8ea89a269f6043be3148930f023e2b2 (patch)
treee927788ae7ba1058100dfb6c211ff57e6440de4c /lisp
parentc0f13227ab16ad9a87a16182e9d9ace5d2f7a6d9 (diff)
parent9aba60432c25b060680eb7db698b20b05d7b94a0 (diff)
downloademacs-bc97a826f8ea89a269f6043be3148930f023e2b2.tar.gz
emacs-bc97a826f8ea89a269f6043be3148930f023e2b2.tar.bz2
emacs-bc97a826f8ea89a269f6043be3148930f023e2b2.zip
Merge
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog58
-rw-r--r--lisp/mail/rmail.el1
-rw-r--r--lisp/progmodes/gdb-mi.el42
-rw-r--r--lisp/vc/log-edit.el14
4 files changed, 93 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6aa1bddb9f3..bf4d87d3405 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,57 @@
+2011-10-28 Alan Mackenzie <acm@muc.de>
+
+ Amend to indent and fontify macros "which include their own semicolon"
+ correctly, using the "virtual semicolon" mechanism.
+
+ * cc-defs.el: Update "virtual semicolon" comments.
+
+ * cc-engine.el (c-crosses-statement-barrier-p): Recoded to scan one line at
+ at time rather than having \n and \r explicitly in c-stmt-delim-chars
+ (for some modes, e.g. AWK).
+ (c-forward-label): Amend for virtual semicolons.
+ (c-at-macro-vsemi-p, c-macro-vsemi-status-unknown-p): New functions
+
+ * cc-fonts.el (c-font-lock-declarations): Take account of the new C macros.
+
+ * cc-langs.el (c-at-vsemi-p-fn, c-vsemi-status-unknown-p-fn): move to
+ earlier in the file.
+ (c-opt-cpp-symbol, c-line-comment-start-regexp): New language variables.
+ (c-opt-cpp-macro-define): Make into a full language variable.
+ (c-stmt-delim-chars, c-stmt-delim-chars-with-comma): Special value for
+ AWK Mode (including \n, \r) removed, no longer needed.
+
+ * cc-mode.el (c-mode, c++-mode, objc-mode): Invoke
+ c-make-macro-with-semi-re. (Erroneously committed early, in previous
+ version, 5.259.)
+
+ * cc-vars.el (c-macro-with-semi-re, c-macro-names-with-semicolon): New
+ variables.
+ (c-make-macro-with-semi-re): New function
+
+ * cc-mode.texi (Indentation Commands): Mention "macros with semicolons".
+ (Other Special Indentations): Add an xref to "Macros with ;".
+ (Customizing Macros): Add stuff about syntax in macros. Add an xref to
+ "Macros with ;".
+ (Macros with ;): New page.
+
+
+
+2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/log-edit.el: Fill empty field rather than adding new one.
+ (log-edit-add-field): New function.
+ (log-edit-insert-changelog): Use it.
+
+2011-10-28 Mark Lillibridge <mark.lillibridge@hp.com> (tiny change)
+
+ * mail/rmail.el (rmail-mode-map): Add M-C-f as in rmailsum (bug#9802).
+
+2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/gdb-mi.el: Warn the user when -i=mi is missing.
+ (gdb--check-interpreter): New function.
+ (gdb): Use it.
+
2011-10-27 Glenn Morris <rgm@gnu.org>
* emacs-lisp/cl-extra.el (most-positive-float, most-negative-float)
@@ -21,8 +75,8 @@
* subr.el (change-major-mode-after-body-hook): New hook.
(run-mode-hooks): Run it.
- * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Use
- change-major-mode-before-body-hook.
+ * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
+ Use change-major-mode-before-body-hook.
* simple.el (fundamental-mode):
* emacs-lisp/derived.el (define-derived-mode): Revert 2010-04-28
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 770050efb08..603a615192a 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1008,6 +1008,7 @@ The buffer is expected to be narrowed to just the header of the message."
(define-key map "\e\C-l" 'rmail-summary-by-labels)
(define-key map "\e\C-r" 'rmail-summary-by-recipients)
(define-key map "\e\C-s" 'rmail-summary-by-regexp)
+ (define-key map "\e\C-f" 'rmail-summary-by-senders)
(define-key map "\e\C-t" 'rmail-summary-by-topic)
(define-key map "m" 'rmail-mail)
(define-key map "\em" 'rmail-retry-failure)
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 22db7b2e5f4..dde00d753ac 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -43,21 +43,10 @@
;; M-x gdb will start the debugger.
-;; This file uses GDB/MI as the primary interface to GDB. It is still under
-;; development and is part of a process to migrate Emacs from annotations (as
-;; used in gdb-ui.el) to GDB/MI. It runs gdb with GDB/MI (-interp=mi) and
-;; access CLI using "-interpreter-exec console cli-command". This code works
-;; without gdb-ui.el and uses MI tokens instead of queues. Eventually MI
-;; should be asynchronous.
-
-;; This mode will PARTLY WORK WITH RECENT GDB RELEASES (status in modeline
-;; doesn't update properly when execution commands are issued from GUD buffer)
-;; and WORKS BEST when GDB runs asynchronously: maint set linux-async on.
-;;
-;; You need development version of GDB 7.0 for the thread buffer to work.
-
-;; This file replaces gdb-ui.el and is for development with GDB. Use the
-;; release branch of Emacs 22 for the latest version of gdb-ui.el.
+;; This file uses GDB/MI as the primary interface to GDB. It runs gdb with
+;; GDB/MI (-interp=mi) and access CLI using "-interpreter-exec console
+;; cli-command". This code works without gdb-ui.el and uses MI tokens instead
+;; of queues. Eventually MI should be asynchronous.
;; Windows Platforms:
@@ -599,6 +588,22 @@ NOARG must be t when this macro is used outside `gud-def'"
(concat (gdb-gud-context-command ,cmd1 ,noall) " " ,cmd2)
,(when (not noarg) 'arg)))
+(defun gdb--check-interpreter (proc string)
+ (unless (zerop (length string))
+ (let ((filter (process-get proc 'gud-normal-filter)))
+ (set-process-filter proc filter)
+ (unless (memq (aref string 0) '(?^ ?~ ?@ ?& ?* ?=))
+ ;; Apparently we're not running with -i=mi.
+ (let ((msg "Error: you did not specify -i=mi on GDB's command line!"))
+ (message msg)
+ (setq string (concat (propertize msg 'font-lock-face 'error)
+ "\n" string)))
+ ;; Use the old gud-gbd filter, not because it works, but because it
+ ;; will properly display GDB's answers rather than hanging waiting for
+ ;; answers that aren't coming.
+ (set (make-local-variable 'gud-marker-filter) #'gud-gdb-marker-filter))
+ (funcall filter proc string))))
+
;;;###autoload
(defun gdb (command-line)
"Run gdb on program FILE in buffer *gud-FILE*.
@@ -665,6 +670,13 @@ detailed description of this mode.
"Multiple debugging requires restarting in text command mode"))
;;
(gud-common-init command-line nil 'gud-gdbmi-marker-filter)
+
+ ;; Setup a temporary process filter to warn when GDB was not started
+ ;; with -i=mi.
+ (let ((proc (get-buffer-process gud-comint-buffer)))
+ (process-put proc 'gud-normal-filter (process-filter proc))
+ (set-process-filter proc #'gdb--check-interpreter))
+
(set (make-local-variable 'gud-minor-mode) 'gdbmi)
(setq comint-input-sender 'gdb-send)
(when (ring-empty-p comint-input-ring) ; cf shell-mode
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index c421304442f..f57429c76c7 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -593,6 +593,13 @@ to build the Fixes: header.")
(put 'log-edit-rewrite-fixes 'safe-local-variable
(lambda (v) (and (stringp (car-safe v)) (stringp (cdr v)))))
+(defun log-edit-add-field (field value)
+ (rfc822-goto-eoh)
+ (if (save-excursion (re-search-backward (concat "^" field ":\\([ \t]*\\)$")
+ nil t))
+ (replace-match (concat " " value) t t nil 1)
+ (insert field ": " value "\n" (if (looking-at "\n") "" "\n"))))
+
(defun log-edit-insert-changelog (&optional use-first)
"Insert a log message by looking at the ChangeLog.
The idea is to write your ChangeLog entries first, and then use this
@@ -620,9 +627,7 @@ regardless of user name or time."
(log-edit-insert-changelog-entries (log-edit-files)))))
(log-edit-set-common-indentation)
;; Add an Author: field if appropriate.
- (when author
- (rfc822-goto-eoh)
- (insert "Author: " author "\n" (if (looking-at "\n") "" "\n")))
+ (when author (log-edit-add-field "Author" author))
;; Add a Fixes: field if applicable.
(when (consp log-edit-rewrite-fixes)
(rfc822-goto-eoh)
@@ -632,8 +637,7 @@ regardless of user name or time."
(fixes (match-substitute-replacement
(cdr log-edit-rewrite-fixes))))
(delete-region start end)
- (rfc822-goto-eoh)
- (insert "Fixes: " fixes "\n" (if (looking-at "\n") "" "\n")))))
+ (log-edit-add-field "Fixes" fixes))))
(and log-edit-strip-single-file-name
(progn (rfc822-goto-eoh)
(if (looking-at "\n") (forward-char 1))