aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2011-08-21 13:25:05 +0200
committerJoakim Verona2011-08-21 13:25:05 +0200
commit324cf6dc8b18f90e6b9ca315608fd37838bd822a (patch)
tree7b6d6a5af5bab201b8c38b11abe0986f47801507
parent37dea37ce545a07a2f9b79139e826c5db05654c4 (diff)
parent1e91d50696f9d458228039f5d1e346fd4dae41e6 (diff)
downloademacs-324cf6dc8b18f90e6b9ca315608fd37838bd822a.tar.gz
emacs-324cf6dc8b18f90e6b9ca315608fd37838bd822a.zip
upstream
-rw-r--r--lisp/ChangeLog21
-rw-r--r--lisp/font-lock.el12
-rw-r--r--lisp/gnus/ChangeLog20
-rw-r--r--lisp/gnus/gnus-agent.el2
-rw-r--r--lisp/gnus/gnus-util.el7
-rw-r--r--lisp/gnus/nntp.el5
-rw-r--r--lisp/gnus/pop3.el2
-rw-r--r--lisp/mail/smtpmail.el7
-rw-r--r--lisp/net/browse-url.el34
-rw-r--r--lisp/progmodes/compile.el15
10 files changed, 104 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c655c4968df..e383f86971f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,24 @@
12011-08-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * mail/smtpmail.el (smtpmail-smtp-user): New variable.
4 (smtpmail-try-auth-methods): Use it.
5
62011-08-21 Chong Yidong <cyd@stupidchicken.com>
7
8 * font-lock.el (font-lock-fontify-region)
9 (font-lock-unfontify-region, font-lock-default-fontify-buffer)
10 (font-lock-default-unfontify-buffer)
11 (font-lock-default-fontify-region)
12 (font-lock-default-unfontify-region): Add docstrings (Bug#8624).
13
14 * progmodes/compile.el (compilation-error-properties): Fix
15 confusion between file struct and message struct (Bug#9319).
16 (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to
17 `ant' regexp.
18
19 * net/browse-url.el (browse-url-firefox): Don't call
20 browse-url-firefox-sentinel unless using -remote (Bug#9328).
21
12011-08-20 Glenn Morris <rgm@gnu.org> 222011-08-20 Glenn Morris <rgm@gnu.org>
2 23
3 * tutorial.el (help-with-tutorial): Avoid an error on short screens. 24 * tutorial.el (help-with-tutorial): Avoid an error on short screens.
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 9cf889e1aec..c37a9ae916e 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1018,14 +1018,20 @@ The region it returns may start or end in the middle of a line.")
1018 (funcall font-lock-unfontify-buffer-function)) 1018 (funcall font-lock-unfontify-buffer-function))
1019 1019
1020(defun font-lock-fontify-region (beg end &optional loudly) 1020(defun font-lock-fontify-region (beg end &optional loudly)
1021 "Fontify the text between BEG and END.
1022If LOUDLY is non-nil, print status messages while fontifying.
1023This works by calling `font-lock-fontify-region-function'."
1021 (font-lock-set-defaults) 1024 (font-lock-set-defaults)
1022 (funcall font-lock-fontify-region-function beg end loudly)) 1025 (funcall font-lock-fontify-region-function beg end loudly))
1023 1026
1024(defun font-lock-unfontify-region (beg end) 1027(defun font-lock-unfontify-region (beg end)
1028 "Unfontify the text between BEG and END.
1029This works by calling `font-lock-unfontify-region-function'."
1025 (save-buffer-state 1030 (save-buffer-state
1026 (funcall font-lock-unfontify-region-function beg end))) 1031 (funcall font-lock-unfontify-region-function beg end)))
1027 1032
1028(defun font-lock-default-fontify-buffer () 1033(defun font-lock-default-fontify-buffer ()
1034 "Fontify the whole buffer using `font-lock-fontify-region-function'."
1029 (let ((verbose (if (numberp font-lock-verbose) 1035 (let ((verbose (if (numberp font-lock-verbose)
1030 (> (buffer-size) font-lock-verbose) 1036 (> (buffer-size) font-lock-verbose)
1031 font-lock-verbose))) 1037 font-lock-verbose)))
@@ -1045,6 +1051,7 @@ The region it returns may start or end in the middle of a line.")
1045 (quit (font-lock-unfontify-buffer))))))) 1051 (quit (font-lock-unfontify-buffer)))))))
1046 1052
1047(defun font-lock-default-unfontify-buffer () 1053(defun font-lock-default-unfontify-buffer ()
1054 "Unfontify the whole buffer using `font-lock-unfontify-region-function'."
1048 ;; Make sure we unfontify etc. in the whole buffer. 1055 ;; Make sure we unfontify etc. in the whole buffer.
1049 (save-restriction 1056 (save-restriction
1050 (widen) 1057 (widen)
@@ -1114,6 +1121,9 @@ Put first the functions more likely to cause a change and cheaper to compute.")
1114 changed)) 1121 changed))
1115 1122
1116(defun font-lock-default-fontify-region (beg end loudly) 1123(defun font-lock-default-fontify-region (beg end loudly)
1124 "Fontify the text between BEG and END.
1125If LOUDLY is non-nil, print status messages while fontifying.
1126This function is the default `font-lock-fontify-region-function'."
1117 (save-buffer-state 1127 (save-buffer-state
1118 ;; Use the fontification syntax table, if any. 1128 ;; Use the fontification syntax table, if any.
1119 (with-syntax-table (or font-lock-syntax-table (syntax-table)) 1129 (with-syntax-table (or font-lock-syntax-table (syntax-table))
@@ -1162,6 +1172,8 @@ This is used by `font-lock-default-unfontify-region' to decide
1162what properties to clear before refontifying a region.") 1172what properties to clear before refontifying a region.")
1163 1173
1164(defun font-lock-default-unfontify-region (beg end) 1174(defun font-lock-default-unfontify-region (beg end)
1175 "Unfontify the text between BEG and END.
1176This function is the default `font-lock-unfontify-region-function'."
1165 (remove-list-of-text-properties 1177 (remove-list-of-text-properties
1166 beg end (append 1178 beg end (append
1167 font-lock-extra-managed-props 1179 font-lock-extra-managed-props
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 744817e68f2..4fc144b81b9 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,23 @@
12011-08-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source
4 instead.
5
6 * pop3.el (pop3-wait-for-messages): Don't use Gnus functions here.
7
8 * gnus-util.el (gnus-process-live-p): Copy over compat function.
9
10 * pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop
11 processing.
12
13 * nntp.el (nntp-kill-buffer): Kill the process before killing the
14 buffer to avoid warnings.
15
162011-08-20 Simon Josefsson <simon@josefsson.org>
17
18 * gnus-agent.el (gnus-agent-expire-done-message): Use %.f as format
19 specified to reduce precision.
20
12011-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org> 212011-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 22
3 * nnimap.el (nnimap-transform-headers): Protect against (NIL ...) 23 * nnimap.el (nnimap-transform-headers): Protect against (NIL ...)
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 424c55c40f5..26222119b98 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -3560,7 +3560,7 @@ articles in every agentized group? "))
3560 units (cdr units))) 3560 units (cdr units)))
3561 3561
3562 (format "Expiry recovered %d NOV entries, deleted %d files,\ 3562 (format "Expiry recovered %d NOV entries, deleted %d files,\
3563 and freed %f %s." 3563 and freed %.f %s."
3564 (nth 0 stats) 3564 (nth 0 stats)
3565 (nth 1 stats) 3565 (nth 1 stats)
3566 size (car units))) 3566 size (car units)))
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 03ff4a2ea4b..34953611966 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1249,6 +1249,13 @@ This function saves the current buffer."
1249 (with-current-buffer gnus-group-buffer 1249 (with-current-buffer gnus-group-buffer
1250 (eq major-mode 'gnus-group-mode)))) 1250 (eq major-mode 'gnus-group-mode))))
1251 1251
1252(defun gnus-process-live-p (process)
1253 "Returns non-nil if PROCESS is alive.
1254A process is considered alive if its status is `run', `open',
1255`listen', `connect' or `stop'."
1256 (memq (process-status process)
1257 '(run open listen connect stop)))
1258
1252(defun gnus-remove-if (predicate sequence &optional hash-table-p) 1259(defun gnus-remove-if (predicate sequence &optional hash-table-p)
1253 "Return a copy of SEQUENCE with all items satisfying PREDICATE removed. 1260 "Return a copy of SEQUENCE with all items satisfying PREDICATE removed.
1254SEQUENCE should be a list, a vector, or a string. Returns always a list. 1261SEQUENCE should be a list, a vector, or a string. Returns always a list.
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index 986fd51a613..325aa67f80d 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -261,6 +261,8 @@ See `nnml-marks-is-evil' for more information.")
261 (const :format "" "password") 261 (const :format "" "password")
262 (string :format "Password: %v"))))))) 262 (string :format "Password: %v")))))))
263 263
264(make-obsolete 'nntp-authinfo-file nil "Emacs 24.1")
265
264 266
265 267
266(defvoo nntp-connection-timeout nil 268(defvoo nntp-connection-timeout nil
@@ -430,6 +432,9 @@ be restored and the command retried."
430 432
431(defun nntp-kill-buffer (buffer) 433(defun nntp-kill-buffer (buffer)
432 (when (buffer-name buffer) 434 (when (buffer-name buffer)
435 (let ((process (get-buffer-process buffer)))
436 (when process
437 (delete-process process)))
433 (kill-buffer buffer) 438 (kill-buffer buffer)
434 (nnheader-init-server-buffer))) 439 (nnheader-init-server-buffer)))
435 440
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index e29ddb0d44e..54c21703836 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -178,6 +178,8 @@ Use streaming commands."
178 178
179(defun pop3-wait-for-messages (process count total-size) 179(defun pop3-wait-for-messages (process count total-size)
180 (while (< (pop3-number-of-responses total-size) count) 180 (while (< (pop3-number-of-responses total-size) count)
181 (unless (memq (process-status process) '(open run))
182 (error "pop3 process died"))
181 (when total-size 183 (when total-size
182 (message "pop3 retrieved %dKB (%d%%)" 184 (message "pop3 retrieved %dKB (%d%%)"
183 (truncate (/ (buffer-size) 1000)) 185 (truncate (/ (buffer-size) 1000))
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 637d10135fa..caec69e7e9e 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -86,6 +86,11 @@ The default value would be \"smtp\" or 25."
86 :type '(choice (integer :tag "Port") (string :tag "Service")) 86 :type '(choice (integer :tag "Port") (string :tag "Service"))
87 :group 'smtpmail) 87 :group 'smtpmail)
88 88
89(defcustom smtpmail-smtp-user nil
90 "User name to use when looking up credentials."
91 :type '(choice (const nil) string)
92 :group 'smtpmail)
93
89(defcustom smtpmail-local-domain nil 94(defcustom smtpmail-local-domain nil
90 "Local domain name without a host name. 95 "Local domain name without a host name.
91If the function `system-name' returns the full internet address, 96If the function `system-name' returns the full internet address,
@@ -490,6 +495,7 @@ The list is in preference order.")
490 (auth-source-search 495 (auth-source-search
491 :host host 496 :host host
492 :port port 497 :port port
498 :user smtpmail-smtp-user
493 :max 1 499 :max 1
494 :require (and ask-for-password 500 :require (and ask-for-password
495 '(:user :secret)) 501 '(:user :secret))
@@ -510,6 +516,7 @@ The list is in preference order.")
510 :max 1 516 :max 1
511 :host host 517 :host host
512 :port port 518 :port port
519 :user smtpmail-smtp-user
513 :require '(:user :secret) 520 :require '(:user :secret)
514 :create t)) 521 :create t))
515 password (plist-get auth-info :secret))) 522 password (plist-get auth-info :secret)))
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index e18b42a275f..f9bc13e1e25 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1103,26 +1103,32 @@ URL in a new window."
1103 (interactive (browse-url-interactive-arg "URL: ")) 1103 (interactive (browse-url-interactive-arg "URL: "))
1104 (setq url (browse-url-encode-url url)) 1104 (setq url (browse-url-encode-url url))
1105 (let* ((process-environment (browse-url-process-environment)) 1105 (let* ((process-environment (browse-url-process-environment))
1106 (use-remote
1107 (not (memq system-type '(windows-nt ms-dos))))
1106 (process 1108 (process
1107 (apply 'start-process 1109 (apply 'start-process
1108 (concat "firefox " url) nil 1110 (concat "firefox " url) nil
1109 browse-url-firefox-program 1111 browse-url-firefox-program
1110 (append 1112 (append
1111 browse-url-firefox-arguments 1113 browse-url-firefox-arguments
1112 (if (memq system-type '(windows-nt ms-dos)) 1114 (if use-remote
1113 (list url) 1115 (list "-remote"
1114 (list "-remote" 1116 (concat
1115 (concat "openURL(" 1117 "openURL("
1116 url 1118 url
1117 (if (browse-url-maybe-new-window 1119 (if (browse-url-maybe-new-window new-window)
1118 new-window) 1120 (if browse-url-firefox-new-window-is-tab
1119 (if browse-url-firefox-new-window-is-tab 1121 ",new-tab"
1120 ",new-tab" 1122 ",new-window"))
1121 ",new-window")) 1123 ")"))
1122 ")"))))))) 1124 (list url))))))
1123 (set-process-sentinel process 1125 ;; If we use -remote, the process exits with status code 2 if
1124 `(lambda (process change) 1126 ;; Firefox is not already running. The sentinel runs firefox
1125 (browse-url-firefox-sentinel process ,url))))) 1127 ;; directly if that happens.
1128 (when use-remote
1129 (set-process-sentinel process
1130 `(lambda (process change)
1131 (browse-url-firefox-sentinel process ,url))))))
1126 1132
1127(defun browse-url-firefox-sentinel (process url) 1133(defun browse-url-firefox-sentinel (process url)
1128 "Handle a change to the process communicating with Firefox." 1134 "Handle a change to the process communicating with Firefox."
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f3b873c8b1e..2fb0ac879b2 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -145,7 +145,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
145 145
146 (ant 146 (ant
147 "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\ 147 "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\
148\\( warning\\)?" 1 (2 . 4) (3 . 5) (4)) 148\\( warning\\)?" 1 (2 . 4) (3 . 5) (6))
149 149
150 (bash 150 (bash
151 "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) 151 "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2)
@@ -985,12 +985,15 @@ POS and RES.")
985 (let* ((prev 985 (let* ((prev
986 (or (get-text-property (1- prev-pos) 'compilation-message) 986 (or (get-text-property (1- prev-pos) 'compilation-message)
987 (get-text-property prev-pos 'compilation-message))) 987 (get-text-property prev-pos 'compilation-message)))
988 (prev-struct 988 (prev-file-struct
989 (car (nth 2 (car prev))))) 989 (and prev
990 (compilation--loc->file-struct
991 (compilation--message->loc prev)))))
992
990 ;; Construct FILE . DIR from that. 993 ;; Construct FILE . DIR from that.
991 (if prev-struct 994 (if prev-file-struct
992 (setq file (cons (car prev-struct) 995 (setq file (cons (caar prev-file-struct)
993 (cadr prev-struct)))))) 996 (cadr (car prev-file-struct)))))))
994 (unless file 997 (unless file
995 (setq file '("*unknown*"))))) 998 (setq file '("*unknown*")))))
996 ;; All of these fields are optional, get them only if we have an index, and 999 ;; All of these fields are optional, get them only if we have an index, and