Now on revision 113914. ------------------------------------------------------------ revno: 113914 fixes bug: http://debbugs.gnu.org/14926 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-08-15 23:53:41 -0700 message: * bytecomp.el (byte-compile-make-variable-buffer-local): Tweak warning. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-16 06:50:58 +0000 +++ lisp/ChangeLog 2013-08-16 06:53:41 +0000 @@ -1,5 +1,8 @@ 2013-08-16 Glenn Morris + * emacs-lisp/bytecomp.el (byte-compile-make-variable-buffer-local): + Tweak warning. (Bug#14926) + * menu-bar.el (send-mail-item-name, read-mail-item-name): Remove. (menu-bar-tools-menu): Simplify news and mail items. (Bug#15095) === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2013-08-08 01:37:47 +0000 +++ lisp/emacs-lisp/bytecomp.el 2013-08-16 06:53:41 +0000 @@ -4274,7 +4274,7 @@ (if (and (eq (car-safe (car-safe (cdr-safe form))) 'quote) (byte-compile-warning-enabled-p 'make-local)) (byte-compile-warn - "`make-variable-buffer-local' should be called at toplevel")) + "`make-variable-buffer-local' not called at toplevel")) (byte-compile-normal-call form)) (put 'make-variable-buffer-local 'byte-hunk-handler 'byte-compile-form-make-variable-buffer-local) ------------------------------------------------------------ revno: 113913 fixes bug: http://debbugs.gnu.org/15095 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-08-15 23:50:58 -0700 message: Simplify news and mail menu items * lisp/menu-bar.el (send-mail-item-name, read-mail-item-name): Remove. (menu-bar-tools-menu): Simplify news and mail items. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-16 06:33:08 +0000 +++ lisp/ChangeLog 2013-08-16 06:50:58 +0000 @@ -1,5 +1,8 @@ 2013-08-16 Glenn Morris + * menu-bar.el (send-mail-item-name, read-mail-item-name): Remove. + (menu-bar-tools-menu): Simplify news and mail items. (Bug#15095) + * image-mode.el (image-mode-map): Add menu items to reverse, increase, decrease, reset animation speed. (image--set-speed, image-increase-speed, image-decrease-speed) === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2013-02-17 03:40:38 +0000 +++ lisp/menu-bar.el 2013-08-16 06:50:58 +0000 @@ -1307,26 +1307,6 @@ ;; The "Tools" menu items -(defun send-mail-item-name () - (let* ((known-send-mail-commands '((sendmail-user-agent . "sendmail") - (mh-e-user-agent . "MH") - (message-user-agent . "Gnus Message") - (gnus-user-agent . "Gnus"))) - (name (assq mail-user-agent known-send-mail-commands))) - (if name - (setq name (cdr name)) - (setq name (symbol-name mail-user-agent)) - (if (string-match "\\(.+\\)-user-agent" name) - (setq name (match-string 1 name)))) - name)) - -(defun read-mail-item-name () - (let* ((known-rmail-commands '((rmail . "RMAIL") - (mh-rmail . "MH") - (gnus . "Gnus"))) - (known (assq read-mail-command known-rmail-commands))) - (if known (cdr known) (symbol-name read-mail-command)))) - (defvar menu-bar-games-menu (let ((menu (make-sparse-keymap "Games"))) @@ -1473,18 +1453,17 @@ (bindings--define-key menu [directory-search] '(menu-item "Directory Search" eudc-tools-menu)) (bindings--define-key menu [compose-mail] - '(menu-item (format "Send Mail (with %s)" (send-mail-item-name)) compose-mail + '(menu-item "Compose New Mail" compose-mail :visible (and mail-user-agent (not (eq mail-user-agent 'ignore))) - :help "Send a mail message")) + :help "Start writing a new mail message")) (bindings--define-key menu [rmail] - '(menu-item (format "Read Mail (with %s)" (read-mail-item-name)) - menu-bar-read-mail + '(menu-item "Read Mail" menu-bar-read-mail :visible (and read-mail-command (not (eq read-mail-command 'ignore))) - :help "Read your mail and reply to it")) + :help "Read your mail")) (bindings--define-key menu [gnus] - '(menu-item "Read Net News (Gnus)" gnus + '(menu-item "Read Net News" gnus :help "Read network news groups")) (bindings--define-key menu [separator-vc] ------------------------------------------------------------ revno: 113912 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-08-15 23:33:08 -0700 message: Add functions to change the speed of animated images * lisp/image-mode.el (image-mode-map): Add menu items to reverse, increase, decrease, reset animation speed. (image--set-speed, image-increase-speed, image-decrease-speed) (image-reverse-speed, image-reset-speed): New functions. (image-mode-map): Add bindings for speed commands. * lisp/image.el (image-animate-get-speed, image-animate-set-speed): New functions. (image-animate-timeout): Respect image :speed property. * etc/NEWS: Mention this. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-08-13 20:13:02 +0000 +++ etc/NEWS 2013-08-16 06:33:08 +0000 @@ -347,6 +347,8 @@ `f' (`image-next-frame') and `b' (`image-previous-frame') visit the next or previous frame. `F' (`image-goto-frame') shows a specific frame. +*** New commands to speed up, slow down, or reverse animation. + --- *** The command `image-mode-fit-frame' deletes other windows. When toggling, it restores the frame's previous window configuration. @@ -683,6 +685,8 @@ *** New functions `image-current-frame' and `image-show-frame' for getting and setting the current frame of a multi-frame image. +*** You can change the speed of animated images. + ** Changes in encoding and decoding of text --- === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-15 17:21:19 +0000 +++ lisp/ChangeLog 2013-08-16 06:33:08 +0000 @@ -1,3 +1,15 @@ +2013-08-16 Glenn Morris + + * image-mode.el (image-mode-map): Add menu items to reverse, + increase, decrease, reset animation speed. + (image--set-speed, image-increase-speed, image-decrease-speed) + (image-reverse-speed, image-reset-speed): New functions. + (image-mode-map): Add bindings for speed commands. + + * image.el (image-animate-get-speed, image-animate-set-speed): + New functions. + (image-animate-timeout): Respect image :speed property. + 2013-08-15 Stefan Monnier * emacs-lisp/debug.el (debugger-setup-buffer): Put point on the === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2013-05-27 00:59:33 +0000 +++ lisp/image-mode.el 2013-08-16 06:33:08 +0000 @@ -354,6 +354,10 @@ (define-key map "b" 'image-previous-frame) (define-key map "n" 'image-next-file) (define-key map "p" 'image-previous-file) + (define-key map "a+" 'image-increase-speed) + (define-key map "a-" 'image-decrease-speed) + (define-key map "a0" 'image-reset-speed) + (define-key map "ar" 'image-reverse-speed) (define-key map [remap forward-char] 'image-forward-hscroll) (define-key map [remap backward-char] 'image-backward-hscroll) (define-key map [remap right-char] 'image-forward-hscroll) @@ -412,7 +416,23 @@ (image-toggle-animation))) :style toggle :selected image-animate-loop :active image-multi-frame - :help "Animate images once, or forever?"] + :help "Animate images once, or forever?"] + ["Reverse Animation" image-reverse-speed + :style toggle :selected (let ((image (image-get-display-property))) + (and image (< + (image-animate-get-speed image) + 0))) + :active image-multi-frame + :help "Reverse direction of this image's animation?"] + ["Speed Up Animation" image-increase-speed + :active image-multi-frame + :help "Speed up this image's animation"] + ["Slow Down Animation" image-decrease-speed + :active image-multi-frame + :help "Slow down this image's animation"] + ["Reset Animation Speed" image-reset-speed + :active image-multi-frame + :help "Reset the speed of this image's animation"] ["Next Frame" image-next-frame :active image-multi-frame :help "Show the next frame of this image"] ["Previous Frame" image-previous-frame :active image-multi-frame @@ -437,7 +457,10 @@ (defun image-mode () "Major mode for image files. You can use \\\\[image-toggle-display] -to toggle between display as an image and display as text." +to toggle between display as an image and display as text. + +Key bindings: +\\{image-mode-map}" (interactive) (condition-case err (progn @@ -703,6 +726,48 @@ (image-animate image index (if image-animate-loop t))))))))) +(defun image--set-speed (speed &optional multiply) + "Set speed of an animated image to SPEED. +If MULTIPLY is non-nil, treat SPEED as a multiplication factor. +If SPEED is `reset', reset the magnitude of the speed to 1." + (let ((image (image-get-display-property))) + (cond + ((null image) + (error "No image is present")) + ((null image-multi-frame) + (message "No image animation.")) + (t + (if (eq speed 'reset) + (setq speed (if (< (image-animate-get-speed image) 0) + -1 1) + multiply nil)) + (image-animate-set-speed image speed multiply) + ;; FIXME Hack to refresh an active image. + (when (image-animate-timer image) + (image-toggle-animation) + (image-toggle-animation)) + (message "Image speed is now %s" (image-animate-get-speed image)))))) + +(defun image-increase-speed () + "Increase the speed of current animated image by a factor of 2." + (interactive) + (image--set-speed 2 t)) + +(defun image-decrease-speed () + "Decrease the speed of current animated image by a factor of 2." + (interactive) + (image--set-speed 0.5 t)) + +(defun image-reverse-speed () + "Reverse the animation of the current image." + (interactive) + (image--set-speed -1 t)) + +(defun image-reset-speed () + "Reset the animation speed of the current image." + (interactive) + (image--set-speed 'reset)) + (defun image-goto-frame (n &optional relative) "Show frame N of a multi-frame image. Optional argument OFFSET non-nil means interpret N as relative to the === modified file 'lisp/image.el' --- lisp/image.el 2013-08-13 20:13:02 +0000 +++ lisp/image.el 2013-08-16 06:33:08 +0000 @@ -687,6 +687,19 @@ (plist-put (cdr image) :index n) (force-window-update)) +(defun image-animate-get-speed (image) + "Return the speed factor for animating IMAGE." + (or (plist-get (cdr image) :speed) 1)) + +(defun image-animate-set-speed (image value &optional multiply) + "Set the speed factor for animating IMAGE to VALUE. +With optional argument MULTIPLY non-nil, treat VALUE as a +multiplication factor for the current value." + (plist-put (cdr image) :speed + (if multiply + (* value (image-animate-get-speed image)) + value))) + ;; FIXME? The delay may not be the same for different sub-images, ;; hence we need to call image-multi-frame-p to return it. ;; But it also returns count, so why do we bother passing that as an @@ -700,21 +713,28 @@ LIMIT determines when to stop. If t, loop forever. If nil, stop after displaying the last animation frame. Otherwise, stop after LIMIT seconds have elapsed. -The minimum delay between successive frames is `image-minimum-frame-delay'." +The minimum delay between successive frames is `image-minimum-frame-delay'. + +If the image has a non-nil :speed property, it acts as a multiplier +for the animation speed. A negative value means to animate in reverse." (image-show-frame image n t) - (setq n (1+ n)) - (let* ((time (float-time)) + (let* ((speed (image-animate-get-speed image)) + (time (float-time)) (animation (image-multi-frame-p image)) ;; Subtract off the time we took to load the image from the ;; stated delay time. - (delay (max (+ (or (cdr animation) image-default-frame-delay) + (delay (max (+ (* (or (cdr animation) image-default-frame-delay) + (/ 1 (abs speed))) time (- (float-time))) image-minimum-frame-delay)) done) - (if (>= n count) - (if limit - (setq n 0) - (setq done t))) + (setq n (if (< speed 0) + (1- n) + (1+ n))) + (if limit + (cond ((>= n count) (setq n 0)) + ((< n 0) (setq n (1- count)))) + (and (or (>= n count) (< n 0)) (setq done t))) (setq time-elapsed (+ delay time-elapsed)) (if (numberp limit) (setq done (>= time-elapsed limit))) ------------------------------------------------------------ revno: 113911 committer: Xue Fuqiao branch nick: trunk timestamp: Fri 2013-08-16 14:03:18 +0800 message: doc/lispref/text.texi(Margins): Add an index. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-16 03:16:03 +0000 +++ doc/lispref/ChangeLog 2013-08-16 06:03:18 +0000 @@ -1,6 +1,7 @@ 2013-08-16 Xue Fuqiao * text.texi (Insertion): Refine. + (Margins): Add an index. * positions.texi (Character Motion): * markers.texi (Moving Markers): === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2013-08-16 03:16:03 +0000 +++ doc/lispref/text.texi 2013-08-16 06:03:18 +0000 @@ -484,6 +484,7 @@ In an interactive call, @var{count} is the numeric prefix argument. +@c FIXME: This variable is obsolete since 23.1. Self-insertion translates the input character through @code{translation-table-for-input}. @xref{Translation of Characters}. @@ -1613,6 +1614,7 @@ @node Margins @section Margins for Filling +@cindex margins, filling @defopt fill-prefix This buffer-local variable, if non-@code{nil}, specifies a string of ------------------------------------------------------------ revno: 113910 committer: Paul Eggert branch nick: trunk timestamp: Thu 2013-08-15 22:15:51 -0700 message: Spelling fixes. diff: === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-08-13 20:13:02 +0000 +++ doc/lispref/display.texi 2013-08-16 05:15:51 +0000 @@ -4667,7 +4667,7 @@ @item :format ImageMagick tries to auto-detect the image type, but it isn't always able to. By using @code{:format-type}, we can give ImageMagick a hint -to try to help it. It's used in conjuction with the +to try to help it. It's used in conjunction with the @code{image-format-suffixes} variable, which provides a mapping from content types to file name suffixes. This is then given to ImageMagick as a file name hint. === modified file 'doc/misc/eieio.texi' --- doc/misc/eieio.texi 2013-07-29 20:26:19 +0000 +++ doc/misc/eieio.texi 2013-08-16 05:15:51 +0000 @@ -256,7 +256,7 @@ textbook or tutorial first, especially if you only know OOP from languages like C++ or Java. If on the other hand you are already familiar with CLOS, you should be aware that @eieio{} does not implement -the full CLOS specificiation and also differs in some other aspects +the full CLOS specification and also differs in some other aspects (@xref{Introduction}, and @ref{CLOS compatibility}). A @dfn{class} is a definition for organizing data and methods === modified file 'doc/misc/todo-mode.texi' --- doc/misc/todo-mode.texi 2013-08-07 14:15:23 +0000 +++ doc/misc/todo-mode.texi 2013-08-16 05:15:51 +0000 @@ -433,7 +433,7 @@ @item F k Delete the current todo file (@code{todo-delete-file}).@footnote{The key -binding of this command is mnenomic for ``kill'' to parallel the binding +binding of this command is mnemonic for ``kill'' to parallel the binding @kbd{k} for item deletion, since @kbd{d} is bound to another item editing command (@pxref{Done Items}).} If the todo file has an archive (@pxref{Todo Archive Mode}), prompt whether to delete that as well. @@ -496,7 +496,7 @@ @item C k Delete the current category (@code{todo-delete-category}).@footnote{This -binding is mnenomic for ``kill'' to parallel the binding @kbd{k} for +binding is mnemonic for ``kill'' to parallel the binding @kbd{k} for item deletion, since @kbd{d} is bound to another item editing command (@pxref{Done Items}).} To delete a category that contains items, you have to confirm your intent; if the category is empty, deletion is @@ -595,7 +595,7 @@ text. Each unique combination of these parameters produces a different insertion command. The command @kbd{i i} realizes one of these combinations. For the commands that realize the remaining combinations -it is convenient to associate each parameter with a mnenomically chosen +it is convenient to associate each parameter with a mnemonically chosen key. Then by typing certain sequences of these keys, you complete the insertion command invocation that realizes the specified combination. As with @kbd{i i}, the effect of many of these commands also depends on @@ -610,7 +610,7 @@ @enumerate @item -@kbd{y} for diary (non)inclusion; +@kbd{y} for diary (non)inclusion; @item @kbd{k} for adding or omitting `diary-nonmarking-symbol'; @item @@ -882,7 +882,7 @@ @item k Delete the todo item at point (@code{todo-delete-item}; the binding is -mnenomic for ``kill'', since @kbd{d} is used for marking items as done +mnemonic for ``kill'', since @kbd{d} is used for marking items as done (@pxref{Done Items}); but note that @kbd{k} does not put the item into the kill ring). This command requires confirmation that you want to delete the item, since you cannot undo the deletion in Todo mode. (You @@ -1170,7 +1170,7 @@ You can mark both todo and done items, but note that only @kbd{m} can apply to both; other commands only affect either marked todo or marked done -items, so if both types of items are marked, invoking these commmands +items, so if both types of items are marked, invoking these commands has no effect and informs you of your erroneous attempt. @node Todo Categories Mode, Searching for Items, Marked Items, Top @@ -1214,7 +1214,7 @@ @node Table of Item Counts, Reordering Categories, , Todo Categories Mode @section Table of Item Counts -Above each column of the table is a labelled button you can press by +Above each column of the table is a labeled button you can press by clicking with the mouse or by typing @key{RET} on it. Pressing an item count button sorts the table alternately in ascending or descending order according to the type of count. Pressing the category button @@ -1375,7 +1375,7 @@ one for filtering a user-specified list of todo files. Thus, there are six item filtering commands:@footnote{The use of @kbd{F} in the key sequences of these commands naturally recalls ``filter'', but is also -consistent with the Todo mode mnenomic key binding convention, since the +consistent with the Todo mode mnemonic key binding convention, since the commands involve one or more whole files.} @itemize @bullet @@ -1533,7 +1533,7 @@ @end table @itemize @bullet -@item +@item As with tables of categories, by customizing @code{todo-show-first} you can have the first invocation of @code{todo-show} for a given todo file display the corresponding saved file of filtered items. If there is @@ -1548,7 +1548,7 @@ @node Todo Display Features, Printing Todo Buffers, Todo Filtered Items Mode, Top @chapter Todo Display Features -You can change the appearance of Todo mode buffers in a variety of ways. +You can change the appearance of Todo mode buffers in a variety of ways. @menu * Faces:: @@ -1567,7 +1567,7 @@ @code{todo-nondiary-marker}) is earlier than the current date and time, they are displayed in a different face. In this way, you can readily recognize diary items that have ``expired'' and act accordingly (e.g., -by tagging them as done or by updating the deadlines). +by tagging them as done or by updating the deadlines). Another example of an informational face is the face used to distinguish top priority items. A third case is the face used in Todo Categories === modified file 'etc/refcards/Makefile' --- etc/refcards/Makefile 2013-08-15 06:31:14 +0000 +++ etc/refcards/Makefile 2013-08-16 05:15:51 +0000 @@ -152,7 +152,7 @@ ## A4, landscape: de-refcard, fr-refcard, pt-br-refcard orgcard ## A4, portrait: cs-*, fr-dired-ref, sk-*, pl-refcard, ru-refcard ## Letter, landscape: calccard, refcard -## Letter, portrait (suffix rule): diref-ref, gnus-*, survival, vip* +## Letter, portrait (suffix rule): dired-ref, gnus-*, survival, vip* calccard_deps = calccard.tex emacsver.tex pdflayout.sty calccard.pdf: $(calccard_deps) === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-08-07 22:54:08 +0000 +++ lisp/desktop.el 2013-08-16 05:15:51 +0000 @@ -390,7 +390,7 @@ (defcustom desktop-restore-forces-onscreen t "If t, offscreen frames are restored onscreen instead. -If `:all', frames that are partially offscreen are also forced onscren. +If `:all', frames that are partially offscreen are also forced onscreen. NOTE: Checking of frame boundaries is only approximate and can fail to reliably detect frames whose onscreen/offscreen state depends on a few pixels, especially near the right / bottom borders of the screen." @@ -670,7 +670,7 @@ ;; which already takes care of frame restoration and deletion. (called-interactively-p 'any)) (let* ((this (selected-frame)) - (mini (window-frame (minibuffer-window this)))) ; in case they difer + (mini (window-frame (minibuffer-window this)))) ; in case they differ (dolist (frame (sort (frame-list) #'frameset-minibufferless-first-p)) (condition-case err (unless (or (eq frame this) @@ -1032,7 +1032,7 @@ :force-onscreen desktop-restore-forces-onscreen))) ;; Just to silence the byte compiler. -;; Dynamicaly bound in `desktop-read'. +;; Dynamically bound in `desktop-read'. (defvar desktop-first-buffer) (defvar desktop-buffer-ok-count) (defvar desktop-buffer-fail-count) === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-14 13:41:02 +0000 +++ lisp/frameset.el 2013-08-16 05:15:51 +0000 @@ -182,7 +182,7 @@ ;; Let's say that Emacs' frame parameters were never designed as a tool to ;; precisely record (or restore) a frame's state. They grew organically, ;; and their uses and behaviors reflect their history. In using them to -;; implement framesets, the unwary implementor, or the prospective package +;; implement framesets, the unwary implementer, or the prospective package ;; writer willing to use framesets in their code, might fall victim of some ;; unexpected... oddities. ;; === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2013-08-13 16:36:32 +0000 +++ lisp/progmodes/python.el 2013-08-16 05:15:51 +0000 @@ -3080,14 +3080,14 @@ min-indent indent (if (<= indent children-indent-limit) - ;; This lays within the children indent offset range, - ;; so it's a normal children of its parent (i.e., not - ;; a children of a children). + ;; This lies within the children indent offset range, + ;; so it's a normal child of its parent (i.e., not + ;; a child of a child). (cons (cons label pos) tree) - ;; Oh noes, a children of a children?!. Fear not, we - ;; know how to roll. We recursely parse these by + ;; Oh no, a child of a child?! Fear not, we + ;; know how to roll. We recursively parse these by ;; swapping prev-indent and min-indent plus adding this - ;; newly found item to a fresh subtree. This works, I + ;; newly found item to a fresh subtree. This works, I ;; promise. (cons (python-imenu--build-tree === modified file 'src/decompress.c' --- src/decompress.c 2013-08-14 12:47:05 +0000 +++ src/decompress.c 2013-08-16 05:15:51 +0000 @@ -164,7 +164,7 @@ stream.avail_in = 0; stream.next_in = Z_NULL; - /* The magic number 32 apparently means "autodect both the gzip and + /* The magic number 32 apparently means "autodetect both the gzip and zlib formats" according to zlib.h. */ if (fn_inflateInit2 (&stream, MAX_WBITS + 32) != Z_OK) return Qnil; === modified file 'src/image.c' --- src/image.c 2013-08-15 20:17:35 +0000 +++ src/image.c 2013-08-16 05:15:51 +0000 @@ -7934,7 +7934,7 @@ return NULL; } - /* The sub-image may not start at origo, so move the destination + /* The sub-image may not start at origin, so move the destination iterator to where the sub-image should start. */ if (source_top > 0) { === modified file 'src/process.c' --- src/process.c 2013-08-15 14:52:53 +0000 +++ src/process.c 2013-08-16 05:15:51 +0000 @@ -1893,7 +1893,7 @@ #ifndef WINDOWSNT /* Wait for child_setup to complete in case that vfork is actually defined as fork. The descriptor - XPROCESS (proc)->open_fd[EXEC_MOINTOR_OUTPUT] + XPROCESS (proc)->open_fd[EXEC_MONITOR_OUTPUT] of a pipe is closed at the child side either by close-on-exec on successful execve or the _exit call in child_setup. */ { ------------------------------------------------------------ revno: 113909 committer: Xue Fuqiao branch nick: trunk timestamp: Fri 2013-08-16 11:16:03 +0800 message: Refine the documentation of `insert-buffer-substring'. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-16 01:57:58 +0000 +++ doc/lispref/ChangeLog 2013-08-16 03:16:03 +0000 @@ -1,6 +1,6 @@ 2013-08-16 Xue Fuqiao - * text.texi (Insertion): Add cross-references. + * text.texi (Insertion): Refine. * positions.texi (Character Motion): * markers.texi (Moving Markers): === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2013-08-16 01:57:58 +0000 +++ doc/lispref/text.texi 2013-08-16 03:16:03 +0000 @@ -423,10 +423,10 @@ @defun insert-buffer-substring from-buffer-or-name &optional start end This function inserts a portion of buffer @var{from-buffer-or-name} -(which must already exist) into the current buffer before point. The -text inserted is the region between @var{start} and @var{end}. (These -arguments default to the beginning and end of the accessible portion of -that buffer.) This function returns @code{nil}. +into the current buffer before point. The text inserted is the region +between @var{start} (inclusive) and @var{end} (exclusive). (These +arguments default to the beginning and end of the accessible portion +of that buffer.) This function returns @code{nil}. In this example, the form is executed with buffer @samp{bar} as the current buffer. We assume that buffer @samp{bar} is initially empty. ------------------------------------------------------------ revno: 113908 committer: Xue Fuqiao branch nick: trunk timestamp: Fri 2013-08-16 10:09:08 +0800 message: * src/editfns.c (insert_before_markers): Mention overlay in the doc string. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-16 00:20:56 +0000 +++ src/ChangeLog 2013-08-16 02:09:08 +0000 @@ -1,5 +1,7 @@ 2013-08-16 Xue Fuqiao + * editfns.c (insert_before_markers): Mention overlay in the doc string. + * marker.c (set_marker): Remove documentation of undefined behavior. 2013-08-15 Lars Magne Ingebrigtsen === modified file 'src/editfns.c' --- src/editfns.c 2013-08-06 05:30:18 +0000 +++ src/editfns.c 2013-08-16 02:09:08 +0000 @@ -2330,6 +2330,10 @@ If the current buffer is unibyte, multibyte strings are converted to unibyte for insertion. +If an overlay begins at the insertion point, the inserted text falls +outside the overlay; if a nonempty overlay ends at the insertion +point, the inserted text falls inside that overlay. + usage: (insert-before-markers &rest ARGS) */) (ptrdiff_t nargs, Lisp_Object *args) { ------------------------------------------------------------ revno: 113907 committer: Xue Fuqiao branch nick: trunk timestamp: Fri 2013-08-16 09:57:58 +0800 message: * doc/lispref/text.texi (Insertion): Add cross-references. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-16 00:20:56 +0000 +++ doc/lispref/ChangeLog 2013-08-16 01:57:58 +0000 @@ -1,5 +1,7 @@ 2013-08-16 Xue Fuqiao + * text.texi (Insertion): Add cross-references. + * positions.texi (Character Motion): * markers.texi (Moving Markers): (Creating Markers): Comment out undefined behavior. === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2013-08-16 00:20:56 +0000 +++ doc/lispref/text.texi 2013-08-16 01:57:58 +0000 @@ -366,7 +366,8 @@ the inserted text, regardless of the markers' insertion type. Insertion functions signal an error if the current buffer is -read-only or if they insert within read-only text. +read-only (@pxref{Read Only Buffers}) or if they insert within +read-only text (@pxref{Special Properties}). These functions copy text characters from strings and buffers along with their properties. The inserted characters have exactly the same ------------------------------------------------------------ revno: 113906 committer: Xue Fuqiao branch nick: trunk timestamp: Fri 2013-08-16 08:20:56 +0800 message: Remove documentation of undefined behavior. * doc/lispref/positions.texi (Character Motion): * doc/lispref/markers.texi (Moving Markers): (Creating Markers): Comment out undefined behavior. * src/marker.c (set_marker): Remove documentation of undefined behavior. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-15 08:27:22 +0000 +++ doc/lispref/ChangeLog 2013-08-16 00:20:56 +0000 @@ -1,3 +1,9 @@ +2013-08-16 Xue Fuqiao + + * positions.texi (Character Motion): + * markers.texi (Moving Markers): + (Creating Markers): Comment out undefined behavior. + 2013-08-15 Xue Fuqiao * markers.texi (The Region): Add/move indexes. === modified file 'doc/lispref/markers.texi' --- doc/lispref/markers.texi 2013-08-15 08:27:22 +0000 +++ doc/lispref/markers.texi 2013-08-16 00:20:56 +0000 @@ -216,11 +216,14 @@ The new marker's insertion type is specified by the argument @var{insertion-type}. @xref{Marker Insertion Types}. +@c This behavior used to be documented until 2013/08. +@ignore If passed an integer argument less than 1, @code{copy-marker} returns a new marker that points to the beginning of the current buffer. If passed an integer argument greater than the length of the buffer, @code{copy-marker} returns a new marker that points to the end of the buffer. +@end ignore @example @group @@ -351,11 +354,15 @@ in @var{buffer}. If @var{buffer} is not provided, it defaults to the current buffer. +@c This behavior used to be documented until 2013/08. +@ignore If @var{position} is less than 1, @code{set-marker} moves @var{marker} to the beginning of the buffer. If @var{position} is greater than the size of the buffer (@pxref{Point}), @code{set-marker} moves marker to -the end of the buffer. If @var{position} is @code{nil} or a marker -that points nowhere, then @var{marker} is set to point nowhere. +the end of the buffer. +@end ignore +If @var{position} is @code{nil} or a marker that points nowhere, then +@var{marker} is set to point nowhere. The value returned is @var{marker}. === modified file 'doc/lispref/positions.texi' --- doc/lispref/positions.texi 2013-08-14 13:58:25 +0000 +++ doc/lispref/positions.texi 2013-08-16 00:20:56 +0000 @@ -146,9 +146,13 @@ @deffn Command goto-char position This function sets point in the current buffer to the value -@var{position}. If @var{position} is less than 1, it moves point to the -beginning of the buffer. If @var{position} is greater than the length -of the buffer, it moves point to the end. +@var{position}. +@c This behavior used to be documented until 2013/08. +@ignore +If @var{position} is less than 1, it moves point to the beginning of +the buffer. If @var{position} is greater than the length of the +buffer, it moves point to the end. +@end ignore If narrowing is in effect, @var{position} still counts from the beginning of the buffer, but point cannot go outside the accessible === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2013-07-10 06:26:23 +0000 +++ doc/lispref/text.texi 2013-08-16 00:20:56 +0000 @@ -240,6 +240,7 @@ copied out of the buffer. @end defun +@c FIXME: `filter-buffer-substring-function' should be documented. @defvar filter-buffer-substring-functions This variable is a wrapper hook (@pxref{Running Hooks}), whose members should be functions that accept four arguments: @var{fun}, === modified file 'lisp/follow.el' --- lisp/follow.el 2013-08-10 15:17:29 +0000 +++ lisp/follow.el 2013-08-16 00:20:56 +0000 @@ -1259,6 +1259,8 @@ ;; If the region is visible, make it look good when spanning ;; multiple windows. + + ;; FIXME: Why not use `use-region-p' here? (when (region-active-p) (follow-maximize-region (selected-window) windows win-start-end))) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 19:46:02 +0000 +++ src/ChangeLog 2013-08-16 00:20:56 +0000 @@ -1,3 +1,7 @@ +2013-08-16 Xue Fuqiao + + * marker.c (set_marker): Remove documentation of undefined behavior. + 2013-08-15 Lars Magne Ingebrigtsen * image.c (imagemagick_compute_animated_image): Animate correctly === modified file 'src/marker.c' --- src/marker.c 2013-08-14 14:02:46 +0000 +++ src/marker.c 2013-08-16 00:20:56 +0000 @@ -536,11 +536,8 @@ DEFUN ("set-marker", Fset_marker, Sset_marker, 2, 3, 0, doc: /* Position MARKER before character number POSITION in BUFFER. If BUFFER is omitted or nil, it defaults to the current buffer. If -POSITION is less than 1, MARKER is moved to the beginning of the -buffer. If POSITION is greater than the size of the buffer, marker is -moved to the end of the buffer. If POSITION is nil, makes marker -point nowhere so it no longer slows down editing in any buffer. -Returns MARKER. */) +POSITION is nil, makes marker point nowhere so it no longer slows down +editing in any buffer. Returns MARKER. */) (Lisp_Object marker, Lisp_Object position, Lisp_Object buffer) { return set_marker_internal (marker, position, buffer, 0); ------------------------------------------------------------ revno: 113905 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 22:17:35 +0200 message: Add comment. diff: === modified file 'src/image.c' --- src/image.c 2013-08-15 20:10:47 +0000 +++ src/image.c 2013-08-15 20:17:35 +0000 @@ -7908,6 +7908,7 @@ MagickGetImagePage (sub_wand, &source_width, &source_height, &source_left, &source_top); + /* This flag says how to handle transparent pixels. */ dispose = MagickGetImageDispose (sub_wand); source_iterator = NewPixelIterator (sub_wand); ------------------------------------------------------------ revno: 113904 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 22:10:47 +0200 message: Whitespace fixup. diff: === modified file 'src/image.c' --- src/image.c 2013-08-15 19:46:02 +0000 +++ src/image.c 2013-08-15 20:10:47 +0000 @@ -7968,7 +7968,7 @@ PixelSetMagickColor (dest[x + source_left], &pixel); } } - PixelSyncIterator(dest_iterator); + PixelSyncIterator (dest_iterator); } DestroyPixelIterator (source_iterator); ------------------------------------------------------------ revno: 113903 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 21:46:02 +0200 message: (imagemagick_compute_animated_image): Allow certain degenerate images (imagemagick_compute_animated_image): Allow images that say they have sub-images that are bigger than the main image, but just crop them. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 18:47:28 +0000 +++ src/ChangeLog 2013-08-15 19:46:02 +0000 @@ -4,6 +4,9 @@ when sub-images are smaller than the main image. (imagemagick_compute_animated_image): Setting the iterator row to zero is apparently not allowed. + (imagemagick_compute_animated_image): Allow images that say they + have sub-images that are bigger than the main image, but just crop + them. 2013-08-15 Jan Djärv === modified file 'src/image.c' --- src/image.c 2013-08-15 18:47:28 +0000 +++ src/image.c 2013-08-15 19:46:02 +0000 @@ -7900,6 +7900,7 @@ ssize_t source_left, source_top; MagickPixelPacket pixel; DisposeType dispose; + ptrdiff_t lines = 0; MagickSetIteratorIndex (super_wand, i); sub_wand = MagickGetImage (super_wand); @@ -7907,17 +7908,6 @@ MagickGetImagePage (sub_wand, &source_width, &source_height, &source_left, &source_top); - /* Sanity check. The sub-image should not be bigger than the - base image. */ - if (source_height + source_top > dest_height) - { - DestroyMagickWand (composite_wand); - DestroyMagickWand (sub_wand); - animation_cache = NULL; - image_error ("Inconsinstent animation size", Qnil, Qnil); - return NULL; - } - dispose = MagickGetImageDispose (sub_wand); source_iterator = NewPixelIterator (sub_wand); @@ -7946,17 +7936,26 @@ /* The sub-image may not start at origo, so move the destination iterator to where the sub-image should start. */ if (source_top > 0) - PixelSetIteratorRow (dest_iterator, source_top); + { + PixelSetIteratorRow (dest_iterator, source_top); + lines = source_top; + } while ((source = PixelGetNextIteratorRow (source_iterator, &source_width)) != NULL) { ptrdiff_t x; + + /* Sanity check. This shouldn't happen, but apparently + does in some pictures. */ + if (++lines >= dest_height) + break; + dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); for (x = 0; x < source_width; x++) { /* Sanity check. This shouldn't happen, but apparently - does in some pictures. */ + also does in some pictures. */ if (x + source_left > dest_width) break; /* Normally we only copy over non-transparent pixels, ------------------------------------------------------------ revno: 113902 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 20:47:28 +0200 message: (imagemagick_compute_animated_image): Fix animated segafault (imagemagick_compute_animated_image): Setting the iterator row to zero is apparently not allowed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 18:34:23 +0000 +++ src/ChangeLog 2013-08-15 18:47:28 +0000 @@ -2,6 +2,8 @@ * image.c (imagemagick_compute_animated_image): Animate correctly when sub-images are smaller than the main image. + (imagemagick_compute_animated_image): Setting the iterator row to + zero is apparently not allowed. 2013-08-15 Jan Djärv === modified file 'src/image.c' --- src/image.c 2013-08-15 18:34:23 +0000 +++ src/image.c 2013-08-15 18:47:28 +0000 @@ -7945,7 +7945,8 @@ /* The sub-image may not start at origo, so move the destination iterator to where the sub-image should start. */ - PixelSetIteratorRow (dest_iterator, source_top); + if (source_top > 0) + PixelSetIteratorRow (dest_iterator, source_top); while ((source = PixelGetNextIteratorRow (source_iterator, &source_width)) != NULL) ------------------------------------------------------------ revno: 113901 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 20:34:23 +0200 message: image.c animation touchups * image.c (imagemagick_compute_animated_image): Animate correctly when sub-images are smaller than the main image. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 17:36:45 +0000 +++ src/ChangeLog 2013-08-15 18:34:23 +0000 @@ -1,3 +1,8 @@ +2013-08-15 Lars Magne Ingebrigtsen + + * image.c (imagemagick_compute_animated_image): Animate correctly + when sub-images are smaller than the main image. + 2013-08-15 Jan Djärv * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001). === modified file 'src/image.c' --- src/image.c 2013-08-15 17:26:34 +0000 +++ src/image.c 2013-08-15 18:34:23 +0000 @@ -7879,6 +7879,7 @@ { int i; MagickWand *composite_wand; + size_t dest_width, dest_height; MagickSetIteratorIndex (super_wand, 0); @@ -7887,18 +7888,36 @@ else composite_wand = animation_cache; + dest_width = MagickGetImageWidth (composite_wand); + dest_height = MagickGetImageHeight (composite_wand); + for (i = max (1, animation_index + 1); i <= ino; i++) { MagickWand *sub_wand; PixelIterator *source_iterator, *dest_iterator; PixelWand **source, **dest; - size_t source_width, dest_width; + size_t source_width, source_height; + ssize_t source_left, source_top; MagickPixelPacket pixel; DisposeType dispose; MagickSetIteratorIndex (super_wand, i); sub_wand = MagickGetImage (super_wand); + MagickGetImagePage (sub_wand, &source_width, &source_height, + &source_left, &source_top); + + /* Sanity check. The sub-image should not be bigger than the + base image. */ + if (source_height + source_top > dest_height) + { + DestroyMagickWand (composite_wand); + DestroyMagickWand (sub_wand); + animation_cache = NULL; + image_error ("Inconsinstent animation size", Qnil, Qnil); + return NULL; + } + dispose = MagickGetImageDispose (sub_wand); source_iterator = NewPixelIterator (sub_wand); @@ -7906,6 +7925,7 @@ { DestroyMagickWand (composite_wand); DestroyMagickWand (sub_wand); + animation_cache = NULL; image_error ("Imagemagick pixel iterator creation failed", Qnil, Qnil); return NULL; @@ -7917,11 +7937,16 @@ DestroyMagickWand (composite_wand); DestroyMagickWand (sub_wand); DestroyPixelIterator (source_iterator); + animation_cache = NULL; image_error ("Imagemagick pixel iterator creation failed", Qnil, Qnil); return NULL; } + /* The sub-image may not start at origo, so move the destination + iterator to where the sub-image should start. */ + PixelSetIteratorRow (dest_iterator, source_top); + while ((source = PixelGetNextIteratorRow (source_iterator, &source_width)) != NULL) { @@ -7929,6 +7954,10 @@ dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); for (x = 0; x < source_width; x++) { + /* Sanity check. This shouldn't happen, but apparently + does in some pictures. */ + if (x + source_left > dest_width) + break; /* Normally we only copy over non-transparent pixels, but if the disposal method is "Background", then we copy over all pixels. */ @@ -7936,7 +7965,7 @@ PixelGetAlpha (source[x])) { PixelGetMagickColor (source[x], &pixel); - PixelSetMagickColor (dest[x], &pixel); + PixelSetMagickColor (dest[x + source_left], &pixel); } } PixelSyncIterator(dest_iterator); ------------------------------------------------------------ revno: 113900 fixes bug: http://debbugs.gnu.org/15001 committer: Jan D. branch nick: trunk timestamp: Thu 2013-08-15 19:36:45 +0200 message: * nsmenu.m (menuWillOpen:): Fix preprocessor test. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 17:20:06 +0000 +++ src/ChangeLog 2013-08-15 17:36:45 +0000 @@ -1,3 +1,7 @@ +2013-08-15 Jan Djärv + + * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001). + 2013-08-15 Lars Magne Ingebrigtsen * image.c (imagemagick_compute_animated_image): Respect the GIF === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-08-13 20:18:30 +0000 +++ src/nsmenu.m 2013-08-15 17:36:45 +0000 @@ -575,7 +575,7 @@ { ++trackingMenu; -#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_6 +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 // On 10.6 we get repeated calls, only the one for NSSystemDefined is "real". if ([[NSApp currentEvent] type] != NSSystemDefined) return; #endif ------------------------------------------------------------ revno: 113899 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 19:26:34 +0200 message: (imagemagick_compute_animated_image): Clean up code slightly diff: === modified file 'src/image.c' --- src/image.c 2013-08-15 17:20:06 +0000 +++ src/image.c 2013-08-15 17:26:34 +0000 @@ -7929,20 +7929,15 @@ dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); for (x = 0; x < source_width; x++) { - if (dispose == BackgroundDispose) + /* Normally we only copy over non-transparent pixels, + but if the disposal method is "Background", then we + copy over all pixels. */ + if (dispose == BackgroundDispose || + PixelGetAlpha (source[x])) { PixelGetMagickColor (source[x], &pixel); PixelSetMagickColor (dest[x], &pixel); } - else - { - /* Copy over non-transparent pixels. */ - if (PixelGetAlpha (source[x])) - { - PixelGetMagickColor (source[x], &pixel); - PixelSetMagickColor (dest[x], &pixel); - } - } } PixelSyncIterator(dest_iterator); } ------------------------------------------------------------ revno: 113898 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15101 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2013-08-15 13:21:19 -0400 message: * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Put point on the previous line. (debugger-eval-expression, debugger-record-expression): Use read--expression (bug#15102). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-15 14:29:08 +0000 +++ lisp/ChangeLog 2013-08-15 17:21:19 +0000 @@ -1,3 +1,10 @@ +2013-08-15 Stefan Monnier + + * emacs-lisp/debug.el (debugger-setup-buffer): Put point on the + previous line (bug#15101). + (debugger-eval-expression, debugger-record-expression): + Use read--expression (bug#15102). + 2013-08-15 Michael Albinus Remove byte compiler warnings, visible when compiling with @@ -20,8 +27,8 @@ (tramp-flush-connection-property, tramp-list-connections) (tramp-parse-connection-properties): Prefix unused arguments with "_". - * net/tramp-compat.el (tramp-compat-make-temp-file): Rename - FILENAME to F. + * net/tramp-compat.el (tramp-compat-make-temp-file): + Rename FILENAME to F. * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names) === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2013-07-26 07:38:18 +0000 +++ lisp/emacs-lisp/debug.el 2013-08-15 17:21:19 +0000 @@ -288,33 +288,41 @@ (insert "Debugger entered") ;; lambda is for debug-on-call when a function call is next. ;; debug is for debug-on-entry function called. - (pcase (car args) - ((or `lambda `debug) - (insert "--entering a function:\n")) - ;; Exiting a function. - (`exit - (insert "--returning value: ") - (setq debugger-value (nth 1 args)) - (prin1 debugger-value (current-buffer)) - (insert ?\n) - (delete-char 1) - (insert ? ) - (beginning-of-line)) - ;; Debugger entered for an error. - (`error - (insert "--Lisp error: ") - (prin1 (nth 1 args) (current-buffer)) - (insert ?\n)) - ;; debug-on-call, when the next thing is an eval. - (`t - (insert "--beginning evaluation of function call form:\n")) - ;; User calls debug directly. - (_ - (insert ": ") - (prin1 (if (eq (car args) 'nil) - (cdr args) args) - (current-buffer)) - (insert ?\n))) + (let ((pos (point))) + (pcase (car args) + ((or `lambda `debug) + (insert "--entering a function:\n") + (setq pos (1- (point)))) + ;; Exiting a function. + (`exit + (insert "--returning value: ") + (setq pos (point)) + (setq debugger-value (nth 1 args)) + (prin1 debugger-value (current-buffer)) + (insert ?\n) + (delete-char 1) + (insert ? ) + (beginning-of-line)) + ;; Debugger entered for an error. + (`error + (insert "--Lisp error: ") + (setq pos (point)) + (prin1 (nth 1 args) (current-buffer)) + (insert ?\n)) + ;; debug-on-call, when the next thing is an eval. + (`t + (insert "--beginning evaluation of function call form:\n") + (setq pos (1- (point)))) + ;; User calls debug directly. + (_ + (insert ": ") + (setq pos (point)) + (prin1 (if (eq (car args) 'nil) + (cdr args) args) + (current-buffer)) + (insert ?\n))) + ;; Place point on "stack frame 0" (bug#15101). + (goto-char pos)) ;; After any frame that uses eval-buffer, ;; insert a line that states the buffer position it's reading at. (save-excursion @@ -533,16 +541,15 @@ (progn ,@body) (setq debugger-outer-match-data (match-data))))) -(defun debugger-eval-expression (exp) +(defun debugger-eval-expression (exp &optional nframe) "Eval an expression, in an environment like that outside the debugger. The environment used is the one when entering the activation frame at point." (interactive - (list (read-from-minibuffer "Eval: " - nil read-expression-map t - 'read-expression-history))) - (let ((nframe (condition-case nil (1+ (debugger-frame-number 'skip-base)) - (error 0))) ;; If on first line. - (base (if (eq 'debug--implement-debug-on-entry + (list (read--expression "Eval in stack frame: "))) + (let ((nframe (or nframe + (condition-case nil (1+ (debugger-frame-number 'skip-base)) + (error 0)))) ;; If on first line. + (base (if (eq 'debug--implement-debug-on-entry (cadr (backtrace-frame 1 'debug))) 'debug--implement-debug-on-entry 'debug))) (debugger-env-macro @@ -651,11 +658,7 @@ (defun debugger-record-expression (exp) "Display a variable's value and record it in `*Backtrace-record*' buffer." (interactive - (list (read-from-minibuffer - "Record Eval: " - nil - read-expression-map t - 'read-expression-history))) + (list (read--expression "Record Eval: "))) (let* ((buffer (get-buffer-create debugger-record-buffer)) (standard-output buffer)) (princ (format "Debugger Eval (%s): " exp)) ------------------------------------------------------------ revno: 113897 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 19:20:06 +0200 message: (imagemagick_compute_animated_image): Respect the GIF disposal methods. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 16:37:15 +0000 +++ src/ChangeLog 2013-08-15 17:20:06 +0000 @@ -1,3 +1,8 @@ +2013-08-15 Lars Magne Ingebrigtsen + + * image.c (imagemagick_compute_animated_image): Respect the GIF + disposal methods. + 2013-08-15 Ken Brown * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC. === modified file 'src/image.c' --- src/image.c 2013-08-15 16:28:42 +0000 +++ src/image.c 2013-08-15 17:20:06 +0000 @@ -7887,17 +7887,20 @@ else composite_wand = animation_cache; - for (i = max (1, animation_index); i <= ino; i++) + for (i = max (1, animation_index + 1); i <= ino; i++) { MagickWand *sub_wand; PixelIterator *source_iterator, *dest_iterator; PixelWand **source, **dest; size_t source_width, dest_width; MagickPixelPacket pixel; + DisposeType dispose; MagickSetIteratorIndex (super_wand, i); sub_wand = MagickGetImage (super_wand); + dispose = MagickGetImageDispose (sub_wand); + source_iterator = NewPixelIterator (sub_wand); if (! source_iterator) { @@ -7926,12 +7929,20 @@ dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); for (x = 0; x < source_width; x++) { - /* Copy over non-transparent pixels. */ - if (PixelGetAlpha (source[x])) + if (dispose == BackgroundDispose) { PixelGetMagickColor (source[x], &pixel); PixelSetMagickColor (dest[x], &pixel); } + else + { + /* Copy over non-transparent pixels. */ + if (PixelGetAlpha (source[x])) + { + PixelGetMagickColor (source[x], &pixel); + PixelSetMagickColor (dest[x], &pixel); + } + } } PixelSyncIterator(dest_iterator); } ------------------------------------------------------------ revno: 113896 committer: Michael Albinus branch nick: trunk timestamp: Thu 2013-08-15 19:02:09 +0200 message: Declare external variables. diff: === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-08-15 14:29:08 +0000 +++ lisp/net/tramp-adb.el 2013-08-15 17:02:09 +0000 @@ -36,7 +36,10 @@ (require 'tramp) (require 'time-date) -(defvar dired-move-to-filename-regexp) +;; Pacify byte-compiler. +(eval-when-compile + (defvar directory-sep-char) + (defvar dired-move-to-filename-regexp)) (defcustom tramp-adb-program "adb" "Name of the Android Debug Bridge program." === modified file 'lisp/net/tramp-cmds.el' --- lisp/net/tramp-cmds.el 2013-01-22 08:49:03 +0000 +++ lisp/net/tramp-cmds.el 2013-08-15 17:02:09 +0000 @@ -30,6 +30,12 @@ (require 'tramp) +;; Pacify byte-compiler. +(eval-when-compile + (defvar buffer-name) + (defvar reporter-eval-buffer) + (defvar reporter-prompt-for-summary-p)) + (defun tramp-list-tramp-buffers () "Return a list of all Tramp connection buffers." (append === modified file 'lisp/net/tramp-compat.el' --- lisp/net/tramp-compat.el 2013-08-15 14:29:08 +0000 +++ lisp/net/tramp-compat.el 2013-08-15 17:02:09 +0000 @@ -29,9 +29,8 @@ ;;; Code: +;; Pacify byte-compiler. (eval-when-compile - - ;; Pacify byte-compiler. (require 'cl)) (eval-and-compile === modified file 'lisp/net/tramp-ftp.el' --- lisp/net/tramp-ftp.el 2013-01-02 16:13:04 +0000 +++ lisp/net/tramp-ftp.el 2013-08-15 17:02:09 +0000 @@ -30,11 +30,13 @@ (require 'tramp) +;; Pacify byte-compiler. (eval-when-compile - - ;; Pacify byte-compiler. (require 'cl) - (require 'custom)) + (require 'custom) + (defvar ange-ftp-ftp-name-arg) + (defvar ange-ftp-ftp-name-res) + (defvar ange-ftp-name-format)) ;; Disable Ange-FTP from file-name-handler-alist. ;; To handle EFS, the following functions need to be dealt with: === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2013-08-15 14:29:08 +0000 +++ lisp/net/tramp-gvfs.el 2013-08-15 17:02:09 +0000 @@ -97,11 +97,6 @@ ;; option "--without-dbus". Declare used subroutines and variables. (declare-function dbus-get-unique-name "dbusbind.c") -;; Pacify byte-compiler -(eval-when-compile - (require 'cl) - (require 'custom)) - (require 'tramp) (require 'dbus) @@ -109,6 +104,12 @@ (require 'url-util) (require 'zeroconf) +;; Pacify byte-compiler. +(eval-when-compile + (require 'cl) + (require 'custom) + (defvar ls-lisp-use-insert-directory-program)) + ;;;###tramp-autoload (defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce") "List of methods for remote files, accessed with GVFS." === modified file 'lisp/net/tramp-gw.el' --- lisp/net/tramp-gw.el 2013-08-15 14:29:08 +0000 +++ lisp/net/tramp-gw.el 2013-08-15 17:02:09 +0000 @@ -33,16 +33,11 @@ (require 'tramp) -;; Pacify byte-compiler +;; Pacify byte-compiler. (eval-when-compile (require 'cl) - (require 'custom)) - -;; Avoid byte-compiler warnings if the byte-compiler supports this. -;; Currently, XEmacs supports this. -(eval-when-compile - (when (featurep 'xemacs) - (byte-compiler-options (warnings (- unused-vars))))) + (require 'custom) + (defvar socks-noproxy)) ;; We don't add the following methods to `tramp-methods', in order to ;; exclude them from file name completion. === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-08-15 14:29:08 +0000 +++ lisp/net/tramp-sh.el 2013-08-15 17:02:09 +0000 @@ -26,21 +26,15 @@ ;;; Code: -(eval-when-compile (require 'cl)) ; ignore-errors (require 'tramp) -;; Pacify byte-compiler. The function is needed on XEmacs only. I'm -;; not sure at all that this is the right way to do it, but let's hope -;; it works for now, and wait for a guru to point out the Right Way to -;; achieve this. -;;(eval-when-compile -;; (unless (fboundp 'dired-insert-set-properties) -;; (fset 'dired-insert-set-properties 'ignore))) -;; Gerd suggests this: -(eval-when-compile (require 'dired)) -;; Note that dired is required at run-time, too, when it is needed. -;; It is only needed on XEmacs for the function -;; `dired-insert-set-properties'. +;; Pacify byte-compiler. +(eval-when-compile + (require 'cl) + (require 'dired) + (defvar directory-sep-char) + (defvar tramp-gw-tunnel-method) + (defvar tramp-gw-socks-method)) (defcustom tramp-inline-compress-start-size 4096 "The minimum size of compressing where inline transfer. @@ -4203,9 +4197,6 @@ (tramp-message vec 2 "Couldn't find an inline transfer compress command"))))) -(defvar tramp-gw-tunnel-method) -(defvar tramp-gw-socks-method) - (defun tramp-compute-multi-hops (vec) "Expands VEC according to `tramp-default-proxies-alist'. Gateway hops are already opened." === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2013-08-15 14:29:08 +0000 +++ lisp/net/tramp-smb.el 2013-08-15 17:02:09 +0000 @@ -27,9 +27,12 @@ ;;; Code: -(eval-when-compile (require 'cl)) ; block, return (require 'tramp) +;; Pacify byte-compiler. +(eval-when-compile + (require 'cl)) + ;; Define SMB method ... ;;;###tramp-autoload (defconst tramp-smb-method "smb" === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-08-15 14:29:08 +0000 +++ lisp/net/tramp.el 2013-08-15 17:02:09 +0000 @@ -57,9 +57,17 @@ ;;; Code: -(eval-when-compile (require 'cl)) ; ignore-errors (require 'tramp-compat) +;; Pacify byte-compiler. +(eval-when-compile + (require 'cl) + (defvar bkup-backup-directory-info) + (defvar directory-sep-char) + (defvar eshell-path-env) + (defvar file-notify-descriptors) + (defvar outline-regexp)) + ;;; User Customizable Internal Variables: (defgroup tramp nil @@ -3350,7 +3358,6 @@ (tramp-error v 'file-notify-error "File notification not supported for `%s'" filename))) -(defvar file-notify-descriptors) (defun tramp-handle-file-notify-rm-watch (proc) "Like `file-notify-rm-watch' for Tramp files." ;; The descriptor must be a process object. @@ -4182,9 +4189,6 @@ ;;; Integration of eshell.el: -(eval-when-compile - (defvar eshell-path-env)) - ;; eshell.el keeps the path in `eshell-path-env'. We must change it ;; when `default-directory' points to another host. (defun tramp-eshell-directory-change () ------------------------------------------------------------ revno: 113895 committer: Ken Brown branch nick: trunk timestamp: Thu 2013-08-15 12:37:15 -0400 message: Revert last change to gmalloc.c; update some comments. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-15 06:31:14 +0000 +++ ChangeLog 2013-08-15 16:37:15 +0000 @@ -1,3 +1,7 @@ +2013-08-15 Ken Brown + + * configure.ac (G_SLICE_ALWAYS_MALLOC): Update comment. + 2013-08-15 Glenn Morris * make-dist: Do not distribute etc/refcards TeX intermediate files. === modified file 'configure.ac' --- configure.ac 2013-08-14 02:15:01 +0000 +++ configure.ac 2013-08-15 16:37:15 +0000 @@ -4340,14 +4340,16 @@ case $opsys in - dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls - dnl memalign and on Cygwin, that becomes the Cygwin-supplied memalign. - dnl As malloc is not the Cygwin malloc, the Cygwin memalign always - dnl returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */ + dnl Emacs supplies its own malloc, but glib calls posix_memalign, + dnl and on Cygwin prior to version 1.7.24 that becomes the + dnl Cygwin-supplied posix_memalign. As malloc is not the Cygwin + dnl malloc, the Cygwin posix_memalign always returns ENOSYS. A + dnl workaround is to set G_SLICE=always-malloc. This is no longer + dnl needed starting with cygwin-1.7.24, and it is no longer + dnl effective starting with glib-2.36. */ cygwin) AC_DEFINE(G_SLICE_ALWAYS_MALLOC, 1, [Define to set the - G_SLICE environment variable to "always-malloc" at startup, if - using GTK.]) + G_SLICE environment variable to "always-malloc" at startup.]) ;; hpux11) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 16:28:42 +0000 +++ src/ChangeLog 2013-08-15 16:37:15 +0000 @@ -1,3 +1,9 @@ +2013-08-15 Ken Brown + + * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC. + * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not + needed. + 2013-08-15 Paul Eggert Fix minor problems found by static checking. === modified file 'src/emacs.c' --- src/emacs.c 2013-08-11 19:43:36 +0000 +++ src/emacs.c 2013-08-15 16:37:15 +0000 @@ -696,7 +696,8 @@ #endif #ifdef G_SLICE_ALWAYS_MALLOC - /* This is used by the Cygwin build. */ + /* This is used by the Cygwin build. It's not needed starting with + cygwin-1.7.24, but it doesn't do any harm. */ xputenv ("G_SLICE=always-malloc"); #endif === modified file 'src/gmalloc.c' --- src/gmalloc.c 2013-08-14 19:09:51 +0000 +++ src/gmalloc.c 2013-08-15 16:37:15 +0000 @@ -1558,15 +1558,6 @@ void *(*__memalign_hook) (size_t size, size_t alignment); -/* As of version 1.7.24, Cygwin allows applications to provide their - own posix_memalign (but not memalign). But posix_memalign as - defined in this file calls memalign, so we have to rename the - latter in order to make sure that posix_memalign calls Emacs's - memalign. */ -#ifdef CYGWIN -#define memalign emacs_memalign -#endif - void * memalign (size_t alignment, size_t size) { ------------------------------------------------------------ revno: 113894 committer: Paul Eggert branch nick: trunk timestamp: Thu 2013-08-15 09:28:42 -0700 message: Fix minor problems found by static checking. * frame.c (delete_frame): * xdisp.c (next_element_from_display_vector): Avoid uninitialized local. * image.c (imagemagick_compute_animated_image): Port to C89. Prefer usual GNU indentation style for loops. Be more careful about bizarrely large sizes, by using ptrdiff_t instead of int. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 16:01:13 +0000 +++ src/ChangeLog 2013-08-15 16:28:42 +0000 @@ -1,3 +1,14 @@ +2013-08-15 Paul Eggert + + Fix minor problems found by static checking. + * frame.c (delete_frame): + * xdisp.c (next_element_from_display_vector): + Avoid uninitialized local. + * image.c (imagemagick_compute_animated_image): Port to C89. + Prefer usual GNU indentation style for loops. + Be more careful about bizarrely large sizes, by using ptrdiff_t + instead of int. + 2013-08-15 Dmitry Antipov Fix infinite frame selection loop (Bug#15025). === modified file 'src/frame.c' --- src/frame.c 2013-08-15 15:37:03 +0000 +++ src/frame.c 2013-08-15 16:28:42 +0000 @@ -1197,7 +1197,8 @@ /* Don't let the frame remain selected. */ if (f == sf) { - Lisp_Object tail, frame1; + Lisp_Object tail; + Lisp_Object frame1 = Qnil; /* Look for another visible frame on the same terminal. Do not call next_frame here because it may loop forever. === modified file 'src/image.c' --- src/image.c 2013-08-15 16:03:56 +0000 +++ src/image.c 2013-08-15 16:28:42 +0000 @@ -7877,6 +7877,7 @@ static MagickWand * imagemagick_compute_animated_image (MagickWand *super_wand, int ino) { + int i; MagickWand *composite_wand; MagickSetIteratorIndex (super_wand, 0); @@ -7886,57 +7887,60 @@ else composite_wand = animation_cache; - for (int i = max (1, animation_index); i <= ino; i++) { - MagickWand *sub_wand; - PixelIterator *source_iterator, *dest_iterator; - PixelWand **source, **dest; - size_t source_width, dest_width; - MagickPixelPacket pixel; - - MagickSetIteratorIndex (super_wand, i); - sub_wand = MagickGetImage (super_wand); - - source_iterator = NewPixelIterator (sub_wand); - if (! source_iterator) - { - DestroyMagickWand (composite_wand); - DestroyMagickWand (sub_wand); - image_error ("Imagemagick pixel iterator creation failed", - Qnil, Qnil); - return NULL; - } - - dest_iterator = NewPixelIterator (composite_wand); - if (! dest_iterator) - { - DestroyMagickWand (composite_wand); - DestroyMagickWand (sub_wand); - DestroyPixelIterator (source_iterator); - image_error ("Imagemagick pixel iterator creation failed", - Qnil, Qnil); - return NULL; - } - - while ((source = PixelGetNextIteratorRow (source_iterator, &source_width)) - != NULL) { - dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); - for (int x = 0; x < source_width; x++) - { - /* Copy over non-transparent pixels. */ - if (PixelGetAlpha (source[x])) + for (i = max (1, animation_index); i <= ino; i++) + { + MagickWand *sub_wand; + PixelIterator *source_iterator, *dest_iterator; + PixelWand **source, **dest; + size_t source_width, dest_width; + MagickPixelPacket pixel; + + MagickSetIteratorIndex (super_wand, i); + sub_wand = MagickGetImage (super_wand); + + source_iterator = NewPixelIterator (sub_wand); + if (! source_iterator) + { + DestroyMagickWand (composite_wand); + DestroyMagickWand (sub_wand); + image_error ("Imagemagick pixel iterator creation failed", + Qnil, Qnil); + return NULL; + } + + dest_iterator = NewPixelIterator (composite_wand); + if (! dest_iterator) + { + DestroyMagickWand (composite_wand); + DestroyMagickWand (sub_wand); + DestroyPixelIterator (source_iterator); + image_error ("Imagemagick pixel iterator creation failed", + Qnil, Qnil); + return NULL; + } + + while ((source = PixelGetNextIteratorRow (source_iterator, &source_width)) + != NULL) + { + ptrdiff_t x; + dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); + for (x = 0; x < source_width; x++) { - PixelGetMagickColor (source[x], &pixel); - PixelSetMagickColor (dest[x], &pixel); + /* Copy over non-transparent pixels. */ + if (PixelGetAlpha (source[x])) + { + PixelGetMagickColor (source[x], &pixel); + PixelSetMagickColor (dest[x], &pixel); + } } + PixelSyncIterator(dest_iterator); } - PixelSyncIterator(dest_iterator); + + DestroyPixelIterator (source_iterator); + DestroyPixelIterator (dest_iterator); + DestroyMagickWand (sub_wand); } - DestroyPixelIterator (source_iterator); - DestroyPixelIterator (dest_iterator); - DestroyMagickWand (sub_wand); - } - /* Cache a copy for the next iteration. The current wand will be destroyed by the caller. */ animation_cache = CloneMagickWand (composite_wand); === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-15 15:28:53 +0000 +++ src/xdisp.c 2013-08-15 16:28:42 +0000 @@ -7507,6 +7507,7 @@ /* For the last character of the box-face run, we need to look either at the next glyph from the display vector, or at the face we saw before the display vector. */ + next_face_id = it->saved_face_id; if (it->current.dpvec_index < it->dpend - it->dpvec - 1) { if (it->dpvec_face_id >= 0) @@ -7521,8 +7522,6 @@ it->saved_face_id); } } - else - next_face_id = it->saved_face_id; next_face = FACE_FROM_ID (it->f, next_face_id); it->end_of_box_run_p = (this_face && this_face->box != FACE_NO_BOX && (!next_face ------------------------------------------------------------ revno: 113893 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 18:03:56 +0200 message: Further image.c compilation warning fixes diff: === modified file 'src/image.c' --- src/image.c 2013-08-15 16:01:13 +0000 +++ src/image.c 2013-08-15 16:03:56 +0000 @@ -7890,7 +7890,7 @@ MagickWand *sub_wand; PixelIterator *source_iterator, *dest_iterator; PixelWand **source, **dest; - unsigned long source_width, dest_width; + size_t source_width, dest_width; MagickPixelPacket pixel; MagickSetIteratorIndex (super_wand, i); ------------------------------------------------------------ revno: 113892 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 18:01:13 +0200 message: (imagemagick_compute_animated_image): Implement a simple cache (imagemagick_compute_animated_image): Fix some compilation warnings. Implement a very simple cache to make the animation usable at all, but it should be replaced with a per-image cache. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 15:37:03 +0000 +++ src/ChangeLog 2013-08-15 16:01:13 +0000 @@ -18,6 +18,9 @@ * image.c (imagemagick_compute_animated_image): Implement animated images (bug#14700). + (imagemagick_compute_animated_image): Fix some compilation + warnings. Implement a very simple cache to make the animation + usable at all, but it should be replaced with a per-image cache. 2013-08-15 Dmitry Antipov === modified file 'src/image.c' --- src/image.c 2013-08-15 15:10:12 +0000 +++ src/image.c 2013-08-15 16:01:13 +0000 @@ -7871,19 +7871,26 @@ compute ann the preceding images to be able to display a particular sub-image. */ +static MagickWand *animation_cache = NULL; +static int animation_index = 0; + static MagickWand * imagemagick_compute_animated_image (MagickWand *super_wand, int ino) { MagickWand *composite_wand; MagickSetIteratorIndex (super_wand, 0); - composite_wand = MagickGetImage (super_wand); - - for (int i = 1; i <= ino; i++) { + + if (ino == 0 || animation_cache == NULL) + composite_wand = MagickGetImage (super_wand); + else + composite_wand = animation_cache; + + for (int i = max (1, animation_index); i <= ino; i++) { MagickWand *sub_wand; PixelIterator *source_iterator, *dest_iterator; PixelWand **source, **dest; - long source_width, dest_width; + unsigned long source_width, dest_width; MagickPixelPacket pixel; MagickSetIteratorIndex (super_wand, i); @@ -7910,7 +7917,8 @@ return NULL; } - while (source = PixelGetNextIteratorRow (source_iterator, &source_width)) { + while ((source = PixelGetNextIteratorRow (source_iterator, &source_width)) + != NULL) { dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); for (int x = 0; x < source_width; x++) { @@ -7929,6 +7937,11 @@ DestroyMagickWand (sub_wand); } + /* Cache a copy for the next iteration. The current wand will be + destroyed by the caller. */ + animation_cache = CloneMagickWand (composite_wand); + animation_index = ino; + return composite_wand; } ------------------------------------------------------------ revno: 113891 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-08-15 19:37:03 +0400 message: Fix infinite frame selection loop (Bug#15025). * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 15:28:53 +0000 +++ src/ChangeLog 2013-08-15 15:37:03 +0000 @@ -1,3 +1,8 @@ +2013-08-15 Dmitry Antipov + + Fix infinite frame selection loop (Bug#15025). + * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame. + 2013-08-15 Eli Zaretskii * xdisp.c (compute_window_start_on_continuation_line): When === modified file 'src/frame.c' --- src/frame.c 2013-08-14 16:36:16 +0000 +++ src/frame.c 2013-08-15 15:37:03 +0000 @@ -1199,8 +1199,15 @@ { Lisp_Object tail, frame1; - /* Look for another visible frame on the same terminal. */ - frame1 = next_frame (frame, Qvisible); + /* Look for another visible frame on the same terminal. + Do not call next_frame here because it may loop forever. + See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15025. */ + FOR_EACH_FRAME (tail, frame1) + if (!EQ (frame, frame1) + && (FRAME_TERMINAL (XFRAME (frame)) + == FRAME_TERMINAL (XFRAME (frame1))) + && FRAME_VISIBLE_P (XFRAME (frame1))) + break; /* If there is none, find *some* other frame. */ if (NILP (frame1) || EQ (frame1, frame)) ------------------------------------------------------------ revno: 113890 fixes bug: http://debbugs.gnu.org/15099 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2013-08-15 18:28:53 +0300 message: Fix bug #15099 with 'box' face attribute in display tables. src/xdisp.c (next_element_from_display_vector): Support 'box' face attribute in the face definitions of a display vector. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 15:20:03 +0000 +++ src/ChangeLog 2013-08-15 15:28:53 +0000 @@ -6,6 +6,8 @@ visible character of the display line. This avoids funky horizontal shifting because the window start is not kept on the same position. (Bug#15090) + (next_element_from_display_vector): Support 'box' face attribute + in the face definitions of a display vector. (Bug#15099) 2013-08-15 Lars Magne Ingebrigtsen === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-15 15:20:03 +0000 +++ src/xdisp.c 2013-08-15 15:28:53 +0000 @@ -7461,6 +7461,8 @@ next_element_from_display_vector (struct it *it) { Lisp_Object gc; + int prev_face_id = it->face_id; + int next_face_id; /* Precondition. */ eassert (it->dpvec && it->current.dpvec_index >= 0); @@ -7473,6 +7475,8 @@ if (GLYPH_CODE_P (gc)) { + struct face *this_face, *prev_face, *next_face; + it->c = GLYPH_CODE_CHAR (gc); it->len = CHAR_BYTES (it->c); @@ -7488,6 +7492,42 @@ it->face_id = merge_faces (it->f, Qt, lface_id, it->saved_face_id); } + + /* Glyphs in the display vector could have the box face, so we + need to set the related flags in the iterator, as + appropriate. */ + this_face = FACE_FROM_ID (it->f, it->face_id); + prev_face = FACE_FROM_ID (it->f, prev_face_id); + + /* Is this character the first character of a box-face run? */ + it->start_of_box_run_p = (this_face && this_face->box != FACE_NO_BOX + && (!prev_face + || prev_face->box == FACE_NO_BOX)); + + /* For the last character of the box-face run, we need to look + either at the next glyph from the display vector, or at the + face we saw before the display vector. */ + if (it->current.dpvec_index < it->dpend - it->dpvec - 1) + { + if (it->dpvec_face_id >= 0) + next_face_id = it->dpvec_face_id; + else + { + int lface_id = + GLYPH_CODE_FACE (it->dpvec[it->current.dpvec_index + 1]); + + if (lface_id > 0) + next_face_id = merge_faces (it->f, Qt, lface_id, + it->saved_face_id); + } + } + else + next_face_id = it->saved_face_id; + next_face = FACE_FROM_ID (it->f, next_face_id); + it->end_of_box_run_p = (this_face && this_face->box != FACE_NO_BOX + && (!next_face + || next_face->box == FACE_NO_BOX)); + it->face_box_p = this_face && this_face->box != FACE_NO_BOX; } else /* Display table entry is invalid. Return a space. */ ------------------------------------------------------------ revno: 113889 fixes bug: http://debbugs.gnu.org/15090 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2013-08-15 18:20:03 +0300 message: Fix bug #15090 with redisplay under linum-mode and visual-line-mode. src/xdisp.c (compute_window_start_on_continuation_line): When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines to make sure we end up setting the window start at the leftmost visible character of the display line. This avoids funky horizontal shifting because the window start is not kept on the same position. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 15:10:12 +0000 +++ src/ChangeLog 2013-08-15 15:20:03 +0000 @@ -1,3 +1,12 @@ +2013-08-15 Eli Zaretskii + + * xdisp.c (compute_window_start_on_continuation_line): When + WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines + to make sure we end up setting the window start at the leftmost + visible character of the display line. This avoids funky + horizontal shifting because the window start is not kept on the + same position. (Bug#15090) + 2013-08-15 Lars Magne Ingebrigtsen * image.c (imagemagick_compute_animated_image): Implement animated === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-14 07:25:45 +0000 +++ src/xdisp.c 2013-08-15 15:20:03 +0000 @@ -14912,7 +14912,25 @@ { min_distance = distance; pos = it.current.pos; - move_it_by_lines (&it, 1); + if (it.line_wrap == WORD_WRAP) + { + /* Under WORD_WRAP, move_it_by_lines is likely to + overshoot and stop not at the first, but the + second character from the left margin. So in + that case, we need a more tight control on the X + coordinate of the iterator than move_it_by_lines + promises in its contract. The method is to first + go to the last (rightmost) visible character of a + line, then move to the leftmost character on the + next line in a separate call. */ + move_it_to (&it, ZV, it.last_visible_x, it.current_y, -1, + MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); + move_it_to (&it, ZV, 0, + it.current_y + it.max_ascent + it.max_descent, -1, + MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); + } + else + move_it_by_lines (&it, 1); } /* Set the window start there. */ ------------------------------------------------------------ revno: 113888 fixes bug: http://debbugs.gnu.org/14700 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Thu 2013-08-15 17:10:12 +0200 message: * image.c (imagemagick_compute_animated_image): Implement animated images. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 14:52:53 +0000 +++ src/ChangeLog 2013-08-15 15:10:12 +0000 @@ -1,3 +1,8 @@ +2013-08-15 Lars Magne Ingebrigtsen + + * image.c (imagemagick_compute_animated_image): Implement animated + images (bug#14700). + 2013-08-15 Dmitry Antipov * lisp.h (FOR_EACH_ALIST_VALUE): New macro === modified file 'src/image.c' --- src/image.c 2013-08-15 05:23:40 +0000 +++ src/image.c 2013-08-15 15:10:12 +0000 @@ -7864,6 +7864,75 @@ return hint_buffer; } +/* Animated images (e.g., GIF89a) are composed from one "master image" + (which is the first one, and then there's a number of images that + follow. If following images have non-transparent colors, these are + composed "on top" of the master image. So, in general, one has to + compute ann the preceding images to be able to display a particular + sub-image. */ + +static MagickWand * +imagemagick_compute_animated_image (MagickWand *super_wand, int ino) +{ + MagickWand *composite_wand; + + MagickSetIteratorIndex (super_wand, 0); + composite_wand = MagickGetImage (super_wand); + + for (int i = 1; i <= ino; i++) { + MagickWand *sub_wand; + PixelIterator *source_iterator, *dest_iterator; + PixelWand **source, **dest; + long source_width, dest_width; + MagickPixelPacket pixel; + + MagickSetIteratorIndex (super_wand, i); + sub_wand = MagickGetImage (super_wand); + + source_iterator = NewPixelIterator (sub_wand); + if (! source_iterator) + { + DestroyMagickWand (composite_wand); + DestroyMagickWand (sub_wand); + image_error ("Imagemagick pixel iterator creation failed", + Qnil, Qnil); + return NULL; + } + + dest_iterator = NewPixelIterator (composite_wand); + if (! dest_iterator) + { + DestroyMagickWand (composite_wand); + DestroyMagickWand (sub_wand); + DestroyPixelIterator (source_iterator); + image_error ("Imagemagick pixel iterator creation failed", + Qnil, Qnil); + return NULL; + } + + while (source = PixelGetNextIteratorRow (source_iterator, &source_width)) { + dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); + for (int x = 0; x < source_width; x++) + { + /* Copy over non-transparent pixels. */ + if (PixelGetAlpha (source[x])) + { + PixelGetMagickColor (source[x], &pixel); + PixelSetMagickColor (dest[x], &pixel); + } + } + PixelSyncIterator(dest_iterator); + } + + DestroyPixelIterator (source_iterator); + DestroyPixelIterator (dest_iterator); + DestroyMagickWand (sub_wand); + } + + return composite_wand; +} + + /* Helper function for imagemagick_load, which does the actual loading given contents and size, apart from frame and image structures, passed from imagemagick_load. Uses librimagemagick to do most of @@ -7965,12 +8034,14 @@ /* If we have an animated image, get the new wand based on the "super-wand". */ - if (ino > 0) + if (MagickGetNumberImages (image_wand) > 1) { MagickWand *super_wand = image_wand; - MagickSetIteratorIndex (super_wand, ino); - image_wand = MagickGetImage (super_wand); - DestroyMagickWand (super_wand); + image_wand = imagemagick_compute_animated_image (super_wand, ino); + if (! image_wand) + image_wand = super_wand; + else + DestroyMagickWand (super_wand); } /* Retrieve the frame's background color, for use later. */ ------------------------------------------------------------ revno: 113887 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-08-15 18:52:53 +0400 message: * lisp.h (FOR_EACH_ALIST_VALUE): New macro to do `for' loops over alist values. * buffer.h (FOR_EACH_BUFFER): * process.c (FOR_EACH_PROCESS): Use it. (handle_child_signal, status_notify, Fget_buffer_process) (kill_buffer_processes): Use FOR_EACH_PROCESS. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-15 05:23:40 +0000 +++ src/ChangeLog 2013-08-15 14:52:53 +0000 @@ -1,5 +1,14 @@ 2013-08-15 Dmitry Antipov + * lisp.h (FOR_EACH_ALIST_VALUE): New macro + to do `for' loops over alist values. + * buffer.h (FOR_EACH_BUFFER): + * process.c (FOR_EACH_PROCESS): Use it. + (handle_child_signal, status_notify, Fget_buffer_process) + (kill_buffer_processes): Use FOR_EACH_PROCESS. + +2013-08-15 Dmitry Antipov + * term.c (get_named_tty, create_tty_output, tty_free_frame_resources) (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort. * image.c (make_image_cache): For struct image_cache, prefer xmalloc === modified file 'src/buffer.h' --- src/buffer.h 2013-08-06 06:53:09 +0000 +++ src/buffer.h 2013-08-15 14:52:53 +0000 @@ -1132,10 +1132,8 @@ /* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is a `for' loop which iterates over the buffers from Vbuffer_alist. */ -#define FOR_EACH_LIVE_BUFFER(list_var, buf_var) \ - for (list_var = Vbuffer_alist; \ - (CONSP (list_var) && (buf_var = XCDR (XCAR (list_var)), 1)); \ - list_var = XCDR (list_var)) +#define FOR_EACH_LIVE_BUFFER(list_var, buf_var) \ + FOR_EACH_ALIST_VALUE (Vbuffer_alist, list_var, buf_var) /* Get text properties of B. */ === modified file 'src/lisp.h' --- src/lisp.h 2013-08-14 16:36:16 +0000 +++ src/lisp.h 2013-08-15 14:52:53 +0000 @@ -4342,6 +4342,12 @@ memory_full (SIZE_MAX); \ } while (0) +/* Do a `for' loop over alist values. */ + +#define FOR_EACH_ALIST_VALUE(head_var, list_var, value_var) \ + for (list_var = head_var; \ + (CONSP (list_var) && (value_var = XCDR (XCAR (list_var)), 1)); \ + list_var = XCDR (list_var)) /* Check whether it's time for GC, and run it if so. */ === modified file 'src/process.c' --- src/process.c 2013-08-12 20:17:32 +0000 +++ src/process.c 2013-08-15 14:52:53 +0000 @@ -361,6 +361,12 @@ #define DATAGRAM_CONN_P(proc) (0) #endif +/* FOR_EACH_PROCESS (LIST_VAR, PROC_VAR) followed by a statement is + a `for' loop which iterates over processes from Vprocess_alist. */ + +#define FOR_EACH_PROCESS(list_var, proc_var) \ + FOR_EACH_ALIST_VALUE (Vprocess_alist, list_var, proc_var) + /* These setters are used only in this file, so they can be private. */ static void pset_buffer (struct Lisp_Process *p, Lisp_Object val) @@ -6135,7 +6141,7 @@ static void handle_child_signal (int sig) { - Lisp_Object tail; + Lisp_Object tail, proc; /* Find the process that signaled us, and record its status. */ @@ -6165,9 +6171,8 @@ } /* Otherwise, if it is asynchronous, it is in Vprocess_alist. */ - for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_PROCESS (tail, proc) { - Lisp_Object proc = XCDR (XCAR (tail)); struct Lisp_Process *p = XPROCESS (proc); int status; @@ -6322,13 +6327,10 @@ that we run, we get called again to handle their status changes. */ update_tick = process_tick; - for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_PROCESS (tail, proc) { Lisp_Object symbol; - register struct Lisp_Process *p; - - proc = Fcdr (XCAR (tail)); - p = XPROCESS (proc); + register struct Lisp_Process *p = XPROCESS (proc); if (p->tick != p->update_tick) { @@ -6851,12 +6853,9 @@ buf = Fget_buffer (buffer); if (NILP (buf)) return Qnil; - for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) - { - proc = Fcdr (XCAR (tail)); - if (PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf)) - return proc; - } + FOR_EACH_PROCESS (tail, proc) + if (EQ (XPROCESS (proc)->buffer, buf)) + return proc; #endif /* subprocesses */ return Qnil; } @@ -6889,18 +6888,14 @@ #ifdef subprocesses Lisp_Object tail, proc; - for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) - { - proc = XCDR (XCAR (tail)); - if (PROCESSP (proc) - && (NILP (buffer) || EQ (XPROCESS (proc)->buffer, buffer))) - { - if (NETCONN_P (proc) || SERIALCONN_P (proc)) - Fdelete_process (proc); - else if (XPROCESS (proc)->infd >= 0) - process_send_signal (proc, SIGHUP, Qnil, 1); - } - } + FOR_EACH_PROCESS (tail, proc) + if (NILP (buffer) || EQ (XPROCESS (proc)->buffer, buffer)) + { + if (NETCONN_P (proc) || SERIALCONN_P (proc)) + Fdelete_process (proc); + else if (XPROCESS (proc)->infd >= 0) + process_send_signal (proc, SIGHUP, Qnil, 1); + } #else /* subprocesses */ /* Since we have no subprocesses, this does nothing. */ #endif /* subprocesses */ ------------------------------------------------------------ revno: 113886 committer: Michael Albinus branch nick: trunk timestamp: Thu 2013-08-15 16:29:08 +0200 message: Remove byte compiler warnings, visible when compiling with `byte-compile-force-lexical-warnings' set to t. * net/tramp.el (tramp-debug-message, tramp-message, tramp-error) (tramp-error-with-buffer): Rename ARGS to ARGUMENTS and BUFFER to BUF. (tramp-handle-unhandled-file-name-directory) (tramp-handle-file-notify-add-watch, tramp-action-login) (tramp-action-succeed, tramp-action-permission-denied) (tramp-action-terminal, tramp-action-process-alive): Prefix unused arguments with "_". * net/tramp-adb.el (tramp-adb-parse-device-names) (tramp-adb-handle-insert-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-copy-file): Prefix unused arguments with "_". (tramp-adb-handle-file-truename): Remove unused arguments. * net/tramp-cache.el (tramp-flush-directory-property) (tramp-flush-connection-property, tramp-list-connections) (tramp-parse-connection-properties): Prefix unused arguments with "_". * net/tramp-compat.el (tramp-compat-make-temp-file): Rename FILENAME to F. * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names) (tramp-zeroconf-parse-workstation-device-names) (tramp-zeroconf-parse-webdav-device-names) (tramp-synce-parse-device-names): Prefix unused arguments with "_". * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_". * net/tramp-sh.el (tramp-sh-handle-file-truename): Remove unused arguments. (tramp-sh-handle-copy-file, tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-file-contents-literally) (tramp-sh-handle-file-notify-add-watch): Prefix unused arguments with "_". (tramp-do-copy-or-rename-file, tramp-barf-if-no-shell-prompt): Remove unused variables. * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-delete-file) (tramp-smb-read-file-entry): Prefix unused arguments with "_". * net/tramp-uu.el (tramp-uu-b64-alphabet, tramp-uu-b64-char-to-byte): Make them a defconst. (tramp-uuencode-region): Remove unused variable. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-14 13:41:02 +0000 +++ lisp/ChangeLog 2013-08-15 14:29:08 +0000 @@ -1,3 +1,54 @@ +2013-08-15 Michael Albinus + + Remove byte compiler warnings, visible when compiling with + `byte-compile-force-lexical-warnings' set to t. + + * net/tramp.el (tramp-debug-message, tramp-message, tramp-error) + (tramp-error-with-buffer): Rename ARGS to ARGUMENTS and BUFFER to BUF. + (tramp-handle-unhandled-file-name-directory) + (tramp-handle-file-notify-add-watch, tramp-action-login) + (tramp-action-succeed, tramp-action-permission-denied) + (tramp-action-terminal, tramp-action-process-alive): Prefix unused + arguments with "_". + + * net/tramp-adb.el (tramp-adb-parse-device-names) + (tramp-adb-handle-insert-directory, tramp-adb-handle-delete-file) + (tramp-adb-handle-copy-file): Prefix unused arguments with "_". + (tramp-adb-handle-file-truename): Remove unused arguments. + + * net/tramp-cache.el (tramp-flush-directory-property) + (tramp-flush-connection-property, tramp-list-connections) + (tramp-parse-connection-properties): Prefix unused arguments with "_". + + * net/tramp-compat.el (tramp-compat-make-temp-file): Rename + FILENAME to F. + + * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) + (tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names) + (tramp-zeroconf-parse-workstation-device-names) + (tramp-zeroconf-parse-webdav-device-names) + (tramp-synce-parse-device-names): Prefix unused arguments with "_". + + * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) + (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_". + + * net/tramp-sh.el (tramp-sh-handle-file-truename): Remove unused + arguments. + (tramp-sh-handle-copy-file, tramp-sh-handle-dired-compress-file) + (tramp-sh-handle-insert-file-contents-literally) + (tramp-sh-handle-file-notify-add-watch): Prefix unused arguments + with "_". + (tramp-do-copy-or-rename-file, tramp-barf-if-no-shell-prompt): + Remove unused variables. + + * net/tramp-smb.el (tramp-smb-handle-copy-directory) + (tramp-smb-handle-copy-file, tramp-smb-handle-delete-file) + (tramp-smb-read-file-entry): Prefix unused arguments with "_". + + * net/tramp-uu.el (tramp-uu-b64-alphabet, tramp-uu-b64-char-to-byte): + Make them a defconst. + (tramp-uuencode-region): Remove unused variable. + 2013-08-14 Juanma Barranquero * frameset.el (frameset--prop-setter): New function. === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-08-01 11:10:31 +0000 +++ lisp/net/tramp-adb.el 2013-08-15 14:29:08 +0000 @@ -174,7 +174,7 @@ (tramp-run-real-handler operation args)))) ;;;###tramp-autoload -(defun tramp-adb-parse-device-names (ignore) +(defun tramp-adb-parse-device-names (_ignore) "Return a list of (nil host) tuples allowed to access." (with-timeout (10) (with-temp-buffer @@ -224,7 +224,7 @@ ;; This is derived from `tramp-sh-handle-file-truename'. Maybe the ;; code could be shared? -(defun tramp-adb-handle-file-truename (filename &optional counter prev-dirs) +(defun tramp-adb-handle-file-truename (filename) "Like `file-truename' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (with-tramp-file-property v localname "file-truename" @@ -416,7 +416,7 @@ switches)))))) (defun tramp-adb-handle-insert-directory - (filename switches &optional wildcard full-directory-p) + (filename switches &optional _wildcard _full-directory-p) "Like `insert-directory' for Tramp files." (when (stringp switches) (setq switches (tramp-adb--gnu-switches-to-ash (split-string switches)))) @@ -518,7 +518,7 @@ (tramp-shell-quote-argument localname)) "Couldn't delete %s" directory))) -(defun tramp-adb-handle-delete-file (filename &optional trash) +(defun tramp-adb-handle-delete-file (filename &optional _trash) "Like `delete-file' for Tramp files." (setq filename (expand-file-name filename)) (with-parsed-tramp-file-name filename nil @@ -651,7 +651,7 @@ (defun tramp-adb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-extended-attributes) + _preserve-uid-gid _preserve-extended-attributes) "Like `copy-file' for Tramp files. PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (setq filename (expand-file-name filename) === modified file 'lisp/net/tramp-cache.el' --- lisp/net/tramp-cache.el 2013-07-10 14:07:17 +0000 +++ lisp/net/tramp-cache.el 2013-08-15 14:29:08 +0000 @@ -187,7 +187,7 @@ 'directory-file-name (list directory)))) (tramp-message key 8 "%s" directory) (maphash - (lambda (key value) + (lambda (key _value) (when (and (stringp (tramp-file-name-localname key)) (string-match directory (tramp-file-name-localname key))) (remhash key tramp-cache-data))) @@ -273,7 +273,7 @@ (let ((hash (gethash key tramp-cache-data)) properties) (when (hash-table-p hash) - (maphash (lambda (x y) (add-to-list 'properties x 'append)) hash)) + (maphash (lambda (x _y) (add-to-list 'properties x 'append)) hash)) properties)) (setq tramp-cache-data-changed t) (remhash key tramp-cache-data)) @@ -304,7 +304,7 @@ "Return a list of all known connection vectors according to `tramp-cache'." (let (result) (maphash - (lambda (key value) + (lambda (key _value) (when (and (vectorp key) (null (aref key 3))) (add-to-list 'result key))) tramp-cache-data) @@ -368,7 +368,7 @@ for all methods. Resulting data are derived from connection history." (let (res) (maphash - (lambda (key value) + (lambda (key _value) (if (and (vectorp key) (string-equal method (tramp-file-name-method key)) (not (tramp-file-name-localname key))) === modified file 'lisp/net/tramp-compat.el' --- lisp/net/tramp-compat.el 2013-07-16 04:39:23 +0000 +++ lisp/net/tramp-compat.el 2013-08-15 14:29:08 +0000 @@ -238,14 +238,14 @@ ;; `make-temp-file' exists in Emacs only. On XEmacs, we use our own ;; implementation with `make-temp-name', creating the temporary file ;; immediately in order to avoid a security hole. -(defsubst tramp-compat-make-temp-file (filename &optional dir-flag) +(defsubst tramp-compat-make-temp-file (f &optional dir-flag) "Create a temporary file (compat function). -Add the extension of FILENAME, if existing." +Add the extension of F, if existing." (let* (file-name-handler-alist (prefix (expand-file-name (symbol-value 'tramp-temp-name-prefix) (tramp-compat-temporary-file-directory))) - (extension (file-name-extension filename t)) + (extension (file-name-extension f t)) result) (condition-case nil (setq result === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2013-08-01 11:10:31 +0000 +++ lisp/net/tramp-gvfs.el 2013-08-15 14:29:08 +0000 @@ -923,7 +923,7 @@ v (concat localname filename) "file-name-all-completions" result)))))))) -(defun tramp-gvfs-handle-file-notify-add-watch (file-name flags callback) +(defun tramp-gvfs-handle-file-notify-add-watch (file-name _flags _callback) "Like `file-notify-add-watch' for Tramp files." (setq file-name (expand-file-name file-name)) (with-parsed-tramp-file-name file-name nil @@ -1093,7 +1093,7 @@ (tramp-flush-file-property v localname)))))) (defun tramp-gvfs-handle-write-region - (start end filename &optional append visit lockname confirm) + (start end filename &optional _append visit _lockname confirm) "Like `write-region' for Tramp files." (with-parsed-tramp-file-name filename nil ;; XEmacs takes a coding system as the seventh argument, not `confirm'. @@ -1653,7 +1653,7 @@ :system nil nil tramp-bluez-interface-adapter "DeviceFound" 'tramp-bluez-device-found) -(defun tramp-bluez-parse-device-names (ignore) +(defun tramp-bluez-parse-device-names (_ignore) "Return a list of (nil host) tuples allowed to access." (mapcar (lambda (x) (list nil (car x))) @@ -1667,14 +1667,14 @@ ;; D-Bus zeroconf functions. -(defun tramp-zeroconf-parse-workstation-device-names (ignore) +(defun tramp-zeroconf-parse-workstation-device-names (_ignore) "Return a list of (user host) tuples allowed to access." (mapcar (lambda (x) (list nil (zeroconf-service-host x))) (zeroconf-list-services "_workstation._tcp"))) -(defun tramp-zeroconf-parse-webdav-device-names (ignore) +(defun tramp-zeroconf-parse-webdav-device-names (_ignore) "Return a list of (user host) tuples allowed to access." (mapcar (lambda (x) @@ -1724,7 +1724,7 @@ (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) tramp-synce-devices)) -(defun tramp-synce-parse-device-names (ignore) +(defun tramp-synce-parse-device-names (_ignore) "Return a list of (nil host) tuples allowed to access." (mapcar (lambda (x) (list nil x)) === modified file 'lisp/net/tramp-gw.el' --- lisp/net/tramp-gw.el 2013-01-01 09:11:05 +0000 +++ lisp/net/tramp-gw.el 2013-08-15 14:29:08 +0000 @@ -96,7 +96,7 @@ (defvar tramp-gw-aux-proc nil "Process listening on local port, as mediation between SSH and the gateway.") -(defun tramp-gw-gw-proc-sentinel (proc event) +(defun tramp-gw-gw-proc-sentinel (proc _event) "Delete auxiliary process when we are deleted." (unless (memq (process-status proc) '(run open)) (tramp-message @@ -105,7 +105,7 @@ (p (tramp-get-connection-property proc "process" nil))) (when (processp p) (delete-process p))))) -(defun tramp-gw-aux-proc-sentinel (proc event) +(defun tramp-gw-aux-proc-sentinel (proc _event) "Activate the different filters for involved gateway and auxiliary processes." (when (memq (process-status proc) '(run open)) ;; A new process has been spawned from `tramp-gw-aux-proc'. === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-08-01 11:10:31 +0000 +++ lisp/net/tramp-sh.el 2013-08-15 14:29:08 +0000 @@ -938,7 +938,7 @@ (tramp-shell-quote-argument l-localname)) t)))) -(defun tramp-sh-handle-file-truename (filename &optional counter prev-dirs) +(defun tramp-sh-handle-file-truename (filename) "Like `file-truename' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (tramp-make-tramp-file-name method user host @@ -1837,7 +1837,7 @@ 'copy-file (list filename newname ok-if-already-exists keep-date))))) (defun tramp-sh-handle-copy-directory - (dirname newname &optional keep-date parents copy-contents) + (dirname newname &optional keep-date parents _copy-contents) "Like `copy-directory' for Tramp files." (let ((t1 (tramp-tramp-file-p dirname)) (t2 (tramp-tramp-file-p newname))) @@ -1911,8 +1911,7 @@ (t2 (tramp-tramp-file-p newname)) (length (nth 7 (file-attributes (file-truename filename)))) (attributes (and preserve-extended-attributes - (apply 'file-extended-attributes (list filename)))) - pr tm) + (apply 'file-extended-attributes (list filename))))) (with-parsed-tramp-file-name (if t1 filename newname) nil (when (and (not ok-if-already-exists) (file-exists-p newname)) @@ -2433,7 +2432,7 @@ (tramp-error v 'file-error "Failed to recursively delete %s" filename)))) -(defun tramp-sh-handle-dired-compress-file (file &rest ok-flag) +(defun tramp-sh-handle-dired-compress-file (file &rest _ok-flag) "Like `dired-compress-file' for Tramp files." ;; OK-FLAG is valid for XEmacs only, but not implemented. ;; Code stolen mainly from dired-aux.el. @@ -2978,7 +2977,7 @@ (inhibit-file-name-operation 'insert-file-contents)) (unwind-protect (progn - (fset 'find-buffer-file-type (lambda (filename) t)) + (fset 'find-buffer-file-type (lambda (_filename) t)) (insert-file-contents filename visit beg end replace)) ;; Save exit. (if find-buffer-file-type-function @@ -3383,7 +3382,7 @@ ;; Default file name handlers, we don't care. (t (tramp-run-real-handler operation args))))))) -(defun tramp-sh-handle-file-notify-add-watch (file-name flags callback) +(defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback) "Like `file-notify-add-watch' for Tramp files." (setq file-name (expand-file-name file-name)) (with-parsed-tramp-file-name file-name nil @@ -3749,7 +3748,7 @@ Looks at process PROC to see if a shell prompt appears in TIMEOUT seconds. If not, it produces an error message with the given ERROR-ARGS." (let ((vec (tramp-get-connection-property proc "vector" nil))) - (condition-case err + (condition-case nil (tramp-wait-for-regexp proc timeout (format === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2013-08-01 11:10:31 +0000 +++ lisp/net/tramp-smb.el 2013-08-15 14:29:08 +0000 @@ -355,7 +355,7 @@ (throw 'tramp-action 'ok))))) (defun tramp-smb-handle-copy-directory - (dirname newname &optional keep-date parents copy-contents) + (dirname newname &optional keep-date parents _copy-contents) "Like `copy-directory' for Tramp files." (setq dirname (expand-file-name dirname) newname (expand-file-name newname)) @@ -492,7 +492,7 @@ (defun tramp-smb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-extended-attributes) + _preserve-uid-gid _preserve-extended-attributes) "Like `copy-file' for Tramp files. KEEP-DATE has no effect in case NEWNAME resides on an SMB server. PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." @@ -571,7 +571,7 @@ (tramp-error v 'file-error "%s `%s'" (match-string 0) directory)))))) -(defun tramp-smb-handle-delete-file (filename &optional trash) +(defun tramp-smb-handle-delete-file (filename &optional _trash) "Like `delete-file' for Tramp files." (setq filename (expand-file-name filename)) (when (file-exists-p filename) @@ -1497,7 +1497,7 @@ "%s%s" (if (string-match "D" mode) "d" "-") (mapconcat - (lambda (x) "") " " + (lambda (_x) "") " " (concat "r" (if (string-match "R" mode) "-" "w") "x")))) line (substring line 0 -6)) (return)) === modified file 'lisp/net/tramp-uu.el' --- lisp/net/tramp-uu.el 2013-01-01 09:11:05 +0000 +++ lisp/net/tramp-uu.el 2013-08-15 14:29:08 +0000 @@ -28,11 +28,11 @@ ;;; Code: -(defvar tramp-uu-b64-alphabet +(defconst tramp-uu-b64-alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" "Mapping from base64-encoded character to the byte it represents.") -(defvar tramp-uu-b64-char-to-byte +(defconst tramp-uu-b64-char-to-byte (let ((i 0)) (mapcar (lambda (c) (prog1 @@ -55,7 +55,6 @@ ;; First we base64 encode the region, then we transmogrify that into ;; uu encoding. (let ((len (base64-encode-region beg end t)) - (padding 0) i c) (save-excursion (goto-char beg) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-08-01 11:10:31 +0000 +++ lisp/net/tramp.el 2013-08-15 14:29:08 +0000 @@ -1417,10 +1417,10 @@ (set (make-local-variable 'outline-level) 'tramp-debug-outline-level)) (current-buffer))) -(defsubst tramp-debug-message (vec fmt-string &rest args) +(defsubst tramp-debug-message (vec fmt-string &rest arguments) "Append message to debug buffer. Message is formatted with FMT-STRING as control string and the remaining -ARGS to actually emit the message (if applicable)." +ARGUMENTS to actually emit the message (if applicable)." (when (get-buffer (tramp-buffer-name vec)) (with-current-buffer (tramp-get-debug-buffer vec) (goto-char (point-max)) @@ -1480,14 +1480,14 @@ ; (1+ (count-lines (point-min) (cdr ffn))))))) (insert (format "%s " fn))) ;; The message. - (insert (apply 'format fmt-string args))))) + (insert (apply 'format fmt-string arguments))))) (defvar tramp-message-show-message t "Show Tramp message in the minibuffer. This variable is used to disable messages from `tramp-error'. The messages are visible anyway, because an error is raised.") -(defsubst tramp-message (vec-or-proc level fmt-string &rest args) +(defsubst tramp-message (vec-or-proc level fmt-string &rest arguments) "Emit a message depending on verbosity level. VEC-OR-PROC identifies the Tramp buffer to use. It can be either a vector or a process. LEVEL says to be quiet if `tramp-verbose' is @@ -1498,7 +1498,7 @@ is greater than or equal 4. Calls functions `message' and `tramp-debug-message' with FMT-STRING as -control string and the remaining ARGS to actually emit the message (if +control string and the remaining ARGUMENTS to actually emit the message (if applicable)." (ignore-errors (when (<= level tramp-verbose) @@ -1514,7 +1514,7 @@ ((= level 2) "Warning: ") (t "Tramp: ")) fmt-string) - args)) + arguments)) ;; Log only when there is a minimum level. (when (>= tramp-verbose 4) (when (and vec-or-proc @@ -1527,17 +1527,17 @@ (apply 'tramp-debug-message vec-or-proc (concat (format "(%d) # " level) fmt-string) - args))))))) + arguments))))))) (defsubst tramp-backtrace (vec-or-proc) "Dump a backtrace into the debug buffer. This function is meant for debugging purposes." (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))) -(defsubst tramp-error (vec-or-proc signal fmt-string &rest args) +(defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments) "Emit an error. VEC-OR-PROC identifies the connection to use, SIGNAL is the -signal identifier to be raised, remaining args passed to +signal identifier to be raised, remaining arguments passed to `tramp-message'. Finally, signal SIGNAL is raised." (let (tramp-message-show-message) (tramp-backtrace vec-or-proc) @@ -1546,16 +1546,16 @@ (error-message-string (list signal (get signal 'error-message) - (apply 'format fmt-string args)))) - (signal signal (list (apply 'format fmt-string args))))) + (apply 'format fmt-string arguments)))) + (signal signal (list (apply 'format fmt-string arguments))))) (defsubst tramp-error-with-buffer - (buffer vec-or-proc signal fmt-string &rest args) - "Emit an error, and show BUFFER. -If BUFFER is nil, show the connection buffer. Wait for 30\", or until + (buf vec-or-proc signal fmt-string &rest arguments) + "Emit an error, and show BUF. +If BUF is nil, show the connection buf. Wait for 30\", or until an input event arrives. The other arguments are passed to `tramp-error'." (save-window-excursion - (let* ((buf (or (and (bufferp buffer) buffer) + (let* ((buf (or (and (bufferp buf) buf) (and (processp vec-or-proc) (process-buffer vec-or-proc)) (and (vectorp vec-or-proc) (tramp-get-connection-buffer vec-or-proc)))) @@ -1563,7 +1563,7 @@ (and buf (with-current-buffer buf (tramp-dissect-file-name default-directory)))))) (unwind-protect - (apply 'tramp-error vec-or-proc signal fmt-string args) + (apply 'tramp-error vec-or-proc signal fmt-string arguments) ;; Save exit. (when (and buf tramp-message-show-message @@ -1572,7 +1572,7 @@ (let ((enable-recursive-minibuffers t)) ;; `tramp-error' does not show messages. So we must do it ;; ourselves. - (message fmt-string args) + (message fmt-string arguments) ;; Show buffer. (pop-to-buffer buf) (discard-input) @@ -3281,7 +3281,7 @@ (setq filename (concat filename "/")))) (tramp-run-real-handler 'substitute-in-file-name (list filename))))) -(defun tramp-handle-unhandled-file-name-directory (filename) +(defun tramp-handle-unhandled-file-name-directory (_filename) "Like `unhandled-file-name-directory' for Tramp files." ;; With Emacs 23, we could simply return `nil'. But we must keep it ;; for backward compatibility. @@ -3341,7 +3341,7 @@ ;; only if that agrees with the buffer's record. (t (equal mt '(-1 65535)))))))))) -(defun tramp-handle-file-notify-add-watch (filename flags callback) +(defun tramp-handle-file-notify-add-watch (filename _flags _callback) "Like `file-notify-add-watch' for Tramp files." ;; This is the default handler. tramp-gvfs.el and tramp-sh.el have ;; its own one. @@ -3365,7 +3365,7 @@ ;; prompts from the remote host. See the variable ;; `tramp-actions-before-shell' for usage of these functions. -(defun tramp-action-login (proc vec) +(defun tramp-action-login (_proc vec) "Send the login name." (when (not (stringp tramp-current-user)) (setq tramp-current-user @@ -3392,11 +3392,11 @@ ;; Hide password prompt. (narrow-to-region (point-max) (point-max))))) -(defun tramp-action-succeed (proc vec) +(defun tramp-action-succeed (_proc _vec) "Signal success in finding shell prompt." (throw 'tramp-action 'ok)) -(defun tramp-action-permission-denied (proc vec) +(defun tramp-action-permission-denied (proc _vec) "Signal permission denied." (kill-process proc) (throw 'tramp-action 'permission-denied)) @@ -3429,7 +3429,7 @@ (tramp-message vec 6 "\n%s" (buffer-string))) (tramp-send-string vec (concat "y" tramp-local-end-of-line))))) -(defun tramp-action-terminal (proc vec) +(defun tramp-action-terminal (_proc vec) "Tell the remote host which terminal type to use. The terminal type can be configured with `tramp-terminal-type'." (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) @@ -3437,7 +3437,7 @@ (tramp-message vec 6 "\n%s" (buffer-string))) (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line))) -(defun tramp-action-process-alive (proc vec) +(defun tramp-action-process-alive (proc _vec) "Check, whether a process has finished." (unless (memq (process-status proc) '(run open)) (throw 'tramp-action 'process-died))) ------------------------------------------------------------ revno: 113885 committer: Xue Fuqiao branch nick: trunk timestamp: Thu 2013-08-15 16:27:22 +0800 message: * doc/lispref/markers.texi (The Region): Add/move indexes. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-13 17:45:34 +0000 +++ doc/lispref/ChangeLog 2013-08-15 08:27:22 +0000 @@ -1,3 +1,7 @@ +2013-08-15 Xue Fuqiao + + * markers.texi (The Region): Add/move indexes. + 2013-08-13 Lars Magne Ingebrigtsen * display.texi (ImageMagick Images): Mention :content-type and === modified file 'doc/lispref/markers.texi' --- doc/lispref/markers.texi 2013-08-14 13:58:25 +0000 +++ doc/lispref/markers.texi 2013-08-15 08:27:22 +0000 @@ -387,7 +387,6 @@ @section The Mark @cindex mark, the @c @cindex the mark? -@cindex mark ring Each buffer has a special marker, which is designated @dfn{the mark}. When a buffer is newly created, this marker exists but does @@ -426,6 +425,7 @@ Mark mode. (Another is that this enables highlighting of the region when the mark is active. @xref{Display}.) +@cindex mark ring In addition to the mark, each buffer has a @dfn{mark ring} which is a list of markers containing previous values of the mark. When editing commands change the mark, they should normally save the old value of the @@ -671,6 +671,7 @@ larger. @end defun +@c FIXME: Mention it in tips.texi? Instead of using @code{region-beginning} and @code{region-end}, a command designed to operate on a region should normally use @code{interactive} with the @samp{r} specification to find the @@ -683,6 +684,8 @@ function is intended to be used by commands that operate on the region, instead of on text near point, when the mark is active. +@cindex empty region +@vindex use-empty-active-region A region is valid if it has a non-zero size, or if the user option @code{use-empty-active-region} is non-@code{nil} (by default, it is @code{nil}). The function @code{region-active-p} is similar to ------------------------------------------------------------ revno: 113884 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-08-14 23:38:44 -0700 message: Stop keeping etc/refcards generated PDFs in the repository They are on the gnu.org website and will be in the release tarfiles. * admin/make-tarball.txt: Mention generating pdfs in etc/refcards. * etc/refcards/calccard.pdf, etc/refcards/cs-dired-ref.pdf: * etc/refcards/cs-refcard.pdf, etc/refcards/de-refcard.pdf: * etc/refcards/dired-ref.pdf, etc/refcards/fr-dired-ref.pdf: * etc/refcards/fr-refcard.pdf, etc/refcards/gnus-booklet.pdf: * etc/refcards/gnus-refcard.pdf, etc/refcards/orgcard.pdf: * etc/refcards/pl-refcard.pdf, etc/refcards/pt-br-refcard.pdf: * etc/refcards/refcard.pdf, etc/refcards/ru-refcard.pdf: * etc/refcards/sk-dired-ref.pdf, etc/refcards/sk-refcard.pdf: Remove generated files from repository. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-08-15 06:23:40 +0000 +++ admin/ChangeLog 2013-08-15 06:38:44 +0000 @@ -1,3 +1,7 @@ +2013-08-15 Glenn Morris + + * make-tarball.txt: Mention generating pdfs in etc/refcards. + 2013-08-15 Xue Fuqiao * notes/hydra: More information about Hydra. === modified file 'admin/make-tarball.txt' --- admin/make-tarball.txt 2013-08-05 16:18:57 +0000 +++ admin/make-tarball.txt 2013-08-15 06:38:44 +0000 @@ -61,6 +61,9 @@ 5. autoreconf -i -I m4 --force make bootstrap + make -C etc/refcards + make -C etc/refcards clean + 6. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-08-15 06:31:14 +0000 +++ etc/ChangeLog 2013-08-15 06:38:44 +0000 @@ -1,5 +1,15 @@ 2013-08-15 Glenn Morris + * refcards/calccard.pdf, refcards/cs-dired-ref.pdf: + * refcards/cs-refcard.pdf, refcards/de-refcard.pdf: + * refcards/dired-ref.pdf, refcards/fr-dired-ref.pdf: + * refcards/fr-refcard.pdf, refcards/gnus-booklet.pdf: + * refcards/gnus-refcard.pdf, refcards/orgcard.pdf: + * refcards/pl-refcard.pdf, refcards/pt-br-refcard.pdf: + * refcards/refcard.pdf, refcards/ru-refcard.pdf: + * refcards/sk-dired-ref.pdf, refcards/sk-refcard.pdf: + Remove generated files from repository. + * refcards/Makefile: Rewrite to use portable Makefile syntax. Add language-specific targets. (distclean, extraclean): New rules. === removed file 'etc/refcards/calccard.pdf' Binary files etc/refcards/calccard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/calccard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/cs-dired-ref.pdf' Binary files etc/refcards/cs-dired-ref.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/cs-dired-ref.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/cs-refcard.pdf' Binary files etc/refcards/cs-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/cs-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/de-refcard.pdf' Binary files etc/refcards/de-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/de-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/dired-ref.pdf' Binary files etc/refcards/dired-ref.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/dired-ref.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/fr-dired-ref.pdf' Binary files etc/refcards/fr-dired-ref.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/fr-dired-ref.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/fr-refcard.pdf' Binary files etc/refcards/fr-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/fr-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/gnus-booklet.pdf' Binary files etc/refcards/gnus-booklet.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/gnus-booklet.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/gnus-refcard.pdf' Binary files etc/refcards/gnus-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/gnus-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/orgcard.pdf' Binary files etc/refcards/orgcard.pdf 2013-01-08 14:27:18 +0000 and etc/refcards/orgcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/pl-refcard.pdf' Binary files etc/refcards/pl-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/pl-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/pt-br-refcard.pdf' Binary files etc/refcards/pt-br-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/pt-br-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/refcard.pdf' Binary files etc/refcards/refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/ru-refcard.pdf' Binary files etc/refcards/ru-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/ru-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/sk-dired-ref.pdf' Binary files etc/refcards/sk-dired-ref.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/sk-dired-ref.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/sk-refcard.pdf' Binary files etc/refcards/sk-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/sk-refcard.pdf 1970-01-01 00:00:00 +0000 differ