Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103902. ------------------------------------------------------------ revno: 103902 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2011-04-13 04:16:42 +0200 message: lisp/image-mode.el: Fix change in revno:103877 (2011-04-09). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-12 22:18:02 +0000 +++ lisp/ChangeLog 2011-04-13 02:16:42 +0000 @@ -1,3 +1,8 @@ +2011-04-13 Juanma Barranquero + + * image-mode.el (image-transform-set-scale): + Fix change in revno:103877 (2011-04-09). + 2011-04-12 Lars Magne Ingebrigtsen * net/network-stream.el (network-stream-open-starttls): Only do === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2011-04-09 20:28:01 +0000 +++ lisp/image-mode.el 2011-04-13 02:16:42 +0000 @@ -610,7 +610,7 @@ This command has no effect unless Emacs is compiled with ImageMagick support." (interactive "nScale: ") - (setq image-transform-resize resize) + (setq image-transform-resize scale) (image-toggle-display-image)) (defun image-transform-fit-to-height () ------------------------------------------------------------ revno: 103901 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2011-04-12 22:18:02 +0000 message: Merge changes made in Gnus trunk. gnus.texi (Window Layout): @itemize @code doesn't exist. It's @table @code. gnus-registry.el (gnus-registry--split-fancy-with-parent-internal): Fix logic bug. (gnus-registry-post-process-groups): Fix logging of no results and quote sender and subject. network-stream.el (network-stream-open-starttls): Only do opportunistic STARTTLS upgrades if we have built-in gnutls support. Upgrades via gnutls-cli are too slow to be done opportunistically. gnus-start.el (gnus-get-unread-articles): Slight cleanup. (gnus-read-active-for-groups): Don't try to finish getting stuff where we had no early-data returned. (gnus-get-unread-articles): Add a sanity check so that we don't issue two async commands to the same server at the same time. gnus-sum.el (gnus-summary-select-article-buffer): Doc fix. gnus-registry.el (gnus-registry-remake-db): Put the warning on a "warning" level. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-04-06 12:18:10 +0000 +++ doc/misc/ChangeLog 2011-04-12 22:18:02 +0000 @@ -1,3 +1,8 @@ +2011-04-12 Lars Magne Ingebrigtsen + + * gnus.texi (Window Layout): @itemize @code doesn't exist. It's @table + @code. + 2011-03-19 Antoine Levitt * gnus.texi (Listing Groups): Document gnus-group-list-ticked === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-03-30 14:59:42 +0000 +++ doc/misc/gnus.texi 2011-04-12 22:18:02 +0000 @@ -22836,7 +22836,7 @@ Here's a list of most of the currently known window configurations, and when they're used: -@itemize @code +@table @code @item group The group buffer. @@ -22903,7 +22903,7 @@ @item mml-preview Previewing a @acronym{MIME} part. -@end itemize +@end table @subsection Example Window Configurations === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-12 15:39:44 +0000 +++ lisp/ChangeLog 2011-04-12 22:18:02 +0000 @@ -1,3 +1,9 @@ +2011-04-12 Lars Magne Ingebrigtsen + + * net/network-stream.el (network-stream-open-starttls): Only do + opportunistic STARTTLS upgrades if we have built-in gnutls support. + Upgrades via gnutls-cli are too slow to be done opportunistically. + 2011-04-12 Juanma Barranquero * dframe.el (dframe-current-frame): Remove spurious quote. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-12 14:16:41 +0000 +++ lisp/gnus/ChangeLog 2011-04-12 22:18:02 +0000 @@ -1,4 +1,26 @@ -2011-04-12 Lars Magne Ingebrigtsen +2011-04-12 Teodor Zlatanov + + * gnus-registry.el (gnus-registry--split-fancy-with-parent-internal): + Fix logic bug. + (gnus-registry-post-process-groups): Fix logging of no results and + quote sender and subject. + +2011-04-12 Lars Magne Ingebrigtsen + + * gnus-start.el (gnus-get-unread-articles): Slight cleanup. + (gnus-read-active-for-groups): Don't try to finish getting stuff where + we had no early-data returned. + (gnus-get-unread-articles): Add a sanity check so that we don't issue + two async commands to the same server at the same time. + +2011-04-12 Stig Sandbeck Mathisen (tiny change) + + * gnus-sum.el (gnus-summary-select-article-buffer): Doc fix. + +2011-04-12 Lars Magne Ingebrigtsen + + * gnus-registry.el (gnus-registry-remake-db): Put the warning on a + "warning" level. * mm-url.el (mm-url-package-name): Removed to ease third-party reuse. (mm-url-insert-file-contents): Don't set the package names. === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2011-04-11 22:17:30 +0000 +++ lisp/gnus/gnus-registry.el 2011-04-12 22:18:02 +0000 @@ -258,7 +258,7 @@ This is not required after changing `gnus-registry-cache-file'." (interactive (list (y-or-n-p "Remake and CLEAR the Gnus registry? "))) (when forsure - (gnus-message 1 "Remaking the Gnus registry") + (gnus-message 4 "Remaking the Gnus registry") (setq gnus-registry-db (gnus-registry-make-db)))) (defun gnus-registry-read () @@ -428,9 +428,9 @@ (when (and (null found) (memq 'sender gnus-registry-track-extra) sender - (gnus-grep-in-list - sender - gnus-registry-unfollowed-addresses)) + (not (gnus-grep-in-list + sender + gnus-registry-unfollowed-addresses))) (let ((groups (apply 'append (mapcar @@ -564,12 +564,12 @@ ((null out) (gnus-message 5 - "%s: no matches for %s %s." - log-agent out mode key) + "%s: no matches for %s '%s'." + log-agent mode key) nil) (t (gnus-message 5 - "%s: too many extra matches (%s) for %s %s. Returning none." + "%s: too many extra matches (%s) for %s '%s'. Returning none." log-agent out mode key) nil)))) === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2011-04-07 22:48:21 +0000 +++ lisp/gnus/gnus-start.el 2011-04-12 22:18:02 +0000 @@ -1699,33 +1699,43 @@ (gnus-read-active-file-1 method nil)))) ;; Start early async retrieval of data. - (dolist (elem type-cache) - (destructuring-bind (method method-type infos dummy) elem - (when (and method infos - (not (gnus-method-denied-p method))) - ;; If the open-server method doesn't exist, then the method - ;; itself doesn't exist, so we ignore it. - (if (not (ignore-errors (gnus-get-function method 'open-server))) - (setq type-cache (delq elem type-cache)) - (unless (gnus-server-opened method) - (gnus-open-server method)) - (when (and - (gnus-server-opened method) - (gnus-check-backend-function - 'retrieve-group-data-early (car method))) - (when (gnus-check-backend-function 'request-scan (car method)) - (gnus-request-scan nil method)) - ;; Store the token we get back from -early so that we - ;; can pass it to -finish later. - (setcar (nthcdr 3 elem) - (gnus-retrieve-group-data-early method infos))))))) + (let ((done-methods nil) + sanity-spec) + (dolist (elem type-cache) + (destructuring-bind (method method-type infos dummy) elem + (setq sanity-spec (list (car method) (cadr method))) + (when (and method infos + (not (gnus-method-denied-p method))) + ;; If the open-server method doesn't exist, then the method + ;; itself doesn't exist, so we ignore it. + (if (not (ignore-errors (gnus-get-function method 'open-server))) + (setq type-cache (delq elem type-cache)) + (unless (gnus-server-opened method) + (gnus-open-server method)) + (when (and + ;; This is a sanity check, so that we never + ;; attempt to start two async requests to the + ;; same server, because that will fail. This + ;; should never happen, since the methods should + ;; be unique at this point, but apparently it + ;; does happen in the wild with some setups. + (not (member sanity-spec done-methods)) + (gnus-server-opened method) + (gnus-check-backend-function + 'retrieve-group-data-early (car method))) + (push sanity-spec done-methods) + (when (gnus-check-backend-function 'request-scan (car method)) + (gnus-request-scan nil method)) + ;; Store the token we get back from -early so that we + ;; can pass it to -finish later. + (setcar (nthcdr 3 elem) + (gnus-retrieve-group-data-early method infos)))))))) ;; Do the rest of the retrieval. (dolist (elem type-cache) (destructuring-bind (method method-type infos early-data) elem (when (and method infos - (not (eq (gnus-server-status method) - 'denied))) + (not (gnus-method-denied-p method))) (let ((updatep (gnus-check-backend-function 'request-update-info (car method)))) ;; See if any of the groups from this method require updating. @@ -1763,6 +1773,7 @@ ;; Finish up getting the data from the methods that have -early ;; methods. ((and + early-data (gnus-check-backend-function 'finish-retrieve-group-infos (car method)) (or (not (gnus-agent-method-p method)) (gnus-online method))) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2011-04-04 14:03:08 +0000 +++ lisp/gnus/gnus-sum.el 2011-04-12 22:18:02 +0000 @@ -7035,7 +7035,7 @@ (defun gnus-summary-select-article-buffer () "Reconfigure windows to show the article buffer. -If `gnus-widen-article-buffer' is set, show only the article +If `gnus-widen-article-window' is set, show only the article buffer." (interactive) (if (not (gnus-buffer-live-p gnus-article-buffer)) === modified file 'lisp/net/network-stream.el' --- lisp/net/network-stream.el 2011-04-02 23:41:03 +0000 +++ lisp/net/network-stream.el 2011-04-12 22:18:02 +0000 @@ -171,9 +171,11 @@ (resulting-type 'plain) starttls-command) - ;; If we have STARTTLS support, try to upgrade the connection. + ;; If we have built-in STARTTLS support, try to upgrade the + ;; connection. (when (and (or (fboundp 'open-gnutls-stream) - (executable-find "gnutls-cli")) + (and require-tls + (executable-find "gnutls-cli"))) capabilities success-string starttls-function (setq starttls-command (funcall starttls-function capabilities))) ------------------------------------------------------------ revno: 103900 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-04-12 17:39:44 +0200 message: lisp/dframe.el (dframe-current-frame): Remove spurious quote. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-12 13:14:44 +0000 +++ lisp/ChangeLog 2011-04-12 15:39:44 +0000 @@ -1,3 +1,7 @@ +2011-04-12 Juanma Barranquero + + * dframe.el (dframe-current-frame): Remove spurious quote. + 2011-04-12 Glenn Morris * calendar/cal-tex.el (cal-tex-end-document): === modified file 'lisp/dframe.el' --- lisp/dframe.el 2011-01-26 08:36:39 +0000 +++ lisp/dframe.el 2011-04-12 15:39:44 +0000 @@ -632,7 +632,7 @@ FRAME-VAR is the variable storing the currently active dedicated frame. If the current frame's buffer uses DESIRED-MAJOR-MODE, then use that frame." (if (not (eq (selected-frame) (symbol-value frame-var))) - (if (and (eq major-mode 'desired-major-mode) + (if (and (eq major-mode desired-major-mode) (get-buffer-window (current-buffer)) (window-frame (get-buffer-window (current-buffer)))) (window-frame (get-buffer-window (current-buffer))) ------------------------------------------------------------ revno: 103899 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2011-04-12 14:16:41 +0000 message: mm-url.el (mm-url-package-name): Removed to ease third-party reuse. (mm-url-insert-file-contents): Don't set the package names. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-11 22:17:30 +0000 +++ lisp/gnus/ChangeLog 2011-04-12 14:16:41 +0000 @@ -1,3 +1,8 @@ +2011-04-12 Lars Magne Ingebrigtsen + + * mm-url.el (mm-url-package-name): Removed to ease third-party reuse. + (mm-url-insert-file-contents): Don't set the package names. + 2011-04-11 Teodor Zlatanov * gnus-registry.el (gnus-registry-action): Remove properties and === modified file 'lisp/gnus/mm-url.el' --- lisp/gnus/mm-url.el 2011-01-26 08:36:39 +0000 +++ lisp/gnus/mm-url.el 2011-04-12 14:16:41 +0000 @@ -83,13 +83,6 @@ ;;; Internal variables -(defvar mm-url-package-name - (gnus-replace-in-string - (gnus-replace-in-string gnus-version " v.*$" "") - " " "-")) - -(defvar mm-url-package-version gnus-version-number) - ;; Stolen from w3. (defvar mm-url-html-entities '( @@ -298,10 +291,6 @@ (if (not (and (boundp 'url-version) (equal url-version "Emacs"))) (list (cons "Connection" "Close")))) - (url-package-name (or mm-url-package-name - url-package-name)) - (url-package-version (or mm-url-package-version - url-package-version)) result) (setq result (url-insert-file-contents url)) (save-excursion ------------------------------------------------------------ revno: 103898 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-04-12 15:14:44 +0200 message: lisp/ChangeLog: Fix date of entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-12 07:03:52 +0000 +++ lisp/ChangeLog 2011-04-12 13:14:44 +0000 @@ -24,8 +24,8 @@ 2011-04-10 Leo Liu - * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Fix - typo. + * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): + Fix typo. 2011-04-09 Chong Yidong @@ -38,14 +38,14 @@ (image-transform-fit-to-width): Handle image-toggle-display-image and image-transform-resize directly. -2011-04-08 Sho Nakatani +2011-04-08 Sho Nakatani * doc-view.el (doc-view-fit-width-to-window) - (doc-view-fit-height-to-window, doc-view-fit-page-to-window): New - functions for fitting the shown image to the Emacs window size. + (doc-view-fit-height-to-window, doc-view-fit-page-to-window): + New functions for fitting the shown image to the Emacs window size. (doc-view-mode-map): Add bindings for the new functions. -2011-03-24 Juanma Barranquero +2011-04-08 Juanma Barranquero * vc-annotate.el (vc-annotate-show-log-revision-at-line): Fix typo in docstring. @@ -125,12 +125,12 @@ (package-menu-refresh, list-packages): Use it. (package-menu--print-info): Renamed from package-print-package. Return insertion data instead of inserting it directly. - (package-menu-describe-package, package-menu-execute): Use - tabulated-list-get-id. + (package-menu-describe-package, package-menu-execute): + Use tabulated-list-get-id. (package-menu-mark-delete, package-menu-mark-install) (package-menu-mark-unmark, package-menu-backup-unmark) - (package-menu-mark-obsolete-for-deletion): Use - tabulated-list-put-tag. + (package-menu-mark-obsolete-for-deletion): + Use tabulated-list-put-tag. (package--list-packages, package-menu-revert) (package-menu-get-package, package-menu-get-version) (package-menu-sort-by-column): Functions deleted. @@ -247,11 +247,11 @@ 2011-04-02 Chong Yidong - * emacs-lisp/package.el (package--with-work-buffer): Recognize - https URLs. + * emacs-lisp/package.el (package--with-work-buffer): + Recognize https URLs. - * net/network-stream.el: Move from gnus/proto-stream.el. Change - prefix to network-stream throughout. + * net/network-stream.el: Move from gnus/proto-stream.el. + Change prefix to network-stream throughout. (open-protocol-stream): Merge into open-network-stream, leaving open-protocol-stream as an alias. Handle nil BUFFER args. @@ -929,10 +929,10 @@ 2011-03-11 Ken Manheimer - * allout-widgets.el (allout-widgets-tally): Initialize - allout-widgets-tally as a hash table rather than nil to prevent - mode-line redisplay warnings. - Also, clarify the module description and fix a comment typo. + * allout-widgets.el (allout-widgets-tally): + Initialize allout-widgets-tally as a hash table rather than nil to + prevent mode-line redisplay warnings. Also, clarify the module + description and fix a comment typo. 2011-03-11 Juanma Barranquero ------------------------------------------------------------ revno: 103897 committer: Andreas Schwab branch nick: emacs timestamp: Tue 2011-04-12 12:20:32 +0200 message: Use xfree instead of free where appropriate (Bug#8437) * charset.c (Fclear_charset_maps): Use xfree instead of free. (Bug#8437) * keyboard.c (parse_tool_bar_item): Likewise. * sound.c (sound_cleanup, alsa_close): Likewise. * termcap.c (tgetent): Likewise. * xfns.c (x_default_font_parameter): Likewise. * xsettings.c (read_and_apply_settings): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-12 10:20:32 +0000 +++ src/ChangeLog 2011-04-12 10:20:32 +0000 @@ -1,5 +1,13 @@ 2011-04-12 Andreas Schwab + * charset.c (Fclear_charset_maps): Use xfree instead of free. + (Bug#8437) + * keyboard.c (parse_tool_bar_item): Likewise. + * sound.c (sound_cleanup, alsa_close): Likewise. + * termcap.c (tgetent): Likewise. + * xfns.c (x_default_font_parameter): Likewise. + * xsettings.c (read_and_apply_settings): Likewise. + * alloc.c (overrun_check_malloc, overrun_check_realloc) (overrun_check_free): Protoize. === modified file 'src/charset.c' --- src/charset.c 2011-04-09 20:46:34 +0000 +++ src/charset.c 2011-04-12 10:20:32 +0000 @@ -2145,7 +2145,7 @@ { if (temp_charset_work) { - free (temp_charset_work); + xfree (temp_charset_work); temp_charset_work = NULL; } === modified file 'src/keyboard.c' --- src/keyboard.c 2011-04-09 19:12:39 +0000 +++ src/keyboard.c 2011-04-12 10:20:32 +0000 @@ -8253,7 +8253,7 @@ PROP (TOOL_BAR_ITEM_LABEL) = new_lbl; else PROP (TOOL_BAR_ITEM_LABEL) = make_string ("", 0); - free (buf); + xfree (buf); } /* If got a filter apply it on binding. */ === modified file 'src/sound.c' --- src/sound.c 2011-04-10 20:43:08 +0000 +++ src/sound.c 2011-04-12 10:20:32 +0000 @@ -460,8 +460,8 @@ current_sound_device->close (current_sound_device); if (current_sound->fd > 0) emacs_close (current_sound->fd); - free (current_sound_device); - free (current_sound); + xfree (current_sound_device); + xfree (current_sound); return Qnil; } @@ -1095,7 +1095,7 @@ snd_pcm_drain (p->handle); snd_pcm_close (p->handle); } - free (p); + xfree (p); } } === modified file 'src/termcap.c' --- src/termcap.c 2011-03-12 12:03:24 +0000 +++ src/termcap.c 2011-04-12 10:20:32 +0000 @@ -1,6 +1,6 @@ /* Work-alike for termcap, plus extra features. Copyright (C) 1985, 1986, 1993, 1994, 1995, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2008, 2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -468,15 +468,15 @@ if (scan_file (term, fd, &buf) == 0) { close (fd); - free (buf.beg); + xfree (buf.beg); if (malloc_size) - free (bp); + xfree (bp); return 0; } /* Free old `term' if appropriate. */ if (term != name) - free (term); + xfree (term); /* If BP is malloc'd by us, make sure it is big enough. */ if (malloc_size) @@ -506,7 +506,7 @@ } close (fd); - free (buf.beg); + xfree (buf.beg); if (malloc_size) bp = (char *) xrealloc (bp, bp1 - bp + 1); === modified file 'src/xfns.c' --- src/xfns.c 2011-04-07 03:34:05 +0000 +++ src/xfns.c 2011-04-12 10:20:32 +0000 @@ -2983,7 +2983,7 @@ { char *name = xstrdup (system_font); font = font_open_by_name (f, name); - free (name); + xfree (name); } } === modified file 'src/xsettings.c' --- src/xsettings.c 2011-02-12 05:13:34 +0000 +++ src/xsettings.c 2011-04-12 10:20:32 +0000 @@ -566,20 +566,20 @@ if (send_event_p) store_config_changed_event (Qtool_bar_style, dpyname); } - free (settings.tb_style); + xfree (settings.tb_style); } if (settings.seen & SEEN_FONT) { if (!current_font || strcmp (current_font, settings.font) != 0) { - free (current_font); + xfree (current_font); current_font = settings.font; if (send_event_p) store_config_changed_event (Qfont_name, dpyname); } else - free (settings.font); + xfree (settings.font); } } ------------------------------------------------------------ revno: 103896 committer: Andreas Schwab branch nick: emacs timestamp: Tue 2011-04-12 12:20:32 +0200 message: * alloc.c (overrun_check_malloc, overrun_check_realloc) (overrun_check_free): Protoize. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-12 08:12:01 +0000 +++ src/ChangeLog 2011-04-12 10:20:32 +0000 @@ -1,3 +1,8 @@ +2011-04-12 Andreas Schwab + + * alloc.c (overrun_check_malloc, overrun_check_realloc) + (overrun_check_free): Protoize. + 2011-04-12 Paul Eggert * sysdep.c (emacs_read, emacs_write): Check for negative sizes === modified file 'src/alloc.c' --- src/alloc.c 2011-04-03 05:41:46 +0000 +++ src/alloc.c 2011-04-12 10:20:32 +0000 @@ -559,8 +559,7 @@ /* Like malloc, but wraps allocated block with header and trailer. */ POINTER_TYPE * -overrun_check_malloc (size) - size_t size; +overrun_check_malloc (size_t size) { register unsigned char *val; size_t overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_SIZE*2 : 0; @@ -584,11 +583,9 @@ with header and trailer. */ POINTER_TYPE * -overrun_check_realloc (block, size) - POINTER_TYPE *block; - size_t size; +overrun_check_realloc (POINTER_TYPE *block, size_t size) { - register unsigned char *val = (unsigned char *)block; + register unsigned char *val = (unsigned char *) block; size_t overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_SIZE*2 : 0; if (val @@ -624,10 +621,9 @@ /* Like free, but checks block for overrun. */ void -overrun_check_free (block) - POINTER_TYPE *block; +overrun_check_free (POINTER_TYPE *block) { - unsigned char *val = (unsigned char *)block; + unsigned char *val = (unsigned char *) block; ++check_depth; if (val ------------------------------------------------------------ revno: 103895 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-04-12 06:18:34 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2011-04-11 10:18:22 +0000 +++ autogen/configure 2011-04-12 10:18:34 +0000 @@ -10009,7 +10009,10 @@ HAVE_IMAGEMAGICK=no if test "${HAVE_X11}" = "yes"; then if test "${with_imagemagick}" != "no"; then - IMAGEMAGICK_MODULE="Wand" + ## 6.2.8 is the earliest version known to work, but earlier versions + ## might work - let us know if you find one. + ## 6.0.7 does not work. See bug#7955. + IMAGEMAGICK_MODULE="Wand >= 6.2.8" succeeded=no ------------------------------------------------------------ revno: 103894 committer: Paul Eggert branch nick: trunk timestamp: Tue 2011-04-12 01:12:01 -0700 message: * sysdep.c (emacs_read, emacs_write): Check for negative sizes since callers should never pass a negative size. Change the signature to match that of plain 'read' and 'write'; see . * lisp.h: Update prototypes of emacs_write and emacs_read. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-11 16:39:09 +0000 +++ src/ChangeLog 2011-04-12 08:12:01 +0000 @@ -1,3 +1,11 @@ +2011-04-12 Paul Eggert + + * sysdep.c (emacs_read, emacs_write): Check for negative sizes + since callers should never pass a negative size. + Change the signature to match that of plain 'read' and 'write'; see + . + * lisp.h: Update prototypes of emacs_write and emacs_read. + 2011-04-11 Eli Zaretskii * xdisp.c (redisplay_window): Don't try to determine the character === modified file 'src/lisp.h' --- src/lisp.h 2011-04-10 20:43:08 +0000 +++ src/lisp.h 2011-04-12 08:12:01 +0000 @@ -3346,8 +3346,8 @@ extern void seed_random (long); extern int emacs_open (const char *, int, int); extern int emacs_close (int); -extern ssize_t emacs_read (int, char *, ssize_t); -extern ssize_t emacs_write (int, const char *, ssize_t); +extern ssize_t emacs_read (int, char *, size_t); +extern ssize_t emacs_write (int, const char *, size_t); enum { READLINK_BUFSIZE = 1024 }; extern char *emacs_readlink (const char *, char [READLINK_BUFSIZE]); #ifndef HAVE_MEMSET === modified file 'src/sysdep.c' --- src/sysdep.c 2011-04-10 20:43:08 +0000 +++ src/sysdep.c 2011-04-12 08:12:01 +0000 @@ -1826,10 +1826,18 @@ } ssize_t -emacs_read (int fildes, char *buf, ssize_t nbyte) +emacs_read (int fildes, char *buf, size_t nbyte) { register ssize_t rtnval; + /* Defend against the possibility that a buggy caller passes a negative NBYTE + argument, which would be converted to a large unsigned size_t NBYTE. This + defense prevents callers from doing large writes, unfortunately. This + size restriction can be removed once we have carefully checked that there + are no such callers. */ + if ((ssize_t) nbyte < 0) + abort (); + while ((rtnval = read (fildes, buf, nbyte)) == -1 && (errno == EINTR)) QUIT; @@ -1837,13 +1845,17 @@ } ssize_t -emacs_write (int fildes, const char *buf, ssize_t nbyte) +emacs_write (int fildes, const char *buf, size_t nbyte) { register ssize_t rtnval, bytes_written; + /* Defend against negative NBYTE, as in emacs_read. */ + if ((ssize_t) nbyte < 0) + abort (); + bytes_written = 0; - while (nbyte > 0) + while (nbyte != 0) { rtnval = write (fildes, buf, nbyte); ------------------------------------------------------------ revno: 103893 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-04-12 00:03:52 -0700 message: Small cal-tex fix. * lisp/calendar/cal-tex.el (cal-tex-end-document): Try to automatically use latin1 input if needed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-12 04:02:38 +0000 +++ lisp/ChangeLog 2011-04-12 07:03:52 +0000 @@ -1,5 +1,8 @@ 2011-04-12 Glenn Morris + * calendar/cal-tex.el (cal-tex-end-document): + Try to automatically use latin1 input if needed. + * calendar/cal-hebrew.el (diary-hebrew-rosh-hodesh): Don't try to cons a mark onto an empty element. === modified file 'lisp/calendar/cal-tex.el' --- lisp/calendar/cal-tex.el 2011-01-25 04:08:28 +0000 +++ lisp/calendar/cal-tex.el 2011-04-12 07:03:52 +0000 @@ -1587,6 +1587,16 @@ Insert the trailer to LaTeX document, pop to LaTeX buffer, add informative header, and run HOOK." (cal-tex-e-document) + (or (and cal-tex-preamble-extra + (string-match "inputenc" cal-tex-preamble-extra)) + (not (re-search-backward "[^[:ascii:]]" nil 'move)) + (progn + (goto-char (point-min)) + (when (search-forward "documentclass" nil t) + (forward-line 1) + ;; Eg for some Bahai holidays. + ;; FIXME latin1 might not always be right. + (insert "\\usepackage[latin1]{inputenc}\n")))) (latex-mode) (pop-to-buffer cal-tex-buffer) (goto-char (point-min)) ------------------------------------------------------------ revno: 103892 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-04-11 21:02:38 -0700 message: cal-hebrew fix for diary-hebrew-rosh-hodesh. * lisp/calendar/cal-hebrew.el (diary-hebrew-rosh-hodesh): Don't try to cons a mark onto an empty element. Recipe showing the problem: ~/diary: &%%(diary-rosh-hodesh) &%%(diary-parasha) emacs -Q --eval "(progn (add-hook 'diary-nongregorian-listing-hook 'diary-hebrew-list-entries) (setq cal-tex-diary t))" -f calendar Move to Jan 2011, press `t m', latex the generated file. [Port to 23.4] diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-11 03:44:54 +0000 +++ lisp/ChangeLog 2011-04-12 04:02:38 +0000 @@ -1,3 +1,8 @@ +2011-04-12 Glenn Morris + + * calendar/cal-hebrew.el (diary-hebrew-rosh-hodesh): + Don't try to cons a mark onto an empty element. + 2011-04-11 Leo Liu * ido.el (ido-buffer-internal): Allow method 'kill for virtual === modified file 'lisp/calendar/cal-hebrew.el' --- lisp/calendar/cal-hebrew.el 2011-03-07 07:48:32 +0000 +++ lisp/calendar/cal-hebrew.el 2011-04-12 04:02:38 +0000 @@ -954,16 +954,17 @@ (format "%s (second day)" this-month) this-month)))) (if (= (% d 7) 6) ; Saturday--check for Shabbat Mevarchim - (cons mark - (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day)) + (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day)) + (cons mark (format "Mevarchim Rosh Hodesh %s (%s)" (aref h-month-names (if (= h-month (calendar-hebrew-last-month-of-year h-year)) 0 h-month)) - (aref calendar-day-name-array (- 29 h-day)))) - ((and (< h-day 30) (> h-day 22) (= 30 last-day)) + (aref calendar-day-name-array (- 29 h-day))))) + ((and (< h-day 30) (> h-day 22) (= 30 last-day)) + (cons mark (format "Mevarchim Rosh Hodesh %s (%s-%s)" (aref h-month-names h-month) (if (= h-day 29)