Now on revision 105806. ------------------------------------------------------------ revno: 105806 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2011-09-17 14:19:04 +0200 message: Fix typos. diff: === modified file 'lisp/org/ChangeLog' --- lisp/org/ChangeLog 2011-09-02 16:38:40 +0000 +++ lisp/org/ChangeLog 2011-09-17 12:19:04 +0000 @@ -1,3 +1,7 @@ +2011-09-17 Juanma Barranquero + + * org.el (org-toggle-pretty-entities): Fix typo in message. + 2011-09-02 Chong Yidong * org-compat.el (org-pop-to-buffer-same-window): Deleted. === modified file 'lisp/org/org.el' --- lisp/org/org.el 2011-09-02 16:38:40 +0000 +++ lisp/org/org.el 2011-09-17 12:19:04 +0000 @@ -5660,7 +5660,7 @@ (org-set-local 'org-pretty-entities (not org-pretty-entities)) (org-restart-font-lock) (if org-pretty-entities - (message "Entities are displayed as UTF8 characers") + (message "Entities are displayed as UTF8 characters") (save-restriction (widen) (org-decompose-region (point-min) (point-max)) === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2011-09-07 07:16:40 +0000 +++ lisp/progmodes/cc-fonts.el 2011-09-17 12:19:04 +0000 @@ -290,7 +290,7 @@ res)))) (defun c-make-font-lock-search-form (regexp highlights) - ;; Return a lisp form which will fontify every occurence of REGEXP + ;; Return a lisp form which will fontify every occurrence of REGEXP ;; (a regular expression, NOT a function) between POINT and `limit' ;; with HIGHLIGHTS, a list of highlighters as specified on page ;; "Search-based Fontification" in the elisp manual. === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-17 08:09:45 +0000 +++ src/ChangeLog 2011-09-17 12:19:04 +0000 @@ -1303,7 +1303,7 @@ underline, overline, and strike-through. (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to ns_draw_text_decoration. Change treatment of cursor drawing to - accomomdate underlining, etc. + accommodate underlining, etc. 2011-07-28 Eli Zaretskii === modified file 'src/xmenu.c' --- src/xmenu.c 2011-09-09 01:06:52 +0000 +++ src/xmenu.c 2011-09-17 12:19:04 +0000 @@ -742,7 +742,7 @@ /* If popup_activated_flag is greater than 1 we are in a popup menu. Don't pass the frame to show_help_event for those. Passing frame creates an Emacs event. As we are looping in - popup_widget_loop, it won't be handeled. Passing NULL shows the tip + popup_widget_loop, it won't be handled. Passing NULL shows the tip directly without using an Emacs event. This is what the Lucid code does below. */ show_help_event (popup_activated_flag <= 1 ? cb_data->cl_data->f : NULL, ------------------------------------------------------------ revno: 105805 fixes bug(s): http://debbugs.gnu.org/9121 committer: Juri Linkov branch nick: trunk timestamp: Sat 2011-09-17 15:07:50 +0300 message: * lisp/textmodes/ispell.el (ispell-word): Add to the error message the word, ispell program name and current dictionary. (ispell-tex-arg-end): Capitalize "error" in the error message. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-17 09:29:01 +0000 +++ lisp/ChangeLog 2011-09-17 12:07:50 +0000 @@ -1,3 +1,9 @@ +2011-09-17 Juri Linkov + + * textmodes/ispell.el (ispell-word): Add to the error message + the word, ispell program name and current dictionary (bug#9121). + (ispell-tex-arg-end): Capitalize "error" in the error message. + 2011-09-17 Andreas Schwab * emacs-lisp/bytecomp.el (byte-compile-lapcode): Fix overflow === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2011-08-25 19:54:07 +0000 +++ lisp/textmodes/ispell.el 2011-09-17 12:07:50 +0000 @@ -1723,7 +1723,11 @@ (extent-at start) (and (fboundp 'delete-extent) (delete-extent (extent-at start))))) - ((null poss) (message "Error in ispell process")) + ((null poss) + (message "Error checking word %s using %s with %s dictionary" + (funcall ispell-format-word-function word) + (file-name-nondirectory ispell-program-name) + (or ispell-current-dictionary "default"))) (ispell-check-only ; called from ispell minor mode. (if (fboundp 'make-extent) (if (fboundp 'set-extent-property) @@ -3034,7 +3038,7 @@ (while (looking-at "[ \t\n]*\\[") (forward-sexp)) (forward-sexp (or arg 1))) (error - (message "error skipping s-expressions at point %d." (point)) + (message "Error skipping s-expressions at point %d." (point)) (beep) (sit-for 2)))) ------------------------------------------------------------ revno: 105804 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2011-09-17 12:02:10 +0000 message: mm-decode.el (mm-inline-media-tests): Support imagemagick images. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-15 05:46:40 +0000 +++ lisp/gnus/ChangeLog 2011-09-17 12:02:10 +0000 @@ -1,3 +1,7 @@ +2011-09-17 Lars Magne Ingebrigtsen + + * mm-decode.el (mm-inline-media-tests): Support imagemagick images. + 2011-09-15 Lars Magne Ingebrigtsen * gnus-sum.el (gnus-summary-read-group-1): Bump the "Retrieving" === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2011-08-04 00:58:07 +0000 +++ lisp/gnus/mm-decode.el 2011-09-17 12:02:10 +0000 @@ -195,7 +195,7 @@ ("image/tiff" mm-inline-image (lambda (handle) - (mm-valid-and-fit-image-p 'tiff handle)) ) + (mm-valid-and-fit-image-p 'tiff handle))) ("image/xbm" mm-inline-image (lambda (handle) @@ -265,6 +265,20 @@ ("multipart/alternative" ignore identity) ("multipart/mixed" ignore identity) ("multipart/related" ignore identity) + ("image/*" + mm-inline-image + (lambda (handle) + (and (mm-valid-image-format-p 'imagemagick) + (mm-with-unibyte-buffer + (mm-insert-part handle) + (let ((image + (ignore-errors + (if (fboundp 'create-image) + (create-image (buffer-string) 'imagemagick 'data-p) + (mm-create-image-xemacs type))))) + (when image + (setcar (cdr handle) (list "image/imagemagick")) + (mm-image-fit-p handle))))))) ;; Disable audio and image ("audio/.*" ignore ignore) ("image/.*" ignore ignore) ------------------------------------------------------------ revno: 105803 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2011-09-17 11:29:01 +0200 message: * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Fix overflow check. (Bug#4251) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-17 00:46:59 +0000 +++ lisp/ChangeLog 2011-09-17 09:29:01 +0000 @@ -1,3 +1,8 @@ +2011-09-17 Andreas Schwab + + * emacs-lisp/bytecomp.el (byte-compile-lapcode): Fix overflow + check. (Bug#4251) + 2011-09-17 Juri Linkov * window.el (window-safe-min-height, window-safe-min-width): === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2011-07-13 22:00:48 +0000 +++ lisp/emacs-lisp/bytecomp.el 2011-09-17 09:29:01 +0000 @@ -834,7 +834,7 @@ (setcar (cdr bytes-tail) (logand pc 255)) (setcar bytes-tail (lsh pc -8)) ;; FIXME: Replace this by some workaround. - (if (> (car bytes) 255) (error "Bytecode overflow"))) + (if (> (car bytes-tail) 255) (error "Bytecode overflow"))) (apply 'unibyte-string (nreverse bytes)))) ------------------------------------------------------------ revno: 105802 fixes bug(s): http://debbugs.gnu.org/9525 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-09-17 11:18:48 +0300 message: Fix bug #9525 with indexing most-positive/negative-fixnum. doc/lispref/numbers.texi (Integer Basics): Add indexing for most-positive-fixnum and most-negative-fixnum. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-09-14 06:52:54 +0000 +++ doc/lispref/ChangeLog 2011-09-17 08:18:48 +0000 @@ -1,3 +1,8 @@ +2011-09-17 Eli Zaretskii + + * numbers.texi (Integer Basics): Add indexing for + most-positive-fixnum and most-negative-fixnum. (Bug#9525) + 2011-09-14 Dani Moncayo (tiny change) * lists.texi (Sets And Lists): Fix typo. (Bug#9393) === modified file 'doc/lispref/numbers.texi' --- doc/lispref/numbers.texi 2011-06-06 19:43:39 +0000 +++ doc/lispref/numbers.texi 2011-09-17 08:18:48 +0000 @@ -148,11 +148,15 @@ give these arguments the name @var{number-or-marker}. When the argument value is a marker, its position value is used and its buffer is ignored. +@cindex largest Lisp integer number +@cindex maximum Lisp integer number @defvar most-positive-fixnum The value of this variable is the largest integer that Emacs Lisp can handle. @end defvar +@cindex smallest Lisp integer number +@cindex minimum Lisp integer number @defvar most-negative-fixnum The value of this variable is the smallest integer that Emacs Lisp can handle. It is negative. ------------------------------------------------------------ revno: 105801 fixes bug(s): http://debbugs.gnu.org/9524 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-09-17 11:09:45 +0300 message: Fix bug #9524 with cursor positioning on display strings in truncated lines. src/xdisp.c (set_cursor_from_row): Don't invoke special treatment of truncated lines if point is covered by a display string. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-17 00:42:13 +0000 +++ src/ChangeLog 2011-09-17 08:09:45 +0000 @@ -1,3 +1,8 @@ +2011-09-17 Eli Zaretskii + + * xdisp.c (set_cursor_from_row): Don't invoke special treatment of + truncated lines if point is covered by a display string. (Bug#9524) + 2011-09-16 Paul Eggert * xselect.c: Relax test for outgoing X longs (Bug#9498). === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-15 17:37:16 +0000 +++ src/xdisp.c 2011-09-17 08:09:45 +0000 @@ -13637,15 +13637,17 @@ /* A truncated row may not include PT among its character positions. Setting the cursor inside the scroll margin will trigger recalculation of hscroll - in hscroll_window_tree. */ - || (row->truncated_on_left_p && pt_old < bpos_min) - || (row->truncated_on_right_p && pt_old > bpos_max) - /* Zero-width characters produce no glyphs. */ + in hscroll_window_tree. But if a display string + covers point, defer to the string-handling code + below to figure this out. */ || (!string_seen - && !empty_line_p - && (row->reversed_p - ? glyph_after > glyphs_end - : glyph_after < glyphs_end))) + && ((row->truncated_on_left_p && pt_old < bpos_min) + || (row->truncated_on_right_p && pt_old > bpos_max) + /* Zero-width characters produce no glyphs. */ + || (!empty_line_p + && (row->reversed_p + ? glyph_after > glyphs_end + : glyph_after < glyphs_end))))) { cursor = glyph_after; x = -1; ------------------------------------------------------------ revno: 105800 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sat 2011-09-17 06:53:25 +0200 message: Indent. diff: === modified file 'lisp/gnus/mm-view.el' --- lisp/gnus/mm-view.el 2011-04-01 14:24:22 +0000 +++ lisp/gnus/mm-view.el 2011-09-17 04:53:25 +0000 @@ -90,13 +90,14 @@ (put-image (let ((image (mm-get-image handle))) (if (eq mm-inline-large-images 'resize) - (gnus-rescale-image image - (let ((edges (gnus-window-inside-pixel-edges - (get-buffer-window (current-buffer))))) - (cons (truncate (* mm-inline-large-images-proportion - (- (nth 2 edges) (nth 0 edges)))) - (truncate (* mm-inline-large-images-proportion - (- (nth 3 edges) (nth 1 edges))))))) + (gnus-rescale-image + image + (let ((edges (gnus-window-inside-pixel-edges + (get-buffer-window (current-buffer))))) + (cons (truncate (* mm-inline-large-images-proportion + (- (nth 2 edges) (nth 0 edges)))) + (truncate (* mm-inline-large-images-proportion + (- (nth 3 edges) (nth 1 edges))))))) image)) b) (insert "\n\n") ------------------------------------------------------------ revno: 105799 fixes bug(s): http://debbugs.gnu.org/9522 author: Juri Linkov committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2011-09-17 02:46:59 +0200 message: lisp/window.el (window-safe-min-height, window-safe-min-width): Fix typos. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-17 00:42:13 +0000 +++ lisp/ChangeLog 2011-09-17 00:46:59 +0000 @@ -1,3 +1,8 @@ +2011-09-17 Juri Linkov + + * window.el (window-safe-min-height, window-safe-min-width): + Fix typos (followup to bug#9522). + 2011-09-17 Sven Joachim * window.el (window-min-width, window-state-put): Fix typos (bug#9522). === modified file 'lisp/window.el' --- lisp/window.el 2011-09-17 00:42:13 +0000 +++ lisp/window.el 2011-09-17 00:46:59 +0000 @@ -158,7 +158,7 @@ these functions to inhibit processing of window parameters.") (defconst window-safe-min-height 1 - "The absolut minimum number of lines of a window. + "The absolute minimum number of lines of a window. Anything less might crash Emacs.") (defcustom window-min-height 4 @@ -177,7 +177,7 @@ :group 'windows) (defconst window-safe-min-width 2 - "The absolut minimum number of columns of a window. + "The absolute minimum number of columns of a window. Anything less might crash Emacs.") (defcustom window-min-width 10 ------------------------------------------------------------ revno: 105798 fixes bug(s): http://debbugs.gnu.org/9522 author: Sven Joachim , Paul Eggert committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2011-09-17 02:42:13 +0200 message: lisp/window.el (window-min-width, window-state-put): Fix typos (bug#9522). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-16 17:15:16 +0000 +++ lisp/ChangeLog 2011-09-17 00:42:13 +0000 @@ -1,3 +1,7 @@ +2011-09-17 Sven Joachim + + * window.el (window-min-width, window-state-put): Fix typos (bug#9522). + 2011-09-16 Eli Zaretskii * simple.el (line-move): If goal-column is set, move by logical === modified file 'lisp/window.el' --- lisp/window.el 2011-09-15 15:12:15 +0000 +++ lisp/window.el 2011-09-17 00:42:13 +0000 @@ -182,7 +182,7 @@ (defcustom window-min-width 10 "The minimum number of columns of any window. -The value has to accomodate margins, fringes, or scrollbars if +The value has to accommodate margins, fringes, or scrollbars if present. A value less than `window-safe-min-width' is ignored. The value of this variable is honored when windows are resized or split. @@ -3772,7 +3772,7 @@ ;; issues - so IGNORE equal 'safe might not always produce the ;; minimum possible state. But such configurations hardly make ;; sense anyway. - (error "Window %s too small to accomodate state" window) + (error "Window %s too small to accommodate state" window) (setq state (cdr state)) (setq window-state-put-list nil) ;; Work on the windows of a temporary buffer to make sure that === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-16 17:49:29 +0000 +++ src/ChangeLog 2011-09-17 00:42:13 +0000 @@ -1298,7 +1298,7 @@ underline, overline, and strike-through. (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to ns_draw_text_decoration. Change treatment of cursor drawing to - accomodate underlining, etc. + accomomdate underlining, etc. 2011-07-28 Eli Zaretskii ------------------------------------------------------------ revno: 105797 committer: Paul Eggert branch nick: trunk timestamp: Fri 2011-09-16 12:49:18 -0700 message: Remove inadvertent x permissions from 4 images. diff: === modified file 'etc/images/icons/allout-widgets/light-bg/leaf.png' (properties changed: +x to -x) === modified file 'etc/images/icons/allout-widgets/light-bg/leaf.xpm' (properties changed: +x to -x) === modified file 'etc/images/icons/allout-widgets/light-bg/locked-encrypted.png' (properties changed: +x to -x) === modified file 'etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.png' (properties changed: +x to -x) ------------------------------------------------------------ revno: 105796 fixes bug(s): http://debbugs.gnu.org/9498 committer: Paul Eggert branch nick: trunk timestamp: Fri 2011-09-16 10:49:29 -0700 message: * xselect.c: Relax test for outgoing X longs (Bug#9498). (cons_to_x_long): New function. (lisp_data_to_selection_data): Use it. Correct the test for short-versus-long data; it was negated. Break out of vector loop, for efficiency, when a long datum is discovered. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-16 14:14:48 +0000 +++ src/ChangeLog 2011-09-16 17:49:29 +0000 @@ -1,3 +1,11 @@ +2011-09-16 Paul Eggert + + * xselect.c: Relax test for outgoing X longs (Bug#9498). + (cons_to_x_long): New function. + (lisp_data_to_selection_data): Use it. Correct the test for + short-versus-long data; it was negated. Break out of vector + loop, for efficiency, when a long datum is discovered. + 2011-09-16 Stefan Monnier * eval.c (Fquote): Document its non-consing behavior (bug#9482). === modified file 'src/xselect.c' --- src/xselect.c 2011-09-14 15:47:21 +0000 +++ src/xselect.c 2011-09-16 17:49:29 +0000 @@ -116,6 +116,7 @@ #define X_SHRT_MIN (-1 - X_SHRT_MAX) #define X_LONG_MAX 0x7fffffff #define X_LONG_MIN (-1 - X_LONG_MAX) +#define X_ULONG_MAX 0xffffffffUL /* If this is a smaller number than the max-request-size of the display, emacs will use INCR selection transfer when the selection is larger @@ -378,7 +379,8 @@ /* Given a selection-name and desired type, look up our local copy of the selection value and convert it to the type. - The value is nil or a string. + Return nil, a string, a vector, a symbol, an integer, or a cons + that CONS_TO_INTEGER could plausibly handle. This function is used both for remote requests (LOCAL_REQUEST is zero) and for local x-get-selection-internal (LOCAL_REQUEST is nonzero). @@ -1718,6 +1720,21 @@ } } +/* Convert OBJ to an X long value, and return it as unsigned long. + OBJ should be an integer or a cons representing an integer. + Treat values in the range X_LONG_MAX + 1 .. X_ULONG_MAX as X + unsigned long values: in theory these values are supposed to be + signed but in practice unsigned 32-bit data are communicated via X + selections and we need to support that. */ +static unsigned long +cons_to_x_long (Lisp_Object obj) +{ + if (X_ULONG_MAX <= INTMAX_MAX + || XINT (INTEGERP (obj) ? obj : XCAR (obj)) < 0) + return cons_to_signed (obj, X_LONG_MIN, min (X_ULONG_MAX, INTMAX_MAX)); + else + return cons_to_unsigned (obj, X_ULONG_MAX); +} /* Use xfree, not XFree, to free the data obtained with this function. */ @@ -1783,11 +1800,11 @@ || (CONSP (XCDR (obj)) && INTEGERP (XCAR (XCDR (obj))))))) { - *data_ret = (unsigned char *) xmalloc (sizeof (long) + 1); + *data_ret = (unsigned char *) xmalloc (sizeof (unsigned long) + 1); *format_ret = 32; *size_ret = 1; - (*data_ret) [sizeof (long)] = 0; - (*(long **) data_ret) [0] = cons_to_signed (obj, X_LONG_MIN, X_LONG_MAX); + (*data_ret) [sizeof (unsigned long)] = 0; + (*(unsigned long **) data_ret) [0] = cons_to_x_long (obj); if (NILP (type)) type = QINTEGER; } else if (VECTORP (obj)) @@ -1822,15 +1839,15 @@ if (NILP (type)) type = QINTEGER; for (i = 0; i < size; i++) { - intmax_t v = cons_to_signed (XVECTOR (obj)->contents[i], - X_LONG_MIN, X_LONG_MAX); - if (X_SHRT_MIN <= v && v <= X_SHRT_MAX) + if (! RANGED_INTEGERP (X_SHRT_MIN, XVECTOR (obj)->contents[i], + X_SHRT_MAX)) { /* Use sizeof (long) even if it is more than 32 bits. See comment in x_get_window_property and x_fill_property_data. */ data_size = sizeof (long); format = 32; + break; } } *data_ret = xnmalloc (size, data_size); @@ -1838,12 +1855,12 @@ *size_ret = size; for (i = 0; i < size; i++) { - long v = cons_to_signed (XVECTOR (obj)->contents[i], - X_LONG_MIN, X_LONG_MAX); if (format == 32) - (*((long **) data_ret)) [i] = v; + (*((unsigned long **) data_ret)) [i] = + cons_to_x_long (XVECTOR (obj)->contents[i]); else - (*((short **) data_ret)) [i] = v; + (*((short **) data_ret)) [i] = + XINT (XVECTOR (obj)->contents[i]); } } } ------------------------------------------------------------ revno: 105795 fixes bug(s): http://debbugs.gnu.org/971 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-09-16 20:15:16 +0300 message: Fix bug #971 with next/previous-line when goal-column is set. lisp/simple.el (line-move): If goal-column is set, move by logical lines, not by display lines. (next-line, previous-line, goal-column, line-move-visual): Doc fix to reflect the above change. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-16 13:46:42 +0000 +++ lisp/ChangeLog 2011-09-16 17:15:16 +0000 @@ -1,3 +1,10 @@ +2011-09-16 Eli Zaretskii + + * simple.el (line-move): If goal-column is set, move by logical + lines, not by display lines. (Bug#971) + (next-line, previous-line, goal-column, line-move-visual): Doc fix + to reflect the above change. + 2011-09-16 Stefan Monnier * image.el (imagemagick-register-types): Use regexp-opt. === modified file 'lisp/simple.el' --- lisp/simple.el 2011-09-10 03:02:06 +0000 +++ lisp/simple.el 2011-09-16 17:15:16 +0000 @@ -4134,7 +4134,9 @@ Then instead of trying to move exactly vertically (or as close as possible), this command moves to the specified goal column (or as close as possible). The goal column is stored in the variable `goal-column', which is nil -when there is no goal column. +when there is no goal column. Note that setting `goal-column' +overrides `line-move-visual' and causes this command to move by buffer +lines rather than by display lines. If you are thinking of using this in a Lisp program, consider using `forward-line' instead. It is usually easier to use @@ -4172,7 +4174,9 @@ Then instead of trying to move exactly vertically (or as close as possible), this command moves to the specified goal column (or as close as possible). The goal column is stored in the variable `goal-column', which is nil -when there is no goal column. +when there is no goal column. Note that setting `goal-column' +overrides `line-move-visual' and causes this command to move by buffer +lines rather than by display lines. If you are thinking of using this in a Lisp program, consider using `forward-line' with a negative argument instead. It is usually easier @@ -4196,7 +4200,8 @@ :group 'editing-basics) (defcustom goal-column nil - "Semipermanent goal column for vertical motion, as set by \\[set-goal-column], or nil." + "Semipermanent goal column for vertical motion, as set by \\[set-goal-column], or nil. +A non-nil setting overrides `line-move-visual', which see." :type '(choice integer (const :tag "None" nil)) :group 'editing-basics) @@ -4226,7 +4231,9 @@ This movement is based on where the cursor is displayed on the screen, instead of relying on buffer contents alone. It takes into account variable-width characters and line continuation. -If nil, `line-move' moves point by logical lines." +If nil, `line-move' moves point by logical lines. +A non-nil setting of `goal-column' overrides the value of this variable +and forces movement by logical lines." :type 'boolean :group 'editing-basics :version "23.1") @@ -4303,7 +4310,7 @@ (not executing-kbd-macro) (line-move-partial arg noerror to-end)) (set-window-vscroll nil 0 t) - (if line-move-visual + (if (and line-move-visual (not goal-column)) (line-move-visual arg noerror) (line-move-1 arg noerror to-end)))) ------------------------------------------------------------ revno: 105794 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9482 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-09-16 10:14:48 -0400 message: * src/eval.c (Fquote): Document its non-consing behavior. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-16 10:25:39 +0000 +++ src/ChangeLog 2011-09-16 14:14:48 +0000 @@ -1,3 +1,7 @@ +2011-09-16 Stefan Monnier + + * eval.c (Fquote): Document its non-consing behavior (bug#9482). + 2011-09-16 Eli Zaretskii * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see === modified file 'src/eval.c' --- src/eval.c 2011-09-09 01:06:52 +0000 +++ src/eval.c 2011-09-16 14:14:48 +0000 @@ -475,6 +475,14 @@ DEFUN ("quote", Fquote, Squote, 1, UNEVALLED, 0, doc: /* Return the argument, without evaluating it. `(quote x)' yields `x'. +Warning: `quote' does not construct its return value, but just returns +the value that was pre-constructed by the Lisp reader (see info node +`(elisp)Printed Representation'). +This means that '(a . b) is not identical to (cons 'a 'b): the former +does not cons. Quoting should be reserved for constants that will +never be modified by side-effects, unless you like self-modifying code. +See the common pitfall in info node `(elisp)Rearrangement' for an example +of unexpected results when a quoted object is modified. usage: (quote ARG) */) (Lisp_Object args) { ------------------------------------------------------------ revno: 105793 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-09-16 09:46:42 -0400 message: * lisp/image.el (imagemagick-register-types): Use regexp-opt. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-15 15:12:15 +0000 +++ lisp/ChangeLog 2011-09-16 13:46:42 +0000 @@ -1,3 +1,7 @@ +2011-09-16 Stefan Monnier + + * image.el (imagemagick-register-types): Use regexp-opt. + 2011-09-15 Chong Yidong * window.el (display-buffer-base-action): Rename from @@ -13,8 +17,8 @@ with an older version, remove it. (package-menu-mark-delete, package-menu-mark-install) (package-menu-mark-unmark): Make unused args optional. - (package-menu-mark-obsolete-for-deletion): Use - package-menu-get-status instead of a regexp search. + (package-menu-mark-obsolete-for-deletion): + Use package-menu-get-status instead of a regexp search. (package-menu-get-status): Use tabulated-list-entry. (package-menu-mark-upgrades): New command. (package-menu-mode-map): Bind it to U. Add it to menu bar. @@ -296,7 +300,8 @@ 2011-09-10 Reuben Thomas - * simple.el (count-words-region): Use buffer if there's no region. + * simple.el (count-words-region): Use buffer if there's no region + (bug#9429). 2011-09-09 Juri Linkov === modified file 'lisp/image.el' --- lisp/image.el 2011-07-25 01:44:10 +0000 +++ lisp/image.el 2011-09-16 13:46:42 +0000 @@ -695,16 +695,14 @@ If Emacs is compiled without ImageMagick support, do nothing." (when (fboundp 'imagemagick-types) - (let ((im-types (imagemagick-types))) - (dolist (im-inhibit imagemagick-types-inhibit) - (setq im-types (delq im-inhibit im-types))) - (dolist (im-type im-types) - (let ((extension - (concat "\\." (downcase (symbol-name im-type)) - "\\'"))) - (push (cons extension 'image-mode) auto-mode-alist) - (push (cons extension 'imagemagick) - image-type-file-name-regexps)))))) + (let ((im-types '())) + (dolist (im-type (imagemagick-types)) + (unless (memq im-type imagemagick-types-inhibit) + (push (downcase (symbol-name im-type)) im-types))) + (let ((extension (concat "\\." (regexp-opt im-types) "\\'"))) + (push (cons extension 'image-mode) auto-mode-alist) + (push (cons extension 'imagemagick) + image-type-file-name-regexps))))) (provide 'image) ------------------------------------------------------------ revno: 105792 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-09-16 13:25:39 +0300 message: Fix a compilation error with MinGW GCC 3.x in tiff_handler. src/image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see GCC PR/17406) by declaring this function with external scope. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-15 18:11:37 +0000 +++ src/ChangeLog 2011-09-16 10:25:39 +0000 @@ -1,3 +1,8 @@ +2011-09-16 Eli Zaretskii + + * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see + GCC PR/17406) by declaring this function with external scope. + 2011-09-15 Paul Eggert * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514). === modified file 'src/image.c' --- src/image.c 2011-09-10 18:13:24 +0000 +++ src/image.c 2011-09-16 10:25:39 +0000 @@ -6745,10 +6745,20 @@ return ((tiff_memory_source *) data)->len; } +/* GCC 3.x on x86 Windows targets has a bug that triggers an internal + compiler error compiling tiff_handler, see Bugzilla bug #17406 + (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17406). Declaring + this function as external works around that problem. */ +#if defined (__MINGW32__) && __GNUC__ == 3 +# define MINGW_STATIC +#else +# define MINGW_STATIC static +#endif -static void tiff_handler (const char *, const char *, const char *, va_list) +MINGW_STATIC void +tiff_handler (const char *, const char *, const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (3, 0); -static void +MINGW_STATIC void tiff_handler (const char *log_format, const char *title, const char *format, va_list ap) { @@ -6762,6 +6772,7 @@ add_to_log (log_format, build_string (title), make_string (buf, max (0, min (len, sizeof buf - 1)))); } +#undef MINGW_STATIC static void tiff_error_handler (const char *, const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (2, 0); ------------------------------------------------------------ revno: 105791 committer: Paul Eggert branch nick: trunk timestamp: Thu 2011-09-15 11:11:37 -0700 message: * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514). Don't mishandle (length (format "%%")) and (format "%4000s%%" ""). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-15 17:41:25 +0000 +++ src/ChangeLog 2011-09-15 18:11:37 +0000 @@ -1,3 +1,8 @@ +2011-09-15 Paul Eggert + + * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514). + Don't mishandle (length (format "%%")) and (format "%4000s%%" ""). + 2011-09-15 Andreas Schwab * editfns.c (Fformat): Correctly handle text properties on "%%". === modified file 'src/editfns.c' --- src/editfns.c 2011-09-15 16:56:07 +0000 +++ src/editfns.c 2011-09-15 18:11:37 +0000 @@ -3721,11 +3721,7 @@ memset (&discarded[format0 - format_start], 1, format - format0); conversion = *format; if (conversion == '%') - { - format0++; - nchars++; - goto copy_char; - } + goto copy_char; discarded[format - format_start] = 1; format++; @@ -4142,7 +4138,7 @@ while (! CHAR_HEAD_P (*format)); convbytes = format - src; - memset (&discarded[format0 + 1 - format_start], 2, convbytes - 1); + memset (&discarded[src + 1 - format_start], 2, convbytes - 1); } else { ------------------------------------------------------------ revno: 105790 committer: Paul Eggert branch nick: trunk timestamp: Thu 2011-09-15 10:41:25 -0700 message: Fix my ChangeLog entry. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-15 16:56:07 +0000 +++ src/ChangeLog 2011-09-15 17:41:25 +0000 @@ -15,8 +15,8 @@ 2011-09-15 Paul Eggert * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514). - This occurs when processing a multibyte format, which can happen - when using 'eval'. Problem reported by Wolfgang Jenker. + This occurs when processing a multibyte format. + Problem reported by Wolfgang Jenker. 2011-09-15 Johan Bockgård ------------------------------------------------------------ revno: 105789 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-09-15 20:37:16 +0300 message: Fix a typo in comment from revno 105784. diff: === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-15 16:02:49 +0000 +++ src/xdisp.c 2011-09-15 17:37:16 +0000 @@ -6441,6 +6441,8 @@ c = ' '; for (i = 0; i < cmp->glyph_len; i++) + /* TAB in a composition means display glyphs with + padding space on the left or right. */ if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') break; } @@ -11916,7 +11918,7 @@ } hscroll = max (hscroll, XFASTINT (w->min_hscroll)); - /* Don't will prevent redisplay optimizations if hscroll + /* Don't prevent redisplay optimizations if hscroll hasn't changed, as it will unnecessarily slow down redisplay. */ if (XFASTINT (w->hscroll) != hscroll) @@ -21726,6 +21728,8 @@ { int c = COMPOSITION_GLYPH (s->cmp, i); + /* TAB in a composition means display glyphs with padding space + on the left or right. */ if (c != '\t') { int face_id = FACE_FOR_CHAR (s->f, base_face->ascii_face, c, ------------------------------------------------------------ revno: 105788 committer: Andreas Schwab branch nick: emacs timestamp: Thu 2011-09-15 18:56:07 +0200 message: * src/editfns.c (Fformat): Correctly handle text properties on "%%". diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-15 16:22:58 +0000 +++ src/ChangeLog 2011-09-15 16:56:07 +0000 @@ -1,3 +1,7 @@ +2011-09-15 Andreas Schwab + + * editfns.c (Fformat): Correctly handle text properties on "%%". + 2011-09-15 Eli Zaretskii * xterm.c (x_draw_composite_glyph_string_foreground): === modified file 'src/editfns.c' --- src/editfns.c 2011-09-15 16:10:37 +0000 +++ src/editfns.c 2011-09-15 16:56:07 +0000 @@ -3721,7 +3721,11 @@ memset (&discarded[format0 - format_start], 1, format - format0); conversion = *format; if (conversion == '%') - goto copy_char; + { + format0++; + nchars++; + goto copy_char; + } discarded[format - format_start] = 1; format++; @@ -4138,8 +4142,7 @@ while (! CHAR_HEAD_P (*format)); convbytes = format - src; - memset (&discarded[format0 + 1 - format_start], 2, - format - (format0 + 1)); + memset (&discarded[format0 + 1 - format_start], 2, convbytes - 1); } else { ------------------------------------------------------------ revno: 105787 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-09-15 19:22:58 +0300 message: Add comments about special meaning of TAB characters in compositions. src/xterm.c (x_draw_composite_glyph_string_foreground): src/w32term.c (x_draw_composite_glyph_string_foreground): src/term.c (encode_terminal_code): src/composite.c (composition_update_it, get_composition_id): src/xdisp.c (get_next_display_element) (fill_composite_glyph_string): Add comments about special meaning of TAB characters in a composition. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-15 16:10:37 +0000 +++ src/ChangeLog 2011-09-15 16:22:58 +0000 @@ -1,3 +1,13 @@ +2011-09-15 Eli Zaretskii + + * xterm.c (x_draw_composite_glyph_string_foreground): + * w32term.c (x_draw_composite_glyph_string_foreground): + * term.c (encode_terminal_code): + * composite.c (composition_update_it, get_composition_id): + * xdisp.c (get_next_display_element) + (fill_composite_glyph_string): Add comments about special meaning + of TAB characters in a composition. + 2011-09-15 Paul Eggert * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514). === modified file 'src/composite.c' --- src/composite.c 2011-08-14 06:40:45 +0000 +++ src/composite.c 2011-09-15 16:22:58 +0000 @@ -345,6 +345,8 @@ { int this_width; ch = XINT (key_contents[i]); + /* TAB in a composition means display glyphs with padding + space on the left or right. */ this_width = (ch == '\t' ? 1 : CHAR_WIDTH (ch)); if (cmp->width < this_width) cmp->width = this_width; @@ -1384,6 +1386,8 @@ else { for (i = 0; i < cmp->glyph_len; i++) + /* TAB in a composition means display glyphs with padding + space on the left or right. */ if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') break; if (c == '\t') === modified file 'src/term.c' --- src/term.c 2011-08-30 21:16:49 +0000 +++ src/term.c 2011-09-15 16:22:58 +0000 @@ -574,6 +574,8 @@ { int c = COMPOSITION_GLYPH (cmp, i); + /* TAB in a composition means display glyphs with + padding space on the left or right. */ if (c == '\t') continue; if (char_charset (c, charset_list, NULL)) === modified file 'src/w32term.c' --- src/w32term.c 2011-09-14 21:45:51 +0000 +++ src/w32term.c 2011-09-15 16:22:58 +0000 @@ -1294,6 +1294,8 @@ old_font = SelectObject (s->hdc, FONT_HANDLE (font)); for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++) + /* TAB in a composition means display glyphs with padding + space on the left or right. */ if (COMPOSITION_GLYPH (s->cmp, j) != '\t') { int xx = x + s->cmp->offsets[j * 2]; === modified file 'src/xterm.c' --- src/xterm.c 2011-09-14 21:45:51 +0000 +++ src/xterm.c 2011-09-15 16:22:58 +0000 @@ -1306,6 +1306,8 @@ int y = s->ybase; for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++) + /* TAB in a composition means display glyphs with padding + space on the left or right. */ if (COMPOSITION_GLYPH (s->cmp, j) != '\t') { int xx = x + s->cmp->offsets[j * 2]; ------------------------------------------------------------ revno: 105786 fixes bug(s): http://debbugs.gnu.org/9514 committer: Paul Eggert branch nick: trunk timestamp: Thu 2011-09-15 09:10:37 -0700 message: * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514). This occurs when processing a multibyte format, which can happen when using 'eval'. Problem reported by Wolfgang Jenker. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-15 16:02:49 +0000 +++ src/ChangeLog 2011-09-15 16:10:37 +0000 @@ -1,3 +1,9 @@ +2011-09-15 Paul Eggert + + * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514). + This occurs when processing a multibyte format, which can happen + when using 'eval'. Problem reported by Wolfgang Jenker. + 2011-09-15 Johan Bockgård * xdisp.c (try_cursor_movement): Only check for exact match if === modified file 'src/editfns.c' --- src/editfns.c 2011-09-09 01:06:52 +0000 +++ src/editfns.c 2011-09-15 16:10:37 +0000 @@ -4137,8 +4137,9 @@ format++; while (! CHAR_HEAD_P (*format)); - convbytes = format - format0; - memset (&discarded[format0 + 1 - format_start], 2, convbytes - 1); + convbytes = format - src; + memset (&discarded[format0 + 1 - format_start], 2, + format - (format0 + 1)); } else { ------------------------------------------------------------ revno: 105785 fixes bug(s): http://debbugs.gnu.org/9495 author: Johan Bockgard committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-09-15 19:02:49 +0300 message: Fix bug #9495 with cursor positioning on truncated lines. Patch by Johan Bockgוrd src/xdisp.c (try_cursor_movement): Only check for exact match if cursor hpos found by set_cursor_from_row is valid. (Bug#9495) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-14 21:45:51 +0000 +++ src/ChangeLog 2011-09-15 16:02:49 +0000 @@ -1,3 +1,8 @@ +2011-09-15 Johan Bockgård + + * xdisp.c (try_cursor_movement): Only check for exact match if + cursor hpos found by set_cursor_from_row is valid. (Bug#9495) + 2011-09-14 Paul Eggert Remove unused external symbols. === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-15 15:41:03 +0000 +++ src/xdisp.c 2011-09-15 16:02:49 +0000 @@ -14627,7 +14627,10 @@ is set, we are done. */ at_zv_p = MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p; - if (!at_zv_p) + if (rv && !at_zv_p + && w->cursor.hpos >= 0 + && w->cursor.hpos < MATRIX_ROW_USED (w->current_matrix, + w->cursor.vpos)) { struct glyph_row *candidate = MATRIX_ROW (w->current_matrix, w->cursor.vpos); ------------------------------------------------------------ revno: 105784 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2011-09-15 18:41:03 +0300 message: xdisp.c (hscroll_window_tree): Sync comment with the code. diff: === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-14 21:45:51 +0000 +++ src/xdisp.c 2011-09-15 15:41:03 +0000 @@ -11916,9 +11916,9 @@ } hscroll = max (hscroll, XFASTINT (w->min_hscroll)); - /* Don't call Fset_window_hscroll if value hasn't - changed because it will prevent redisplay - optimizations. */ + /* Don't will prevent redisplay optimizations if hscroll + hasn't changed, as it will unnecessarily slow down + redisplay. */ if (XFASTINT (w->hscroll) != hscroll) { XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; ------------------------------------------------------------ revno: 105783 committer: Chong Yidong branch nick: trunk timestamp: Thu 2011-09-15 11:12:15 -0400 message: Make the user customizable display-buffer variable empty by default. * lisp/window.el (display-buffer-base-action): Rename from display-buffer-default-action. Make default value empty. (display-buffer-overriding-action): Convert to defvar. (display-buffer-fallback-action): New var. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-15 02:05:17 +0000 +++ lisp/ChangeLog 2011-09-15 15:12:15 +0000 @@ -1,5 +1,12 @@ 2011-09-15 Chong Yidong + * window.el (display-buffer-base-action): Rename from + display-buffer-default-action. Make default value empty. + (display-buffer-overriding-action): Convert to defvar. + (display-buffer-fallback-action): New var. + +2011-09-15 Chong Yidong + * emacs-lisp/package.el (package-alist): Fix risky-local-variable declaration. (package--add-to-archive-contents): If there is a duplicate entry === modified file 'lisp/window.el' --- lisp/window.el 2011-09-14 09:17:30 +0000 +++ lisp/window.el 2011-09-15 15:12:15 +0000 @@ -4465,6 +4465,14 @@ :value-type (sexp :tag "Value"))) "Custom type for `display-buffer' actions.") +(defvar display-buffer-overriding-action '(nil . nil) + "Overriding action to perform to display a buffer. +It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a +function or a list of functions. Each function should accept 2 +arguments: a buffer to display and an alist similar to ALIST. +See `display-buffer' for details.") +(put 'display-buffer-overriding-action 'risky-local-variable t) + (defcustom display-buffer-alist nil "Alist of conditional actions for `display-buffer'. This is a list of elements (CONDITION . ACTION), where: @@ -4485,7 +4493,18 @@ :version "24.1" :group 'windows) -(defcustom display-buffer-default-action +(defcustom display-buffer-base-action '(nil . nil) + "User-specified default action for `display-buffer'. +It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a +function or a list of functions. Each function should accept 2 +arguments: a buffer to display and an alist similar to ALIST. +See `display-buffer' for details." + :type display-buffer--action-custom-type + :risky t + :version "24.1" + :group 'windows) + +(defconst display-buffer-fallback-action '((display-buffer--maybe-same-window display-buffer-reuse-window display-buffer--special @@ -4493,26 +4512,11 @@ display-buffer-use-some-window ;; If all else fails, pop up a new frame. display-buffer-pop-up-frame)) - "List of default actions for `display-buffer'. -It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a -function or a list of functions. Each function should accept 2 -arguments: a buffer to display and an alist similar to ALIST. -See `display-buffer' for details." - :type display-buffer--action-custom-type - :risky t - :version "24.1" - :group 'windows) - -(defcustom display-buffer-overriding-action '(nil . nil) - "Overriding action to perform to display a buffer. -It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a -function or a list of functions. Each function should accept 2 -arguments: a buffer to display and an alist similar to ALIST. -See `display-buffer' for details." - :type display-buffer--action-custom-type - :risky t - :version "24.1" - :group 'windows) + "Default fallback action for `display-buffer'. +This is the action used by `display-buffer' if no other actions +specified, e.g. by the user options `display-buffer-alist' or +`display-buffer-base-action'. See `display-buffer'.") +(put 'display-buffer-fallback-action 'risky-local-variable t) (defun display-buffer-assq-regexp (buffer-name alist) "Retrieve ALIST entry corresponding to BUFFER-NAME." @@ -4553,12 +4557,13 @@ alist. It should either display the buffer and return the window, or return nil if unable to display the buffer. -`display-buffer' builds a function list and an alist from -`display-buffer-overriding-action', `display-buffer-alist', -ACTION, and `display-buffer-default-action' (in that order). -Then it calls each function in the combined function list in -turn, passing the buffer as the first argument and the combined -alist as the second argument, until a function returns non-nil. +The `display-buffer' function builds a function list and an alist +from `display-buffer-overriding-action', `display-buffer-alist', +the ACTION argument, `display-buffer-base-action', and +`display-buffer-fallback-action' (in that order). Then it calls +each function in the combined function list in turn, passing the +buffer as the first argument and the combined alist as the second +argument, until one of the functions returns non-nil. Available action functions include: `display-buffer-same-window' @@ -4608,7 +4613,8 @@ ;; Construct action function list and action alist. (actions (list display-buffer-overriding-action user-action action extra-action - display-buffer-default-action)) + display-buffer-base-action + display-buffer-fallback-action)) (functions (apply 'append (mapcar (lambda (x) (setq x (car x)) ------------------------------------------------------------ revno: 105782 committer: Glenn Morris branch nick: trunk timestamp: Thu 2011-09-15 06:18:44 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2011-09-07 10:18:28 +0000 +++ autogen/config.in 2011-09-15 10:18:44 +0000 @@ -1172,6 +1172,9 @@ /* Define to 1 if on MINIX. */ #undef _MINIX +/* Define if GNUstep uses ObjC exceptions. */ +#undef _NATIVE_OBJC_EXCEPTIONS + /* The _Noreturn keyword of draft C1X. */ #ifndef _Noreturn # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ === modified file 'autogen/configure' --- autogen/configure 2011-09-12 10:18:39 +0000 +++ autogen/configure 2011-09-15 10:18:44 +0000 @@ -9814,6 +9814,7 @@ CPPFLAGS="$CPPFLAGS -x objective-c" CFLAGS="$CFLAGS -x objective-c" TEMACS_LDFLAGS2="\${LDFLAGS}" +GNU_OBJC_CFLAGS= if test "${with_ns}" != no; then if test "${opsys}" = darwin; then NS_IMPL_COCOA=yes @@ -9841,7 +9842,45 @@ LIB_STANDARD= START_FILES= TEMACS_LDFLAGS2= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5 +$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; } +if test "${emacs_cv_objc_exceptions+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 +1; +#else +fail; +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_objc_exceptions=yes +else + emacs_cv_objc_exceptions=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5 +$as_echo "$emacs_cv_objc_exceptions" >&6; } + if test $emacs_cv_objc_exceptions = yes; then + +$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h + + GNU_OBJC_CFLAGS="-fobjc-exceptions" + fi fi + + CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" + ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : HAVE_NS=yes @@ -13541,7 +13580,6 @@ $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h - GNU_OBJC_CFLAGS= fi if test "${NS_IMPL_GNUSTEP}" = "yes"; then @@ -13549,8 +13587,9 @@ # See also .m.o rule in Makefile.in */ # FIXME: are all these flags really needed? Document here why. */ - C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" - GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" + C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + ## Extra CFLAGS applied to src/*.m files. + GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" fi if test "${NS_HAVE_NSINTEGER}" = "yes"; then ------------------------------------------------------------ revno: 105781 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-09-15 05:46:40 +0000 message: gnus-sum.el (gnus-summary-read-group-1): Bump the "Retrieving" message level. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-15 01:08:08 +0000 +++ lisp/gnus/ChangeLog 2011-09-15 05:46:40 +0000 @@ -1,3 +1,8 @@ +2011-09-15 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-read-group-1): Bump the "Retrieving" + message level. + 2011-09-15 Katsumi Yamaoka * message.el (message-read-from-minibuffer): Make abbrev expansion work. === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2011-09-11 22:50:22 +0000 +++ lisp/gnus/gnus-sum.el 2011-09-15 05:46:40 +0000 @@ -3961,7 +3961,7 @@ ;; (when (and (not (gnus-group-native-p group)) ;; (not (gnus-gethash group gnus-newsrc-hashtb))) ;; (error "Dead non-native groups can't be entered")) - (gnus-message 5 "Retrieving newsgroup: %s..." + (gnus-message 7 "Retrieving newsgroup: %s..." (gnus-group-decoded-name group)) (let* ((new-group (gnus-summary-setup-buffer group)) (quit-config (gnus-group-quit-config group)) ------------------------------------------------------------ revno: 105780 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-09-14 20:01:25 -0700 message: * configure.in: (C_SWITCH_X_SYSTEM): Enable GNUstep to find its headers. diff: === modified file 'ChangeLog' --- ChangeLog 2011-09-15 02:32:55 +0000 +++ ChangeLog 2011-09-15 03:01:25 +0000 @@ -3,6 +3,7 @@ * configure.in: Make configure work with recent GNUsteps. (_NATIVE_OBJC_EXCEPTIONS): New AC_DEFINE. (GNU_OBJC_CFLAGS): Add -fobjc-exceptions when needed. + (C_SWITCH_X_SYSTEM): Enable GNUstep to find its headers. 2011-09-11 Paul Eggert === modified file 'configure.in' --- configure.in 2011-09-15 02:32:55 +0000 +++ configure.in 2011-09-15 03:01:25 +0000 @@ -2582,7 +2582,7 @@ AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) # See also .m.o rule in Makefile.in */ # FIXME: are all these flags really needed? Document here why. */ - C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" + C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" ## Extra CFLAGS applied to src/*.m files. GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" fi ------------------------------------------------------------ revno: 105779 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-09-14 19:32:55 -0700 message: Make the GNUstep port at least be able to configure. Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00938.html * configure.in: (_NATIVE_OBJC_EXCEPTIONS): New AC_DEFINE. (GNU_OBJC_CFLAGS): Add -fobjc-exceptions when needed. diff: === modified file 'ChangeLog' --- ChangeLog 2011-09-13 23:42:21 +0000 +++ ChangeLog 2011-09-15 02:32:55 +0000 @@ -1,3 +1,9 @@ +2011-09-15 Glenn Morris + + * configure.in: Make configure work with recent GNUsteps. + (_NATIVE_OBJC_EXCEPTIONS): New AC_DEFINE. + (GNU_OBJC_CFLAGS): Add -fobjc-exceptions when needed. + 2011-09-11 Paul Eggert Merge from gnulib, porting to Tru64. === modified file 'configure.in' --- configure.in 2011-09-06 20:47:45 +0000 +++ configure.in 2011-09-15 02:32:55 +0000 @@ -1489,6 +1489,7 @@ CPPFLAGS="$CPPFLAGS -x objective-c" CFLAGS="$CFLAGS -x objective-c" TEMACS_LDFLAGS2="\${LDFLAGS}" +GNU_OBJC_CFLAGS= dnl I don't think it's especially important, but src/Makefile.in dnl (now the only user of ns_appdir) used to go to the trouble of adding a dnl trailing "/" to it, so now we do it here. @@ -1521,7 +1522,28 @@ LIB_STANDARD= START_FILES= TEMACS_LDFLAGS2= + dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1. + dnl If they had chosen to either define it or not, we could have + dnl just used AC_CHECK_DECL here. + AC_CACHE_CHECK(if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS, + emacs_cv_objc_exceptions, +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], +[[#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 +1; +#else +fail; +#endif]])], emacs_cv_objc_exceptions=yes, emacs_cv_objc_exceptions=no ) ) + if test $emacs_cv_objc_exceptions = yes; then + dnl _NATIVE_OBJC_EXCEPTIONS is used by the GNUstep headers. + AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1, + [Define if GNUstep uses ObjC exceptions.]) + GNU_OBJC_CFLAGS="-fobjc-exceptions" + fi fi + + dnl This is only used while we test the NS headers, it gets reset below. + CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" + AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], [AC_MSG_ERROR([`--with-ns' was specified, but the include files are missing or cannot be compiled.])]) @@ -2555,14 +2577,14 @@ AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.]) if test "${NS_IMPL_COCOA}" = "yes"; then AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing under MacOS X.]) - GNU_OBJC_CFLAGS= fi if test "${NS_IMPL_GNUSTEP}" = "yes"; then AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) # See also .m.o rule in Makefile.in */ # FIXME: are all these flags really needed? Document here why. */ C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" - GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" + ## Extra CFLAGS applied to src/*.m files. + GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" fi if test "${NS_HAVE_NSINTEGER}" = "yes"; then AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) ------------------------------------------------------------ revno: 105778 committer: Chong Yidong branch nick: trunk timestamp: Wed 2011-09-14 22:10:52 -0400 message: * doc/emacs/package.texi (Package Menu): Add package-menu-mark-upgrades. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-09-12 14:48:34 +0000 +++ doc/emacs/ChangeLog 2011-09-15 02:10:52 +0000 @@ -1,3 +1,7 @@ +2011-09-15 Chong Yidong + + * package.texi (Package Menu): Add package-menu-mark-upgrades. + 2011-09-12 Eric Hanchrow * frames.texi (Frame Commands): Note that delete-other-frames only === modified file 'doc/emacs/package.texi' --- doc/emacs/package.texi 2011-08-26 15:48:19 +0000 +++ doc/emacs/package.texi 2011-09-15 02:10:52 +0000 @@ -107,6 +107,12 @@ Remove any installation or deletion mark previously added to the current line by an @kbd{i} or @kbd{d} command. +@item U +Mark all package with a newer available version for ``upgrading'' +(@code{package-menu-mark-upgrades}). This places an installation mark +on the new available versions, and a deletion mark on the old +installed versions. + @item x Download and install all packages marked with @kbd{i}, and their dependencies; also, delete all packages marked with @kbd{d} ------------------------------------------------------------ revno: 105777 committer: Chong Yidong branch nick: trunk timestamp: Wed 2011-09-14 22:05:17 -0400 message: Add package-menu-mark-upgrades to the Package Menu menu bar map. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-15 01:57:54 +0000 +++ lisp/ChangeLog 2011-09-15 02:05:17 +0000 @@ -10,7 +10,7 @@ package-menu-get-status instead of a regexp search. (package-menu-get-status): Use tabulated-list-entry. (package-menu-mark-upgrades): New command. - (package-menu-mode-map): Bind it to U. + (package-menu-mode-map): Bind it to U. Add it to menu bar. (package-menu-execute): Do installation before deletion. (package-menu-refresh, package-menu-execute): Use derived-mode-p instead of checking major-mode. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2011-09-15 01:57:54 +0000 +++ lisp/emacs-lisp/package.el 2011-09-15 02:05:17 +0000 @@ -1305,6 +1305,9 @@ (define-key menu-map [mi] '(menu-item "Mark for install" package-menu-mark-install :help "Mark a package for installation and move to the next line")) + (define-key menu-map [mupgrades] + '(menu-item "Mark upgradable packages" package-menu-mark-upgrades + :help "Mark packages that have a newer version for upgrading")) (define-key menu-map [s3] '("--")) (define-key menu-map [mg] '(menu-item "Update package list" revert-buffer ------------------------------------------------------------ revno: 105776 committer: Chong Yidong branch nick: trunk timestamp: Wed 2011-09-14 21:57:54 -0400 message: Add an "mark upgradable packages" command to Package Menu mode. * lisp/emacs-lisp/package.el (package-alist): Fix risky-local-variable declaration. (package--add-to-archive-contents): If there is a duplicate entry with an older version, remove it. (package-menu-mark-delete, package-menu-mark-install) (package-menu-mark-unmark): Make unused args optional. (package-menu-mark-obsolete-for-deletion): Use package-menu-get-status instead of a regexp search. (package-menu-get-status): Use tabulated-list-entry. (package-menu-mark-upgrades): New command. (package-menu-mode-map): Bind it to U. (package-menu-execute): Do installation before deletion. (package-menu-refresh, package-menu-execute): Use derived-mode-p instead of checking major-mode. (package-menu--find-upgrades): New function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 22:57:57 +0000 +++ lisp/ChangeLog 2011-09-15 01:57:54 +0000 @@ -1,3 +1,21 @@ +2011-09-15 Chong Yidong + + * emacs-lisp/package.el (package-alist): Fix risky-local-variable + declaration. + (package--add-to-archive-contents): If there is a duplicate entry + with an older version, remove it. + (package-menu-mark-delete, package-menu-mark-install) + (package-menu-mark-unmark): Make unused args optional. + (package-menu-mark-obsolete-for-deletion): Use + package-menu-get-status instead of a regexp search. + (package-menu-get-status): Use tabulated-list-entry. + (package-menu-mark-upgrades): New command. + (package-menu-mode-map): Bind it to U. + (package-menu-execute): Do installation before deletion. + (package-menu-refresh, package-menu-execute): Use derived-mode-p + instead of checking major-mode. + (package-menu--find-upgrades): New function. + 2011-09-14 Lars Magne Ingebrigtsen * mail/smtpmail.el (smtpmail-send-command): Don't include AUTH === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2011-08-28 21:32:50 +0000 +++ lisp/emacs-lisp/package.el 2011-09-15 01:57:54 +0000 @@ -309,7 +309,7 @@ This variable is set automatically by `package-load-descriptor', called via `package-initialize'. To change which packages are loaded and/or activated, customize `package-load-list'.") -(put 'package-archive-contents 'risky-local-variable t) +(put 'package-alist 'risky-local-variable t) (defvar package-activated-list nil "List of the names of currently activated packages.") @@ -820,13 +820,19 @@ "Add the PACKAGE from the given ARCHIVE if necessary. Also, add the originating archive to the end of the package vector." (let* ((name (car package)) - (version (aref (cdr package) 0)) - (entry (cons (car package) + (version (package-desc-vers (cdr package))) + (entry (cons name (vconcat (cdr package) (vector archive)))) - (existing-package (cdr (assq name package-archive-contents)))) - (when (or (not existing-package) - (version-list-< (aref existing-package 0) version)) - (add-to-list 'package-archive-contents entry)))) + (existing-package (assq name package-archive-contents))) + (cond ((not existing-package) + (add-to-list 'package-archive-contents entry)) + ((version-list-< (package-desc-vers (cdr existing-package)) + version) + ;; Replace the entry with this one. + (setq package-archive-contents + (cons entry + (delq existing-package + package-archive-contents))))))) (defun package-download-transaction (package-list) "Download and install all the packages in PACKAGE-LIST. @@ -1269,6 +1275,7 @@ (define-key map "\177" 'package-menu-backup-unmark) (define-key map "d" 'package-menu-mark-delete) (define-key map "i" 'package-menu-mark-install) + (define-key map "U" 'package-menu-mark-upgrades) (define-key map "r" 'package-menu-refresh) (define-key map "~" 'package-menu-mark-obsolete-for-deletion) (define-key map "x" 'package-menu-execute) @@ -1422,7 +1429,7 @@ This fetches the contents of each archive specified in `package-archives', and then refreshes the package menu." (interactive) - (unless (eq major-mode 'package-menu-mode) + (unless (derived-mode-p 'package-menu-mode) (error "The current buffer is not a Package Menu")) (package-refresh-contents) (package-menu--generate t t)) @@ -1437,21 +1444,21 @@ (describe-package package)))) ;; fixme numeric argument -(defun package-menu-mark-delete (num) +(defun package-menu-mark-delete (&optional num) "Mark a package for deletion and move to the next line." (interactive "p") (if (member (package-menu-get-status) '("installed" "obsolete")) (tabulated-list-put-tag "D" t) (forward-line))) -(defun package-menu-mark-install (num) +(defun package-menu-mark-install (&optional num) "Mark a package for installation and move to the next line." (interactive "p") (if (string-equal (package-menu-get-status) "available") (tabulated-list-put-tag "I" t) (forward-line))) -(defun package-menu-mark-unmark (num) +(defun package-menu-mark-unmark (&optional num) "Clear any marks on a package and move to the next line." (interactive "p") (tabulated-list-put-tag " " t)) @@ -1467,9 +1474,8 @@ (interactive) (save-excursion (goto-char (point-min)) - (forward-line 2) (while (not (eobp)) - (if (looking-at ".*\\s obsolete\\s ") + (if (equal (package-menu-get-status) "obsolete") (tabulated-list-put-tag "D" t) (forward-line 1))))) @@ -1482,17 +1488,66 @@ 'package-menu-view-commentary 'package-menu-describe-package "24.1") (defun package-menu-get-status () - (save-excursion - (if (looking-at ". [^ \t]*[ \t]*[^ \t]*[ \t]*\\([^ \t]*\\)") - (match-string 1) + (let* ((pkg (tabulated-list-get-id)) + (entry (and pkg (assq pkg tabulated-list-entries)))) + (if entry + (aref (cadr entry) 2) ""))) +(defun package-menu--find-upgrades () + (let (installed available upgrades) + ;; Build list of installed/available packages in this buffer. + (dolist (entry tabulated-list-entries) + ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC]) + (let ((pkg (car entry)) + (status (aref (cadr entry) 2)) + old) + (cond ((equal status "installed") + (push pkg installed)) + ((equal status "available") + (push pkg available))))) + ;; Loop through list of installed packages, finding upgrades + (dolist (pkg installed) + (let ((avail-pkg (assq (car pkg) available))) + (and avail-pkg + (version-list-< (cdr pkg) (cdr avail-pkg)) + (push avail-pkg upgrades)))) + upgrades)) + +(defun package-menu-mark-upgrades () + "Mark all upgradable packages in the Package Menu. +For each installed package with a newer version available, place +an (I)nstall flag on the available version and a (D)elete flag on +the installed version. A subsequent \\[package-menu-execute] +call will upgrade the package." + (interactive) + (unless (derived-mode-p 'package-menu-mode) + (error "The current buffer is not a Package Menu")) + (let ((upgrades (package-menu--find-upgrades))) + (if (null upgrades) + (message "No packages to upgrade.") + (widen) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (let* ((pkg (tabulated-list-get-id)) + (upgrade (assq (car pkg) upgrades))) + (cond ((null upgrade) + (forward-line 1)) + ((equal pkg upgrade) + (package-menu-mark-install)) + (t + (package-menu-mark-delete)))))) + (message "%d package%s marked for upgrading." + (length upgrades) + (if (= (length upgrades) 1) "" "s"))))) + (defun package-menu-execute () "Perform marked Package Menu actions. Packages marked for installation are downloaded and installed; packages marked for deletion are removed." (interactive) - (unless (eq major-mode 'package-menu-mode) + (unless (derived-mode-p 'package-menu-mode) (error "The current buffer is not in Package Menu mode")) (let (install-list delete-list cmd id) (save-excursion @@ -1509,6 +1564,14 @@ ((eq cmd ?I) (push (car id) install-list)))) (forward-line))) + (when install-list + (if (yes-or-no-p + (if (= (length install-list) 1) + (format "Install package `%s'? " (car install-list)) + (format "Install these %d packages (%s)? " + (length install-list) + (mapconcat 'symbol-name install-list ", ")))) + (mapc 'package-install install-list))) ;; Delete packages, prompting if necessary. (when delete-list (if (yes-or-no-p @@ -1527,14 +1590,6 @@ (package-delete (car elt) (cdr elt)) (error (message (cadr err))))) (error "Aborted"))) - (when install-list - (if (yes-or-no-p - (if (= (length install-list) 1) - (format "Install package `%s'? " (car install-list)) - (format "Install these %d packages (%s)? " - (length install-list) - (mapconcat 'symbol-name install-list ", ")))) - (mapc 'package-install install-list))) ;; If we deleted anything, regenerate `package-alist'. This is done ;; automatically if we installed a package. (and delete-list (null install-list) @@ -1597,7 +1652,13 @@ (package-menu--generate nil t)) ;; The package menu buffer has keybindings. If the user types ;; `M-x list-packages', that suggests it should become current. - (switch-to-buffer buf))) + (switch-to-buffer buf)) + (let ((upgrades (package-menu--find-upgrades))) + (if upgrades + (message "%d package%s can be upgraded; type `%s' to mark them for upgrading." + (length upgrades) + (if (= (length upgrades) 1) "" "s") + (substitute-command-keys "\\[package-menu-mark-upgrades]"))))) ;;;###autoload (defalias 'package-list-packages 'list-packages) ------------------------------------------------------------ revno: 105775 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-09-15 01:08:08 +0000 message: message.el (message-read-from-minibuffer): Make abbrev expansion work. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-12 09:12:46 +0000 +++ lisp/gnus/ChangeLog 2011-09-15 01:08:08 +0000 @@ -1,3 +1,7 @@ +2011-09-15 Katsumi Yamaoka + + * message.el (message-read-from-minibuffer): Make abbrev expansion work. + 2011-09-12 Lars Magne Ingebrigtsen * gnus.el (gnus-interactive-exit): Update defcustom spec. === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2011-09-11 18:30:07 +0000 +++ lisp/gnus/message.el 2011-09-15 01:08:08 +0000 @@ -8068,10 +8068,10 @@ (defun message-read-from-minibuffer (prompt &optional initial-contents) "Read from the minibuffer while providing abbrev expansion." (if (fboundp 'mail-abbrevs-setup) - (let ((mail-abbrev-mode-regexp "") - (minibuffer-setup-hook 'mail-abbrevs-setup) + (let ((minibuffer-setup-hook 'mail-abbrevs-setup) (minibuffer-local-map message-minibuffer-local-map)) - (read-from-minibuffer prompt initial-contents)) + (flet ((mail-abbrev-in-expansion-header-p nil t)) + (read-from-minibuffer prompt initial-contents))) (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook) (minibuffer-local-map message-minibuffer-local-map)) (read-string prompt initial-contents)))) ------------------------------------------------------------ revno: 105774 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2011-09-15 00:57:57 +0200 message: Update the process marker so that the "broken by peer" status message is inserted in the right place. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 21:59:50 +0000 +++ lisp/ChangeLog 2011-09-14 22:57:57 +0000 @@ -2,6 +2,8 @@ * mail/smtpmail.el (smtpmail-send-command): Don't include AUTH passwords in the log buffer. + (smtpmail-process-filter): Update the process marker so that the + "broken by peer" status message is inserted in the right place. 2011-09-14 Stefan Monnier === modified file 'lisp/mail/smtpmail.el' --- lisp/mail/smtpmail.el 2011-09-14 21:59:50 +0000 +++ lisp/mail/smtpmail.el 2011-09-14 22:57:57 +0000 @@ -835,7 +835,8 @@ (defun smtpmail-process-filter (process output) (with-current-buffer (process-buffer process) (goto-char (point-max)) - (insert output))) + (insert output) + (set-marker (process-mark process) (point)))) (defun smtpmail-read-response (process) (let ((case-fold-search nil) ------------------------------------------------------------ revno: 105773 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Wed 2011-09-14 23:59:50 +0200 message: (smtpmail-send-command): Don't include AUTH passwords in the log buffer diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 21:43:36 +0000 +++ lisp/ChangeLog 2011-09-14 21:59:50 +0000 @@ -1,3 +1,8 @@ +2011-09-14 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-send-command): Don't include AUTH + passwords in the log buffer. + 2011-09-14 Stefan Monnier * textmodes/bibtex.el (bibtex-complete-string-cleanup) === modified file 'lisp/mail/smtpmail.el' --- lisp/mail/smtpmail.el 2011-09-03 20:24:12 +0000 +++ lisp/mail/smtpmail.el 2011-09-14 21:59:50 +0000 @@ -891,8 +891,8 @@ (defun smtpmail-send-command (process command) (goto-char (point-max)) - (if (= (aref command 0) ?P) - (insert "PASS \r\n") + (if (string-match "\\`AUTH [A-Z]+ " command) + (insert (match-string 0 command) "\r\n") (insert command "\r\n")) (setq smtpmail-read-point (point)) (process-send-string process command) ------------------------------------------------------------ revno: 105772 committer: Paul Eggert branch nick: trunk timestamp: Wed 2011-09-14 14:45:51 -0700 message: Remove unused external symbols. * dispextern.h (calc_pixel_width_or_height): Remove decl. * xdisp.c (calc_pixel_width_or_height): Now static. * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove. * indent.c (check_display_width): * w32term.c: Fix comment to match code. * xterm.c, xterm.h (x_catching_errors): Remove. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-14 15:47:21 +0000 +++ src/ChangeLog 2011-09-14 21:45:51 +0000 @@ -1,5 +1,15 @@ 2011-09-14 Paul Eggert + Remove unused external symbols. + * dispextern.h (calc_pixel_width_or_height): Remove decl. + * xdisp.c (calc_pixel_width_or_height): Now static. + * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove. + * indent.c (check_display_width): + * w32term.c: Fix comment to match code. + * xterm.c, xterm.h (x_catching_errors): Remove. + +2011-09-14 Paul Eggert + * xselect.c: Use signed conversions more consistently (Bug#9498). (selection_data_to_lisp_data): Assume incoming selection data are signed integers, not unsigned. This is to be consistent with === modified file 'src/dispextern.h' --- src/dispextern.h 2011-09-09 01:06:52 +0000 +++ src/dispextern.h 2011-09-14 21:45:51 +0000 @@ -3036,8 +3036,6 @@ extern int last_tool_bar_item; extern void reseat_at_previous_visible_line_start (struct it *); extern Lisp_Object lookup_glyphless_char_display (int, struct it *); -extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object, - struct font *, int, int *); extern EMACS_INT compute_display_string_pos (struct text_pos *, struct bidi_string_data *, int, int *); === modified file 'src/doprnt.c' --- src/doprnt.c 2011-09-09 01:06:52 +0000 +++ src/doprnt.c 2011-09-14 21:45:51 +0000 @@ -486,6 +486,8 @@ return nbytes; } +#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT + /* Format to buffer *BUF of positive size *BUFSIZE, reallocating *BUF and updating *BUFSIZE if the buffer is too small, and otherwise behaving line esprintf. When reallocating, free *BUF unless it is @@ -505,6 +507,8 @@ return nbytes; } +#endif + /* Act like exprintf, except take a va_list. */ ptrdiff_t evxprintf (char **buf, ptrdiff_t *bufsize, === modified file 'src/indent.c' --- src/indent.c 2011-09-12 11:51:27 +0000 +++ src/indent.c 2011-09-14 21:45:51 +0000 @@ -471,7 +471,7 @@ if (CONSP (val = get_char_property_and_overlay (make_number (pos), Qdisplay, Qnil, &overlay)) && EQ (Qspace, XCAR (val))) - { /* FIXME: Use calc_pixel_width_or_height, as in term.c. */ + { /* FIXME: Use calc_pixel_width_or_height. */ Lisp_Object plist = XCDR (val), prop; int width = -1; === modified file 'src/w32term.c' --- src/w32term.c 2011-08-04 00:58:07 +0000 +++ src/w32term.c 2011-09-14 21:45:51 +0000 @@ -5197,7 +5197,6 @@ x_catch_errors_unwind (old_val) x_check_errors (dpy, format) x_fully_uncatch_errors () -x_catching_errors () x_had_errors_p (dpy) x_clear_errors (dpy) x_uncatch_errors (dpy, count) === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-14 05:20:23 +0000 +++ src/xdisp.c 2011-09-14 21:45:51 +0000 @@ -21293,7 +21293,7 @@ ? XFLOATINT (X) \ : - 1) -int +static int calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop, struct font *font, int width_p, int *align_to) { === modified file 'src/xterm.c' --- src/xterm.c 2011-09-09 01:06:52 +0000 +++ src/xterm.c 2011-09-14 21:45:51 +0000 @@ -7686,14 +7686,6 @@ } #endif -/* Nonzero if x_catch_errors has been done and not yet canceled. */ - -int -x_catching_errors (void) -{ - return x_error_message != 0; -} - #if 0 static unsigned int x_wire_count; x_trace_wire (void) === modified file 'src/xterm.h' --- src/xterm.h 2011-09-09 01:06:52 +0000 +++ src/xterm.h 2011-09-14 21:45:51 +0000 @@ -958,7 +958,6 @@ extern void x_check_errors (Display *, const char *) ATTRIBUTE_FORMAT_PRINTF (2, 0); extern int x_had_errors_p (Display *); -extern int x_catching_errors (void); extern void x_uncatch_errors (void); extern void x_clear_errors (Display *); extern void x_set_window_size (struct frame *, int, int, int); ------------------------------------------------------------ revno: 105771 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2011-09-14 17:43:36 -0400 message: * textmodes/bibtex.el (bibtex-complete-string-cleanup) (bibtex-complete-crossref-cleanup): Adjust to accommodate needs of bibtex-completion-at-point-function. (bibtex-completion-at-point-function): Use them. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 21:21:59 +0000 +++ lisp/ChangeLog 2011-09-14 21:43:36 +0000 @@ -1,5 +1,10 @@ 2011-09-14 Stefan Monnier + * textmodes/bibtex.el (bibtex-complete-string-cleanup) + (bibtex-complete-crossref-cleanup): Adjust to accommodate needs of + bibtex-completion-at-point-function. + (bibtex-completion-at-point-function): Use them. + * newcomment.el (comment-add, comment-valid-prefix-p): Docfix. * mpc.el (mpc-constraints-tag-lookup): New function. === modified file 'lisp/textmodes/bibtex.el' --- lisp/textmodes/bibtex.el 2011-09-10 21:15:28 +0000 +++ lisp/textmodes/bibtex.el 2011-09-14 21:43:36 +0000 @@ -3068,24 +3068,28 @@ (message "No BibTeX buffers defined"))) buffer-list)) -(defun bibtex-complete-string-cleanup (str compl) +(defun bibtex-complete-string-cleanup (compl) (lambda (str status) ;Curried. "Cleanup after inserting string STR. Remove enclosing field delimiters for STR. Display message with expansion of STR using expansion list COMPL." - ;; point is at position inside field where completion was requested - (save-excursion - (let ((abbr (cdr (if (stringp str) - (assoc-string str compl t))))) - (if abbr (message "Abbreviation for `%s'" abbr)) - (bibtex-remove-delimiters)))) + (when (memq status '(exact finished sole)) + (let ((abbr (cdr (assoc-string str compl t)))) + (when abbr + (message "%s = abbreviation for `%s'" str abbr))) + (when (eq status 'finished) + (save-excursion (bibtex-remove-delimiters)))))) -(defun bibtex-complete-crossref-cleanup (key) +(defun bibtex-complete-crossref-cleanup (buf) (lambda (key status) ;Curried. "Display summary message on entry KEY after completion of a crossref key. Use `bibtex-summary-function' to generate summary." - (save-excursion - (if (and (stringp key) - (bibtex-search-entry key t)) - (message "Ref: %s" (funcall bibtex-summary-function))))) + (when (memq status '(exact sole finished)) + (let ((summary + (with-current-buffer buf + (save-excursion + (if (bibtex-search-entry key t) + (funcall bibtex-summary-function)))))) + (when summary + (message "%s %s" key summary)))))) (defun bibtex-copy-summary-as-kill (&optional arg) "Push summery of current BibTeX entry to kill ring. @@ -4985,16 +4989,7 @@ (t (let ((completion-ignore-case nil)) (complete-with-action a (bibtex-global-key-alist) s p))))) - :exit-function - (lambda (string status) - (when (memq status '(exact sole finished)) - (let ((summary - (with-current-buffer buf - (save-excursion - (if (bibtex-search-entry string) - (funcall bibtex-summary-function)))))) - (when summary - (message "%s %s" string summary)))))))) + :exit-function (bibtex-complete-crossref-cleanup buf)))) ((eq compl 'string) ;; String key completion: no cleanup needed. @@ -5011,14 +5006,7 @@ ((eq a 'metadata) `(metadata (category . bibtex-string))) (t (let ((completion-ignore-case t)) (complete-with-action a compl s p))))) - :exit-function - (lambda (string status) - (when (memq status '(exact finished sole)) - (let ((abbr (cdr (assoc-string string compl t)))) - (when abbr - (message "%s = abbreviation for `%s'" string abbr)))) - (when (eq status 'finished) - (save-excursion (bibtex-remove-delimiters))))))))) + :exit-function (bibtex-complete-string-cleanup compl)))))) (defun bibtex-String (&optional key) "Insert a new BibTeX @String entry with key KEY." ------------------------------------------------------------ revno: 105770 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2011-09-14 17:21:59 -0400 message: * newcomment.el (comment-add, comment-valid-prefix-p): Docfix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 21:20:24 +0000 +++ lisp/ChangeLog 2011-09-14 21:21:59 +0000 @@ -1,5 +1,7 @@ 2011-09-14 Stefan Monnier + * newcomment.el (comment-add, comment-valid-prefix-p): Docfix. + * mpc.el (mpc-constraints-tag-lookup): New function. (mpc-constraints-restore): Use it to make jumping to "album=Foo" apply also to browser "album|playlist". === modified file 'lisp/newcomment.el' --- lisp/newcomment.el 2011-05-28 23:07:43 +0000 +++ lisp/newcomment.el 2011-09-14 21:21:59 +0000 @@ -987,8 +987,8 @@ (setq ,bindent (- ,bindent n))))))))))) (defun comment-add (arg) - "Compute the number of extra comment starter characters -\(extra semicolons in Lisp mode, extra stars in C mode, etc.) + "Compute the number of extra comment starter characters. +\(Extra semicolons in Lisp mode, extra stars in C mode, etc.) If ARG is non-nil, just follow ARG. If the comment starter is multi-char, just follow ARG. Otherwise obey `comment-add'." @@ -1243,7 +1243,7 @@ :group 'comment) (defun comment-valid-prefix-p (prefix compos) - "Check that the adaptive-fill-prefix is consistent with the context. + "Check that the adaptive fill prefix is consistent with the context. PREFIX is the prefix (presumably guessed by `adaptive-fill-mode'). COMPOS is the position of the beginning of the comment we're in, or nil if we're not inside a comment." ------------------------------------------------------------ revno: 105769 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2011-09-14 17:20:24 -0400 message: * mpc.el (mpc-constraints-tag-lookup): New function. (mpc-constraints-restore): Use it to make jumping to "album=Foo" apply also to browser "album|playlist". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 16:07:42 +0000 +++ lisp/ChangeLog 2011-09-14 21:20:24 +0000 @@ -1,3 +1,9 @@ +2011-09-14 Stefan Monnier + + * mpc.el (mpc-constraints-tag-lookup): New function. + (mpc-constraints-restore): Use it to make jumping to "album=Foo" apply + also to browser "album|playlist". + 2011-09-14 Juri Linkov * isearch.el (isearch-fail-pos): Add new arg `msg'. Doc fix. @@ -21,8 +27,8 @@ (display-buffer-function, special-display-buffer-names) (special-display-function): Mention help-setup parameter instead of display-buffer-window in doc-string. - * help.el (help-window-setup): New argument help-window. Use - help-window-setup parameter instead of display-buffer-window. + * help.el (help-window-setup): New argument help-window. + Use help-window-setup parameter instead of display-buffer-window. Reword some messages. (with-help-window): Pass window used for displaying the buffer to help-window-setup. Don't set display-buffer-window. === modified file 'lisp/mpc.el' --- lisp/mpc.el 2011-08-24 01:55:10 +0000 +++ lisp/mpc.el 2011-09-14 21:20:24 +0000 @@ -1349,6 +1349,16 @@ (push (cons tag select) constraints))) constraints)) +(defun mpc-constraints-tag-lookup (buffer-tag constraints) + (let (res) + (dolist (constraint constraints) + (when (or (eq (car constraint) buffer-tag) + (and (string-match "|" (symbol-name buffer-tag)) + (member (symbol-name (car constraint)) + (split-string (symbol-name buffer-tag) "|")))) + (setq res (cdr constraint)))) + res)) + (defun mpc-constraints-restore (constraints) (let ((search (assq 'Search constraints))) (setq mpc--song-search (cadr search)) @@ -1357,10 +1367,10 @@ (setq buf (cdr buf)) (when (buffer-live-p buf) (let* ((tag (buffer-local-value 'mpc-tag buf)) - (constraint (assq tag constraints))) + (constraint (mpc-constraints-tag-lookup tag constraints))) (when tag (with-current-buffer buf - (mpc-select-restore (cdr constraint))))))) + (mpc-select-restore constraint)))))) (mpc-selection-refresh)) ;; I don't get the ring.el code. I think it doesn't do what I need, but ------------------------------------------------------------ revno: 105768 committer: Juri Linkov branch nick: trunk timestamp: Wed 2011-09-14 19:07:42 +0300 message: Share code between `isearch-message' and `isearch-string' in `isearch-fail-pos'. http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00169.html * lisp/isearch.el (isearch-fail-pos): Add new arg `msg'. Doc fix. (isearch-edit-string): Use length of `isearch-string' when `isearch-fail-pos' returns nil. (isearch-message): Remove duplicate code and call `isearch-fail-pos' with arg `t'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 15:14:34 +0000 +++ lisp/ChangeLog 2011-09-14 16:07:42 +0000 @@ -1,3 +1,11 @@ +2011-09-14 Juri Linkov + + * isearch.el (isearch-fail-pos): Add new arg `msg'. Doc fix. + (isearch-edit-string): Use length of `isearch-string' when + `isearch-fail-pos' returns nil. + (isearch-message): Remove duplicate code and call + `isearch-fail-pos' with arg `t'. + 2011-09-14 Chong Yidong * replace.el (occur-mode-goto-occurrence): Don't force using other === modified file 'lisp/isearch.el' --- lisp/isearch.el 2011-09-10 11:33:38 +0000 +++ lisp/isearch.el 2011-09-14 16:07:42 +0000 @@ -1063,21 +1063,24 @@ (defvar minibuffer-history-symbol) ;; from external package gmhist.el -(defun isearch-fail-pos () - "Position of first mismatch in search string, or its length if none." - (let ((cmds isearch-cmds)) - (if (and isearch-success (not isearch-error)) - (length isearch-message) +(defun isearch-fail-pos (&optional msg) + "Return position of first mismatch in search string, or nil if none. +If MSG is non-nil, use `isearch-message', otherwise `isearch-string'." + (let ((cmds isearch-cmds) + (curr-msg (if msg isearch-message isearch-string)) + succ-msg) + (when (or (not isearch-success) isearch-error) (while (or (not (isearch-success-state (car cmds))) (isearch-error-state (car cmds))) (pop cmds)) - (let ((succ-msg (and cmds (isearch-message-state (car cmds))))) - (if (and (stringp succ-msg) - (< (length succ-msg) (length isearch-message)) - (equal succ-msg - (substring isearch-message 0 (length succ-msg)))) - (length succ-msg) - 0))))) + (setq succ-msg (and cmds (if msg (isearch-message-state (car cmds)) + (isearch-string-state (car cmds))))) + (if (and (stringp succ-msg) + (< (length succ-msg) (length curr-msg)) + (equal succ-msg + (substring curr-msg 0 (length succ-msg)))) + (length succ-msg) + 0)))) (defun isearch-edit-string () "Edit the search string in the minibuffer. @@ -1169,7 +1172,8 @@ (setq isearch-new-string (read-from-minibuffer (isearch-message-prefix nil nil isearch-nonincremental) - (cons isearch-string (1+ (isearch-fail-pos))) + (cons isearch-string (1+ (or (isearch-fail-pos) + (length isearch-string)))) minibuffer-local-isearch-map nil (if isearch-regexp (cons 'regexp-search-ring @@ -2174,22 +2178,11 @@ ;; Generate and print the message string. (let ((cursor-in-echo-area ellipsis) (m isearch-message) - (cmds isearch-cmds) - succ-msg) - (when (or (not isearch-success) isearch-error) - ;; Highlight failed part - (while (or (not (isearch-success-state (car cmds))) - (isearch-error-state (car cmds))) - (pop cmds)) - (setq succ-msg (and cmds (isearch-message-state (car cmds))) - m (copy-sequence m)) - (add-text-properties - (if (and (stringp succ-msg) - (< (length succ-msg) (length m)) - (equal succ-msg (substring m 0 (length succ-msg)))) - (length succ-msg) - 0) - (length m) '(face isearch-fail) m) + (fail-pos (isearch-fail-pos t))) + ;; Highlight failed part + (when fail-pos + (setq m (copy-sequence m)) + (add-text-properties fail-pos (length m) '(face isearch-fail) m) ;; Highlight failed trailing whitespace (when (string-match " +$" m) (add-text-properties (match-beginning 0) (match-end 0) ------------------------------------------------------------ revno: 105767 fixes bug(s): http://debbugs.gnu.org/9498 committer: Paul Eggert branch nick: trunk timestamp: Wed 2011-09-14 08:47:21 -0700 message: * xselect.c: Use signed conversions more consistently (Bug#9498). (selection_data_to_lisp_data): Assume incoming selection data are signed integers, not unsigned. This is to be consistent with outgoing selection data, which was modified to use signed integers in as part of the fix to Bug#9196 in response to Jan D.'s comment in that X11 expects long, not unsigned long. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-14 05:20:23 +0000 +++ src/ChangeLog 2011-09-14 15:47:21 +0000 @@ -1,3 +1,13 @@ +2011-09-14 Paul Eggert + + * xselect.c: Use signed conversions more consistently (Bug#9498). + (selection_data_to_lisp_data): Assume incoming selection data are + signed integers, not unsigned. This is to be consistent with + outgoing selection data, which was modified to use signed integers + in as part of the fix to Bug#9196 in response to Jan D.'s comment + in that X11 + expects long, not unsigned long. + 2011-09-14 Eli Zaretskii * xdisp.c (try_window_reusing_current_matrix): Fix incorrect === modified file 'src/xselect.c' --- src/xselect.c 2011-09-09 01:06:52 +0000 +++ src/xselect.c 2011-09-14 15:47:21 +0000 @@ -1685,9 +1685,9 @@ convert it to a cons of integers, 16 bits in each half. */ else if (format == 32 && size == sizeof (int)) - return INTEGER_TO_CONS (((unsigned int *) data) [0]); + return INTEGER_TO_CONS (((int *) data) [0]); else if (format == 16 && size == sizeof (short)) - return make_number (((unsigned short *) data) [0]); + return make_number (((short *) data) [0]); /* Convert any other kind of data to a vector of numbers, represented as above (as an integer, or a cons of two 16 bit integers.) @@ -1699,7 +1699,7 @@ v = Fmake_vector (make_number (size / 2), make_number (0)); for (i = 0; i < size / 2; i++) { - EMACS_INT j = ((unsigned short *) data) [i]; + EMACS_INT j = ((short *) data) [i]; Faset (v, make_number (i), make_number (j)); } return v; @@ -1711,7 +1711,7 @@ make_number (0)); for (i = 0; i < size / X_LONG_SIZE; i++) { - unsigned int j = ((unsigned int *) data) [i]; + int j = ((int *) data) [i]; Faset (v, make_number (i), INTEGER_TO_CONS (j)); } return v; ------------------------------------------------------------ revno: 105766 fixes bug(s): http://debbugs.gnu.org/9499 committer: Chong Yidong branch nick: trunk timestamp: Wed 2011-09-14 11:14:34 -0400 message: * replace.el (occur-mode-goto-occurrence): Don't force using other window. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 15:06:28 +0000 +++ lisp/ChangeLog 2011-09-14 15:14:34 +0000 @@ -1,5 +1,8 @@ 2011-09-14 Chong Yidong + * replace.el (occur-mode-goto-occurrence): Don't force using other + window (Bug#9499). + * dired-aux.el (dired-do-chmod): Don't provide initial input. 2011-09-14 Martin Rudalics === modified file 'lisp/dired.el' --- lisp/dired.el 2011-09-12 20:45:56 +0000 +++ lisp/dired.el 2011-09-14 15:14:34 +0000 @@ -3663,7 +3663,7 @@ ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "bbc9babe193843cad535d73492326c48") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "0ffe89ae728efb341dfacff6c85e2ba4") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ === modified file 'lisp/replace.el' --- lisp/replace.el 2011-09-10 21:15:28 +0000 +++ lisp/replace.el 2011-09-14 15:14:34 +0000 @@ -940,7 +940,7 @@ (save-excursion (goto-char (posn-point (event-end event))) (occur-mode-find-occurrence)))))) - (pop-to-buffer (marker-buffer pos) t) + (pop-to-buffer (marker-buffer pos)) (goto-char pos) (run-hooks 'occur-mode-find-occurrence-hook))) ------------------------------------------------------------ revno: 105765 committer: Chong Yidong branch nick: trunk timestamp: Wed 2011-09-14 11:06:28 -0400 message: * lisp/dired-aux.el (dired-do-chmod): Don't provide initial input. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-14 09:17:30 +0000 +++ lisp/ChangeLog 2011-09-14 15:06:28 +0000 @@ -1,3 +1,7 @@ +2011-09-14 Chong Yidong + + * dired-aux.el (dired-do-chmod): Don't provide initial input. + 2011-09-14 Martin Rudalics * window.el (display-buffer-window): Remove. === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2011-09-12 20:45:56 +0000 +++ lisp/dired-aux.el 2011-09-14 15:06:28 +0000 @@ -285,11 +285,8 @@ (match-string 3 modestr))))) (modes (dired-mark-read-string "Change mode of %s to: " - ;; Insert initial input if there's only one file. - (unless (cadr files) default) - 'chmod arg files default)) + nil 'chmod arg files default)) num-modes) - (cond ((equal modes "") ;; We used to treat empty input as DEFAULT, but that is not ;; such a good idea (Bug#9361). @@ -388,7 +385,7 @@ (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) (defun dired-mark-read-string (prompt initial op-symbol arg files - &optional standard-value) + &optional default-value) "Read args for a Dired marked-files command, prompting with PROMPT. Return the user input (a string). @@ -397,14 +394,14 @@ ARG is normally the prefix argument for the calling command. FILES should be a list of file names. -STANDARD-VALUE, if non-nil, should be a \"standard\" value or -list of such values, available via history commands. Note that -if the user enters empty input, this function returns the empty -string, not STANDARD-VALUE." +DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list +of such values, available via history commands. Note that if the +user enters empty input, this function returns the empty string, +not DEFAULT-VALUE." (dired-mark-pop-up nil op-symbol files 'read-from-minibuffer (format prompt (dired-mark-prompt arg files)) - initial nil nil nil standard-value)) + initial nil nil nil default-value)) ;;; Cleaning a directory: flagging some backups for deletion. ------------------------------------------------------------ revno: 105764 committer: martin rudalics branch nick: trunk timestamp: Wed 2011-09-14 11:17:30 +0200 message: Replace display-buffer-window by help-setup window parameter. * window.el (display-buffer-window): Remove. (display-buffer-record-window): Use help-setup window parameter instead of variable display-buffer-window. (display-buffer-function, special-display-buffer-names) (special-display-function): Mention help-setup parameter instead of display-buffer-window in doc-string. * help.el (help-window-setup): New argument help-window. Use help-window-setup parameter instead of display-buffer-window. Reword some messages. (with-help-window): Pass window used for displaying the buffer to help-window-setup. Don't set display-buffer-window. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 23:42:21 +0000 +++ lisp/ChangeLog 2011-09-14 09:17:30 +0000 @@ -1,3 +1,17 @@ +2011-09-14 Martin Rudalics + + * window.el (display-buffer-window): Remove. + (display-buffer-record-window): Use help-setup window parameter + instead of variable display-buffer-window. + (display-buffer-function, special-display-buffer-names) + (special-display-function): Mention help-setup parameter instead + of display-buffer-window in doc-string. + * help.el (help-window-setup): New argument help-window. Use + help-window-setup parameter instead of display-buffer-window. + Reword some messages. + (with-help-window): Pass window used for displaying the buffer + to help-window-setup. Don't set display-buffer-window. + 2011-09-13 Glenn Morris * emacs-lisp/debug.el (debugger-make-xrefs): === modified file 'lisp/help.el' --- lisp/help.el 2011-09-13 07:22:05 +0000 +++ lisp/help.el 2011-09-14 09:17:30 +0000 @@ -1060,14 +1060,13 @@ (message "%s" (substitute-command-keys (concat quit-part scroll-part))))) -(defun help-window-setup () +(defun help-window-setup (help-window) "Set up help window for `with-help-window'. -This relies on `display-buffer-window' being correctly set up by -`display-buffer'." - (let* ((help-window (car-safe display-buffer-window)) - (help-buffer (when (window-live-p help-window) +HELP-WINDOW is the window used for displaying the help buffer." + (let* ((help-buffer (when (window-live-p help-window) (window-buffer help-window))) - (help-value (cdr-safe display-buffer-window))) + (help-setup (when (window-live-p help-window) + (window-parameter help-window 'help-setup)))) (when help-buffer ;; Handle `help-window-point-marker'. (when (eq (marker-buffer help-window-point-marker) help-buffer) @@ -1078,6 +1077,7 @@ (cond ((or (eq help-window (selected-window)) (and (or (eq help-window-select t) + (eq help-setup 'new-frame) (and (eq help-window-select 'other) (eq (window-frame help-window) (selected-frame)) (> (length (window-list nil 'no-mini)) 2))) @@ -1085,13 +1085,12 @@ ;; The help window is or gets selected ... (help-window-display-message (cond - ((eq help-value 'new-window) + ((eq help-setup 'new-window) ;; ... and is new, ... - "Type \"q\" to delete this window") - ((eq help-value 'new-frame) - ;; ... is on a new frame ... - "Type \"q\" to delete this frame") - ((eq help-value 'reuse-other-window) + "Type \"q\" to delete help window") + ((eq help-setup 'new-frame) + "Type \"q\" to delete help frame") + ((eq help-setup 'reuse-other) ;; ... or displayed some other buffer before. "Type \"q\" to restore previous buffer")) help-window t)) @@ -1101,15 +1100,22 @@ ;; other one is the selected one. (help-window-display-message (cond - ((eq help-value 'new-window) + ((eq help-setup 'new-window) "Type \\[delete-other-windows] to delete the help window") - ((eq help-value 'reuse-other-window) - "Type \"q\" in other window to quit")) + ((eq help-setup 'reuse-other) + "Type \"q\" in help window to restore its previous buffer")) help-window 'other)) (t - ;; Not much to say here. + ;; The help window is not selected ... (help-window-display-message - "Type \"q\" in help window to quit" help-window)))))) + (cond + ((eq help-setup 'new-window) + ;; ... and is new, ... + "Type \"q\" in help window to delete it") + ((eq help-setup 'reuse-other) + ;; ... or displayed some other buffer before. + "Type \"q\" in help window to restore previous buffer")) + help-window)))))) ;; `with-help-window' is a wrapper for `with-output-to-temp-buffer' ;; providing the following additional twists: @@ -1134,18 +1140,18 @@ variable `temp-buffer-show-specifiers' to an appropriate value." (declare (indent 1) (debug t)) `(progn - ;; Reset `display-buffer-window': `display-buffer' is - ;; supposed to set this to the window displaying the buffer plus - ;; some additional information. - (setq display-buffer-window nil) ;; Make `help-window-point-marker' point nowhere. The only place ;; where this should be set to a buffer position is within BODY. (set-marker help-window-point-marker nil) - (prog1 - ;; Return value returned by `with-output-to-temp-buffer'. - (with-output-to-temp-buffer ,buffer-name - (progn ,@body)) - (when display-buffer-window (help-window-setup))))) + (let* (help-window + (temp-buffer-show-hook + (cons (lambda () (setq help-window (selected-window))) + temp-buffer-show-hook))) + ;; Return value returned by `with-output-to-temp-buffer'. + (prog1 + (with-output-to-temp-buffer ,buffer-name + (progn ,@body)) + (help-window-setup help-window))))) ;; Called from C, on encountering `help-char' when reading a char. ;; Don't print to *Help*; that would clobber Help history. === modified file 'lisp/window.el' --- lisp/window.el 2011-09-13 19:10:32 +0000 +++ lisp/window.el 2011-09-14 09:17:30 +0000 @@ -3785,17 +3785,6 @@ (window-state-put-2 ignore)) (window-check frame)))) -(defvar display-buffer-window nil - "Window used by `display-buffer' and related information. -After `display-buffer' displays a buffer in some window this -variable is a cons cell whose car denotes the window used to -display the buffer. The cdr is supposed to be one of the symbols -`reuse-buffer-window', `reuse-other-window', `new-window' or -`new-frame'. - -See the function `display-buffer-record-window' for how this -variable can be assigned a value.") - (defun display-buffer-record-window (type window buffer) "Record information for window used by `display-buffer'. TYPE must be one of the symbols reuse-window, pop-up-window, or @@ -3804,15 +3793,13 @@ displayed." (cond ((eq type 'reuse-window) - ;; In `display-buffer-window' record whether we used a window on the - ;; same buffer or another one. - (if (eq (window-buffer window) buffer) - (setq display-buffer-window - (cons window 'reuse-buffer-window)) - (setq display-buffer-window - (cons window 'reuse-other-window))) - ;; In quit-restore parameter record information about the old buffer - ;; unless such information exists already. + ;; In `help-setup' window parameter record whether we used a window + ;; on the same buffer or another one. + (set-window-parameter + window 'help-setup + (if (eq (window-buffer window) buffer) 'reuse-same 'reuse-other)) + ;; In `quit-restore' parameter record information about the old + ;; buffer unless such information exists already. (unless (window-parameter window 'quit-restore) (set-window-parameter window 'quit-restore @@ -3820,15 +3807,15 @@ (window-point window) buffer (window-total-size window) (selected-window))))) ((eq type 'pop-up-window) - ;; In `display-buffer-window' record window as new. - (setq display-buffer-window (cons window 'new-window)) + ;; In `help-setup' window parameter record window as new. + (set-window-parameter window 'help-setup 'new-window) ;; In `quit-restore' parameter record that we popped up this window, ;; its buffer, and which window was selected before. (set-window-parameter window 'quit-restore (list 'new-window buffer (selected-window)))) ((eq type 'pop-up-frame) - ;; In `display-buffer-window' record window as on new frame. - (setq display-buffer-window (cons window 'new-frame)) + ;; In `help-setup' window parameter record window as on new frame. + (set-window-parameter window 'help-setup 'new-frame) ;; In `quit-restore' parameter record that we popped up this window ;; on a new frame, the buffer, and which window was selected before. (set-window-parameter @@ -3841,9 +3828,8 @@ should choose or create a window, display the specified buffer in it, and return the window. -The function specified here is responsible for setting the value -of `display-buffer-window' and the quit-restore parameter of the -window used." +The function specified here is responsible for setting the +quit-restore and help-setup parameters of the window used." :type '(choice (const nil) (function :tag "function")) @@ -3913,8 +3899,8 @@ function, that function is called with the buffer named BUFFER-NAME as first, and the element's cdr as second argument. In any case, that function is responsible for setting the value -of `display-buffer-window' and the quit-restore parameter of the -window used. +The function specified here is responsible for setting the +quit-restore and help-setup parameters of the window used. If this variable appears \"not to work\", because you added a name to it but the corresponding buffer is displayed in the @@ -4115,9 +4101,8 @@ `special-display-buffer-names' or matches a regexp in `special-display-regexps'. -The function specified here is responsible for setting the value -of `display-buffer-window' and the quit-restore parameter of the -window used." +The function specified here is responsible for setting the +quit-restore and help-setup parameters of the window used." :type 'function :group 'frames)