Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 101845. ------------------------------------------------------------ revno: 101845 committer: Chong Yidong branch nick: trunk timestamp: Fri 2010-10-08 01:02:56 -0400 message: * xterm.c (x_draw_relief_rect): If box width is larger than 1, draw the outermost line using the black relief, for legibility. Omit drawing the four corner pixels. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-04 18:16:22 +0000 +++ src/ChangeLog 2010-10-08 05:02:56 +0000 @@ -1,3 +1,9 @@ +2010-10-08 Chong Yidong + + * xterm.c (x_draw_relief_rect): If box width is larger than 1, + draw the outermost line using the black relief, for legibility. + Omit drawing the four corner pixels. + 2010-10-04 Chong Yidong * keyboard.c (echo_prompt): Function moved into read_key_sequence. === modified file 'src/xterm.c' --- src/xterm.c 2010-10-03 15:39:21 +0000 +++ src/xterm.c 2010-10-08 05:02:56 +0000 @@ -1942,18 +1942,35 @@ gc = f->output_data.x->black_relief.gc; XSetClipRectangles (dpy, gc, 0, 0, clip_rect, 1, Unsorted); + /* This code is more complicated than it has to be, because of two + minor hacks to make the boxes look nicer: (i) if width > 1, draw + the outermost line using the black relief. (ii) Omit the four + corner pixels. */ + /* Top. */ if (top_p) - for (i = 0; i < width; ++i) - XDrawLine (dpy, window, gc, - left_x + i * left_p, top_y + i, - right_x + 1 - i * right_p, top_y + i); + { + if (width == 1) + XDrawLine (dpy, window, gc, + left_x + (left_p ? 1 : 0), top_y, + right_x + (right_p ? 0 : 1), top_y); + + for (i = 1; i < width; ++i) + XDrawLine (dpy, window, gc, + left_x + i * left_p, top_y + i, + right_x + 1 - i * right_p, top_y + i); + } /* Left. */ if (left_p) - for (i = 0; i < width; ++i) - XDrawLine (dpy, window, gc, - left_x + i, top_y + i, left_x + i, bottom_y - i + 1); + { + if (width == 1) + XDrawLine (dpy, window, gc, left_x, top_y + 1, left_x, bottom_y); + + for (i = (width > 1 ? 1 : 0); i < width; ++i) + XDrawLine (dpy, window, gc, + left_x + i, top_y + i, left_x + i, bottom_y - i + 1); + } XSetClipMask (dpy, gc, None); if (raised_p) @@ -1962,12 +1979,30 @@ gc = f->output_data.x->white_relief.gc; XSetClipRectangles (dpy, gc, 0, 0, clip_rect, 1, Unsorted); + if (width > 1) + { + /* Outermost top line. */ + if (top_p) + XDrawLine (dpy, window, gc, + left_x + (left_p ? 1 : 0), top_y, + right_x + (right_p ? 0 : 1), top_y); + + /* Outermost left line. */ + if (left_p) + XDrawLine (dpy, window, gc, left_x, top_y + 1, left_x, bottom_y); + } + /* Bottom. */ if (bot_p) - for (i = 0; i < width; ++i) + { XDrawLine (dpy, window, gc, - left_x + i * left_p, bottom_y - i, - right_x + 1 - i * right_p, bottom_y - i); + left_x + (left_p ? 1 : 0), bottom_y, + right_x + (right_p ? 0 : 1), bottom_y); + for (i = 1; i < width; ++i) + XDrawLine (dpy, window, gc, + left_x + i * left_p, bottom_y - i, + right_x + 1 - i * right_p, bottom_y - i); + } /* Right. */ if (right_p) ------------------------------------------------------------ revno: 101844 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-10-07 20:27:49 -0700 message: ChangeLog fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-08 03:23:31 +0000 +++ lisp/ChangeLog 2010-10-08 03:27:49 +0000 @@ -39,7 +39,7 @@ * progmodes/octave-mod.el (octave-smie-op-levels): Remove dummy entry that is now unnecessary. -2010-10-07 Miles Bader > +2010-10-07 Miles Bader * emacs-lisp/regexp-opt.el (regexp-opt): Add `symbols' mode. @@ -17110,7 +17110,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -17126,5 +17126,3 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . - -;; arch-tag: d3e45e38-19e2-49b6-8dc2-7cb26adcc5a1 ------------------------------------------------------------ revno: 101843 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-10-07 20:23:31 -0700 message: * lisp/net/browse-url.el (browse-url-xdg-open): Shell-quote url. (Bug#7166) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-08 00:05:12 +0000 +++ lisp/ChangeLog 2010-10-08 03:23:31 +0000 @@ -1,3 +1,7 @@ +2010-10-08 Glenn Morris + + * net/browse-url.el (browse-url-xdg-open): Shell-quote url. (Bug#7166) + 2010-10-07 Chong Yidong * cus-edit.el (custom-variable, custom-face): Doc fix. === modified file 'lisp/net/browse-url.el' --- lisp/net/browse-url.el 2010-09-23 06:42:45 +0000 +++ lisp/net/browse-url.el 2010-10-08 03:23:31 +0000 @@ -939,7 +939,7 @@ (interactive (browse-url-interactive-arg "URL: ")) (call-process "/bin/sh" nil nil nil "-c" - (concat "nohup xdg-open " url + (concat "nohup xdg-open " (shell-quote-argument url) ">/dev/null 2>&1 branch nick: trunk timestamp: Thu 2010-10-07 20:17:31 -0700 message: etc/NEWS. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-10-06 04:14:05 +0000 +++ etc/NEWS 2010-10-08 03:17:31 +0000 @@ -250,7 +250,7 @@ ** latex-electric-env-pair-mode keeps \begin..\end matched on the fly. -** FIXME: xdg-open for browse-url and reportbug, 2010/08. (Close bug#4546?) +** FIXME: xdg-open for browse-url and reportbug, 2010/08. ** Archive Mode has basic support to browse 7z archives. ------------------------------------------------------------ revno: 101841 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-10-08 02:12:56 +0000 message: gnus-art.el (gnus-mime-view-part-externally, gnus-mime-view-part-internally): Make predicate function passed to gnus-mime-view-part-as-type assume argument is a mime type, not a list of a mime type. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-08 01:51:08 +0000 +++ lisp/gnus/ChangeLog 2010-10-08 02:12:56 +0000 @@ -1,5 +1,10 @@ 2010-10-08 Katsumi Yamaoka + * gnus-art.el (gnus-mime-view-part-externally) + (gnus-mime-view-part-internally): Make predicate function passed to + gnus-mime-view-part-as-type assume argument is a mime type, not a list + of a mime type. + * shr.el (shr-table-widths): Don't use cl function `reduce'. 2010-10-07 Lars Magne Ingebrigtsen === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-10-06 02:41:59 +0000 +++ lisp/gnus/gnus-art.el 2010-10-08 02:12:56 +0000 @@ -5381,7 +5381,7 @@ (mm-enable-external t)) (if (not (stringp method)) (gnus-mime-view-part-as-type - nil (lambda (types) (stringp (mailcap-mime-info (car types))))) + nil (lambda (type) (stringp (mailcap-mime-info type)))) (when handle (if (mm-handle-undisplayer handle) (mm-remove-part handle) @@ -5402,7 +5402,7 @@ (inhibit-read-only t)) (if (not (mm-inlinable-p handle)) (gnus-mime-view-part-as-type - nil (lambda (types) (mm-inlinable-p handle (car types)))) + nil (lambda (type) (mm-inlinable-p handle type))) (when handle (if (mm-handle-undisplayer handle) (mm-remove-part handle) ------------------------------------------------------------ revno: 101840 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-10-08 01:51:08 +0000 message: shr.el (shr-table-widths): Don't use cl function `reduce'. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-07 22:26:11 +0000 +++ lisp/gnus/ChangeLog 2010-10-08 01:51:08 +0000 @@ -1,3 +1,7 @@ +2010-10-08 Katsumi Yamaoka + + * shr.el (shr-table-widths): Don't use cl function `reduce'. + 2010-10-07 Lars Magne Ingebrigtsen * shr.el (require): Require cl when compiling. === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-07 22:26:11 +0000 +++ lisp/gnus/shr.el 2010-10-08 01:51:08 +0000 @@ -548,8 +548,8 @@ (aset natural-widths i (max (aref natural-widths i) (cadr column))) (setq i (1+ i))))) - (let ((extra (- (reduce '+ suggested-widths) - (reduce '+ widths))) + (let ((extra (- (apply '+ (append suggested-widths nil)) + (apply '+ (append widths nil)))) (expanded-columns 0)) (when (> extra 0) (dotimes (i length) ------------------------------------------------------------ revno: 101839 committer: Chong Yidong branch nick: trunk timestamp: Thu 2010-10-07 20:05:12 -0400 message: Improvements to face customization interface. * lisp/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-deactivate): Show empty values with shadow face. (custom-face-selected): Only use this for face specs with default attributes. (custom-face-value-create): Cleanup. * lisp/wid-edit.el (widget-checklist-value-create): Use dolist. (widget-checklist-match-find): Make second arg optional. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-07 17:30:10 +0000 +++ lisp/ChangeLog 2010-10-08 00:05:12 +0000 @@ -1,3 +1,18 @@ +2010-10-07 Chong Yidong + + * 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-deactivate): Show empty values with shadow face. + (custom-face-selected): Only use this for face specs with default + attributes. + (custom-face-value-create): Cleanup. + + * wid-edit.el (widget-checklist-value-create): Use dolist. + (widget-checklist-match-find): Make second arg optional. + 2010-10-07 Glenn Morris * hilit-chg.el (hilit-chg-get-diff-info, hilit-chg-get-diff-list-hk): === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2010-08-29 16:17:13 +0000 +++ lisp/cus-edit.el 2010-10-08 00:05:12 +0000 @@ -1914,7 +1914,7 @@ SET for current session only." "\ something in this group has been set but not saved.") (changed ":" custom-changed "\ -CHANGED outside Customize; operating on it here may be unreliable." "\ +CHANGED outside Customize." "\ something in this group has been changed outside customize.") (saved "!" custom-saved "\ SAVED and set." "\ @@ -2456,16 +2456,22 @@ (define-widget 'custom-variable 'custom "A widget for displaying a Custom variable. -The following property has a special meaning for this widget: -:hidden-states - A list of widget states for which the widget's initial - contents should be hidden." +The following properties have special meanings for this widget: + +:hidden-states should be a list of widget states for which the + widget's initial contents are to be hidden. + +:custom-form should be a symbol describing how to display and + edit the variable---either `edit' (using edit widgets), + `lisp' (as a Lisp sexp), or `mismatch' (should not happen); + if nil, use the return value of `custom-variable-default-form'." :format "%v" :help-echo "Set or reset this variable." :documentation-property #'custom-variable-documentation :custom-category 'option :custom-state nil :custom-menu 'custom-variable-menu-create - :custom-form nil ; defaults to value of `custom-variable-default-form' + :custom-form nil :value-create 'custom-variable-value-create :action 'custom-variable-action :hidden-states '(standard) @@ -3026,24 +3032,64 @@ ;;; The `custom-face-edit' Widget. (define-widget 'custom-face-edit 'checklist - "Edit face attributes." - :format "%t: %v" - :tag "Attributes" - :extra-offset 13 + "Widget for editing face attributes." + :format "%v" + :extra-offset 3 :button-args '(:help-echo "Control whether this attribute has any effect.") :value-to-internal 'custom-face-edit-fix-value :match (lambda (widget value) (widget-checklist-match widget (custom-face-edit-fix-value widget value))) + :value-create 'custom-face-edit-value-create :convert-widget 'custom-face-edit-convert-widget :args (mapcar (lambda (att) - (list 'group - :inline t + (list 'group :inline t :sibling-args (widget-get (nth 1 att) :sibling-args) (list 'const :format "" :value (nth 0 att)) (nth 1 att))) custom-face-attributes)) +(defun custom-face-edit-value-create (widget) + (let* ((value (widget-get widget :value)) ; list of key-value pairs + (alist (widget-checklist-match-find widget value)) + (args (widget-get widget :args)) + (show-all (widget-get widget :show-all-attributes)) + (buttons (widget-get widget :buttons)) + entry) + (unless (looking-back "^ *") + (insert ?\n)) + (insert-char ?\s (widget-get widget :extra-offset)) + (if (or alist show-all) + (dolist (prop args) + (setq entry (assq prop alist)) + (if (or entry show-all) + (widget-checklist-add-item widget prop entry))) + (insert (propertize "-- Empty face --" 'face 'shadow) ?\n)) + (let ((indent (widget-get widget :indent))) + (if indent (insert-char ?\s (widget-get widget :indent)))) + (push (widget-create-child-and-convert + widget 'visibility + :help-echo "Show or hide all face attributes." + :button-face 'custom-visibility + :pressed-face 'custom-visibility + :mouse-face 'highlight + :on "Hide Unused Attributes" :off "Show All Attributes" + :on-image nil :off-image nil + :always-active t + :action 'custom-face-edit-value-visibility-action + show-all) + buttons) + (insert ?\n) + (widget-put widget :buttons buttons) + (widget-put widget :children (nreverse (widget-get widget :children))))) + +(defun custom-face-edit-value-visibility-action (widget &rest ignore) + ;; Toggle hiding of face attributes. + (let ((parent (widget-get widget :parent))) + (widget-put parent :show-all-attributes + (not (widget-get parent :show-all-attributes))) + (custom-redraw parent))) + (defun custom-face-edit-fix-value (widget value) "Ignoring WIDGET, convert :bold and :italic in VALUE to new form. Also change :reverse-video to :inverse-video." @@ -3092,7 +3138,7 @@ (save-excursion (goto-char from) (widget-default-delete widget) - (insert tag ": *\n") + (insert tag ": " (propertize "--" 'face 'shadow) "\n") (widget-put widget :inactive (cons value (cons from (- (point) from)))))))) @@ -3235,14 +3281,23 @@ :version "20.3") (define-widget 'custom-face 'custom - "Customize face." + "Widget for customizing a face. +The widget value is the face name (a symbol). + +The following properties have special meanings for this widget: + +:custom-form should be a symbol describing how to display and + edit the face attributes---either `selected' (attributes for + selected display only), `all' (all attributes), `lisp' (as a + Lisp sexp), or `mismatch' (should not happen); if nil, use + the return value of `custom-face-default-form'." :sample-face 'custom-face-tag :help-echo "Set or reset this face." :documentation-property #'face-doc-string :value-create 'custom-face-value-create :action 'custom-face-action :custom-category 'face - :custom-form nil ; defaults to value of `custom-face-default-form' + :custom-form nil :custom-set 'custom-face-set :custom-mark-to-save 'custom-face-mark-to-save :custom-reset-current 'custom-redraw @@ -3273,30 +3328,16 @@ (not (face-spec-set-match-display value (selected-frame)))) (define-widget 'custom-face-selected 'group - "Edit the attributes of the selected display in a face specification." - :args '((choice :inline t - (group :tag "With Defaults" :inline t - (group (const :tag "" default) - (custom-face-edit :tag " Default\n Attributes")) - (repeat :format "" - :inline t - (group custom-display-unselected sexp)) - (group (sexp :format "") - (custom-face-edit :tag " Overriding\n Attributes")) - (repeat :format "" - :inline t - sexp)) - (group :tag "No Defaults" :inline t - (repeat :format "" - :inline t - (group custom-display-unselected sexp)) - (group (sexp :format "") - (custom-face-edit :tag "\n Attributes")) - (repeat :format "" - :inline t - sexp))))) - - + "Widget for editing the attributes of a face on the selected display." + :args '((group :tag "No Defaults" :inline t + (repeat :format "" + :inline t + (group custom-display-unselected sexp)) + (group (sexp :format "") + (custom-face-edit :tag "\n Attributes")) + (repeat :format "" + :inline t + sexp)))) (defconst custom-face-selected (widget-convert 'custom-face-selected) "Converted version of the `custom-face-selected' widget.") @@ -3344,120 +3385,114 @@ (defun custom-face-value-create (widget) "Create a list of the display specifications for WIDGET." - (let ((buttons (widget-get widget :buttons)) - children - (symbol (widget-get widget :value)) - (tag (widget-get widget :tag)) - (state (widget-get widget :custom-state)) - (begin (point)) - (is-last (widget-get widget :custom-last)) - (prefix (widget-get widget :custom-prefix))) - (unless tag - (setq tag (prin1-to-string symbol))) - (cond ((eq custom-buffer-style 'tree) - (insert prefix (if is-last " `--- " " |--- ")) - (push (widget-create-child-and-convert - widget 'custom-browse-face-tag) - buttons) - (insert " " tag "\n") - (widget-put widget :buttons buttons)) - (t - ;; Visibility. - (push (widget-create-child-and-convert - widget 'custom-visibility - :help-echo "Hide or show this face." - :on "Hide" - :off "Show" - :on-image "down" - :off-image "right" - :action 'custom-toggle-parent - (not (eq state 'hidden))) - buttons) - (insert " ") - ;; Create tag. - (insert tag) - (widget-specify-sample widget begin (point)) - (if (eq custom-buffer-style 'face) - (insert " ") - (if (string-match "face\\'" tag) - (insert ":") - (insert " face: "))) - ;; Sample. - (push (widget-create-child-and-convert widget 'item - :format "(%{%t%})" - :sample-face symbol - :tag "sample") - buttons) - ;; Magic. - (insert "\n") - (let ((magic (widget-create-child-and-convert - widget 'custom-magic nil))) - (widget-put widget :custom-magic magic) - (push magic buttons)) - ;; Update buttons. - (widget-put widget :buttons buttons) - ;; Insert documentation. - (widget-put widget :documentation-indent 3) - (widget-add-documentation-string-button - widget :visibility-widget 'custom-visibility) - - ;; The comment field - (unless (eq state 'hidden) - (let* ((comment (get symbol 'face-comment)) - (comment-widget - (widget-create-child-and-convert - widget 'custom-comment - :parent widget - :value (or comment "")))) - (widget-put widget :comment-widget comment-widget) - (push comment-widget children))) - ;; See also. - (unless (eq state 'hidden) - (when (eq (widget-get widget :custom-level) 1) - (custom-add-parent-links widget)) - (custom-add-see-also widget)) - ;; Editor. - (unless (eq (preceding-char) ?\n) - (insert "\n")) - (unless (eq state 'hidden) - (message "Creating face editor...") - (custom-load-widget widget) - (unless (widget-get widget :custom-form) - (widget-put widget :custom-form custom-face-default-form)) - (let* ((symbol (widget-value widget)) - (spec (or (get symbol 'customized-face) - (get symbol 'saved-face) - (get symbol 'face-defface-spec) - ;; Attempt to construct it. - (list (list t (custom-face-attributes-get - symbol (selected-frame)))))) - (form (widget-get widget :custom-form)) - (indent (widget-get widget :indent)) - edit) - ;; If the user has changed this face in some other way, - ;; edit it as the user has specified it. - (if (not (face-spec-match-p symbol spec (selected-frame))) - (setq spec (list (list t (face-attr-construct symbol (selected-frame)))))) - (setq spec (custom-pre-filter-face-spec spec)) - (setq edit (widget-create-child-and-convert - widget - (cond ((and (eq form 'selected) - (widget-apply custom-face-selected - :match spec)) - (when indent (insert-char ?\ indent)) - 'custom-face-selected) - ((and (not (eq form 'lisp)) - (widget-apply custom-face-all - :match spec)) - 'custom-face-all) - (t - (when indent (insert-char ?\ indent)) - 'sexp)) - :value spec)) - (custom-face-state-set widget) - (push edit children) - (widget-put widget :children children)) - (message "Creating face editor...done")))))) + (let* ((buttons (widget-get widget :buttons)) + (symbol (widget-get widget :value)) + (tag (or (widget-get widget :tag) + (prin1-to-string symbol))) + (hiddenp (eq (widget-get widget :custom-state) 'hidden)) + children) + + (if (eq custom-buffer-style 'tree) + + ;; Draw a tree-style `custom-face' widget + (progn + (insert (widget-get widget :custom-prefix) + (if (widget-get widget :custom-last) " `--- " " |--- ")) + (push (widget-create-child-and-convert + widget 'custom-browse-face-tag) + buttons) + (insert " " tag "\n") + (widget-put widget :buttons buttons)) + + ;; Draw an ordinary `custom-face' widget + (let ((opoint (point))) + ;; Visibility indicator. + (push (widget-create-child-and-convert + widget 'custom-visibility + :help-echo "Hide or show this face." + :on "Hide" :off "Show" + :on-image "down" :off-image "right" + :action 'custom-toggle-parent + (not hiddenp)) + buttons) + ;; Face name (tag). + (insert " " tag) + (widget-specify-sample widget opoint (point))) + (insert + (cond ((eq custom-buffer-style 'face) " ") + ((string-match "face\\'" tag) ":") + (t " face: "))) + + ;; Face sample. + (push (widget-create-child-and-convert + widget 'item + :format "(%{%t%})" :sample-face symbol :tag "sample") + buttons) + ;; Magic. + (insert "\n") + (let ((magic (widget-create-child-and-convert + widget 'custom-magic nil))) + (widget-put widget :custom-magic magic) + (push magic buttons)) + + ;; Update buttons. + (widget-put widget :buttons buttons) + + ;; Insert documentation. + (widget-put widget :documentation-indent 3) + (widget-add-documentation-string-button + widget :visibility-widget 'custom-visibility) + ;; The comment field + (unless hiddenp + (let* ((comment (get symbol 'face-comment)) + (comment-widget + (widget-create-child-and-convert + widget 'custom-comment + :parent widget + :value (or comment "")))) + (widget-put widget :comment-widget comment-widget) + (push comment-widget children))) + + ;; Editor. + (unless (eq (preceding-char) ?\n) + (insert "\n")) + (unless hiddenp + (custom-load-widget widget) + (unless (widget-get widget :custom-form) + (widget-put widget :custom-form custom-face-default-form)) + + (let* ((spec (or (get symbol 'customized-face) + (get symbol 'saved-face) + (get symbol 'face-defface-spec) + ;; Attempt to construct it. + (list (list t (custom-face-attributes-get + symbol (selected-frame)))))) + (form (widget-get widget :custom-form)) + (indent (widget-get widget :indent)) + edit-widget-type edit) + ;; If the user has changed this face in some other way, + ;; edit it as the user has specified it. + (if (not (face-spec-match-p symbol spec (selected-frame))) + (setq spec `((t ,(face-attr-construct symbol + (selected-frame)))))) + (setq spec (custom-pre-filter-face-spec spec)) + + (cond ((and (eq form 'selected) + (widget-apply custom-face-selected :match spec)) + (when indent (insert-char ?\s indent)) + (setq edit-widget-type 'custom-face-selected)) + ((and (not (eq form 'lisp)) + (widget-apply custom-face-all :match spec)) + (setq edit-widget-type 'custom-face-all)) + (t + (when indent + (insert-char ?\s indent)) + (setq edit-widget-type 'sexp))) + (setq edit (widget-create-child-and-convert + widget edit-widget-type :value spec)) + (custom-face-state-set widget) + (push edit children) + (widget-put widget :children children)))))) (defvar custom-face-menu `(("Set for Current Session" custom-face-set) === modified file 'lisp/wid-edit.el' --- lisp/wid-edit.el 2010-08-29 16:17:13 +0000 +++ lisp/wid-edit.el 2010-10-08 00:05:12 +0000 @@ -2237,11 +2237,10 @@ (defun widget-checklist-value-create (widget) ;; Insert all values - (let ((alist (widget-checklist-match-find widget (widget-get widget :value))) - (args (widget-get widget :args))) - (while args - (widget-checklist-add-item widget (car args) (assq (car args) alist)) - (setq args (cdr args))) + (let ((alist (widget-checklist-match-find widget)) + (args (widget-get widget :args))) + (dolist (item args) + (widget-checklist-add-item widget item (assq item alist))) (widget-put widget :children (nreverse (widget-get widget :children))))) (defun widget-checklist-add-item (widget type chosen) @@ -2314,9 +2313,10 @@ values nil))))) (cons found rest))) -(defun widget-checklist-match-find (widget vals) +(defun widget-checklist-match-find (widget &optional vals) "Find the vals which match a type in the checklist. Return an alist of (TYPE MATCH)." + (or vals (setq vals (widget-get widget :value))) (let ((greedy (widget-get widget :greedy)) (args (copy-sequence (widget-get widget :args))) found) @@ -2809,11 +2809,10 @@ argument answer found) (while args (setq argument (car args) - args (cdr args) - answer (widget-match-inline argument vals)) - (if answer - (setq vals (cdr answer) - found (append found (car answer))) + args (cdr args)) + (if (setq answer (widget-match-inline argument vals)) + (setq found (append found (car answer)) + vals (cdr answer)) (setq vals nil args nil))) (if answer ------------------------------------------------------------ revno: 101838 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-07 22:26:11 +0000 message: Merge changes made in Gnus trunk. shr.el (shr-render-td): Use a cache for the table rendering function to avoid getting an exponential rendering behaviour in nested tables. shr.el (shr-insert): Rework the line-breaking algorithm. shr.el (shr-insert): Don't leave trailing spaces. shr.el (shr-insert-table): Also insert empty TDs. shr.el (shr-tag-blockquote): Ensure paragraphs after . gnus-start.el (gnus-get-unread-articles): Require gnus-agent before bidning gnus-agent variables. mm-decode.el (mm-save-part): If given a non-directory result, expand the file name before using to avoid setting mm-default-directory to nil. gnus.el (gnus-carpal): The carpal mode has been removed, but define the variable for backwards compatability. nnimap.el (nnimap-update-info): Remove double setting of high. nnimap.el (nnimap-update-info): Don't ignore groups that have no UIDNEXT. shr.el (require): Require cl when compiling. shr.el (shr-tag-hr): New function. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-07 18:22:07 +0000 +++ lisp/gnus/ChangeLog 2010-10-07 22:26:11 +0000 @@ -1,3 +1,29 @@ +2010-10-07 Lars Magne Ingebrigtsen + + * shr.el (require): Require cl when compiling. + (shr-tag-hr): New function. + + * nnimap.el (nnimap-update-info): Remove double setting of high. + (nnimap-update-info): Don't ignore groups that have no UIDNEXT. This + makes nnimap work properly on Courier again. + + * gnus.el (gnus-carpal): The carpal mode has been removed, but define + the variable for backwards compatability. + + * mm-decode.el (mm-save-part): If given a non-directory result, expand + the file name before using to avoid setting mm-default-directory to + nil. + + * gnus-start.el (gnus-get-unread-articles): Require gnus-agent before + bidning gnus-agent variables. + + * shr.el (shr-render-td): Use a cache for the table rendering function + to avoid getting an exponential rendering behaviour in nested tables. + (shr-insert): Rework the line-breaking algorithm. + (shr-insert): Don't leave trailing spaces. + (shr-insert-table): Also insert empty TDs. + (shr-tag-blockquote): Ensure paragraphs after . + 2010-10-07 Stefan Monnier * gnus-sum.el (gnus-number): Rename from `number'. === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2010-10-06 01:38:26 +0000 +++ lisp/gnus/gnus-group.el 2010-10-07 22:26:11 +0000 @@ -4321,7 +4321,8 @@ (interactive (list (let ((how (gnus-completing-read "Which back end" - (mapcar 'car (append gnus-valid-select-methods gnus-server-alist)) + (mapcar 'car (append gnus-valid-select-methods + gnus-server-alist)) t (cons "nntp" 0) 'gnus-method-history))) ;; We either got a back end name or a virtual server name. ;; If the first, we also need an address. === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2010-10-01 23:08:25 +0000 +++ lisp/gnus/gnus-start.el 2010-10-07 22:26:11 +0000 @@ -1674,6 +1674,7 @@ ;; and compute how many unread articles there are in each group. (defun gnus-get-unread-articles (&optional level) (setq gnus-server-method-cache nil) + (require 'gnus-agent) (let* ((newsrc (cdr gnus-newsrc-alist)) (alevel (or level gnus-activate-level (1+ gnus-level-subscribed))) (foreign-level === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-10-07 18:22:07 +0000 +++ lisp/gnus/gnus-sum.el 2010-10-07 22:26:11 +0000 @@ -8686,8 +8686,8 @@ (apply '+ (mapcar 'gnus-summary-limit-children (cdr thread))) 0)) - (number (mail-header-number (car thread))) - score) + (number (mail-header-number (car thread))) + score) (if (and (not (memq number gnus-newsgroup-marked)) (or @@ -8732,8 +8732,8 @@ t) ;; Do the `display' group parameter. (and gnus-newsgroup-display - (let ((gnus-number number)) - (not (funcall gnus-newsgroup-display)))))) + (let ((gnus-number number)) + (not (funcall gnus-newsgroup-display)))))) ;; Nope, invisible article. 0 ;; Ok, this article is to be visible, so we add it to the limit === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2010-10-07 03:49:38 +0000 +++ lisp/gnus/gnus-util.el 2010-10-07 22:26:11 +0000 @@ -1647,7 +1647,8 @@ (defun gnus-ido-completing-read (prompt collection &optional require-match initial-input history def) "Call `ido-completing-read-function'." - (ido-completing-read prompt collection nil require-match initial-input history def)) + (ido-completing-read prompt collection nil require-match + initial-input history def)) (autoload 'iswitchb-read-buffer "iswitchb") === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-10-04 22:26:51 +0000 +++ lisp/gnus/gnus.el 2010-10-07 22:26:11 +0000 @@ -2585,6 +2585,11 @@ (defvar gnus-server-method-cache nil) (defvar gnus-extended-servers nil) +;; The carpal mode has been removed, but define the variable for +;; backwards compatability. +(defvar gnus-carpal nil) +(make-obsolete-variable 'gnus-carpal nil "Emacs 24.1") + (defvar gnus-agent-fetching nil "Whether Gnus agent is in fetching mode.") === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2010-10-05 22:43:06 +0000 +++ lisp/gnus/mm-decode.el 2010-10-07 22:26:11 +0000 @@ -1258,8 +1258,10 @@ (or filename ""))) (or mm-default-directory default-directory) (or filename ""))) - (when (file-directory-p file) - (setq file (expand-file-name filename file))) + (if (file-directory-p file) + (setq file (expand-file-name filename file)) + (setq file (expand-file-name + file (or mm-default-directory default-directory)))) (setq mm-default-directory (file-name-directory file)) (and (or (not (file-exists-p file)) (yes-or-no-p (format "File %s already exists; overwrite? " === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-07 11:46:01 +0000 +++ lisp/gnus/nnimap.el 2010-10-07 22:26:11 +0000 @@ -1016,8 +1016,10 @@ (defun nnimap-update-info (info marks) (when (and marks - ;; Ignore groups with no UIDNEXT values. - (nth 4 marks)) + ;; Ignore groups with no UIDNEXT/marks. This happens for + ;; completely empty groups. + (or (car marks) + (nth 4 marks))) (destructuring-bind (existing flags high low uidnext start-article permanent-flags) marks (let ((group (gnus-info-group info)) @@ -1044,9 +1046,6 @@ group (cons (car (gnus-active group)) (or high (1- uidnext))))) - (when (and (not high) - uidnext) - (setq high (1- uidnext))) ;; Then update the list of read articles. (let* ((unread (gnus-compress-sequence === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-07 11:46:01 +0000 +++ lisp/gnus/shr.el 2010-10-07 22:26:11 +0000 @@ -30,6 +30,7 @@ ;;; Code: +(eval-when-compile (require 'cl)) (require 'browse-url) (defgroup shr nil @@ -68,6 +69,7 @@ (defvar shr-indentation 0) (defvar shr-inhibit-images nil) (defvar shr-list-mode nil) +(defvar shr-content-cache nil) (defvar shr-map (let ((map (make-sparse-keymap))) @@ -83,6 +85,7 @@ ;;;###autoload (defun shr-insert-document (dom) + (setq shr-content-cache nil) (let ((shr-state nil) (shr-start nil)) (shr-descend (shr-transform-dom dom)))) @@ -135,6 +138,17 @@ (message "Browsing %s..." url) (browse-url url)))) +(defun shr-insert-image () + "Insert the image under point into the buffer." + (interactive) + (let ((url (get-text-property (point) 'shr-image))) + (if (not url) + (message "No image under point") + (message "Inserting %s..." url) + (url-retrieve url 'shr-image-fetched + (list (current-buffer) (1- (point)) (point-marker)) + t)))) + ;;; Utility functions. (defun shr-transform-dom (dom) @@ -175,20 +189,8 @@ column) (when (and (string-match "\\`[ \t\n]" text) (not (bolp))) - (insert " ") - (setq shr-state 'space)) + (insert " ")) (dolist (elem (split-string text)) - (setq column (current-column)) - (when (> column 0) - (cond - ((and (or (not first) - (eq shr-state 'space)) - (> (+ column (length elem) 1) shr-width)) - (insert "\n") - (put-text-property (1- (point)) (point) 'shr-break t)) - ((not first) - (insert " ")))) - (setq first nil) (when (and (bolp) (> shr-indentation 0)) (shr-indent)) @@ -197,12 +199,19 @@ ;; starts. (unless shr-start (setq shr-start (point))) - (insert elem)) - (setq shr-state nil) - (when (and (string-match "[ \t\n]\\'" text) - (not (bolp))) - (insert " ") - (setq shr-state 'space)))))) + (insert elem) + (when (> (current-column) shr-width) + (if (not (search-backward " " (line-beginning-position) t)) + (insert "\n") + (delete-char 1) + (insert "\n") + (put-text-property (1- (point)) (point) 'shr-break t) + (when (> shr-indentation 0) + (shr-indent)) + (end-of-line))) + (insert " ")) + (unless (string-match "[ \t\n]\\'" text) + (delete-char -1)))))) (defun shr-ensure-newline () (unless (zerop (current-column)) @@ -396,11 +405,14 @@ (defun shr-tag-ul (cont) (shr-ensure-paragraph) (let ((shr-list-mode 'ul)) - (shr-generic cont))) + (shr-generic cont)) + (shr-ensure-paragraph)) (defun shr-tag-ol (cont) + (shr-ensure-paragraph) (let ((shr-list-mode 1)) - (shr-generic cont))) + (shr-generic cont)) + (shr-ensure-paragraph)) (defun shr-tag-li (cont) (shr-ensure-newline) @@ -437,6 +449,10 @@ (defun shr-tag-h6 (cont) (shr-heading cont)) +(defun shr-tag-hr (cont) + (shr-ensure-newline) + (insert (make-string shr-width ?-) "\n")) + ;;; Table rendering algorithm. ;; Table rendering is the only complicated thing here. We do this by @@ -496,16 +512,15 @@ overlay overlay-line) (dolist (line lines) (setq overlay-line (pop overlay-lines)) - (when (> (length line) 0) - (end-of-line) - (insert line "|") - (dolist (overlay overlay-line) - (let ((o (make-overlay (- (point) (nth 0 overlay) 1) - (- (point) (nth 1 overlay) 1))) - (properties (nth 2 overlay))) - (while properties - (overlay-put o (pop properties) (pop properties))))) - (forward-line 1))) + (end-of-line) + (insert line "|") + (dolist (overlay overlay-line) + (let ((o (make-overlay (- (point) (nth 0 overlay) 1) + (- (point) (nth 1 overlay) 1))) + (properties (nth 2 overlay))) + (while properties + (overlay-put o (pop properties) (pop properties))))) + (forward-line 1)) ;; Add blank lines at padding at the bottom of the TD, ;; possibly. (dotimes (i (- height (length lines))) @@ -570,13 +585,18 @@ (defun shr-render-td (cont width fill) (with-temp-buffer - (let ((shr-width width) - (shr-indentation 0)) - (shr-generic cont)) - (delete-region - (point) - (+ (point) - (skip-chars-backward " \t\n"))) + (let ((cache (cdr (assoc (cons width cont) shr-content-cache)))) + (if cache + (insert cache) + (let ((shr-width width) + (shr-indentation 0)) + (shr-generic cont)) + (delete-region + (point) + (+ (point) + (skip-chars-backward " \t\n"))) + (push (cons (cons width cont) (buffer-string)) + shr-content-cache))) (goto-char (point-min)) (let ((max 0)) (while (not (eobp)) ------------------------------------------------------------ revno: 101837 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2010-10-07 20:22:07 +0200 message: * lisp/gnus/gnus-sum.el (gnus-number): Rename from `number'. (gnus-article-marked-p, gnus-summary-limit-to-display-predicate) (gnus-summary-limit-children): Update uses correspondingly. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-07 12:31:39 +0000 +++ lisp/gnus/ChangeLog 2010-10-07 18:22:07 +0000 @@ -1,3 +1,9 @@ +2010-10-07 Stefan Monnier + + * gnus-sum.el (gnus-number): Rename from `number'. + (gnus-article-marked-p, gnus-summary-limit-to-display-predicate) + (gnus-summary-limit-children): Update uses correspondingly. + 2010-10-07 Katsumi Yamaoka * gnus-gravatar.el (gnus-gravatar-too-ugly): New user option. === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-10-06 01:09:32 +0000 +++ lisp/gnus/gnus-sum.el 2010-10-07 18:22:07 +0000 @@ -5682,17 +5682,17 @@ (unseen . unseen)) gnus-article-mark-lists)) (push (cons (cdr elem) - (gnus-byte-compile + (gnus-byte-compile ;Why bother? `(lambda () (gnus-article-marked-p ',(cdr elem))))) gnus-summary-display-cache))) (let ((gnus-category-predicate-alist gnus-summary-display-cache) (gnus-category-predicate-cache gnus-summary-display-cache)) (gnus-get-predicate display))) -;; Uses the dynamically bound `number' variable. -(defvar number) +;; Uses the dynamically bound `gnus-number' variable. +(defvar gnus-number) (defun gnus-article-marked-p (type &optional article) - (let ((article (or article number))) + (let ((article (or article gnus-number))) (cond ((eq type 'tick) (memq article gnus-newsgroup-marked)) @@ -8283,9 +8283,9 @@ (unless gnus-newsgroup-display (error "There is no `display' group parameter")) (let (articles) - (dolist (number gnus-newsgroup-articles) + (dolist (gnus-number gnus-newsgroup-articles) (when (funcall gnus-newsgroup-display) - (push number articles))) + (push gnus-number articles))) (gnus-summary-limit articles)) (gnus-summary-position-point)) @@ -8686,7 +8686,7 @@ (apply '+ (mapcar 'gnus-summary-limit-children (cdr thread))) 0)) - (number (mail-header-number (car thread))) + (number (mail-header-number (car thread))) score) (if (and (not (memq number gnus-newsgroup-marked)) @@ -8732,7 +8732,8 @@ t) ;; Do the `display' group parameter. (and gnus-newsgroup-display - (not (funcall gnus-newsgroup-display))))) + (let ((gnus-number number)) + (not (funcall gnus-newsgroup-display)))))) ;; Nope, invisible article. 0 ;; Ok, this article is to be visible, so we add it to the limit ------------------------------------------------------------ revno: 101836 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-10-07 10:30:10 -0700 message: Tiny hilit-chg.el change. * lisp/hilit-chg.el (hilit-chg-get-diff-info, hilit-chg-get-diff-list-hk): Prefix things. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-07 17:22:51 +0000 +++ lisp/ChangeLog 2010-10-07 17:30:10 +0000 @@ -1,5 +1,8 @@ 2010-10-07 Glenn Morris + * hilit-chg.el (hilit-chg-get-diff-info, hilit-chg-get-diff-list-hk): + Prefix things. + * emacs-lisp/shadow.el (shadow-font-lock-keywords) (load-path-shadows-mode, list-load-path-shadows): Rename shadow-mode to load-path-shadows-mode, update references. === modified file 'lisp/hilit-chg.el' --- lisp/hilit-chg.el 2010-10-06 04:06:25 +0000 +++ lisp/hilit-chg.el 2010-10-07 17:30:10 +0000 @@ -921,25 +921,26 @@ (defun hilit-chg-get-diff-info (buf-a file-a buf-b file-b) - (let (e x y) ; e,x,y are set by function hilit-chg-get-diff-list-hk + ;; hilit-e,x,y are set by function hilit-chg-get-diff-list-hk. + (let (hilit-e hilit-x hilit-y) (ediff-setup buf-a file-a buf-b file-b nil nil ; buf-c file-C 'hilit-chg-get-diff-list-hk (list (cons 'ediff-job-name 'something)) ) - (ediff-with-current-buffer e (ediff-really-quit nil)) - (list x y))) + (ediff-with-current-buffer hilit-e (ediff-really-quit nil)) + (list hilit-x hilit-y))) (defun hilit-chg-get-diff-list-hk () - ;; e, x and y are dynamically bound by hilit-chg-get-diff-info - ;; which calls this function as a hook - (defvar x) ; placate the byte-compiler - (defvar y) - (defvar e) - (setq e (current-buffer)) + ;; hilit-e/x/y are dynamically bound by hilit-chg-get-diff-info + ;; which calls this function as a hook. + (defvar hilit-x) ; placate the byte-compiler + (defvar hilit-y) + (defvar hilit-e) + (setq hilit-e (current-buffer)) (let ((n 0) extent p va vb a b) - (setq x nil y nil) ;; x and y are bound by hilit-chg-get-diff-info + (setq hilit-x nil hilit-y nil) (while (< n ediff-number-of-differences) (ediff-make-fine-diffs n) (setq va (ediff-get-fine-diff-vector n 'A)) @@ -955,7 +956,7 @@ (setq extent (list (overlay-start (car p)) (overlay-end (car p)))) (setq p (cdr p)) - (setq x (append x (list extent) )));; while p + (setq hilit-x (append hilit-x (list extent) )));; while p ;; (setq vb (ediff-get-fine-diff-vector n 'B)) ;; vb is a vector @@ -970,7 +971,7 @@ (setq extent (list (overlay-start (car p)) (overlay-end (car p)))) (setq p (cdr p)) - (setq y (append y (list extent) ))) + (setq hilit-y (append hilit-y (list extent) ))) (setq n (1+ n)));; while ;; ediff-quit doesn't work here. ;; No point in returning a value, since this is a hook function. ------------------------------------------------------------ revno: 101835 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-10-07 10:22:51 -0700 message: Rename some more shadow.el stuff. * lisp/emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords) (load-path-shadows-find-file): Rename variable and button. (list-load-path-shadows): Update button caller. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-07 17:17:18 +0000 +++ lisp/ChangeLog 2010-10-07 17:22:51 +0000 @@ -3,6 +3,9 @@ * emacs-lisp/shadow.el (shadow-font-lock-keywords) (load-path-shadows-mode, list-load-path-shadows): Rename shadow-mode to load-path-shadows-mode, update references. + (load-path-shadows-font-lock-keywords, load-path-shadows-find-file): + Rename variable and button. + (list-load-path-shadows): Update button caller. 2010-10-07 Stefan Monnier === modified file 'lisp/emacs-lisp/shadow.el' --- lisp/emacs-lisp/shadow.el 2010-10-07 17:17:18 +0000 +++ lisp/emacs-lisp/shadow.el 2010-10-07 17:22:51 +0000 @@ -152,7 +152,7 @@ (nth 7 (file-attributes f2))) (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2)))))))) -(defvar shadow-font-lock-keywords +(defvar load-path-shadows-font-lock-keywords `((,(format "hides \\(%s.*\\)" (file-name-directory (locate-library "simple.el"))) . (1 font-lock-warning-face))) @@ -161,13 +161,13 @@ (define-derived-mode load-path-shadows-mode fundamental-mode "LP-Shadows" "Major mode for load-path shadows buffer." (set (make-local-variable 'font-lock-defaults) - '((shadow-font-lock-keywords))) + '((load-path-shadows-font-lock-keywords))) (setq buffer-undo-list t buffer-read-only t)) ;; TODO use text-properties instead, a la dired. (require 'button) -(define-button-type 'shadow-find-file +(define-button-type 'load-path-shadows-find-file 'follow-link t ;; 'face 'default 'action (lambda (button) @@ -273,7 +273,8 @@ (dotimes (i 2) (make-button (match-beginning (1+ i)) (match-end (1+ i)) - 'type 'shadow-find-file 'shadow-file + 'type 'load-path-shadows-find-file + 'shadow-file (match-string (1+ i))))) (goto-char (point-max))))) ;; We are non-interactive, print shadows via message. ------------------------------------------------------------ revno: 101834 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-10-07 10:17:18 -0700 message: Rename shadow-mode. * lisp/emacs-lisp/shadow.el (shadow-font-lock-keywords) (load-path-shadows-mode, list-load-path-shadows): Rename shadow-mode to load-path-shadows-mode, update references. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-07 11:27:19 +0000 +++ lisp/ChangeLog 2010-10-07 17:17:18 +0000 @@ -1,3 +1,9 @@ +2010-10-07 Glenn Morris + + * emacs-lisp/shadow.el (shadow-font-lock-keywords) + (load-path-shadows-mode, list-load-path-shadows): Rename shadow-mode to + load-path-shadows-mode, update references. + 2010-10-07 Stefan Monnier * emacs-lisp/smie.el (smie-bnf-classify): New function. === modified file 'lisp/emacs-lisp/shadow.el' --- lisp/emacs-lisp/shadow.el 2010-10-07 02:37:39 +0000 +++ lisp/emacs-lisp/shadow.el 2010-10-07 17:17:18 +0000 @@ -156,9 +156,9 @@ `((,(format "hides \\(%s.*\\)" (file-name-directory (locate-library "simple.el"))) . (1 font-lock-warning-face))) - "Keywords to highlight in `shadow-mode'.") + "Keywords to highlight in `load-path-shadows-mode'.") -(define-derived-mode shadow-mode fundamental-mode "Shadow" +(define-derived-mode load-path-shadows-mode fundamental-mode "LP-Shadows" "Major mode for load-path shadows buffer." (set (make-local-variable 'font-lock-defaults) '((shadow-font-lock-keywords))) @@ -263,7 +263,7 @@ (let ((string (buffer-string))) (with-current-buffer (get-buffer-create "*Shadows*") (display-buffer (current-buffer)) - (shadow-mode) ; run after-change-major-mode-hook + (load-path-shadows-mode) ; run after-change-major-mode-hook (let ((inhibit-read-only t)) (erase-buffer) (insert string) ------------------------------------------------------------ revno: 101833 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-07 12:31:39 +0000 message: [Gnus] Introduce gnus-gravatar-too-ugly. gnus-gravatar.el (gnus-gravatar-too-ugly): New user option. gnus-gravatar.el (gnus-gravatar-transform-address): Don't show avatars of people of which mail addresses match gnus-gravatar-too-ugly. gnus.texi (Gravatars): Document gnus-gravatar-too-ugly. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-07 02:23:28 +0000 +++ doc/misc/ChangeLog 2010-10-07 12:31:39 +0000 @@ -1,3 +1,7 @@ +2010-10-07 Katsumi Yamaoka + + * gnus.texi (Gravatars): Document gnus-gravatar-too-ugly. + 2010-10-06 Julien Danjou * sieve.texi (Manage Sieve API): Document sieve-manage-authenticate. === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2010-10-06 12:38:45 +0000 +++ doc/misc/gnus.texi 2010-10-07 12:31:39 +0000 @@ -827,6 +827,7 @@ * Smileys:: Show all those happy faces the way they were meant to be shown. * Picons:: How to display pictures of what you're reading. +* Gravatars:: Display the avatar of people you read. * XVarious:: Other XEmacsy Gnusey variables. Thwarting Email Spam @@ -23195,6 +23196,12 @@ @vindex gnus-gravatar-properties List of image properties applied to Gravatar images. +@item gnus-gravatar-too-ugly +@vindex gnus-gravatar-too-ugly +Regexp that matches mail addresses or names of people of which avatars +should not be displayed, or @code{nil}. It default to the value of +@code{gnus-article-x-face-too-ugly} (@pxref{X-Face}). + @end table If you want to see them in the From field, set: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-07 11:46:01 +0000 +++ lisp/gnus/ChangeLog 2010-10-07 12:31:39 +0000 @@ -1,3 +1,9 @@ +2010-10-07 Katsumi Yamaoka + + * gnus-gravatar.el (gnus-gravatar-too-ugly): New user option. + (gnus-gravatar-transform-address): Don't show avatars of people of + which mail addresses match gnus-gravatar-too-ugly. + 2010-10-07 Lars Magne Ingebrigtsen * shr.el (shr-table-widths): Expand TD elements to fill available === modified file 'lisp/gnus/gnus-gravatar.el' --- lisp/gnus/gnus-gravatar.el 2010-10-07 06:47:37 +0000 +++ lisp/gnus/gnus-gravatar.el 2010-10-07 12:31:39 +0000 @@ -42,6 +42,13 @@ :version "24.1" :group 'gnus-gravatar) +(defcustom gnus-gravatar-too-ugly (if (boundp 'gnus-article-x-face-too-ugly) + gnus-article-x-face-too-ugly) + "Regexp matching posters whose avatar shouldn't be shown automatically." + :type '(choice regexp (const nil)) + :version "24.1" + :group 'gnus-gravatar) + (defun gnus-gravatar-transform-address (header category) (gnus-with-article-headers (let ((addresses @@ -55,10 +62,16 @@ (mail-fetch-field header))))) (let ((gravatar-size gnus-gravatar-size)) (dolist (address addresses) - (gravatar-retrieve - (car address) - 'gnus-gravatar-insert - (list header address category))))))) + (unless (and gnus-gravatar-too-ugly + (or (string-match gnus-gravatar-too-ugly + (car address)) + (and (cdr address) + (string-match gnus-gravatar-too-ugly + (cdr address))))) + (gravatar-retrieve + (car address) + 'gnus-gravatar-insert + (list header address category)))))))) (defun gnus-gravatar-insert (gravatar header address category) "Insert GRAVATAR for ADDRESS in HEADER in current article buffer. ------------------------------------------------------------ revno: 101832 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-07 11:46:01 +0000 message: Merge changes made in Gnus trunk. nnimap.el (nnimap-request-rename-group): Add this method. shr.el: Keep track of the natural width of TD elements, so we know which ones to expand. shr.el: Expand TD elements to fill available space. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-07 06:47:37 +0000 +++ lisp/gnus/ChangeLog 2010-10-07 11:46:01 +0000 @@ -1,3 +1,12 @@ +2010-10-07 Lars Magne Ingebrigtsen + + * shr.el (shr-table-widths): Expand TD elements to fill available + space. + +2010-10-07 Julien Danjou + + * nnimap.el (nnimap-request-rename-group): Add this method. + 2010-10-07 Katsumi Yamaoka * gnus-html.el (gnus-html-schedule-image-fetching): Remove function === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-06 12:38:45 +0000 +++ lisp/gnus/nnimap.el 2010-10-07 11:46:01 +0000 @@ -652,6 +652,11 @@ (with-current-buffer (nnimap-buffer) (car (nnimap-command "DELETE %S" (utf7-encode group t)))))) +(deffoo nnimap-request-rename-group (group new-name &optional server) + (when (nnimap-possibly-change-group nil server) + (with-current-buffer (nnimap-buffer) + (car (nnimap-command "RENAME %S %S" (utf7-encode group t) (utf7-encode new-name t)))))) + (deffoo nnimap-request-expunge-group (group &optional server) (when (nnimap-possibly-change-group group server) (with-current-buffer (nnimap-buffer) === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-06 13:21:07 +0000 +++ lisp/gnus/shr.el 2010-10-07 11:46:01 +0000 @@ -184,7 +184,8 @@ ((and (or (not first) (eq shr-state 'space)) (> (+ column (length elem) 1) shr-width)) - (insert "\n")) + (insert "\n") + (put-text-property (1- (point)) (point) 'shr-break t)) ((not first) (insert " ")))) (setq first nil) @@ -459,7 +460,7 @@ ;; be smaller (if there's little text) or bigger (if there's ;; unbreakable text). (sketch (shr-make-table cont suggested-widths)) - (sketch-widths (shr-table-widths sketch (length suggested-widths)))) + (sketch-widths (shr-table-widths sketch suggested-widths))) ;; Then render the table again with these new "hard" widths. (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths)) ;; Finally, insert all the images after the table. The Emacs buffer @@ -490,7 +491,7 @@ (insert "|\n")) (dolist (column row) (goto-char start) - (let ((lines (split-string (nth 2 column) "\n")) + (let ((lines (nth 2 column)) (overlay-lines (nth 3 column)) overlay overlay-line) (dolist (line lines) @@ -520,14 +521,33 @@ (insert (make-string (aref widths i) ?-) ?+)) (insert "\n")) -(defun shr-table-widths (table length) - (let ((widths (make-vector length 0))) +(defun shr-table-widths (table suggested-widths) + (let* ((length (length suggested-widths)) + (widths (make-vector length 0)) + (natural-widths (make-vector length 0))) (dolist (row table) (let ((i 0)) (dolist (column row) (aset widths i (max (aref widths i) (car column))) - (incf i)))) + (aset natural-widths i (max (aref natural-widths i) + (cadr column))) + (setq i (1+ i))))) + (let ((extra (- (reduce '+ suggested-widths) + (reduce '+ widths))) + (expanded-columns 0)) + (when (> extra 0) + (dotimes (i length) + ;; If the natural width is wider than the rendered width, we + ;; want to allow the column to expand. + (when (> (aref natural-widths i) (aref widths i)) + (setq expanded-columns (1+ expanded-columns)))) + (dotimes (i length) + (when (> (aref natural-widths i) (aref widths i)) + (aset widths i (min + (1+ (aref natural-widths i)) + (+ (/ extra expanded-columns) + (aref widths i)))))))) widths)) (defun shr-make-table (cont widths &optional fill) @@ -575,11 +595,26 @@ (when (> (- width (current-column)) 0) (insert (make-string (- width (current-column)) ? ))) (forward-line 1)))) - (list max - (count-lines (point-min) (point-max)) - (buffer-string) - (and fill - (shr-collect-overlays)))))) + (if fill + (list max + (count-lines (point-min) (point-max)) + (split-string (buffer-string) "\n") + (shr-collect-overlays)) + (list max + (shr-natural-width)))))) + +(defun shr-natural-width () + (goto-char (point-min)) + (let ((current 0) + (max 0)) + (while (not (eobp)) + (end-of-line) + (setq current (+ current (current-column))) + (unless (get-text-property (point) 'shr-break) + (setq max (max max current) + current 0)) + (forward-line 1)) + max)) (defun shr-collect-overlays () (save-excursion @@ -608,12 +643,12 @@ (let ((total-percentage 0) (widths (make-vector (length columns) 0))) (dotimes (i (length columns)) - (incf total-percentage (aref columns i))) + (setq total-percentage (+ total-percentage (aref columns i)))) (setq total-percentage (/ 1.0 total-percentage)) (dotimes (i (length columns)) (aset widths i (max (truncate (* (aref columns i) total-percentage - shr-width)) + (- shr-width (1+ (length columns))))) 10))) widths)) ------------------------------------------------------------ revno: 101831 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2010-10-07 13:40:42 +0200 message: url-http.el (url-http-end-of-document-sentinel): Protect against the process buffer being killed. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2010-10-04 19:34:35 +0000 +++ lisp/url/ChangeLog 2010-10-07 11:40:42 +0000 @@ -1,3 +1,8 @@ +2010-10-07 Lars Magne Ingebrigtsen + + * url-http.el (url-http-end-of-document-sentinel): Protect against + the process buffer being killed. + 2010-10-04 Lars Magne Ingebrigtsen * url-http.el (url-http-wait-for-headers-change-function): Protect === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2010-10-04 19:34:35 +0000 +++ lisp/url/url-http.el 2010-10-07 11:40:42 +0000 @@ -874,13 +874,14 @@ (url-http-debug "url-http-end-of-document-sentinel in buffer (%s)" (process-buffer proc)) (url-http-idle-sentinel proc why) - (with-current-buffer (process-buffer proc) - (goto-char (point-min)) - (if (not (looking-at "HTTP/")) - ;; HTTP/0.9 just gets passed back no matter what - (url-http-activate-callback) - (if (url-http-parse-headers) - (url-http-activate-callback))))) + (when (buffer-name (process-buffer proc)) + (with-current-buffer (process-buffer proc) + (goto-char (point-min)) + (if (not (looking-at "HTTP/")) + ;; HTTP/0.9 just gets passed back no matter what + (url-http-activate-callback) + (if (url-http-parse-headers) + (url-http-activate-callback)))))) (defun url-http-simple-after-change-function (st nd length) ;; Function used when we do NOT know how long the document is going to be ------------------------------------------------------------ revno: 101830 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2010-10-07 13:27:19 +0200 message: SMIE: Reliably distinguish openers/closers in smie-prec2-levels * lisp/emacs-lisp/smie.el (smie-bnf-classify): New function. (smie-bnf-precedence-table): Use it to remember the closers/openers. (smie-merge-prec2s): Handle those new entries. (smie-prec2-levels): Only set precedence to nil for actual openers/closers. * lisp/progmodes/octave-mod.el (octave-smie-op-levels): Remove dummy entry that is now unnecessary. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-07 07:24:21 +0000 +++ lisp/ChangeLog 2010-10-07 11:27:19 +0000 @@ -1,3 +1,13 @@ +2010-10-07 Stefan Monnier + + * emacs-lisp/smie.el (smie-bnf-classify): New function. + (smie-bnf-precedence-table): Use it to remember the closers/openers. + (smie-merge-prec2s): Handle those new entries. + (smie-prec2-levels): Only set precedence to nil for actual + openers/closers. + * progmodes/octave-mod.el (octave-smie-op-levels): Remove dummy entry + that is now unnecessary. + 2010-10-07 Miles Bader > * emacs-lisp/regexp-opt.el (regexp-opt): Add `symbols' mode. @@ -25,8 +35,8 @@ 2010-10-06 Michael Albinus - * net/tramp-sh.el (tramp-sh-file-name-handler-alist): Use - `tramp-handle-find-backup-file-name'. + * net/tramp-sh.el (tramp-sh-file-name-handler-alist): + Use `tramp-handle-find-backup-file-name'. 2010-10-06 Glenn Morris === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2010-09-21 21:18:08 +0000 +++ lisp/emacs-lisp/smie.el 2010-10-07 11:27:19 +0000 @@ -138,7 +138,12 @@ (let ((prec2 (make-hash-table :test 'equal))) (dolist (table tables) (maphash (lambda (k v) - (smie-set-prec2tab prec2 (car k) (cdr k) v)) + (if (consp k) + (smie-set-prec2tab prec2 (car k) (cdr k) v) + (if (and (gethash k prec2) + (not (equal (gethash k prec2) v))) + (error "Conflicting values for %s property" k) + (puthash k v prec2)))) table)) prec2))) @@ -225,6 +230,9 @@ '= override))) (t (smie-set-prec2tab prec2 (car rhs) (cadr rhs) '= override))) (setq rhs (cdr rhs))))) + ;; Keep track of which tokens are openers/closer, so they can get a nil + ;; precedence in smie-prec2-levels. + (puthash :smie-open/close-alist (smie-bnf-classify bnf) prec2) prec2)) ;; (defun smie-prec2-closer-alist (prec2 include-inners) @@ -307,6 +315,33 @@ (pushnew (cons (car rhs) term) alist :test #'equal))))))) (nreverse alist))) +(defun smie-bnf-classify (bnf) + "Return a table classifying terminals. +Each terminal can either be an `opener', a `closer', or neither." + (let ((table (make-hash-table :test #'equal)) + (alist '())) + (dolist (category bnf) + (puthash (car category) 'neither table) ;Remove non-terminals. + (dolist (rhs (cdr category)) + (if (null (cdr rhs)) + (puthash (pop rhs) 'neither table) + (let ((first (pop rhs))) + (puthash first + (if (memq (gethash first table) '(nil opener)) + 'opener 'neither) + table)) + (while (cdr rhs) + (puthash (pop rhs) 'neither table)) ;Remove internals. + (let ((last (pop rhs))) + (puthash last + (if (memq (gethash last table) '(nil closer)) + 'closer 'neither) + table))))) + (maphash (lambda (tok v) + (when (memq v '(closer opener)) + (push (cons tok v) alist))) + table) + alist)) (defun smie-debug--prec2-cycle (csts) "Return a cycle in CSTS, assuming there's one. @@ -345,11 +380,6 @@ (defun smie-prec2-levels (prec2) ;; FIXME: Rather than only return an alist of precedence levels, we should ;; also extract other useful data from it: - ;; - matching sets of block openers&closers (which can otherwise become - ;; collapsed into a single equivalence class in smie-op-levels) for - ;; smie-close-block as well as to detect mismatches in smie-next-sexp - ;; or in blink-paren (as well as to do the blink-paren for inner - ;; keywords like the "in" of "let..in..end"). ;; - better default indentation rules (i.e. non-zero indentation after inner ;; keywords like the "in" of "let..in..end") for smie-indent-after-keyword. ;; Of course, maybe those things would be even better handled in the @@ -369,18 +399,19 @@ ;; variables (aka "precedence levels"). These can be either ;; equality constraints (in `eqs') or `<' constraints (in `csts'). (maphash (lambda (k v) - (if (setq tmp (assoc (car k) table)) - (setq x (cddr tmp)) - (setq x (cons nil nil)) - (push (cons (car k) (cons nil x)) table)) - (if (setq tmp (assoc (cdr k) table)) - (setq y (cdr tmp)) - (setq y (cons nil (cons nil nil))) - (push (cons (cdr k) y) table)) - (ecase v - (= (push (cons x y) eqs)) - (< (push (cons x y) csts)) - (> (push (cons y x) csts)))) + (when (consp k) + (if (setq tmp (assoc (car k) table)) + (setq x (cddr tmp)) + (setq x (cons nil nil)) + (push (cons (car k) (cons nil x)) table)) + (if (setq tmp (assoc (cdr k) table)) + (setq y (cdr tmp)) + (setq y (cons nil (cons nil nil))) + (push (cons (cdr k) y) table)) + (ecase v + (= (push (cons x y) eqs)) + (< (push (cons x y) csts)) + (> (push (cons y x) csts))))) prec2) ;; First process the equality constraints. (let ((eqs eqs)) @@ -432,16 +463,22 @@ (setcar (car eq) (cadr eq))) ;; Finally, fill in the remaining vars (which only appeared on the ;; right side of the < constraints). - (dolist (x table) - ;; When both sides are nil, it means this operator binds very - ;; very tight, but it's still just an operator, so we give it - ;; the highest precedence. - ;; OTOH if only one side is nil, it usually means it's like an - ;; open-paren, which is very important for indentation purposes, - ;; so we keep it nil, to make it easier to recognize. - (unless (or (nth 1 x) (nth 2 x)) - (setf (nth 1 x) i) - (setf (nth 2 x) i)))) + (let ((classification-table (gethash :smie-open/close-alist prec2))) + (dolist (x table) + ;; When both sides are nil, it means this operator binds very + ;; very tight, but it's still just an operator, so we give it + ;; the highest precedence. + ;; OTOH if only one side is nil, it usually means it's like an + ;; open-paren, which is very important for indentation purposes, + ;; so we keep it nil if so, to make it easier to recognize. + (unless (or (nth 1 x) + (eq 'opener (cdr (assoc (car x) classification-table)))) + (setf (nth 1 x) i) + (incf i)) ;See other (incf i) above. + (unless (or (nth 2 x) + (eq 'closer (cdr (assoc (car x) classification-table)))) + (setf (nth 2 x) i) + (incf i))))) ;See other (incf i) above. table)) ;;; Parsing using a precedence level table. === modified file 'lisp/progmodes/octave-mod.el' --- lisp/progmodes/octave-mod.el 2010-09-10 23:13:42 +0000 +++ lisp/progmodes/octave-mod.el 2010-10-07 11:27:19 +0000 @@ -456,10 +456,7 @@ octave-smie-bnf-table '((assoc "\n" ";"))) - (smie-precs-precedence-table - (append octave-operator-table - '((nonassoc " -dummy- "))) ;Bogus anchor at the end. - )))) + (smie-precs-precedence-table octave-operator-table)))) ;; Tokenizing needs to be refined so that ";;" is treated as two ;; tokens and also so as to recognize the \n separator (and ------------------------------------------------------------ revno: 101829 committer: Miles Bader branch nick: trunk timestamp: Thu 2010-10-07 16:24:21 +0900 message: (regexp-opt): Add `symbols' mode. diff: === modified file 'doc/lispref/searching.texi' --- doc/lispref/searching.texi 2010-06-23 03:36:56 +0000 +++ doc/lispref/searching.texi 2010-10-07 07:24:21 +0000 @@ -918,7 +918,11 @@ If the optional argument @var{paren} is non-@code{nil}, then the returned regular expression is always enclosed by at least one parentheses-grouping construct. If @var{paren} is @code{words}, then -that construct is additionally surrounded by @samp{\<} and @samp{\>}. +that construct is additionally surrounded by @samp{\<} and @samp{\>}; +alternatively, if @var{paren} is @code{symbols}, then that construct +is additionally surrounded by @samp{\_<} and @samp{\_>} +(@code{symbols} is often appropriate when matching +programming-language keywords and the like). This simplified definition of @code{regexp-opt} produces a regular expression which is equivalent to the actual value === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-07 02:42:30 +0000 +++ lisp/ChangeLog 2010-10-07 07:24:21 +0000 @@ -1,3 +1,7 @@ +2010-10-07 Miles Bader > + + * emacs-lisp/regexp-opt.el (regexp-opt): Add `symbols' mode. + 2010-10-07 Glenn Morris * mail/rmail.el (mail-sendmail-delimit-header, mail-header-end) === modified file 'lisp/emacs-lisp/regexp-opt.el' --- lisp/emacs-lisp/regexp-opt.el 2010-09-10 23:13:42 +0000 +++ lisp/emacs-lisp/regexp-opt.el 2010-10-07 07:24:21 +0000 @@ -96,19 +96,24 @@ (concat open (mapconcat 'regexp-quote STRINGS \"\\\\|\") close)) If PAREN is `words', then the resulting regexp is additionally surrounded -by \\=\\< and \\>." +by \\=\\< and \\>. +If PAREN is `symbols', then the resulting regexp is additionally surrounded +by \\=\\_< and \\_>." (save-match-data ;; Recurse on the sorted list. (let* ((max-lisp-eval-depth 10000) (max-specpdl-size 10000) (completion-ignore-case nil) (completion-regexp-list nil) - (words (eq paren 'words)) (open (cond ((stringp paren) paren) (paren "\\("))) (sorted-strings (delete-dups (sort (copy-sequence strings) 'string-lessp))) (re (regexp-opt-group sorted-strings (or open t) (not open)))) - (if words (concat "\\<" re "\\>") re)))) + (cond ((eq paren 'words) + (concat "\\<" re "\\>")) + ((eq paren 'symbols) + (concat "\\_<" re "\\_>")) + (t re))))) ;;;###autoload (defun regexp-opt-depth (regexp) ------------------------------------------------------------ revno: 101828 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-07 06:47:37 +0000 message: [Gnus] Enable XEmacs to display images. gnus-html.el (gnus-html-schedule-image-fetching): Remove function name from XEmacs' function-arglist. gnus-gravatar.el (gnus-gravatar-insert): Don't add properties to gravatar under XEmacs. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-07 03:49:38 +0000 +++ lisp/gnus/ChangeLog 2010-10-07 06:47:37 +0000 @@ -1,3 +1,11 @@ +2010-10-07 Katsumi Yamaoka + + * gnus-html.el (gnus-html-schedule-image-fetching): Remove function + name from XEmacs' function-arglist. + + * gnus-gravatar.el (gnus-gravatar-insert): Don't add properties to + gravatar under XEmacs. + 2010-10-07 Teodor Zlatanov * auth-source.el: Update docs with TODO items. === modified file 'lisp/gnus/gnus-gravatar.el' --- lisp/gnus/gnus-gravatar.el 2010-10-03 00:33:27 +0000 +++ lisp/gnus/gnus-gravatar.el 2010-10-07 06:47:37 +0000 @@ -84,10 +84,9 @@ ;; another mail with the same someaddress. (unless (memq 'gnus-gravatar (text-properties-at (point))) (let ((inhibit-read-only t) - (point (point)) - (gravatar (append - gravatar - gnus-gravatar-properties))) + (point (point))) + (unless (featurep 'xemacs) + (setq gravatar (append gravatar gnus-gravatar-properties))) (gnus-put-image gravatar nil category) (put-text-property point (point) 'gnus-gravatar address) (gnus-add-wash-type category) === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2010-10-05 22:43:06 +0000 +++ lisp/gnus/gnus-html.el 2010-10-07 06:47:37 +0000 @@ -361,7 +361,7 @@ 'gnus-html-image-fetched (list buffer image)))) (when (> (length (if (featurep 'xemacs) - (split-string (function-arglist 'url-retrieve)) + (cdr (split-string (function-arglist 'url-retrieve))) (help-function-arglist 'url-retrieve))) 4) (setq args (nconc args (list t))))