Now on revision 105519. ------------------------------------------------------------ revno: 105519 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-08-21 09:39:07 +0000 message: Merge changes made in Gnus trunk. nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source instead. pop3.el (pop3-wait-for-messages): Don't use Gnus functions here. gnus-util.el (gnus-process-live-p): Copy over compat function. pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop processing. nntp.el (nntp-kill-buffer): Kill the process before killing the buffer to avoid warnings. gnus-agent.el (gnus-agent-expire-done-message): Use %.f as format specified to reduce precision. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-08-20 00:27:04 +0000 +++ lisp/gnus/ChangeLog 2011-08-21 09:39:07 +0000 @@ -1,3 +1,23 @@ +2011-08-21 Lars Magne Ingebrigtsen + + * nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source + instead. + + * pop3.el (pop3-wait-for-messages): Don't use Gnus functions here. + + * gnus-util.el (gnus-process-live-p): Copy over compat function. + + * pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop + processing. + + * nntp.el (nntp-kill-buffer): Kill the process before killing the + buffer to avoid warnings. + +2011-08-20 Simon Josefsson + + * gnus-agent.el (gnus-agent-expire-done-message): Use %.f as format + specified to reduce precision. + 2011-08-19 Lars Magne Ingebrigtsen * nnimap.el (nnimap-transform-headers): Protect against (NIL ...) === modified file 'lisp/gnus/gnus-agent.el' --- lisp/gnus/gnus-agent.el 2011-06-10 00:10:24 +0000 +++ lisp/gnus/gnus-agent.el 2011-08-21 09:39:07 +0000 @@ -3560,7 +3560,7 @@ units (cdr units))) (format "Expiry recovered %d NOV entries, deleted %d files,\ - and freed %f %s." + and freed %.f %s." (nth 0 stats) (nth 1 stats) size (car units))) === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2011-08-20 00:20:39 +0000 +++ lisp/gnus/gnus-util.el 2011-08-21 09:39:07 +0000 @@ -1249,6 +1249,13 @@ (with-current-buffer gnus-group-buffer (eq major-mode 'gnus-group-mode)))) +(defun gnus-process-live-p (process) + "Returns non-nil if PROCESS is alive. +A process is considered alive if its status is `run', `open', +`listen', `connect' or `stop'." + (memq (process-status process) + '(run open listen connect stop))) + (defun gnus-remove-if (predicate sequence &optional hash-table-p) "Return a copy of SEQUENCE with all items satisfying PREDICATE removed. SEQUENCE should be a list, a vector, or a string. Returns always a list. === modified file 'lisp/gnus/nntp.el' --- lisp/gnus/nntp.el 2011-07-01 01:49:43 +0000 +++ lisp/gnus/nntp.el 2011-08-21 09:39:07 +0000 @@ -261,6 +261,8 @@ (const :format "" "password") (string :format "Password: %v"))))))) +(make-obsolete 'nntp-authinfo-file nil "Emacs 24.1") + (defvoo nntp-connection-timeout nil @@ -430,6 +432,9 @@ (defun nntp-kill-buffer (buffer) (when (buffer-name buffer) + (let ((process (get-buffer-process buffer))) + (when process + (delete-process process))) (kill-buffer buffer) (nnheader-init-server-buffer))) === modified file 'lisp/gnus/pop3.el' --- lisp/gnus/pop3.el 2011-07-05 22:27:16 +0000 +++ lisp/gnus/pop3.el 2011-08-21 09:39:07 +0000 @@ -178,6 +178,8 @@ (defun pop3-wait-for-messages (process count total-size) (while (< (pop3-number-of-responses total-size) count) + (unless (memq (process-status process) '(open run)) + (error "pop3 process died")) (when total-size (message "pop3 retrieved %dKB (%d%%)" (truncate (/ (buffer-size) 1000)) ------------------------------------------------------------ revno: 105518 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-08-21 06:11:59 +0200 message: Introduce a new variable to allow controlling the SMTP user name * mail/smtpmail.el (smtpmail-smtp-user): New variable. (smtpmail-try-auth-methods): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-21 03:00:52 +0000 +++ lisp/ChangeLog 2011-08-21 04:11:59 +0000 @@ -1,3 +1,8 @@ +2011-08-21 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-smtp-user): New variable. + (smtpmail-try-auth-methods): Use it. + 2011-08-21 Chong Yidong * font-lock.el (font-lock-fontify-region) === modified file 'lisp/mail/smtpmail.el' --- lisp/mail/smtpmail.el 2011-08-17 22:02:49 +0000 +++ lisp/mail/smtpmail.el 2011-08-21 04:11:59 +0000 @@ -86,6 +86,11 @@ :type '(choice (integer :tag "Port") (string :tag "Service")) :group 'smtpmail) +(defcustom smtpmail-smtp-user nil + "User name to use when looking up credentials." + :type '(choice (const nil) string) + :group 'smtpmail) + (defcustom smtpmail-local-domain nil "Local domain name without a host name. If the function `system-name' returns the full internet address, @@ -490,6 +495,7 @@ (auth-source-search :host host :port port + :user smtpmail-smtp-user :max 1 :require (and ask-for-password '(:user :secret)) @@ -510,6 +516,7 @@ :max 1 :host host :port port + :user smtpmail-smtp-user :require '(:user :secret) :create t)) password (plist-get auth-info :secret))) ------------------------------------------------------------ revno: 105517 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-08-20 23:02:39 -0400 message: Minor fix to last change. diff: === modified file 'lisp/font-lock.el' --- lisp/font-lock.el 2011-08-21 03:00:52 +0000 +++ lisp/font-lock.el 2011-08-21 03:02:39 +0000 @@ -1031,7 +1031,7 @@ (funcall font-lock-unfontify-region-function beg end))) (defun font-lock-default-fontify-buffer () - "Fontify the whole buffer using `font-lock-fontify-buffer-function'." + "Fontify the whole buffer using `font-lock-fontify-region-function'." (let ((verbose (if (numberp font-lock-verbose) (> (buffer-size) font-lock-verbose) font-lock-verbose))) @@ -1173,8 +1173,7 @@ (defun font-lock-default-unfontify-region (beg end) "Unfontify the text between BEG and END. -This function is the default value of the variable - `font-lock-unfontify-region-function'." +This function is the default `font-lock-unfontify-region-function'." (remove-list-of-text-properties beg end (append font-lock-extra-managed-props ------------------------------------------------------------ revno: 105516 fixes bug(s): http://debbugs.gnu.org/8624 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-08-20 23:00:52 -0400 message: Add some docstrings to font-lock.el. * font-lock.el (font-lock-fontify-region) (font-lock-unfontify-region, font-lock-default-fontify-buffer) (font-lock-default-unfontify-buffer) (font-lock-default-fontify-region) (font-lock-default-unfontify-region): Add docstrings (Bug#8624). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-21 02:24:07 +0000 +++ lisp/ChangeLog 2011-08-21 03:00:52 +0000 @@ -1,5 +1,11 @@ 2011-08-21 Chong Yidong + * font-lock.el (font-lock-fontify-region) + (font-lock-unfontify-region, font-lock-default-fontify-buffer) + (font-lock-default-unfontify-buffer) + (font-lock-default-fontify-region) + (font-lock-default-unfontify-region): Add docstrings (Bug#8624). + * progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to === modified file 'lisp/font-lock.el' --- lisp/font-lock.el 2011-08-18 11:36:19 +0000 +++ lisp/font-lock.el 2011-08-21 03:00:52 +0000 @@ -1018,14 +1018,20 @@ (funcall font-lock-unfontify-buffer-function)) (defun font-lock-fontify-region (beg end &optional loudly) + "Fontify the text between BEG and END. +If LOUDLY is non-nil, print status messages while fontifying. +This works by calling `font-lock-fontify-region-function'." (font-lock-set-defaults) (funcall font-lock-fontify-region-function beg end loudly)) (defun font-lock-unfontify-region (beg end) + "Unfontify the text between BEG and END. +This works by calling `font-lock-unfontify-region-function'." (save-buffer-state (funcall font-lock-unfontify-region-function beg end))) (defun font-lock-default-fontify-buffer () + "Fontify the whole buffer using `font-lock-fontify-buffer-function'." (let ((verbose (if (numberp font-lock-verbose) (> (buffer-size) font-lock-verbose) font-lock-verbose))) @@ -1045,6 +1051,7 @@ (quit (font-lock-unfontify-buffer))))))) (defun font-lock-default-unfontify-buffer () + "Unfontify the whole buffer using `font-lock-unfontify-region-function'." ;; Make sure we unfontify etc. in the whole buffer. (save-restriction (widen) @@ -1114,6 +1121,9 @@ changed)) (defun font-lock-default-fontify-region (beg end loudly) + "Fontify the text between BEG and END. +If LOUDLY is non-nil, print status messages while fontifying. +This function is the default `font-lock-fontify-region-function'." (save-buffer-state ;; Use the fontification syntax table, if any. (with-syntax-table (or font-lock-syntax-table (syntax-table)) @@ -1162,6 +1172,9 @@ what properties to clear before refontifying a region.") (defun font-lock-default-unfontify-region (beg end) + "Unfontify the text between BEG and END. +This function is the default value of the variable + `font-lock-unfontify-region-function'." (remove-list-of-text-properties beg end (append font-lock-extra-managed-props ------------------------------------------------------------ revno: 105515 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-08-20 22:24:07 -0400 message: Fix to `ant' compile regexp. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to `ant' regexp. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-21 02:07:00 +0000 +++ lisp/ChangeLog 2011-08-21 02:24:07 +0000 @@ -2,6 +2,8 @@ * progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). + (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to + `ant' regexp. * net/browse-url.el (browse-url-firefox): Don't call browse-url-firefox-sentinel unless using -remote (Bug#9328). === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-08-21 02:07:00 +0000 +++ lisp/progmodes/compile.el 2011-08-21 02:24:07 +0000 @@ -145,7 +145,7 @@ (ant "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\ -\\( warning\\)?" 1 (2 . 4) (3 . 5) (4)) +\\( warning\\)?" 1 (2 . 4) (3 . 5) (6)) (bash "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) ------------------------------------------------------------ revno: 105514 fixes bug(s): http://debbugs.gnu.org/9319 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-08-20 22:07:00 -0400 message: Fix error in compilation-error-properties. * lisp/progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-21 01:01:12 +0000 +++ lisp/ChangeLog 2011-08-21 02:07:00 +0000 @@ -1,5 +1,8 @@ 2011-08-21 Chong Yidong + * progmodes/compile.el (compilation-error-properties): Fix + confusion between file struct and message struct (Bug#9319). + * net/browse-url.el (browse-url-firefox): Don't call browse-url-firefox-sentinel unless using -remote (Bug#9328). === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-08-18 11:36:19 +0000 +++ lisp/progmodes/compile.el 2011-08-21 02:07:00 +0000 @@ -985,12 +985,15 @@ (let* ((prev (or (get-text-property (1- prev-pos) 'compilation-message) (get-text-property prev-pos 'compilation-message))) - (prev-struct - (car (nth 2 (car prev))))) + (prev-file-struct + (and prev + (compilation--loc->file-struct + (compilation--message->loc prev))))) + ;; Construct FILE . DIR from that. - (if prev-struct - (setq file (cons (car prev-struct) - (cadr prev-struct)))))) + (if prev-file-struct + (setq file (cons (caar prev-file-struct) + (cadr (car prev-file-struct))))))) (unless file (setq file '("*unknown*"))))) ;; All of these fields are optional, get them only if we have an index, and ------------------------------------------------------------ revno: 105513 fixes bug(s): http://debbugs.gnu.org/9328 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-08-20 21:01:12 -0400 message: Fix for browse-url-firefox on Windows. * lisp/net/browse-url.el (browse-url-firefox): Don't call browse-url-firefox-sentinel unless using -remote. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-20 22:53:00 +0000 +++ lisp/ChangeLog 2011-08-21 01:01:12 +0000 @@ -1,3 +1,8 @@ +2011-08-21 Chong Yidong + + * net/browse-url.el (browse-url-firefox): Don't call + browse-url-firefox-sentinel unless using -remote (Bug#9328). + 2011-08-20 Glenn Morris * tutorial.el (help-with-tutorial): Avoid an error on short screens. === modified file 'lisp/net/browse-url.el' --- lisp/net/browse-url.el 2011-07-13 13:49:55 +0000 +++ lisp/net/browse-url.el 2011-08-21 01:01:12 +0000 @@ -1103,26 +1103,32 @@ (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment)) + (use-remote + (not (memq system-type '(windows-nt ms-dos)))) (process (apply 'start-process (concat "firefox " url) nil browse-url-firefox-program (append browse-url-firefox-arguments - (if (memq system-type '(windows-nt ms-dos)) - (list url) - (list "-remote" - (concat "openURL(" - url - (if (browse-url-maybe-new-window - new-window) - (if browse-url-firefox-new-window-is-tab - ",new-tab" - ",new-window")) - ")"))))))) - (set-process-sentinel process - `(lambda (process change) - (browse-url-firefox-sentinel process ,url))))) + (if use-remote + (list "-remote" + (concat + "openURL(" + url + (if (browse-url-maybe-new-window new-window) + (if browse-url-firefox-new-window-is-tab + ",new-tab" + ",new-window")) + ")")) + (list url)))))) + ;; If we use -remote, the process exits with status code 2 if + ;; Firefox is not already running. The sentinel runs firefox + ;; directly if that happens. + (when use-remote + (set-process-sentinel process + `(lambda (process change) + (browse-url-firefox-sentinel process ,url)))))) (defun browse-url-firefox-sentinel (process url) "Handle a change to the process communicating with Firefox." ------------------------------------------------------------ revno: 105512 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-08-20 15:53:00 -0700 message: * lisp/tutorial.el (help-with-tutorial): Avoid an error on short screens. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-20 22:41:41 +0000 +++ lisp/ChangeLog 2011-08-20 22:53:00 +0000 @@ -1,5 +1,7 @@ 2011-08-20 Glenn Morris + * tutorial.el (help-with-tutorial): Avoid an error on short screens. + * tutorial.el (tutorial--default-keys): Update some default bindings. * files.el (hack-local-variables): Fully ignore case for "mode:". === modified file 'lisp/tutorial.el' --- lisp/tutorial.el 2011-08-20 22:41:41 +0000 +++ lisp/tutorial.el 2011-08-20 22:53:00 +0000 @@ -889,6 +889,11 @@ (search-forward ">>") (replace-match "]"))) (beginning-of-line) + ;; FIXME: if the window is not tall, and especially if the + ;; big red "NOTICE: The main purpose..." text has been + ;; inserted at the start of the buffer, the "type C-v to + ;; move to the next screen" might not be visible on the + ;; first screen (n < 0). How will the novice know what to do? (let ((n (- (window-height (selected-window)) (count-lines (point-min) (point)) 6))) @@ -897,7 +902,7 @@ ;; For a short gap, we don't need the [...] line, ;; so delete it. (delete-region (point) (progn (end-of-line) (point))) - (newline n)) + (if (> n 0) (newline n))) ;; Some people get confused by the large gap. (newline (/ n 2)) ------------------------------------------------------------ revno: 105511 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-08-20 15:41:41 -0700 message: Update some tutorial key bindings; ref bug#8739. * lisp/tutorial.el (tutorial--default-keys): Update some default bindings. * etc/NEWS: delete-forward-char is not bound to C-d. * lisp/bindings.el, lisp/windows.el: Comments. diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-08-18 15:53:29 +0000 +++ etc/NEWS 2011-08-20 22:41:41 +0000 @@ -407,7 +407,7 @@ and no prefix argument is given. If set to `kill', these commands kill instead. -*** New command `delete-forward-char', bound to C-d and [delete]. +*** New command `delete-forward-char', bound to [delete]. This is meant for interactive use, and obeys `delete-active-region'. The command `delete-char' does not obey `delete-active-region'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-20 22:26:52 +0000 +++ lisp/ChangeLog 2011-08-20 22:41:41 +0000 @@ -1,5 +1,7 @@ 2011-08-20 Glenn Morris + * tutorial.el (tutorial--default-keys): Update some default bindings. + * files.el (hack-local-variables): Fully ignore case for "mode:". 2011-08-20 Alan Mackenzie === modified file 'lisp/bindings.el' --- lisp/bindings.el 2011-07-14 01:58:51 +0000 +++ lisp/bindings.el 2011-08-20 22:41:41 +0000 @@ -834,6 +834,7 @@ (setq i (1+ i)))) (define-key global-map [?\C-\M--] 'negative-argument) +;; Update tutorial--default-keys if you change these. (define-key global-map "\177" 'delete-backward-char) (define-key global-map "\C-d" 'delete-char) === modified file 'lisp/tutorial.el' --- lisp/tutorial.el 2011-01-25 04:08:28 +0000 +++ lisp/tutorial.el 2011-08-20 22:41:41 +0000 @@ -253,7 +253,7 @@ ;; * INSERTING AND DELETING ;; C-u 8 * to insert ********. (delete-backward-char "\d") - (delete-forward-char [?\C-d]) + (delete-char [?\C-d]) (backward-kill-word [?\M-\d]) (kill-word [?\M-d]) (kill-line [?\C-k]) @@ -298,7 +298,7 @@ (isearch-backward [?\C-r]) ;; * MULTIPLE WINDOWS - (split-window-vertically [?\C-x ?2]) + (split-window-above-each-other [?\C-x ?2]) (scroll-other-window [?\C-\M-v]) (other-window [?\C-x ?o]) (find-file-other-window [?\C-x ?4 ?\C-f]) === modified file 'lisp/window.el' --- lisp/window.el 2011-08-20 10:10:05 +0000 +++ lisp/window.el 2011-08-20 22:41:41 +0000 @@ -7474,6 +7474,8 @@ (< (window-width window) t-p-w-w) t-p-w-w)))) +;; Some of these are in tutorial--default-keys, so update that if you +;; change these. (define-key ctl-x-map "0" 'delete-window) (define-key ctl-x-map "1" 'delete-other-windows) (define-key ctl-x-map "2" 'split-window-above-each-other) ------------------------------------------------------------ revno: 105510 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-08-20 15:26:52 -0700 message: * lisp/files.el (hack-local-variables): Fully ignore case for "mode:". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-20 22:02:25 +0000 +++ lisp/ChangeLog 2011-08-20 22:26:52 +0000 @@ -1,3 +1,7 @@ +2011-08-20 Glenn Morris + + * files.el (hack-local-variables): Fully ignore case for "mode:". + 2011-08-20 Alan Mackenzie Resolve invalid use of a regexp in regexp-opt. === modified file 'lisp/files.el' --- lisp/files.el 2011-08-19 18:23:09 +0000 +++ lisp/files.el 2011-08-20 22:26:52 +0000 @@ -3154,7 +3154,8 @@ (var (let ((read-circle nil)) (read str))) val val2) - (and (eq var 'Mode) (setq var 'mode)) + (and (equal (downcase (symbol-name var)) "mode") + (setq var 'mode)) ;; Read the variable value. (skip-chars-forward "^:") (forward-char 1) ------------------------------------------------------------ revno: 105509 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-08-20 15:19:53 -0700 message: Add missing file to leim/Makefile. * leim/Makefile.in (OTHERS): * leim/makefile.w32-in (MISC): Add ipa-praat.elc. diff: === modified file 'leim/ChangeLog' --- leim/ChangeLog 2011-07-23 17:29:42 +0000 +++ leim/ChangeLog 2011-08-20 22:19:53 +0000 @@ -1,3 +1,8 @@ +2011-08-20 Glenn Morris + + * Makefile.in (OTHERS): + * makefile.w32-in (MISC): Add ipa-praat.elc. + 2011-07-23 Yair F * quail/hebrew.el ("hebrew"): Additional key mappings. === modified file 'leim/Makefile.in' --- leim/Makefile.in 2011-06-12 09:01:24 +0000 +++ leim/Makefile.in 2011-08-20 22:19:53 +0000 @@ -124,6 +124,7 @@ ${srcdir}/quail/arabic.elc \ ${srcdir}/quail/ethiopic.elc \ ${srcdir}/quail/ipa.elc \ + ${srcdir}/quail/ipa-praat.elc \ ${srcdir}/quail/hebrew.elc \ ${srcdir}/quail/georgian.elc \ $(srcdir)/quail/persian.elc \ === modified file 'leim/makefile.w32-in' --- leim/makefile.w32-in 2011-05-16 11:27:34 +0000 +++ leim/makefile.w32-in 2011-08-20 22:19:53 +0000 @@ -118,6 +118,7 @@ $(srcdir)/quail/arabic.elc \ $(srcdir)/quail/ethiopic.elc \ $(srcdir)/quail/ipa.elc \ + $(srcdir)/quail/ipa-praat.elc \ $(srcdir)/quail/hebrew.elc \ $(srcdir)/quail/georgian.elc \ $(srcdir)/quail/persian.elc \ ------------------------------------------------------------ revno: 105508 [merge] committer: Alan Mackenzie branch nick: trunk timestamp: Sat 2011-08-20 22:04:33 +0000 message: Resolve invalid use of a regexp in regexp-opt. cc-fonts.el (c-complex-decl-matchers): Add in special detection for a java annotation. cc-engine.el (c-forward-decl-or-cast-1): Add in special detection for a java annotation. cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling for java. (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-20 19:30:53 +0000 +++ lisp/ChangeLog 2011-08-20 22:02:25 +0000 @@ -1,3 +1,17 @@ +2011-08-20 Alan Mackenzie + + Resolve invalid use of a regexp in regexp-opt. + + * cc-fonts.el (c-complex-decl-matchers): Add in special detection + for a java annotation. + + * cc-engine.el (c-forward-decl-or-cast-1): Add in special + detection for a java annotation. + + * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling + for java. + (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+". + 2011-08-20 Chong Yidong * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2011-08-16 20:10:40 +0000 +++ lisp/progmodes/cc-engine.el 2011-08-20 22:02:25 +0000 @@ -6325,7 +6325,9 @@ (let* ((start (point)) kwd-sym kwd-clause-end found-type) ;; Look for a specifier keyword clause. - (when (looking-at c-prefix-spec-kwds-re) + (when (or (looking-at c-prefix-spec-kwds-re) + (and (c-major-mode-is 'java-mode) + (looking-at "@[A-Za-z0-9]+"))) (if (looking-at c-typedef-key) (setq at-typedef t)) (setq kwd-sym (c-keyword-sym (match-string 1))) === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2011-08-20 14:43:33 +0000 +++ lisp/progmodes/cc-fonts.el 2011-08-20 22:02:25 +0000 @@ -1666,7 +1666,9 @@ (unless (c-skip-comments-and-strings limit) (c-forward-syntactic-ws) ;; Handle prefix declaration specifiers. - (when (looking-at c-prefix-spec-kwds-re) + (when (or (looking-at c-prefix-spec-kwds-re) + (and (c-major-mode-is 'java-mode) + (looking-at "@[A-Za-z0-9]+"))) (c-forward-keyword-clause 1)) ,(if (c-major-mode-is 'c++-mode) `(when (and (c-forward-type) === modified file 'lisp/progmodes/cc-langs.el' --- lisp/progmodes/cc-langs.el 2011-08-20 14:43:33 +0000 +++ lisp/progmodes/cc-langs.el 2011-08-20 22:02:25 +0000 @@ -1823,7 +1823,7 @@ "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") ;; Note: "const" is not used in Java, but it's still a reserved keyword. java '("abstract" "const" "final" "native" "private" "protected" "public" - "static" "strictfp" "synchronized" "transient" "volatile" "@[A-Za-z0-9]+") + "static" "strictfp" "synchronized" "transient" "volatile") pike '("final" "inline" "local" "nomask" "optional" "private" "protected" "public" "static" "variant")) @@ -1909,10 +1909,7 @@ (c-lang-defconst c-prefix-spec-kwds-re ;; Adorned regexp of `c-prefix-spec-kwds'. - t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)) - java (replace-regexp-in-string - "\\\\\\[" "[" - (replace-regexp-in-string "\\\\\\+" "+" (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))))) + t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))) (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) ------------------------------------------------------------ revno: 105507 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-08-20 17:22:46 -0400 message: * eval.c (Fcondition_case): Document `debug' symbol in error handler. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-20 21:17:06 +0000 +++ src/ChangeLog 2011-08-20 21:22:46 +0000 @@ -1,6 +1,7 @@ 2011-08-20 Chong Yidong * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329). + (Fcondition_case): Document `debug' symbol in error handler. 2011-08-19 Eli Zaretskii === modified file 'src/eval.c' --- src/eval.c 2011-08-20 21:17:06 +0000 +++ src/eval.c 2011-08-20 21:22:46 +0000 @@ -1357,8 +1357,12 @@ if CONDITION-NAME is one of the error's condition names. If an error happens, the first applicable handler is run. -The car of a handler may be a list of condition names -instead of a single condition name. Then it handles all of them. +The car of a handler may be a list of condition names instead of a +single condition name; then it handles all of them. If the special +condition name `debug' is present in this list, it allows another +condition in the list to run the debugger if `debug-on-error' and the +other usual mechanisms says it should (otherwise, `condition-case' +suppresses the debugger). When a handler handles an error, control returns to the `condition-case' and it executes the handler's BODY... ------------------------------------------------------------ revno: 105506 fixes bug(s): http://debbugs.gnu.org/9329 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-08-20 17:17:06 -0400 message: * src/eval.c (Fsignal): Handle `debug' symbol in error handler. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-19 11:30:29 +0000 +++ src/ChangeLog 2011-08-20 21:17:06 +0000 @@ -1,3 +1,7 @@ +2011-08-20 Chong Yidong + + * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329). + 2011-08-19 Eli Zaretskii * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of === modified file 'src/eval.c' --- src/eval.c 2011-08-17 21:40:13 +0000 +++ src/eval.c 2011-08-20 21:17:06 +0000 @@ -1699,6 +1699,10 @@ && (!NILP (Vdebug_on_signal) /* If no handler is present now, try to run the debugger. */ || NILP (clause) + /* A `debug' symbol in the handler list disables the normal + suppression of the debugger. */ + || (CONSP (clause) && CONSP (XCAR (clause)) + && !NILP (Fmemq (Qdebug, XCAR (clause)))) /* Special handler that means "print a message and run debugger if requested". */ || EQ (h->handler, Qerror))) ------------------------------------------------------------ revno: 105505 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-08-20 15:30:53 -0400 message: * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix (Bug#9274). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-20 14:54:21 +0000 +++ lisp/ChangeLog 2011-08-20 19:30:53 +0000 @@ -1,3 +1,8 @@ +2011-08-20 Chong Yidong + + * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix + (Bug#9274). + 2011-08-20 Alan Mackenzie * Fontify CPP expressions correctly when starting in the middle of === modified file 'lisp/startup.el' --- lisp/startup.el 2011-08-12 20:45:45 +0000 +++ lisp/startup.el 2011-08-20 19:30:53 +0000 @@ -409,7 +409,7 @@ \"\\'\"; those are added automatically by callers.") (defun normal-top-level-add-subdirs-to-load-path () - "Add all subdirectories of current directory to `load-path'. + "Add all subdirectories of `default-directory' to `load-path'. More precisely, this uses only the subdirectories whose names start with letters or digits; it excludes any subdirectory named `RCS' or `CVS', and any subdirectory that contains a file named `.nosearch'." ------------------------------------------------------------ revno: 105504 [merge] committer: Alan Mackenzie branch nick: trunk timestamp: Sat 2011-08-20 15:23:04 +0000 message: Fontify CPP expressions correctly when starting in the middle of such a construct. Mainly for when jit-lock etc. starts a chunk here. cc-fonts.el (c-font-lock-context): new buffer local variable. (c-make-font-lock-search-form): new function, extracted from c-make-font-lock-search-function. (c-make-font-lock-search-function): Use the above function. (c-make-font-lock-context-search-function): New function. (c-cpp-matchers): Enhance the preprocessor expression case with the above function (c-font-lock-complex-decl-prepare): Test for being in a CPP form which takes an expression. cc-langs.el (c-cpp-expr-intro-re): New lang-variable. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-20 10:02:04 +0000 +++ lisp/ChangeLog 2011-08-20 14:54:21 +0000 @@ -1,3 +1,22 @@ +2011-08-20 Alan Mackenzie + + * Fontify CPP expressions correctly when starting in the middle of + such a construct. Mainly for when jit-lock etc. starts a chunk + here. + + * progmodes/cc-fonts.el (c-font-lock-context): new buffer local + variable. + (c-make-font-lock-search-form): new function, extracted from + c-make-font-lock-search-function. + (c-make-font-lock-search-function): Use the above function. + (c-make-font-lock-context-search-function): New function. + (c-cpp-matchers): Enhance the preprocessor expression case with + the above function + (c-font-lock-complex-decl-prepare): Test for being in a CPP form + which takes an expression. + + * progmodes/cc-langs.el (c-cpp-expr-intro-re): New lang-variable. + 2011-08-20 Martin Rudalics * window.el (display-buffer-reuse-window) === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2011-07-26 19:18:40 +0000 +++ lisp/progmodes/cc-fonts.el 2011-08-20 14:43:33 +0000 @@ -199,10 +199,16 @@ (set-face-foreground 'c-annotation-face "blue") (eval-and-compile - ;; We need the following functions during compilation since they're - ;; called when the `c-lang-defconst' initializers are evaluated. - ;; Define them at runtime too for the sake of derived modes. + ;; We need the following definitions during compilation since they're + ;; used when the `c-lang-defconst' initializers are evaluated. Define + ;; them at runtime too for the sake of derived modes. + ;; This indicates the "font locking context", and is set just before + ;; fontification is done. If non-nil, it says, e.g., point starts + ;; from within a #if preprocessor construct. + (defvar c-font-lock-context nil) + (make-variable-buffer-local 'c-font-lock-context) + (defmacro c-put-font-lock-face (from to face) ;; Put a face on a region (overriding any existing face) in the way ;; font-lock would do it. In XEmacs that means putting an @@ -283,6 +289,45 @@ nil))))) res)))) + (defun c-make-font-lock-search-form (regexp highlights) + ;; Return a lisp form which will fontify every occurence of REGEXP + ;; (a regular expression, NOT a function) between POINT and `limit' + ;; with HIGHLIGHTS, a list of highlighters as specified on page + ;; "Search-based Fontification" in the elisp manual. + `(while (re-search-forward ,regexp limit t) + (unless (progn + (goto-char (match-beginning 0)) + (c-skip-comments-and-strings limit)) + (goto-char (match-end 0)) + ,@(mapcar + (lambda (highlight) + (if (integerp (car highlight)) + ;; e.g. highlight is (1 font-lock-type-face t) + (progn + (unless (eq (nth 2 highlight) t) + (error + "The override flag must currently be t in %s" + highlight)) + (when (nth 3 highlight) + (error + "The laxmatch flag may currently not be set in %s" + highlight)) + `(save-match-data + (c-put-font-lock-face + (match-beginning ,(car highlight)) + (match-end ,(car highlight)) + ,(elt highlight 1)))) + ;; highlight is an "ANCHORED HIGHLIGHER" of the form + ;; (ANCHORED-MATCHER PRE-FORM POST-FORM SUBEXP-HIGHLIGHTERS...) + (when (nth 3 highlight) + (error "Match highlights currently not supported in %s" + highlight)) + `(progn + ,(nth 1 highlight) + (save-match-data ,(car highlight)) + ,(nth 2 highlight)))) + highlights)))) + (defun c-make-font-lock-search-function (regexp &rest highlights) ;; This function makes a byte compiled function that works much like ;; a matcher element in `font-lock-keywords'. It cuts out a little @@ -313,43 +358,101 @@ ;; lambda more easily. (byte-compile `(lambda (limit) - (let (;; The font-lock package in Emacs is known to clobber + (let ( ;; The font-lock package in Emacs is known to clobber ;; `parse-sexp-lookup-properties' (when it exists). (parse-sexp-lookup-properties (cc-eval-when-compile (boundp 'parse-sexp-lookup-properties)))) - (while (re-search-forward ,regexp limit t) - (unless (progn - (goto-char (match-beginning 0)) - (c-skip-comments-and-strings limit)) - (goto-char (match-end 0)) - ,@(mapcar - (lambda (highlight) - (if (integerp (car highlight)) - (progn - (unless (eq (nth 2 highlight) t) - (error - "The override flag must currently be t in %s" - highlight)) - (when (nth 3 highlight) - (error - "The laxmatch flag may currently not be set in %s" - highlight)) - `(save-match-data - (c-put-font-lock-face - (match-beginning ,(car highlight)) - (match-end ,(car highlight)) - ,(elt highlight 1)))) - (when (nth 3 highlight) - (error "Match highlights currently not supported in %s" - highlight)) - `(progn - ,(nth 1 highlight) - (save-match-data ,(car highlight)) - ,(nth 2 highlight)))) - highlights)))) + + ;; (while (re-search-forward ,regexp limit t) + ;; (unless (progn + ;; (goto-char (match-beginning 0)) + ;; (c-skip-comments-and-strings limit)) + ;; (goto-char (match-end 0)) + ;; ,@(mapcar + ;; (lambda (highlight) + ;; (if (integerp (car highlight)) + ;; (progn + ;; (unless (eq (nth 2 highlight) t) + ;; (error + ;; "The override flag must currently be t in %s" + ;; highlight)) + ;; (when (nth 3 highlight) + ;; (error + ;; "The laxmatch flag may currently not be set in %s" + ;; highlight)) + ;; `(save-match-data + ;; (c-put-font-lock-face + ;; (match-beginning ,(car highlight)) + ;; (match-end ,(car highlight)) + ;; ,(elt highlight 1)))) + ;; (when (nth 3 highlight) + ;; (error "Match highlights currently not supported in %s" + ;; highlight)) + ;; `(progn + ;; ,(nth 1 highlight) + ;; (save-match-data ,(car highlight)) + ;; ,(nth 2 highlight)))) + ;; highlights))) + ,(c-make-font-lock-search-form regexp highlights)) + nil))) + (defun c-make-font-lock-context-search-function (normal &rest state-stanzas) + ;; This function makes a byte compiled function that works much like + ;; a matcher element in `font-lock-keywords', with the following + ;; enhancement: the generated function will test for particular "font + ;; lock contexts" at the start of the region, i.e. is this point in + ;; the middle of some particular construct? if so the generated + ;; function will first fontify the tail of the construct, before + ;; going into the main loop and fontify full constructs up to limit. + ;; + ;; The generated function takes one parameter called `limit', and + ;; will fontify the region between POINT and LIMIT. + ;; + ;; NORMAL is a list of the form (REGEXP HIGHLIGHTS .....), and is + ;; used to fontify the "regular" bit of the region. + ;; STATE-STANZAS is list of elements of the form (STATE LIM REGEXP + ;; HIGHLIGHTS), each element coding one possible font lock context. + + ;; o - REGEXP is a font-lock regular expression (NOT a function), + ;; o - HIGHLIGHTS is a list of zero or more highlighters as defined + ;; on page "Search-based Fontification" in the elisp manual. As + ;; yet (2009-06), they must have OVERRIDE set, and may not have + ;; LAXMATCH set. + ;; + ;; o - STATE is the "font lock context" (e.g. in-cpp-expr) and is + ;; not quoted. + ;; o - LIM is a lisp form whose evaluation will yield the limit + ;; position in the buffer for fontification by this stanza. + ;; + ;; This function does not do any hidden buffer changes, but the + ;; generated functions will. (They are however used in places + ;; covered by the font-lock context.) + ;; + ;; Note: Replace `byte-compile' with `eval' to debug the generated + ;; lambda more easily. + (byte-compile + `(lambda (limit) + (let ( ;; The font-lock package in Emacs is known to clobber + ;; `parse-sexp-lookup-properties' (when it exists). + (parse-sexp-lookup-properties + (cc-eval-when-compile + (boundp 'parse-sexp-lookup-properties)))) + ,@(mapcar + (lambda (stanza) + (let ((state (car stanza)) + (lim (nth 1 stanza)) + (regexp (nth 2 stanza)) + (highlights (cdr (cddr stanza)))) + `(if (eq c-font-lock-context ',state) + (let ((limit ,lim)) + ,(c-make-font-lock-search-form + regexp highlights))))) + state-stanzas) + ,(c-make-font-lock-search-form (car normal) (cdr normal)) + nil)))) + ; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. ; '(progn (def-edebug-spec c-fontify-types-and-refs let*) @@ -494,19 +597,24 @@ (c-lang-const c-cpp-expr-directives))) (cef-re (c-make-keywords-re t (c-lang-const c-cpp-expr-functions)))) - `((,(c-make-font-lock-search-function - (concat noncontinued-line-end - (c-lang-const c-opt-cpp-prefix) - ced-re ; 1 + ncle-depth - ;; Match the whole logical line to look - ;; for the functions in. - "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") - `((let ((limit (match-end 0))) - (while (re-search-forward ,cef-re limit 'move) - (c-put-font-lock-face (match-beginning 1) - (match-end 1) - c-preprocessor-face-name))) - (goto-char (match-end ,(1+ ncle-depth))))))))) + + `((,(c-make-font-lock-context-search-function + `(,(concat noncontinued-line-end + (c-lang-const c-opt-cpp-prefix) + ced-re ; 1 + ncle-depth + ;; Match the whole logical line to look + ;; for the functions in. + "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") + ((let ((limit (match-end 0))) + (while (re-search-forward ,cef-re limit 'move) + (c-put-font-lock-face (match-beginning 1) + (match-end 1) + c-preprocessor-face-name))) + (goto-char (match-end ,(1+ ncle-depth))))) + `(in-cpp-expr + (save-excursion (c-end-of-macro) (point)) + ,cef-re + (1 c-preprocessor-face-name t))))))) ;; Fontify the directive names. (,(c-make-font-lock-search-function @@ -759,6 +867,12 @@ (c-forward-syntactic-ws limit) (c-font-lock-declarators limit t (eq prop 'c-decl-type-start)))) + (setq c-font-lock-context ;; (c-guess-font-lock-context) + (save-excursion + (if (and c-cpp-expr-intro-re + (c-beginning-of-macro) + (looking-at c-cpp-expr-intro-re)) + 'in-cpp-expr))) nil) (defun c-font-lock-<>-arglists (limit) === modified file 'lisp/progmodes/cc-langs.el' --- lisp/progmodes/cc-langs.el 2011-07-26 19:18:40 +0000 +++ lisp/progmodes/cc-langs.el 2011-08-20 14:43:33 +0000 @@ -815,6 +815,16 @@ t (if (c-lang-const c-opt-cpp-prefix) '("if" "elif"))) +(c-lang-defconst c-cpp-expr-intro-re + "Regexp which matches the start of a CPP directive which contains an +expression, or nil if there aren't any in the language." + t (if (c-lang-const c-cpp-expr-directives) + (concat + (c-lang-const c-opt-cpp-prefix) + (c-make-keywords-re t (c-lang-const c-cpp-expr-directives))))) +(c-lang-defvar c-cpp-expr-intro-re + (c-lang-const c-cpp-expr-intro-re)) + (c-lang-defconst c-cpp-expr-functions "List of functions in cpp expressions." t (if (c-lang-const c-opt-cpp-prefix) ------------------------------------------------------------ revno: 105503 committer: martin rudalics branch nick: trunk timestamp: Sat 2011-08-20 12:10:05 +0200 message: Remove some commented-out obsoletion declarations from window.el. diff: === modified file 'lisp/window.el' --- lisp/window.el 2011-08-20 10:02:04 +0000 +++ lisp/window.el 2011-08-20 10:10:05 +0000 @@ -6121,8 +6121,6 @@ (and (consp regexp) (stringp (car regexp)) (string-match-p (car regexp) buffer-name))) (throw 'found t)))))))) -;; (make-obsolete - ;; 'same-window-p "pass argument to buffer display function instead." "24.1") (defcustom special-display-frame-alist '((height . 14) (width . 80) (unsplittable . t)) @@ -6185,9 +6183,6 @@ (set-window-buffer (frame-selected-window frame) buffer) (set-window-dedicated-p (frame-selected-window frame) t) (frame-selected-window frame)))))) -;; (make-obsolete - ;; 'special-display-popup-frame - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom special-display-function 'special-display-popup-frame "Function to call for displaying special buffers. @@ -6363,9 +6358,6 @@ ((and (consp regexp) (stringp (car regexp)) (string-match-p (car regexp) buffer-name)) (throw 'found (cdr regexp)))))))))) -;; (make-obsolete - ;; 'special-display-p - ;; "pass argument to buffer display function instead." "24.1") (defcustom pop-up-frame-alist nil "Alist of parameters for automatically generated new frames. @@ -6530,8 +6522,6 @@ (max split-height-threshold (* 2 (max window-min-height (if mode-line-format 2 1)))))))))) -;; (make-obsolete - ;; 'window-splittable-p "use 2nd arg of `display-buffer' instead." "24.1") (defun split-window-sensibly (window) "Split WINDOW in a way suitable for `display-buffer'. @@ -6581,8 +6571,6 @@ (when (with-no-warnings (window-splittable-p window)) (with-selected-window window (split-window-vertically))))))) -;; (make-obsolete - ;; 'split-window-sensibly "use 2nd arg of `display-buffer' instead." "24.1") ;; Functions for converting Emacs 23 buffer display options to buffer ;; display specifiers. ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.