aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2011-07-18 23:10:15 -0700
committerPaul Eggert2011-07-18 23:10:15 -0700
commit7403ff044d82d390bdc4cdd3954448daedcd4571 (patch)
tree2f5ce508e4b20d5641ebd6c86ca61bc8dab401cc /lisp
parentd3411f89d34bd1009cae738f917abf477be09882 (diff)
parent15e3a074a6ebdcefd828a1ba14a5a12ff9921034 (diff)
downloademacs-7403ff044d82d390bdc4cdd3954448daedcd4571.tar.gz
emacs-7403ff044d82d390bdc4cdd3954448daedcd4571.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog20
-rw-r--r--lisp/emacs-lisp/cl-loaddefs.el2
-rw-r--r--lisp/image.el2
-rw-r--r--lisp/mh-e/ChangeLog11
-rw-r--r--lisp/mh-e/mh-compat.el12
-rw-r--r--lisp/mh-e/mh-e.el4
-rw-r--r--lisp/mh-e/mh-folder.el8
-rw-r--r--lisp/progmodes/cc-engine.el8
-rw-r--r--lisp/progmodes/cc-fonts.el47
-rw-r--r--lisp/progmodes/cc-langs.el2
-rw-r--r--lisp/progmodes/etags.el2
11 files changed, 93 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ae54b3733f6..0ea3d94a01f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,25 @@
12011-07-18 Alan Mackenzie <acm@muc.de>
2
3 Fontify declarators properly when, e.g., a jit-lock chunk begins
4 inside a declaration.
5
6 * progmodes/cc-langs.el (c-symbol-chars): Correct a typo.
7
8 * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): New
9 function.
10 (c-complex-decl-matchers): Insert reference to
11 c-font-lock-enclosing-decls.
12
13 * progmodes/cc-engine.el (c-backward-single-comment):
14 (c-backward-comments): Bind open-paren-in-column-0-is-defun-start
15 to nil around calls to (forward-comment -1).
16
12011-07-17 Lars Magne Ingebrigtsen <larsi@gnus.org> 172011-07-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 18
19 * image.el (put-image): Doc typo fix.
20
21 * progmodes/etags.el (tags-search): Doc typo fix.
22
3 * mail/smtpmail.el (smtpmail-via-smtp): Query the user for 23 * mail/smtpmail.el (smtpmail-via-smtp): Query the user for
4 password if we get errors 550 to 554. 24 password if we get errors 550 to 554.
5 25
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el
index f0c72a0b269..270211f6a78 100644
--- a/lisp/emacs-lisp/cl-loaddefs.el
+++ b/lisp/emacs-lisp/cl-loaddefs.el
@@ -282,7 +282,7 @@ Not documented
282;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist 282;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist
283;;;;;; do* do loop return-from return block etypecase typecase ecase 283;;;;;; do* do loop return-from return block etypecase typecase ecase
284;;;;;; case load-time-value eval-when destructuring-bind function* 284;;;;;; case load-time-value eval-when destructuring-bind function*
285;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "2261724608e3223036b863d214f7dc0c") 285;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "9452c0e16fd960fce5c19e5c067a7160")
286;;; Generated autoloads from cl-macs.el 286;;; Generated autoloads from cl-macs.el
287 287
288(autoload 'gensym "cl-macs" "\ 288(autoload 'gensym "cl-macs" "\
diff --git a/lisp/image.el b/lisp/image.el
index b67367ad436..c6862622639 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -389,7 +389,7 @@ IMAGE must be an image created with `create-image' or `defimage'.
389IMAGE is displayed by putting an overlay into the current buffer with a 389IMAGE is displayed by putting an overlay into the current buffer with a
390`before-string' STRING that has a `display' property whose value is the 390`before-string' STRING that has a `display' property whose value is the
391image. STRING is defaulted if you omit it. 391image. STRING is defaulted if you omit it.
392The overlay created will have the `put-overlay' property set to t. 392The overlay created will have the `put-image' property set to t.
393POS may be an integer or marker. 393POS may be an integer or marker.
394AREA is where to display the image. AREA nil or omitted means 394AREA is where to display the image. AREA nil or omitted means
395display it in the text area, a value of `left-margin' means 395display it in the text area, a value of `left-margin' means
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 431c15b2346..731aaf25f3d 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,14 @@
12011-07-17 Bill Wohler <wohler@newt.com>
2
3 Release MH-E version 8.2.93.
4
5 * mh-e.el (Version, mh-version): Update for release 8.2.93.
6
7 * mh-compat.el (mh-pop-to-buffer-same-window): Delete.
8 * mh-folder.el (mh-inc-folder, mh-modify, mh-scan-folder)
9 (mh-make-folder): Revert to switch-to-buffer, as the Emacs folks
10 decided that it was fine to use it in programs.
11
12011-07-16 Bill Wohler <wohler@newt.com> 122011-07-16 Bill Wohler <wohler@newt.com>
2 13
3 Release MH-E version 8.2.92. 14 Release MH-E version 8.2.92.
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index 16dfe05b094..07c558f60cc 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -251,18 +251,6 @@ The argument STRING is ignored."
251 (buffer-substring-no-properties 251 (buffer-substring-no-properties
252 (match-beginning num) (match-end num))) 252 (match-beginning num) (match-end num)))
253 253
254(defun-mh mh-pop-to-buffer-same-window
255 pop-to-buffer-same-window (&optional buffer-or-name norecord label)
256 "Pop to buffer specified by BUFFER-OR-NAME in the selected window.
257Another window will be used only if the buffer can't be shown in
258the selected window, usually because it is dedicated to another
259buffer. Optional arguments BUFFER-OR-NAME, NORECORD and LABEL are
260as for `pop-to-buffer'. This macro is used by Emacs versions that
261lack the `pop-to-buffer-same-window' function, introduced in
262Emacs 24. The function `switch-to-buffer' is used instead and
263LABEL is ignored."
264 (switch-to-buffer buffer-or-name norecord))
265
266(defun-mh mh-replace-regexp-in-string replace-regexp-in-string 254(defun-mh mh-replace-regexp-in-string replace-regexp-in-string
267 (regexp rep string &optional fixedcase literal subexp start) 255 (regexp rep string &optional fixedcase literal subexp start)
268 "Replace REGEXP with REP everywhere in STRING and return result. 256 "Replace REGEXP with REP everywhere in STRING and return result.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 1e7b07eb6dc..5562a310f29 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -5,7 +5,7 @@
5 5
6;; Author: Bill Wohler <wohler@newt.com> 6;; Author: Bill Wohler <wohler@newt.com>
7;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
8;; Version: 8.2.92 8;; Version: 8.2.93
9;; Keywords: mail 9;; Keywords: mail
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
@@ -127,7 +127,7 @@
127;; Try to keep variables local to a single file. Provide accessors if 127;; Try to keep variables local to a single file. Provide accessors if
128;; variables are shared. Use this section as a last resort. 128;; variables are shared. Use this section as a last resort.
129 129
130(defconst mh-version "8.2.92" "Version number of MH-E.") 130(defconst mh-version "8.2.93" "Version number of MH-E.")
131 131
132;; Variants 132;; Variants
133 133
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 1d9a79d0deb..40febd641de 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -795,7 +795,7 @@ instead."
795 (setq threading-needed-flag mh-show-threads-flag) 795 (setq threading-needed-flag mh-show-threads-flag)
796 (setq mh-previous-window-config config)) 796 (setq mh-previous-window-config config))
797 ((not (eq (current-buffer) (get-buffer folder))) 797 ((not (eq (current-buffer) (get-buffer folder)))
798 (mh-pop-to-buffer-same-window folder) 798 (switch-to-buffer folder)
799 (setq mh-previous-window-config config)))) 799 (setq mh-previous-window-config config))))
800 (mh-get-new-mail file) 800 (mh-get-new-mail file)
801 (when (and threading-needed-flag 801 (when (and threading-needed-flag
@@ -855,7 +855,7 @@ From a program, edit MESSAGE; nil means edit current message."
855 855
856 ;; Just show the edit buffer... 856 ;; Just show the edit buffer...
857 (delete-other-windows) 857 (delete-other-windows)
858 (mh-pop-to-buffer-same-window edit-buffer))) 858 (switch-to-buffer edit-buffer)))
859 859
860;;;###mh-autoload 860;;;###mh-autoload
861(defun mh-next-button (&optional backward-flag) 861(defun mh-next-button (&optional backward-flag)
@@ -1705,7 +1705,7 @@ DONT-EXEC-PENDING is non-nil."
1705 (unless dont-exec-pending 1705 (unless dont-exec-pending
1706 (mh-process-or-undo-commands folder) 1706 (mh-process-or-undo-commands folder)
1707 (mh-reset-threads-and-narrowing)) 1707 (mh-reset-threads-and-narrowing))
1708 (mh-pop-to-buffer-same-window folder))) 1708 (switch-to-buffer folder)))
1709 (mh-regenerate-headers range) 1709 (mh-regenerate-headers range)
1710 (if (zerop (buffer-size)) 1710 (if (zerop (buffer-size))
1711 (if (equal range "all") 1711 (if (equal range "all")
@@ -1786,7 +1786,7 @@ Also removes all content from the folder buffer."
1786(defun mh-make-folder (name) 1786(defun mh-make-folder (name)
1787 "Create a new mail folder called NAME. 1787 "Create a new mail folder called NAME.
1788Make it the current folder." 1788Make it the current folder."
1789 (mh-pop-to-buffer-same-window name) 1789 (switch-to-buffer name)
1790 (setq buffer-read-only nil) 1790 (setq buffer-read-only nil)
1791 (erase-buffer) 1791 (erase-buffer)
1792 (if mh-adaptive-cmd-note-flag 1792 (if mh-adaptive-cmd-note-flag
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 38f66b4504e..a6fd28be21d 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1301,12 +1301,13 @@ This function does not do any hidden buffer changes."
1301 ;; same line. 1301 ;; same line.
1302 (re-search-forward "\\=\\s *[\n\r]" start t) 1302 (re-search-forward "\\=\\s *[\n\r]" start t)
1303 1303
1304 (if (if (forward-comment -1) 1304 (if (if (let (open-paren-in-column-0-is-defun-start) (forward-comment -1))
1305 (if (eolp) 1305 (if (eolp)
1306 ;; If forward-comment above succeeded and we're at eol 1306 ;; If forward-comment above succeeded and we're at eol
1307 ;; then the newline we moved over above didn't end a 1307 ;; then the newline we moved over above didn't end a
1308 ;; line comment, so we give it another go. 1308 ;; line comment, so we give it another go.
1309 (forward-comment -1) 1309 (let (open-paren-in-column-0-is-defun-start)
1310 (forward-comment -1))
1310 t)) 1311 t))
1311 1312
1312 ;; Emacs <= 20 and XEmacs move back over the closer of a 1313 ;; Emacs <= 20 and XEmacs move back over the closer of a
@@ -1333,7 +1334,8 @@ comment at the start of cc-engine.el for more info."
1333 ;; return t when moving backwards at bob. 1334 ;; return t when moving backwards at bob.
1334 (not (bobp)) 1335 (not (bobp))
1335 1336
1336 (if (forward-comment -1) 1337 (if (let (open-paren-in-column-0-is-defun-start)
1338 (forward-comment -1))
1337 (if (looking-at "\\*/") 1339 (if (looking-at "\\*/")
1338 ;; Emacs <= 20 and XEmacs move back over the 1340 ;; Emacs <= 20 and XEmacs move back over the
1339 ;; closer of a block comment that lacks an opener. 1341 ;; closer of a block comment that lacks an opener.
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 600bbc76e9a..0500d48ddbc 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1346,6 +1346,50 @@ casts and declarations are fontified. Used on level 2 and higher."
1346 (c-font-lock-declarators limit t nil))) 1346 (c-font-lock-declarators limit t nil)))
1347 nil) 1347 nil)
1348 1348
1349(defun c-font-lock-enclosing-decls (limit)
1350 ;; Fontify the declarators of (nested) declarations we're in the middle of.
1351 ;; This is mainly for when a jit-lock etc. chunk starts inside the brace
1352 ;; block of a struct/union/class, etc.
1353 ;;
1354 ;; This function will be called from font-lock for a region bounded by POINT
1355 ;; and LIMIT, as though it were to identify a keyword for
1356 ;; font-lock-keyword-face. It always returns NIL to inhibit this and
1357 ;; prevent a repeat invocation. See elisp/lispref page "Search-based
1358 ;; Fontification".
1359 (let* ((paren-state (c-parse-state))
1360 (start (point))
1361 decl-context bo-decl in-typedef type-type ps-elt)
1362
1363 ;; First, are we actually in a "local" declaration?
1364 (setq decl-context (c-beginning-of-decl-1)
1365 bo-decl (point)
1366 in-typedef (looking-at c-typedef-key))
1367 (if in-typedef (c-forward-token-2))
1368 (when (and (eq (car decl-context) 'same)
1369 (< bo-decl start))
1370 ;; Are we genuinely at a type?
1371 (setq type-type (c-forward-type t))
1372 (if (and type-type
1373 (or (not (eq type-type 'maybe))
1374 (looking-at c-symbol-key)))
1375 (c-font-lock-declarators limit t in-typedef)))
1376
1377 ;; Secondly, are we in any nested struct/union/class/etc. braces?
1378 (while paren-state
1379 (setq ps-elt (car paren-state)
1380 paren-state (cdr paren-state))
1381 (when (and (atom ps-elt)
1382 (eq (char-after ps-elt) ?\{))
1383 (goto-char ps-elt)
1384 (setq decl-context (c-beginning-of-decl-1)
1385 in-typedef (looking-at c-typedef-key))
1386 (if in-typedef (c-forward-token-2))
1387 (when (looking-at c-opt-block-decls-with-vars-key)
1388 (goto-char ps-elt)
1389 (when (c-safe (c-forward-sexp))
1390 (c-forward-syntactic-ws)
1391 (c-font-lock-declarators limit t in-typedef)))))))
1392
1349(c-lang-defconst c-simple-decl-matchers 1393(c-lang-defconst c-simple-decl-matchers
1350 "Simple font lock matchers for types and declarations. These are used 1394 "Simple font lock matchers for types and declarations. These are used
1351on level 2 only and so aren't combined with `c-complex-decl-matchers'." 1395on level 2 only and so aren't combined with `c-complex-decl-matchers'."
@@ -1452,6 +1496,9 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
1452 ;; Fontify all declarations, casts and normal labels. 1496 ;; Fontify all declarations, casts and normal labels.
1453 c-font-lock-declarations 1497 c-font-lock-declarations
1454 1498
1499 ;; Fontify declarators when POINT is within their declaration.
1500 c-font-lock-enclosing-decls
1501
1455 ;; Fontify angle bracket arglists like templates in C++. 1502 ;; Fontify angle bracket arglists like templates in C++.
1456 ,@(when (c-lang-const c-recognize-<>-arglists) 1503 ,@(when (c-lang-const c-recognize-<>-arglists)
1457 `(c-font-lock-<>-arglists)) 1504 `(c-font-lock-<>-arglists))
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index a6459e1724f..9ce23a080d6 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -523,7 +523,7 @@ operator at the top level."
523 523
524(c-lang-defconst c-symbol-chars 524(c-lang-defconst c-symbol-chars
525 "Set of characters that can be part of a symbol. 525 "Set of characters that can be part of a symbol.
526This is on the form that fits inside [ ] in a regexp." 526This is of the form that fits inside [ ] in a regexp."
527 ;; Pike note: With the backquote identifiers this would include most 527 ;; Pike note: With the backquote identifiers this would include most
528 ;; operator chars too, but they are handled with other means instead. 528 ;; operator chars too, but they are handled with other means instead.
529 t (concat c-alnum "_$") 529 t (concat c-alnum "_$")
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 385adf1af0a..da073ceb258 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1860,7 +1860,7 @@ nil, we exit; otherwise we scan the next file."
1860Stops when a match is found. 1860Stops when a match is found.
1861To continue searching for next match, use command \\[tags-loop-continue]. 1861To continue searching for next match, use command \\[tags-loop-continue].
1862 1862
1863If `file-list-form' is non-nil, it should be a form that, when 1863If FILE-LIST-FORM is non-nil, it should be a form that, when
1864evaluated, will return a list of file names. The search will be 1864evaluated, will return a list of file names. The search will be
1865restricted to these files. 1865restricted to these files.
1866 1866