Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 101996. ------------------------------------------------------------ revno: 101996 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-10-18 20:13:27 -0400 message: * lisp/gnus/nnimap.el (nnimap-request-move-article, nnimap-parse-line) (nnimap-process-expiry-targets): Use unibyte for buffers that hold undecoded network data. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-18 23:41:03 +0000 +++ lisp/gnus/ChangeLog 2010-10-19 00:13:27 +0000 @@ -1,3 +1,9 @@ +2010-10-19 Stefan Monnier + + * nnimap.el (nnimap-request-move-article, nnimap-parse-line) + (nnimap-process-expiry-targets): Use unibyte for buffers that hold + undecoded network data. + 2010-10-18 Lars Magne Ingebrigtsen * gnus-agent.el (gnus-agent-toggle-plugged): Use the right minor mode @@ -20,9 +26,9 @@ 2010-10-18 Andrew Cohen - * gnus-registry.el (gnus-registry-split-fancy-with-parent): Splitting - according to references/in-reply-to obeys the ignore-groups variable, - while splitting by sender and subject do not. + * gnus-registry.el (gnus-registry-split-fancy-with-parent): + Splitting according to references/in-reply-to obeys the ignore-groups + variable, while splitting by sender and subject do not. 2010-10-18 Lars Magne Ingebrigtsen @@ -48,7 +54,7 @@ 2010-10-15 Andrew Cohen - * gnus-sum.el (gnus-summary-refer-thread): unconditionally ignore + * gnus-sum.el (gnus-summary-refer-thread): Unconditionally ignore duplicates. 2010-10-15 Kan-Ru Chen (tiny change) === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-18 22:09:28 +0000 +++ lisp/gnus/nnimap.el 2010-10-19 00:13:27 +0000 @@ -714,6 +714,7 @@ (deffoo nnimap-request-move-article (article group server accept-form &optional last internal-move-group) (with-temp-buffer + (mm-disable-multibyte) (when (nnimap-request-article article group server (current-buffer)) ;; If the move is internal (on the same server), just do it the easy ;; way. @@ -769,6 +770,7 @@ (dolist (article articles) (let ((target nnmail-expiry-target)) (with-temp-buffer + (mm-disable-multibyte) (when (nnimap-request-article article group server (current-buffer)) (nnheader-message 7 "Expiring article %s:%d" group article) (when (functionp target) @@ -1474,6 +1476,7 @@ (defun nnimap-parse-line (line) (let (char result) (with-temp-buffer + (mm-disable-multibyte) (insert line) (goto-char (point-min)) (while (not (eobp)) ------------------------------------------------------------ revno: 101995 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-10-18 23:41:03 +0000 message: message.el (message-get-reply-headers): If we're fed `to-address', then always use that. gnus-agent.el (gnus-agent-toggle-plugged): Use the right minor mode name in the mode line spec so that the mode line menu works (bug #2431). diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-18 22:09:28 +0000 +++ lisp/gnus/ChangeLog 2010-10-18 23:41:03 +0000 @@ -1,5 +1,12 @@ 2010-10-18 Lars Magne Ingebrigtsen + * gnus-agent.el (gnus-agent-toggle-plugged): Use the right minor mode + name in the mode line spec so that the mode line menu works + (bug #2431). + + * message.el (message-get-reply-headers): If we're fed `to-address', + then always use that. + * gnus-art.el (gnus-article-make-menu-bar): The article/group menus aren't so wide as to need to switch off the edit menu. === modified file 'lisp/gnus/gnus-agent.el' --- lisp/gnus/gnus-agent.el 2010-09-30 10:25:45 +0000 +++ lisp/gnus/gnus-agent.el 2010-10-18 23:41:03 +0000 @@ -513,8 +513,8 @@ ;; Set up the menu. (when (gnus-visual-p 'agent-menu 'menu) (funcall (intern (format "gnus-agent-%s-make-menu-bar" buffer)))) - (unless (assq 'gnus-agent-mode minor-mode-alist) - (push gnus-agent-mode-status minor-mode-alist)) + (unless (assq mode minor-mode-alist) + (push (cons mode (cdr gnus-agent-mode-status)) minor-mode-alist)) (unless (assq mode minor-mode-map-alist) (push (cons mode (symbol-value (intern (format "gnus-agent-%s-mode-map" buffer)))) === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2010-10-11 23:29:33 +0000 +++ lisp/gnus/message.el 2010-10-18 23:41:03 +0000 @@ -6568,6 +6568,10 @@ (save-match-data ;; Build (textual) list of new recipient addresses. (cond + (to-address + (setq recipients (concat ", " to-address)) + ;; If the author explicitly asked for a copy, we don't deny it to them. + (if mct (setq recipients (concat recipients ", " mct)))) ((not wide) (setq recipients (concat ", " author))) (address-headers @@ -6603,10 +6607,6 @@ You may customize the variable `message-use-mail-followup-to', if you want to get rid of this query permanently."))) (setq recipients (concat ", " mft))) - (to-address - (setq recipients (concat ", " to-address)) - ;; If the author explicitly asked for a copy, we don't deny it to them. - (if mct (setq recipients (concat recipients ", " mct)))) (t (setq recipients (if never-mct "" (concat ", " author))) (if to (setq recipients (concat recipients ", " to))) ------------------------------------------------------------ revno: 101994 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-10-18 22:09:28 +0000 message: Merge changes made in Gnus trunk. gnus-art.el: Make the "dumbquotes" translation work again. gnus-registry.el (gnus-registry-split-fancy-with-parent): Splitting according to references/in-reply-to obeys the ignore-groups variable, while splitting by sender and subject do not. nnimap.el (nnimap-request-group): Don't SELECT the group twice on `M-g'. nnimap.el (nnimap-update-info): Update flags/read marks even if \* isn't part of the permanent marks. gnus-coding.texi (Gnus Maintainance Guide): Update to mention Emacs bzr/Gnus git sync. gnus-delay.el (gnus-delay-article): Remove superfluous `group' binding. gnus-art.el (gnus-article-make-menu-bar): The article/group menus aren't so wide as to need to switch off the edit menu. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-15 10:21:03 +0000 +++ doc/misc/ChangeLog 2010-10-18 22:09:28 +0000 @@ -1,3 +1,8 @@ +2010-10-18 Lars Magne Ingebrigtsen + + * gnus-coding.texi (Gnus Maintainance Guide): Update to mention Emacs + bzr/Gnus git sync. + 2010-10-15 Eli Zaretskii * auth.texi (GnuPG and EasyPG Assistant Configuration): Fix last === modified file 'doc/misc/gnus-coding.texi' --- doc/misc/gnus-coding.texi 2010-09-02 00:55:51 +0000 +++ doc/misc/gnus-coding.texi 2010-10-18 22:09:28 +0000 @@ -288,14 +288,21 @@ With the inclusion of Gnus 5.10, Miles Bader has set up an Emacs-Gnus gateway to ensure the bug fixes from Emacs CVS are propagated to Gnus -CVS semi-automatically. These bug fixes are installed on the stable -branch and on the trunk. Basically the idea is that the gateway will -cause all common files in Emacs and Gnus v5-10 to be identical except -when there's a very good reason (e.g., the Gnus version string in Emacs -says @samp{5.11}, but the v5-10 version string remains @samp{5.10.x}). -Furthermore, all changes in these files in either Emacs or the v5-10 -branch will be installed into the Gnus CVS trunk, again except where -there's a good reason. +CVS semi-automatically. + +After Emacs moved to bzr and Gnus moved to git, Katsumi Yamaoka has +taken over the chore of keeping Emacs and Gnus in sync. In general, +changes made to one repository will usually be replicated in the other +within a few days. + +Basically the idea is that the gateway will cause all common files in +Emacs and Gnus v5-13 to be identical except when there's a very good +reason (e.g., the Gnus version string in Emacs says @samp{5.11}, but +the v5-13 version string remains @samp{5.13.x}). Furthermore, all +changes in these files in either Emacs or the v5-13 branch will be +installed into the Gnus git trunk, again except where there's a good +reason. + @c (typically so far the only exception has been that the changes @c already exist in the trunk in modified form). Because of this, when the next major version of Gnus will be included in @@ -311,9 +318,9 @@ new @file{encrypt.el}), you should probably make the change in the Emacs tree, and it will show up in the Gnus tree a few days later. -If you don't have Emacs CVS access (or it's inconvenient), you can +If you don't have Emacs bzr access (or it's inconvenient), you can change such a file in the v5-10 branch, and it should propagate to Emacs -CVS -- however, it will get some extra scrutiny (by Miles) to see if the +bzr -- however, it will get some extra scrutiny (by Miles) to see if the changes are possibly controversial and need discussion on the mailing list. Many changes are obvious bug-fixes however, so often there won't be any problem. @@ -321,12 +328,12 @@ @item If it's to a Gnus file, and it's important enough that it should be part of Emacs and the v5-10 branch, then you can make the change on the v5-10 -branch, and it will go into Emacs CVS and the Gnus CVS trunk (a few days +branch, and it will go into Emacs bzr and the Gnus git trunk (a few days later). The most prominent examples for such changes are bug-fixed including improvements on the documentation. If you know that there will be conflicts (perhaps because the affected -source code is different in v5-10 and the Gnus CVS trunk), then you can +source code is different in v5-10 and the Gnus git trunk), then you can install your change in both places, and when I try to sync them, there will be a conflict -- however, since in most such cases there would be a conflict @emph{anyway}, it's often easier for me to resolve it simply if @@ -338,9 +345,6 @@ change on the Gnus Git trunk and it goes into Emacs a few years later... :-) -With the new Git repository, we'll probably set up something to -automatically synchronize with Emacs when possible. CVS was much less -powerful for this kind of synchronization. @end itemize Of course in any case, if you just can't wait for me to sync your === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-18 05:21:26 +0000 +++ lisp/gnus/ChangeLog 2010-10-18 22:09:28 +0000 @@ -1,3 +1,28 @@ +2010-10-18 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-make-menu-bar): The article/group menus + aren't so wide as to need to switch off the edit menu. + + * gnus-delay.el (gnus-delay-article): Remove superfluous `group' + binding. Suggested by Leo (bug #6613). + + * nnimap.el (nnimap-request-group): Don't SELECT the group twice on + `M-g'. + (nnimap-update-info): Update flags/read marks even if \* isn't part of + the permanent marks. + +2010-10-18 Andrew Cohen + + * gnus-registry.el (gnus-registry-split-fancy-with-parent): Splitting + according to references/in-reply-to obeys the ignore-groups variable, + while splitting by sender and subject do not. + +2010-10-18 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-dumbquotes-map): Make into a char/string + alist, so that we can look for non-Unicode chars. + (article-translate-strings): Allow both character and string maps. + 2010-10-18 Katsumi Yamaoka * shr.el (shr-insert): Don't insert space behind a wide character === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-10-14 22:39:54 +0000 +++ lisp/gnus/gnus-art.el 2010-10-18 22:09:28 +0000 @@ -916,25 +916,25 @@ "Function used to decode addresses.") (defvar gnus-article-dumbquotes-map - '(("\200" "EUR") - ("\202" ",") - ("\203" "f") - ("\204" ",,") - ("\205" "...") - ("\213" "<") - ("\214" "OE") - ("\221" "`") - ("\222" "'") - ("\223" "``") - ("\224" "\"") - ("\225" "*") - ("\226" "-") - ("\227" "--") - ("\230" "~") - ("\231" "(TM)") - ("\233" ">") - ("\234" "oe") - ("\264" "'")) + '((?\200 "EUR") + (?\202 ",") + (?\203 "f") + (?\204 ",,") + (?\205 "...") + (?\213 "<") + (?\214 "OE") + (?\221 "`") + (?\222 "'") + (?\223 "``") + (?\224 "\"") + (?\225 "*") + (?\226 "-") + (?\227 "--") + (?\230 "~") + (?\231 "(TM)") + (?\233 ">") + (?\234 "oe") + (?\264 "'")) "Table for MS-to-Latin1 translation.") (defcustom gnus-ignored-mime-types nil @@ -2138,9 +2138,18 @@ (when (article-goto-body) (let ((inhibit-read-only t)) (dolist (elem map) - (save-excursion - (while (search-forward (car elem) nil t) - (replace-match (cadr elem))))))))) + (let ((from (car elem)) + (to (cadr elem))) + (save-excursion + (if (stringp from) + (while (search-forward from nil t) + (replace-match to)) + (while (not (eobp)) + (if (eq (following-char) from) + (progn + (delete-char 1) + (insert to)) + (forward-char 1))))))))))) (defun article-treat-overstrike () "Translate overstrikes into bold text." @@ -4393,7 +4402,6 @@ (defun gnus-article-make-menu-bar () (unless (boundp 'gnus-article-commands-menu) (gnus-summary-make-menu-bar)) - (gnus-turn-off-edit-menu 'article) (unless (boundp 'gnus-article-article-menu) (easy-menu-define gnus-article-article-menu gnus-article-mode-map "" === modified file 'lisp/gnus/gnus-delay.el' --- lisp/gnus/gnus-delay.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/gnus-delay.el 2010-10-18 22:09:28 +0000 @@ -133,8 +133,7 @@ (message-add-header (format "%s: %s" gnus-delay-header deadline))) (set-buffer-modified-p t) ;; If group does not exist, create it. - (let ((group (format "nndraft:%s" gnus-delay-group))) - (gnus-agent-queue-setup gnus-delay-group)) + (gnus-agent-queue-setup gnus-delay-group) (message-disassociate-draft) (nndraft-request-associate-buffer gnus-delay-group) (save-buffer 0) === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2010-10-14 10:16:59 +0000 +++ lisp/gnus/gnus-group.el 2010-10-18 22:09:28 +0000 @@ -757,7 +757,6 @@ (symbol-value 'gnus-topic-mode))) (defun gnus-group-make-menu-bar () - (gnus-turn-off-edit-menu 'group) (unless (boundp 'gnus-group-reading-menu) (easy-menu-define === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2010-10-08 23:55:33 +0000 +++ lisp/gnus/gnus-registry.el 2010-10-18 22:09:28 +0000 @@ -551,8 +551,9 @@ key gnus-registry-max-track-groups))) (dolist (group groups) - (push group found-full) - (setq found (append (list group) (delete group found))))) + (when (and group (gnus-registry-follow-group-p group)) + (push group found-full) + (setq found (append (list group) (delete group found)))))) (push key matches) (gnus-message ;; raise level of messaging if gnus-registry-track-extra @@ -580,8 +581,9 @@ key gnus-registry-max-track-groups))) (dolist (group groups) - (push group found-full) - (setq found (append (list group) (delete group found))))) + (when (and group (gnus-registry-follow-group-p group)) + (push group found-full) + (setq found (append (list group) (delete group found)))))) (push key matches) (gnus-message ;; raise level of messaging if gnus-registry-track-extra === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-10-16 01:55:08 +0000 +++ lisp/gnus/gnus.el 2010-10-18 22:09:28 +0000 @@ -3938,7 +3938,9 @@ (not (eq (caar old-params) name))) (setq new-params (append new-params (list (car old-params))))) (setq old-params (cdr old-params))) - (gnus-group-set-info new-params (gnus-info-group info) 'params))))) + (if (listp group) + (gnus-info-set-params info new-params t) + (gnus-group-set-info new-params (gnus-info-group info) 'params)))))) (defun gnus-group-remove-parameter (group name) "Remove parameter NAME from GROUP. === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-16 01:55:08 +0000 +++ lisp/gnus/nnimap.el 2010-10-18 22:09:28 +0000 @@ -617,7 +617,13 @@ (nreverse parts))) (deffoo nnimap-request-group (group &optional server dont-check info) - (let ((result (nnimap-possibly-change-group group server)) + (let ((result (nnimap-possibly-change-group + ;; Don't SELECT the group if we're going to select it + ;; later, anyway. + (if dont-check + nil + group) + server)) articles active marks high low) (with-current-buffer nntp-server-buffer (when result @@ -634,6 +640,7 @@ (nnimap-send-command "SELECT %S" (utf7-encode group t))) (flag-sequence (nnimap-send-command "UID FETCH 1:* FLAGS"))) + (setf (nnimap-group nnimap-object) group) (nnimap-wait-for-response flag-sequence) (setq marks (nnimap-flags-to-marks @@ -1105,12 +1112,13 @@ (unless (eq permanent-flags 'not-scanned) (gnus-group-set-parameter info 'permanent-flags - (if (memq '%* permanent-flags) - t - nil))) + (and (or (memq '%* permanent-flags) + (memq '%Seen permanent-flags)) + permanent-flags))) ;; Update marks and read articles if this isn't a ;; read-only IMAP group. - (when (cdr (assq 'permanent-flags (gnus-info-params info))) + (when (setq permanent-flags + (cdr (assq 'permanent-flags (gnus-info-params info)))) (if (and highestmodseq (not start-article)) ;; We've gotten the data by QRESYNCing. @@ -1136,27 +1144,32 @@ (gnus-info-read info)) (gnus-info-read info)) read))) - (gnus-info-set-read info read) + (when (or (not (listp permanent-flags)) + (memq '%Seen permanent-flags)) + (gnus-info-set-read info read)) ;; Update the marks. (setq marks (gnus-info-marks info)) (dolist (type (cdr nnimap-mark-alist)) - (let ((old-marks (assoc (car type) marks)) - (new-marks - (gnus-compress-sequence - (cdr (or (assoc (caddr type) flags) ; %Flagged - (assoc (intern (cadr type) obarray) flags) - (assoc (cadr type) flags)))))) ; "\Flagged" - (setq marks (delq old-marks marks)) - (pop old-marks) - (when (and old-marks - (> start-article 1)) - (setq old-marks (gnus-range-difference - old-marks - (cons start-article high))) - (setq new-marks (gnus-range-nconcat old-marks new-marks))) - (when new-marks - (push (cons (car type) new-marks) marks))) - (gnus-info-set-marks info marks t))))) + (when (or (not (listp permanent-flags)) + (memq (assoc (caddr type) flags) permanent-flags) + (memq '%* permanent-flags)) + (let ((old-marks (assoc (car type) marks)) + (new-marks + (gnus-compress-sequence + (cdr (or (assoc (caddr type) flags) ; %Flagged + (assoc (intern (cadr type) obarray) flags) + (assoc (cadr type) flags)))))) ; "\Flagged" + (setq marks (delq old-marks marks)) + (pop old-marks) + (when (and old-marks + (> start-article 1)) + (setq old-marks (gnus-range-difference + old-marks + (cons start-article high))) + (setq new-marks (gnus-range-nconcat old-marks new-marks))) + (when new-marks + (push (cons (car type) new-marks) marks))))) + (gnus-info-set-marks info marks t)))) ;; Note the active level for the next run-through. (gnus-group-set-parameter info 'active (gnus-active group)) (gnus-group-set-parameter info 'uidvalidity uidvalidity) ------------------------------------------------------------ revno: 101993 author: Julien Danjou committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-10-18 17:10:38 -0400 message: * lisp/avoid.el (mouse-avoidance-ignore-p): Ignore mouse when it is hidden by `make-pointer-invisible'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-18 21:02:00 +0000 +++ lisp/ChangeLog 2010-10-18 21:10:38 +0000 @@ -1,3 +1,8 @@ +2010-10-18 Julien Danjou + + * avoid.el (mouse-avoidance-ignore-p): Ignore mouse when it is + hidden by `make-pointer-invisible'. + 2010-10-18 Stefan Monnier * files.el (locate-file-completion-table): Strip non-matching elements === modified file 'lisp/avoid.el' --- lisp/avoid.el 2010-01-13 08:35:10 +0000 +++ lisp/avoid.el 2010-10-18 21:10:38 +0000 @@ -278,7 +278,8 @@ (defun mouse-avoidance-ignore-p () (let ((mp (mouse-position))) - (or executing-kbd-macro ; don't check inside macro + (or (not (frame-pointer-visible-p)) ; The pointer is hidden + executing-kbd-macro ; don't check inside macro (null (cadr mp)) ; don't move unless in an Emacs frame (not (eq (car mp) (selected-frame))) ;; Don't do anything if last event was a mouse event. ------------------------------------------------------------ revno: 101992 author: Julien Danjou committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-10-18 17:07:31 -0400 message: * src/frame.c (Fframe_pointer_visible_p): Add `frame-pointer-visible-p' to get the pointer visibility. diff: === modified file 'doc/lispref/frames.texi' --- doc/lispref/frames.texi 2010-09-06 16:38:03 +0000 +++ doc/lispref/frames.texi 2010-10-18 21:07:31 +0000 @@ -1748,6 +1748,15 @@ value is not significant. @end defun +@defun frame-pointer-visible-p &optional frame +This predicate function returns non-@code{nil} if the mouse pointer +displayed on @var{frame} is visible; otherwise it returns @code{nil}. +@var{frame} omitted or @code{nil} means the selected frame. This is +useful when @code{make-pointer-invisible} is set to @code{t}: it +allows to know if the pointer has been hidden. +@xref{Mouse Avoidance,,,emacs}. +@end defun + @need 3000 @node Pop-Up Menus === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-18 20:32:54 +0000 +++ src/ChangeLog 2010-10-18 21:07:31 +0000 @@ -1,3 +1,8 @@ +2010-10-18 Julien Danjou + + * frame.c (Fframe_pointer_visible_p): + Add `frame-pointer-visible-p' to get the pointer visibility. + 2010-10-18 Lars Magne Ingebrigtsen * gnutls.c (emacs_gnutls_read): Return 0 if we get a === modified file 'src/frame.c' --- src/frame.c 2010-09-17 14:37:14 +0000 +++ src/frame.c 2010-10-18 21:07:31 +0000 @@ -4314,6 +4314,20 @@ } } +DEFUN ("frame-pointer-visible-p", Fframe_pointer_visible_p, + Sframe_pointer_visible_p, 0, 1, 0, + doc: /* Return t if the mouse pointer displayed on FRAME is visible. +Otherwise it returns nil. FRAME omitted or nil means the +selected frame. This is useful when `make-pointer-invisible' is set. */) + (Lisp_Object frame) +{ + if (NILP (frame)) + frame = selected_frame; + + CHECK_FRAME (frame); + + return (XFRAME (frame)->pointer_invisible ? Qnil : Qt); +} /*********************************************************************** @@ -4623,6 +4637,7 @@ defsubr (&Sset_frame_width); defsubr (&Sset_frame_size); defsubr (&Sset_frame_position); + defsubr (&Sframe_pointer_visible_p); #ifdef HAVE_WINDOW_SYSTEM defsubr (&Sx_get_resource); ------------------------------------------------------------ revno: 101991 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-10-18 17:02:00 -0400 message: * lisp/files.el (locate-file-completion-table): Strip non-matching elements before checking length of list. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-18 17:26:25 +0000 +++ lisp/ChangeLog 2010-10-18 21:02:00 +0000 @@ -1,3 +1,8 @@ +2010-10-18 Stefan Monnier + + * files.el (locate-file-completion-table): Strip non-matching elements + before checking length of list (bug#7238). + 2010-10-18 Chong Yidong * custom.el (custom-theme-set-variables): Mark as a safe function. @@ -7,8 +12,8 @@ 2010-10-17 Agustín Martín - * textmodes/ispell.el (ispell-aspell-find-dictionary): Fix - aspell data file searching (bug#7230). + * textmodes/ispell.el (ispell-aspell-find-dictionary): + Fix aspell data file searching (bug#7230). 2010-10-16 Chong Yidong @@ -19,12 +24,12 @@ to the front of each variable or face widget. (custom-theme-write): Save theme settings in the correct order. Optionally, remove saved settings from user customizations. - (custom-theme-write-variables, custom-theme-write-faces): Saved - only the checked widgets. + (custom-theme-write-variables, custom-theme-write-faces): + Save only the checked widgets. (customize-themes): Add a link for migrating custom settings. - * custom.el (custom-declare-theme, provide-theme): Use - custom-theme-name-valid-p. + * custom.el (custom-declare-theme, provide-theme): + Use custom-theme-name-valid-p. (custom-theme-name-valid-p): Remove checks that are now unnecessary since themes no longer obey load-path. @@ -36,10 +41,9 @@ * cus-edit.el (custom-variable, custom-face): Combine the :inhibit-magic and :display-style properties into a single :custom-style property. - (custom-toggle-hide-variable, custom-toggle-hide-face): New - functions. If hiding an edited value, save it to :shown-value. - (custom-variable-value-create, custom-face-value-create): Use - them. + (custom-toggle-hide-variable, custom-toggle-hide-face): + New functions. If hiding an edited value, save it to :shown-value. + (custom-variable-value-create, custom-face-value-create): Use them. (custom-magic-reset): Allow magic property to be unset. * custom.el: Custom themes no longer use load-path. @@ -69,7 +73,7 @@ erasing. If given a THEME arg, display only the faces of that arg instead of custom-theme--listed-faces. (custom-theme-variable-menu, custom-theme-variable-action) - (custom-variable-reset-theme, custom-theme-delete-variable): Deleted. + (custom-variable-reset-theme, custom-theme-delete-variable): Delete. (custom-theme-add-variable, custom-theme-add-face): Apply value from the theme settings, instead of the current value. (custom-theme-add-var-1, custom-theme-add-face-1): New functions. @@ -93,8 +97,7 @@ * mail/rmail.el (rmail-show-message-1): Catch an error of base64-decode-region and just show an error message (bug#7165). - * ps-mule.el (ps-mule-font-spec-list): Delete it. Not used - anymore. + * ps-mule.el (ps-mule-font-spec-list): Delete it. Not used anymore. (ps-mule-begin-job): Fix for the case that only ENCODING is set in a font-spec (bug#7197). @@ -128,11 +131,11 @@ 2010-10-14 Jay Belanger - * calc/calc-alg.el (math-var): Renamed from `var'. + * calc/calc-alg.el (math-var): Rename from `var'. (math-is-polynomial, math-is-poly-rec): Replace `var' with `math-var'. - * calc/calcalg2.el (math-var): Renamed from `var'. + * calc/calcalg2.el (math-var): Rename from `var'. (calcFunc-table, math-scan-for-limits): Replace `var' with `math-var'. @@ -196,8 +199,8 @@ (custom-theme-allow-multiple-selections): New option. (custom-theme-choose-mode): New major mode. - * custom.el (custom-theme-set-variables): Remove dead code. Obey - custom--inhibit-theme-enable. + * custom.el (custom-theme-set-variables): Remove dead code. + Obey custom--inhibit-theme-enable. (custom--inhibit-theme-enable): New var. (provide-theme): Obey it. (load-theme): Replace load with manual read/eval, in order to @@ -208,8 +211,8 @@ * cus-edit.el (custom--initialize-widget-variables): New function. (Custom-mode): Use it. - * cus-face.el (custom-theme-set-faces): Remove dead code. Obey - custom--inhibit-theme-enable. + * cus-face.el (custom-theme-set-faces): Remove dead code. + Obey custom--inhibit-theme-enable. * help-mode.el (help-theme-def, help-theme-edit): New buttons. @@ -260,15 +263,14 @@ (custom-available-themes): New function. (load-theme): Use it. - * cus-edit.el (custom-face-edit-fix-value): Use - custom-fix-face-spec. + * cus-edit.el (custom-face-edit-fix-value): Use custom-fix-face-spec. * custom.el (custom-push-theme): Cleanup (use cond). (disable-theme): Recompute the saved-face property. (custom-theme-recalc-face): Follow face alias before setting prop. - * image.el (image-checkbox-checked, image-checkbox-unchecked): New - variables, containing checkbox images. + * image.el (image-checkbox-checked, image-checkbox-unchecked): + New variables, containing checkbox images. * startup.el (fancy-startup-tail): * wid-edit.el (checkbox): Use them. @@ -303,8 +305,8 @@ * epa.el (epa-passphrase-callback-function): Display filename passed as the 3rd arg. - * epa-file.el (epa-file-passphrase-callback-function): Pass - filename to epa-passphrase-callback-function. + * epa-file.el (epa-file-passphrase-callback-function): + Pass filename to epa-passphrase-callback-function. 2010-10-09 Chong Yidong @@ -332,8 +334,7 @@ * cc-engine.el (c-forward-type): New &optional param "brace-block-too". (c-forward-decl-or-cast-1): cdr of return value now indicates the - presence of either or both of a "struct"-like keyword and - "typedef". + presence of either or both of a "struct"-like keyword and "typedef". * cc-fonts.el (c-complex-decl-matchers): Remove the heuristic fontification of declarators which follow a "}". @@ -355,8 +356,7 @@ querying the password for. * ibuffer.el (ibuffer-visit-buffer): To mimick list-buffers - behaviour, don't bury the ibuffer buffer when visiting other - buffers. + behaviour, don't bury the ibuffer buffer when visiting other buffers. 2010-10-08 Chong Yidong @@ -364,12 +364,12 @@ (custom-magic-value-create): Pad button tags with spaces. (custom-face-edit): New variable. (custom-face-value-create): Determine whether to use the usual - face editor here, instead of using custom-face-selected. Pass - face defaults to custom-face-edit widget. + face editor here, instead of using custom-face-selected. + Pass face defaults to custom-face-edit widget. (custom-face-selected, custom-display-unselected): Delete widgets. (custom-display-unselected-match): Function removed. - (custom-face-set, custom-face-mark-to-save): Accept - custom-face-edit widgets as the direct widget child. + (custom-face-set, custom-face-mark-to-save): + Accept custom-face-edit widgets as the direct widget child. * wid-edit.el (widget--completing-widget): New var. (widget-default-complete): Bind it when doing completion. @@ -453,8 +453,8 @@ * cus-edit.el (custom-variable, custom-face): Doc fix. (custom-face-edit): Add value-create attribute. (custom-face-edit-value-create) - (custom-face-edit-value-visibility-action): New functions. Hide - unused face attributes by default, and add a visibility toggle. + (custom-face-edit-value-visibility-action): New functions. + Hide unused face attributes by default, and add a visibility toggle. (custom-face-edit-deactivate): Show empty values with shadow face. (custom-face-selected): Only use this for face specs with default attributes. @@ -534,10 +534,9 @@ (tramp-handle-file-exists-p, tramp-handle-file-newer-than-file-p): New defuns, taken from tramp-smb.el. (tramp-coding-system-change-eol-conversion) - (tramp-set-process-query-on-exit-flag): Removed. + (tramp-set-process-query-on-exit-flag): Remove. - * net/tramp-compat.el (top): Do not check for byte-compiler - objects. + * net/tramp-compat.el (top): Do not check for byte-compiler objects. (tramp-compat-coding-system-change-eol-conversion) (tramp-compat-set-process-query-on-exit-flag): New defuns, taken from tramp.el. @@ -546,30 +545,30 @@ * net/tramp-gw.el: Replace `tramp-set-process-query-on-exit-flag' by `tramp-compat-set-process-query-on-exit-flag'. - * net/tramp-imap.el (tramp-imap-file-name-handler-alist): Use - `tramp-handle-directory-files-and-attributes', + * net/tramp-imap.el (tramp-imap-file-name-handler-alist): + Use `tramp-handle-directory-files-and-attributes', `tramp-handle-file-exists-p' and `tramp-handle-file-newer-than-file-p'. (tramp-imap-handle-file-exists-p) (tramp-imap-handle-file-executable-p) (tramp-imap-handle-file-readable-p) (tramp-imap-handle-directory-files-and-attributes) - (tramp-imap-handle-file-newer-than-file-p): Removed. + (tramp-imap-handle-file-newer-than-file-p): Remove. * net/tramp-sh.el: Replace `tramp-set-process-query-on-exit-flag' by `tramp-compat-set-process-query-on-exit-flag' and `tramp-coding-system-change-eol-conversion' by `tramp-compat-coding-system-change-eol-conversion'. - * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use - `tramp-handle-directory-files-and-attributes', + * net/tramp-smb.el (tramp-smb-file-name-handler-alist): + Use `tramp-handle-directory-files-and-attributes', `tramp-handle-file-exists-p' and `tramp-handle-file-newer-than-file-p'. (tramp-smb-handle-directory-files-and-attributes) (tramp-smb-handle-file-exists-p) - (tramp-smb-handle-file-newer-than-file-p): Removed. - (tramp-smb-maybe-open-connection): Replace - `tramp-set-process-query-on-exit-flag' by + (tramp-smb-handle-file-newer-than-file-p): Remove. + (tramp-smb-maybe-open-connection): + Replace `tramp-set-process-query-on-exit-flag' by `tramp-compat-set-process-query-on-exit-flag'. 2010-10-05 Glenn Morris @@ -596,7 +595,7 @@ (tramp-handle-substitute-in-file-name) (tramp-handle-unhandled-file-name-directory) (tramp-mode-string-to-int, tramp-local-host-p) - (tramp-make-tramp-temp-file): Moved from tramp-sh.el. + (tramp-make-tramp-temp-file): Move from tramp-sh.el. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Do not require 'tramp-sh. @@ -613,8 +612,8 @@ * net/gnutls.el: Improve docs. Remove starttls and ssl emulation. Provide only `open-gnutls-stream' (formerly `open-ssl-stream') and - `gnutls-negotiate' (formerly `starttls-negotiate'). Remove - trivial wrapper `starttls-open-stream'. + `gnutls-negotiate' (formerly `starttls-negotiate'). + Remove trivial wrapper `starttls-open-stream'. 2010-10-03 Dan Nicolaescu @@ -628,8 +627,8 @@ 2010-10-03 Teodor Zlatanov * net/gnutls.el (starttls-negotiate): Use the plist interface to - `gnutls-boot'. Make TYPE the only required parameter. Allow - TRUSTFILES and KEYFILES to be lists. + `gnutls-boot'. Make TYPE the only required parameter. + Allow TRUSTFILES and KEYFILES to be lists. (open-ssl-stream): Use it. 2010-10-03 Glenn Morris @@ -650,8 +649,8 @@ 2010-10-03 Chong Yidong - * emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove - obsolete use of binary-overwrite-mode (Bug#7001). + * emacs-lisp/bytecomp.el (byte-compile-from-buffer): + Remove obsolete use of binary-overwrite-mode (Bug#7001). 2010-10-03 Glenn Morris @@ -686,18 +685,18 @@ 2010-10-03 Chong Yidong - * server.el (server-process-filter, server-return-error): Give - emacsclient time to shut down after receiving an error string. + * server.el (server-process-filter, server-return-error): + Give emacsclient time to shut down after receiving an error string. 2010-10-02 Michael Albinus * files.el (remote-file-name-inhibit-cache): New defcustom. - * time.el (display-time-file-nonempty-p): Use - `remote-file-name-inhibit-cache'. + * time.el (display-time-file-nonempty-p): + Use `remote-file-name-inhibit-cache'. - * net/tramp.el (tramp-completion-reread-directory-timeout): Fix - docstring. + * net/tramp.el (tramp-completion-reread-directory-timeout): + Fix docstring. * net/tramp-cache.el (tramp-cache-inhibit-cache): Remove. (tramp-get-file-property): Replace `tramp-cache-inhibit-cache' by @@ -718,10 +717,9 @@ * net/tramp-sh.el (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-name-all-completions) - (tramp-handle-vc-registered): Use - `remote-file-name-inhibit-cache'. - (tramp-open-connection-setup-interactive-shell): Call - `tramp-cleanup-connection' directly. + (tramp-handle-vc-registered): Use `remote-file-name-inhibit-cache'. + (tramp-open-connection-setup-interactive-shell): + Call `tramp-cleanup-connection' directly. 2010-10-02 Glenn Morris === modified file 'lisp/files.el' --- lisp/files.el 2010-10-02 13:21:43 +0000 +++ lisp/files.el 2010-10-18 21:02:00 +0000 @@ -801,9 +801,10 @@ ;; Switching from names to names+fullnames creates a non-monotonicity ;; which can cause problems with things like partial-completion. ;; To minimize the problem, filter out completion-regexp-list, so that - ;; M-x load-library RET t/x.e TAB finds some files. - (if completion-regexp-list - (setq names (all-completions "" names))) + ;; M-x load-library RET t/x.e TAB finds some files. Also remove elements + ;; from `names' which only matched `string' when they still had + ;; their suffix. + (setq names (all-completions string names)) ;; Remove duplicates of the first element, so that we can easily check ;; if `names' really only contains a single element. (when (cdr names) (setcdr names (delete (car names) (cdr names)))) ------------------------------------------------------------ revno: 101990 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2010-10-18 22:32:54 +0200 message: (emacs_gnutls_read): Return 0 if we get a non-"EAGAIN"-like error to signal to Emacs that the socket should be closed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-15 18:42:54 +0000 +++ src/ChangeLog 2010-10-18 20:32:54 +0000 @@ -1,3 +1,9 @@ +2010-10-18 Lars Magne Ingebrigtsen + + * gnutls.c (emacs_gnutls_read): Return 0 if we get a + non-"EAGAIN"-like error to signal to Emacs that the socket should + be closed. + 2010-10-15 Eli Zaretskii * unexcoff.c (make_hdr): Fix prototype according to changes in === modified file 'src/gnutls.c' --- src/gnutls.c 2010-10-10 18:47:45 +0000 +++ src/gnutls.c 2010-10-18 20:32:54 +0000 @@ -125,8 +125,13 @@ rtnval = gnutls_read (state, buf, nbyte); if (rtnval >= 0) return rtnval; - else - return -1; + else { + if (rtnval == GNUTLS_E_AGAIN || + rtnval == GNUTLS_E_INTERRUPTED) + return -1; + else + return 0; + } } /* convert an integer error to a Lisp_Object; it will be either a ------------------------------------------------------------ revno: 101989 committer: Chong Yidong branch nick: trunk timestamp: Mon 2010-10-18 13:26:25 -0400 message: Use unsafep to check for theme safety. * cus-face.el (custom-theme-set-faces): Mark as a safe function. * custom.el (custom-theme-set-variables): Mark as a safe function. (load-theme): Check forms using unsafep. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-18 16:01:43 +0000 +++ lisp/ChangeLog 2010-10-18 17:26:25 +0000 @@ -1,3 +1,10 @@ +2010-10-18 Chong Yidong + + * custom.el (custom-theme-set-variables): Mark as a safe function. + (load-theme): Check forms using unsafep. + + * cus-face.el (custom-theme-set-faces): Mark as a safe function. + 2010-10-17 Agustín Martín * textmodes/ispell.el (ispell-aspell-find-dictionary): Fix === modified file 'lisp/cus-face.el' --- lisp/cus-face.el 2010-10-14 05:57:58 +0000 +++ lisp/cus-face.el 2010-10-18 17:26:25 +0000 @@ -349,6 +349,8 @@ (put face 'face-override-spec nil) (face-spec-set face spec t)))))))) +(put 'custom-theme-set-faces 'safe-function t) + ;; XEmacs compability function. In XEmacs, when you reset a Custom ;; Theme, you have to specify the theme to reset it to. We just apply ;; the next theme. === modified file 'lisp/custom.el' --- lisp/custom.el 2010-10-17 00:00:34 +0000 +++ lisp/custom.el 2010-10-18 17:26:25 +0000 @@ -993,6 +993,8 @@ (and (or now (default-boundp symbol)) (put symbol 'variable-comment comment))))))) +(put 'custom-theme-set-variables 'safe-function t) + ;;; Defining themes. @@ -1134,32 +1136,27 @@ (with-temp-buffer (insert-file-contents fn) (let ((custom--inhibit-theme-enable no-enable) - sexp scar) - (while (setq sexp (let ((read-circle nil)) + form scar) + (while (setq form (let ((read-circle nil)) (condition-case nil (read (current-buffer)) (end-of-file nil)))) - ;; Perform some checks on each sexp before evaluating it. (cond - ((not (listp sexp))) - ((eq (setq scar (car sexp)) 'deftheme) - (unless (eq (cadr sexp) theme) + ;; Check `deftheme' expressions. + ((eq (setq scar (car form)) 'deftheme) + (unless (eq (cadr form) theme) (error "Incorrect theme name in `deftheme'")) - (and (symbolp (nth 1 sexp)) - (stringp (nth 2 sexp)) - (eval (list scar (nth 1 sexp) (nth 2 sexp))))) - ((or (eq scar 'custom-theme-set-variables) - (eq scar 'custom-theme-set-faces)) - (unless (equal (nth 1 sexp) `(quote ,theme)) - (error "Incorrect theme name in theme settings")) - (dolist (entry (cddr sexp)) - (unless (eq (car-safe entry) 'quote) - (error "Unsafe expression in theme settings"))) - (eval sexp)) + (and (symbolp (nth 1 form)) + (stringp (nth 2 form)) + (eval (list scar (nth 1 form) (nth 2 form))))) + ;; Check `provide-theme' expressions. ((and (eq scar 'provide-theme) - (equal (cadr sexp) `(quote ,theme)) - (= (length sexp) 2)) - (eval sexp)))))))) + (equal (cadr form) `(quote ,theme)) + (= (length form) 2)) + (eval form)) + ;; All other expressions need to be safe. + ((not (unsafep form)) + (eval form)))))))) (defun custom-theme-name-valid-p (name) "Return t if NAME is a valid name for a Custom theme, nil otherwise. ------------------------------------------------------------ revno: 101988 committer: Agustin Martin branch nick: trunk timestamp: Mon 2010-10-18 18:01:43 +0200 message: ispell.el (ispell-aspell-find-dictionary): Fix aspell data file search (bug#7230). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-17 00:00:34 +0000 +++ lisp/ChangeLog 2010-10-18 16:01:43 +0000 @@ -1,3 +1,8 @@ +2010-10-17 Agustín Martín + + * textmodes/ispell.el (ispell-aspell-find-dictionary): Fix + aspell data file searching (bug#7230). + 2010-10-16 Chong Yidong * cus-theme.el (custom-theme--migrate-settings): New var. === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2010-09-20 14:15:27 +0000 +++ lisp/textmodes/ispell.el 2010-10-18 16:01:43 +0000 @@ -983,19 +983,32 @@ (car (split-string (buffer-string))))) (defun ispell-aspell-find-dictionary (dict-name) - ;; This returns nil if the data file does not exist. - ;; Can someone please explain the return value format when the - ;; file does exist -- rms? - (let* ((lang ;; Strip out variant, etc. - (and (string-match "^[[:alpha:]_]+" dict-name) - (match-string 0 dict-name))) + "For aspell dictionary DICT-NAME, return a list of parameters if an + associated data file is found or nil otherwise. List format is + that of `ispell-dictionary-base-alist' elements." + ;; Make sure `ispell-aspell-data-dir' is defined + (or ispell-aspell-data-dir + (setq ispell-aspell-data-dir + (ispell-get-aspell-config-value "data-dir"))) + ;; Try finding associated datafile + (let* ((datafile1 + (concat ispell-aspell-data-dir "/" + ;; Strip out variant, country code, etc. + (and (string-match "^[[:alpha:]]+" dict-name) + (match-string 0 dict-name)) ".dat")) + (datafile2 + (concat ispell-aspell-data-dir "/" + ;; Strip out anything but xx_YY. + (and (string-match "^[[:alpha:]_]+" dict-name) + (match-string 0 dict-name)) ".dat")) (data-file - (concat (or ispell-aspell-data-dir - (setq ispell-aspell-data-dir - (ispell-get-aspell-config-value "data-dir"))) - "/" lang ".dat")) + (if (file-readable-p datafile1) + datafile1 + (if (file-readable-p datafile2) + datafile2))) otherchars) - (condition-case () + + (if data-file (with-temp-buffer (insert-file-contents data-file) ;; There is zero or one line with special characters declarations. @@ -1023,9 +1036,7 @@ ;; Here we specify the encoding to use while communicating with ;; aspell. This doesn't apply to command line arguments, so ;; just don't pass words to spellcheck as arguments... - 'utf-8)) - (file-error - nil)))) + 'utf-8))))) (defun ispell-aspell-add-aliases (alist) "Find aspell's dictionary aliases and add them to dictionary ALIST. ------------------------------------------------------------ revno: 101987 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-10-18 05:45:06 +0000 message: shr.el (shr-insert): Comment fix. diff: === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-18 05:21:26 +0000 +++ lisp/gnus/shr.el 2010-10-18 05:45:06 +0000 @@ -217,7 +217,8 @@ (unless shr-start (setq shr-start (point))) ;; No space is needed behind a wide character categorized as - ;; kinsoku-bol, or between characters both categorized as nospace. + ;; kinsoku-bol, between characters both categorized as nospace, + ;; or at the beginning of a line. (let (prev) (when (and (eq (preceding-char) ? ) (or (= (line-beginning-position) (1- (point)))