Now on revision 111816. ------------------------------------------------------------ revno: 111816 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-02-16 19:40:38 -0800 message: * lisp/menu-bar.el (menu-bar-tools-menu): Fix case of EDE entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-17 00:50:41 +0000 +++ lisp/ChangeLog 2013-02-17 03:40:38 +0000 @@ -1,5 +1,7 @@ 2013-02-17 Glenn Morris + * menu-bar.el (menu-bar-tools-menu): Fix case of EDE entry. + * image-mode.el (image-mode-map): Add image-dired menu entry. * image-dired.el (tumme): Make this alias obsolete. === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2013-01-07 22:00:55 +0000 +++ lisp/menu-bar.el 2013-02-17 03:40:38 +0000 @@ -1518,7 +1518,7 @@ :button (:toggle . (bound-and-true-p semantic-mode)))) (bindings--define-key menu [ede] - '(menu-item "Project support (EDE)" + '(menu-item "Project Support (EDE)" global-ede-mode :help "Toggle the Emacs Development Environment (Global EDE mode)" :button (:toggle . (bound-and-true-p global-ede-mode)))) ------------------------------------------------------------ revno: 111815 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-02-16 17:40:14 -0800 message: Add a very basic bisecting guide diff: === modified file 'admin/notes/bzr' --- admin/notes/bzr 2012-12-29 18:15:47 +0000 +++ admin/notes/bzr 2013-02-17 01:40:14 +0000 @@ -267,3 +267,52 @@ yum --enablerepo=epel install python-simpletal Then point your web-browser to http://127.0.0.1:8080/ . + +* Bisecting + +This is a semi-automated way to find the revision that introduced a bug. + +First, get the bzr bisect plugin if you do not have it already: + + cd ~/.bazaar/plugins + bzr branch lp:bzr-bisect bisect + +`bzr help bisect' should work now. + +It's probably simplest to make a new copy of the branch to work in +from this point onwards. + +Identify the last known "good" revision where the relevant issue is +NOT present (e.g. maybe Emacs 24.1). Let's say this is revision 1000. + + bzr bisect start + bzr bisect no -r 1000 + +At this point, bzr will switch to the mid-point of revision 1000 and +the current revision. If you know that the issue was definitely +present in some specific revision (say 2000), you can use: + + bzr bisect yes -r 2000 + +Now bzr switches to revision 1500. + +Now test whether the issue is present. You might need to rebuild +Emacs to do this, or if you know the problem is in a specific Lisp +file, you might be able to get away with just loading that one file in +current Emacs. + +If the issue is present, use + + bzr bisect yes + +If it is not, use + + bzr bisect no + +Repeat until you zero-in on the specific revision. + +When finished, use + + bzr bisect reset + +or simply delete the entire branch if you created it just for this. ------------------------------------------------------------ revno: 111814 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-02-16 16:50:41 -0800 message: * lisp/image-mode.el (image-mode-map): Add image-dired menu entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-17 00:45:53 +0000 +++ lisp/ChangeLog 2013-02-17 00:50:41 +0000 @@ -1,5 +1,7 @@ 2013-02-17 Glenn Morris + * image-mode.el (image-mode-map): Add image-dired menu entry. + * image-dired.el (tumme): Make this alias obsolete. 2013-02-16 Glenn Morris === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2013-02-16 19:56:50 +0000 +++ lisp/image-mode.el 2013-02-17 00:50:41 +0000 @@ -376,9 +376,15 @@ :visible (eq image-type 'imagemagick) :help "Rotate the image"] "--" - ["Next Image" image-next-file :active t + ["Show Thumbnails" + (lambda () + (interactive) + (image-dired default-directory)) + :active default-directory + :help "Show thumbnails for all images in this directory"] + ["Next Image" image-next-file :active buffer-file-name :help "Move to next image in this directory"] - ["Previous Image" image-previous-file :active t + ["Previous Image" image-previous-file :active buffer-file-name :help "Move to previous image in this directory"] "--" ["Animate Image" image-toggle-animation :style toggle ------------------------------------------------------------ revno: 111813 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-02-16 16:45:53 -0800 message: * lisp/image-dired.el (tumme): Make this alias obsolete. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-16 19:56:50 +0000 +++ lisp/ChangeLog 2013-02-17 00:45:53 +0000 @@ -1,3 +1,7 @@ +2013-02-17 Glenn Morris + + * image-dired.el (tumme): Make this alias obsolete. + 2013-02-16 Glenn Morris * image.el (image-animated-types): Remove. === modified file 'lisp/image-dired.el' --- lisp/image-dired.el 2013-01-02 16:13:04 +0000 +++ lisp/image-dired.el 2013-02-17 00:45:53 +0000 @@ -883,7 +883,7 @@ (defalias 'image-dired 'image-dired-show-all-from-dir) ;;;###autoload -(defalias 'tumme 'image-dired-show-all-from-dir) +(define-obsolete-function-alias 'tumme 'image-dired "24.4") (defun image-dired-sane-db-file () "Check if `image-dired-db-file' exists. ------------------------------------------------------------ revno: 111812 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-02-16 16:38:03 -0800 message: * lisp/gnus/shr.el (shr-put-image): Use image-multi-frame-p if available. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-02-16 19:56:50 +0000 +++ lisp/gnus/ChangeLog 2013-02-17 00:38:03 +0000 @@ -1,3 +1,7 @@ +2013-02-17 Glenn Morris + + * shr.el (shr-put-image): Use image-multi-frame-p if available. + 2013-02-16 Glenn Morris * shr.el (shr-put-image): Only animate images that specify a delay. === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2013-02-16 19:56:50 +0000 +++ lisp/gnus/shr.el 2013-02-17 00:38:03 +0000 @@ -615,8 +615,12 @@ (overlay-put overlay 'face 'default))) (insert-image image (or alt "*"))) (put-text-property start (point) 'image-size size) - ;; Only animate multi-frame things that specify a delay. FIXME? - (when (cdr (image-animated-p image)) + (when (if (fboundp 'image-multi-frame-p) + ;; Only animate multi-frame things that specify a + ;; delay; eg animated gifs as opposed to + ;; multi-page tiffs. FIXME? + (cdr (image-multi-frame-p image)) + (image-animated-p image)) (image-animate image nil 60))) image) (insert alt))) ------------------------------------------------------------ revno: 111811 fixes bug: http://debbugs.gnu.org/10739 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-02-16 11:56:50 -0800 message: Generalize "animated" images to "multi-frame" images * lisp/image.el (image-animated-types): Remove. (image-multi-frame-p): Rename from image-animated-p, and generalize. (image-animated-p): Make obsolete alias. (image-animate, image-nth-frame, image-animate-timeout): Use image-multi-frame-p. (image-animate-timeout): If no delay, use image-default-frame-delay. * lisp/image-mode.el (image-mode, image-toggle-animation): Use image-multi-frame-p. (image-mode): Adjust startup message for a multi-frame image. * lisp/gnus/shr.el (shr-put-image): Only animate images that specify a delay. This is consistent with the old image-animated-p behavior. * etc/NEWS: Add placeholder for this. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-02-16 03:29:39 +0000 +++ etc/NEWS 2013-02-16 19:56:50 +0000 @@ -145,6 +145,8 @@ `f' (`image-next-frame') and `b' (`image-previous-frame') visit the next or previous frame. `F' (`image-goto-frame') shows a specific frame. +*** `image-animated-p' is now `image-multi-frame-p'. + --- *** The command `image-mode-fit-frame' deletes other windows. When toggling, it restores the frame's previous window configuration. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-16 19:20:21 +0000 +++ lisp/ChangeLog 2013-02-16 19:56:50 +0000 @@ -1,5 +1,15 @@ 2013-02-16 Glenn Morris + * image.el (image-animated-types): Remove. + (image-multi-frame-p): Rename from image-animated-p, and generalize. + (image-animated-p): Make obsolete alias. + (image-animate, image-nth-frame, image-animate-timeout): + Use image-multi-frame-p. + (image-animate-timeout): If no delay, use image-default-frame-delay. + * image-mode.el (image-mode, image-toggle-animation): + Use image-multi-frame-p. (Bug#763, bug#10739) + (image-mode): Adjust startup message for a multi-frame image. + * image-mode.el (image-mode-map): Give it a menu. 2013-02-16 Michael Albinus === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-02-14 00:44:38 +0000 +++ lisp/gnus/ChangeLog 2013-02-16 19:56:50 +0000 @@ -1,3 +1,8 @@ +2013-02-16 Glenn Morris + + * shr.el (shr-put-image): Only animate images that specify a delay. + This is consistent with the old image-animated-p behavior. + 2013-02-14 Katsumi Yamaoka * gnus-util.el (gnus-define-keys): Convert [?\S-\ ] to [(shift space)] === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/shr.el 2013-02-16 19:56:50 +0000 @@ -615,7 +615,8 @@ (overlay-put overlay 'face 'default))) (insert-image image (or alt "*"))) (put-text-property start (point) 'image-size size) - (when (image-animated-p image) + ;; Only animate multi-frame things that specify a delay. FIXME? + (when (cdr (image-animated-p image)) (image-animate image nil 60))) image) (insert alt))) === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2013-02-16 19:20:21 +0000 +++ lisp/image-mode.el 2013-02-16 19:56:50 +0000 @@ -464,7 +464,7 @@ (cond ((null image) (message "%s" (concat msg1 "an image."))) - ((setq animated (image-animated-p image)) + ((setq animated (image-multi-frame-p image)) (setq image-current-frame (or (plist-get (cdr image) :index) 0) mode-line-process `(:eval (propertize (format " [%s/%s]" @@ -472,9 +472,9 @@ ,(car animated)) 'help-echo "Frame number"))) (message "%s" - (concat msg1 "text, or " - (substitute-command-keys - "\\[image-toggle-animation] to animate.")))) + (concat msg1 "text. This image has multiple frames."))) +;;; (substitute-command-keys +;;; "\\[image-toggle-animation] to animate.")))) (t (message "%s" (concat msg1 "text.")))))) @@ -663,7 +663,7 @@ (cond ((null image) (error "No image is present")) - ((null (setq animation (image-animated-p image))) + ((null (setq animation (image-multi-frame-p image))) (message "No image animation.")) (t (let ((timer (image-animate-timer image))) === modified file 'lisp/image.el' --- lisp/image.el 2013-02-16 03:39:12 +0000 +++ lisp/image.el 2013-02-16 19:56:50 +0000 @@ -606,29 +606,25 @@ ;;; Animated image API -(defconst image-animated-types '(gif) - "List of supported animated image types.") - (defvar image-default-frame-delay 0.1 "Default interval in seconds between frames of a multi-frame image. Only used if the image does not specify a value.") -(defun image-animated-p (image) - "Return non-nil if IMAGE can be animated. -To be capable of being animated, an image must be of a type -listed in `image-animated-types', and contain more than one -sub-image, with a specified animation delay. The actual return -value is a cons (NIMAGES . DELAY), where NIMAGES is the number -of sub-images in the animated image and DELAY is the delay in -seconds until the next sub-image should be displayed." - (cond - ((memq (plist-get (cdr image) :type) image-animated-types) - (let* ((metadata (image-metadata image)) - (images (plist-get metadata 'count)) - (delay (plist-get metadata 'delay))) - (when (and images (> images 1) (numberp delay)) - (if (< delay 0) (setq delay image-default-frame-delay)) - (cons images delay)))))) +(defun image-multi-frame-p (image) + "Return non-nil if IMAGE contains more than one frame. +The actual return value is a cons (NIMAGES . DELAY), where NIMAGES is +the number of frames (or sub-images) in the image and DELAY is the delay +in seconds that the image specifies between each frame. DELAY may be nil, +in which case you might want to use `image-default-frame-delay'." + (let* ((metadata (image-metadata image)) + (images (plist-get metadata 'count)) + (delay (plist-get metadata 'delay))) + (when (and images (> images 1)) + (if (or (not (numberp delay)) (< delay 0)) + (setq delay image-default-frame-delay)) + (cons images delay)))) + +(define-obsolete-function-alias 'image-animated-p 'image-multi-frame-p "24.4") ;; "Destructively"? (defun image-animate (image &optional index limit) @@ -639,7 +635,7 @@ LIMIT specifies how long to animate the image. If omitted or nil, play the animation until the end. If t, loop forever. If a number, play until that number of seconds has elapsed." - (let ((animation (image-animated-p image)) + (let ((animation (image-multi-frame-p image)) timer) (when animation (if (setq timer (image-animate-timer image)) @@ -673,13 +669,13 @@ do not check N is within the range of frames present in the image." (unless nocheck (if (< n 0) (setq n 0) - (setq n (min n (1- (car (image-animated-p image))))))) + (setq n (min n (1- (car (image-multi-frame-p image))))))) (plist-put (cdr image) :index n) (setq image-current-frame n) (force-window-update)) ;; FIXME? The delay may not be the same for different sub-images, -;; hence we need to call image-animated-p to return it. +;; 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 ;; argument? (defun image-animate-timeout (image n count time-elapsed limit) @@ -695,10 +691,11 @@ (image-nth-frame image n t) (setq n (1+ n)) (let* ((time (float-time)) - (animation (image-animated-p image)) + (animation (image-multi-frame-p image)) ;; Subtract off the time we took to load the image from the ;; stated delay time. - (delay (max (+ (cdr animation) time (- (float-time))) + (delay (max (+ (or (cdr animation) image-default-frame-delay) + time (- (float-time))) image-minimum-frame-delay)) done) (if (>= n count) ------------------------------------------------------------ revno: 111810 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-02-16 11:20:21 -0800 message: * lisp/image-mode.el (image-mode-map): Give it a menu. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-16 17:44:00 +0000 +++ lisp/ChangeLog 2013-02-16 19:20:21 +0000 @@ -1,3 +1,7 @@ +2013-02-16 Glenn Morris + + * image-mode.el (image-mode-map): Give it a menu. + 2013-02-16 Michael Albinus * net/tramp-cache.el (tramp-connection-properties): New customer === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2013-02-16 03:29:39 +0000 +++ lisp/image-mode.el 2013-02-16 19:20:21 +0000 @@ -359,6 +359,53 @@ (define-key map [remap move-end-of-line] 'image-eol) (define-key map [remap beginning-of-buffer] 'image-bob) (define-key map [remap end-of-buffer] 'image-eob) + (easy-menu-define image-mode-menu map "Menu for Image mode." + '("Image" + ["Show as Text" image-toggle-display :active t + :help "Show image as text"] + "--" + ["Fit Frame to Image" image-mode-fit-frame :active t + :help "Resize frame to match image"] + ["Fit to Window Height" image-transform-fit-to-height + :visible (eq image-type 'imagemagick) + :help "Resize image to match the window height"] + ["Fit to Window Width" image-transform-fit-to-width + :visible (eq image-type 'imagemagick) + :help "Resize image to match the window width"] + ["Rotate Image..." image-transform-set-rotation + :visible (eq image-type 'imagemagick) + :help "Rotate the image"] + "--" + ["Next Image" image-next-file :active t + :help "Move to next image in this directory"] + ["Previous Image" image-previous-file :active t + :help "Move to previous image in this directory"] + "--" + ["Animate Image" image-toggle-animation :style toggle + :selected (let ((image (image-get-display-property))) + (and image (image-animate-timer image))) + :active image-current-frame + :help "Toggle image animation"] + ["Loop Animation" + (lambda () (interactive) +;;; (make-variable-buffer-local 'image-animate-loop) + (setq image-animate-loop (not image-animate-loop)) + ;; FIXME this is a hacky way to make it affect a currently + ;; animating image. + (when (let ((image (image-get-display-property))) + (and image (image-animate-timer image))) + (image-toggle-animation) + (image-toggle-animation))) + :style toggle :selected image-animate-loop + :active image-current-frame + :help "Animate images once, or forever?"] + ["Next Frame" image-next-frame :active image-current-frame + :help "Show the next frame of this image"] + ["Previous Frame" image-previous-frame :active image-current-frame + :help "Show the previous frame of this image"] + ["Goto Frame..." image-goto-frame :active image-current-frame + :help "Show a specific frame of this image"] + )) map) "Mode keymap for `image-mode'.") @@ -637,8 +684,7 @@ (interactive (list (or current-prefix-arg (read-number "Show frame number: ")))) - (let ((image (image-get-display-property)) - animation) + (let ((image (image-get-display-property))) (cond ((null image) (error "No image is present")) ------------------------------------------------------------ revno: 111809 committer: Michael Albinus branch nick: trunk timestamp: Sat 2013-02-16 18:44:00 +0100 message: * net/tramp-cache.el (tramp-connection-properties): New customer option. (tramp-get-connection-property): Use it. * net/tramp-compat.el (top): Require 'trampver. * net/tramp-sh.el (tramp-remote-process-environment): Set tramp-autoload cookie. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-16 17:20:43 +0000 +++ lisp/ChangeLog 2013-02-16 17:44:00 +0000 @@ -1,3 +1,14 @@ +2013-02-16 Michael Albinus + + * net/tramp-cache.el (tramp-connection-properties): New customer + option. + (tramp-get-connection-property): Use it. + + * net/tramp-compat.el (top): Require 'trampver. + + * net/tramp-sh.el (tramp-remote-process-environment): Set + tramp-autoload cookie. + 2013-02-16 Kevin Ryde * info-look.el (info-lookup-select-mode): If major-mode has no === modified file 'lisp/net/tramp-cache.el' --- lisp/net/tramp-cache.el 2013-01-01 09:11:05 +0000 +++ lisp/net/tramp-cache.el 2013-02-16 17:44:00 +0000 @@ -58,6 +58,19 @@ (defvar tramp-cache-data (make-hash-table :test 'equal) "Hash table for remote files properties.") +;;;###tramp-autoload +(defcustom tramp-connection-properties nil + "List of static connection properties. +Every entry has the form (REGEXP PROPERTY VALUE). The regexp +matches remote file names. It can be nil. PROPERTY is a string, +and VALUE the corresponding value. They are used, if there is no +matching entry in for PROPERTY in `tramp-cache-data'." + :group 'tramp + :version "24.4" + :type '(repeat (list (choice :tag "File Name regexp" regexp (const nil)) + (choice :tag " Property" string) + (choice :tag " Value" sexp)))) + (defcustom tramp-persistency-file-name (cond ;; GNU Emacs. @@ -204,9 +217,27 @@ (setq key (copy-sequence key)) (aset key 3 nil)) (let* ((hash (gethash key tramp-cache-data)) - (value (if (hash-table-p hash) - (gethash property hash default) - default))) + (value + (catch 'result + (or + ;; Check for dynamic properties. + (and + (hash-table-p hash) + (maphash + (lambda (x y) (when (equal x property) (throw 'result y))) + hash)) + ;; Check for static properties. + (and + (vectorp key) + (dolist (elt tramp-connection-properties) + (when (and (string-match + (or (nth 0 elt) "") + (tramp-make-tramp-file-name + (aref key 0) (aref key 1) (aref key 2) nil)) + (string-equal (or (nth 1 elt) "") (or property ""))) + (throw 'result (nth 2 elt))))) + ;; The default value. + default)))) (tramp-message key 7 "%s %s" property value) value)) === modified file 'lisp/net/tramp-compat.el' --- lisp/net/tramp-compat.el 2013-02-12 14:35:10 +0000 +++ lisp/net/tramp-compat.el 2013-02-16 17:44:00 +0000 @@ -52,6 +52,7 @@ (require 'format-spec) (require 'shell) + (require 'trampver) (require 'tramp-loaddefs) ;; As long as password.el is not part of (X)Emacs, it shouldn't be === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-02-13 16:23:15 +0000 +++ lisp/net/tramp-sh.el 2013-02-16 17:44:00 +0000 @@ -512,6 +512,7 @@ (const :tag "Private Directories" tramp-own-remote-path) (string :tag "Directory")))) +;;;###tramp-autoload (defcustom tramp-remote-process-environment `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "LC_ALL=C" ,(format "TERM=%s" tramp-terminal-type) ------------------------------------------------------------ revno: 111808 committer: Michael Albinus branch nick: trunk timestamp: Sat 2013-02-16 18:38:37 +0100 message: * tramp.texi (Top, Configuration): Insert section `Android shell setup' in menu. (Android shell setup): New section. (Connection types, Default Method) (Frequently Asked Questions): Mention "scp" instead of "scpc". (External methods): Remove "scpc" and "rsyncc" entries. (Frequently Asked Questions): Remove entry about ControlPersist. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-02-13 08:50:44 +0000 +++ doc/misc/ChangeLog 2013-02-16 17:38:37 +0000 @@ -1,3 +1,13 @@ +2013-02-16 Michael Albinus + + * tramp.texi (Top, Configuration): Insert section `Android shell + setup' in menu. + (Android shell setup): New section. + (Connection types, Default Method) + (Frequently Asked Questions): Mention "scp" instead of "scpc". + (External methods): Remove "scpc" and "rsyncc" entries. + (Frequently Asked Questions): Remove entry about ControlPersist. + 2013-02-13 Glenn Morris * message.texi (News Headers): Don't mention yow any more. === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2013-01-24 09:43:32 +0000 +++ doc/misc/tramp.texi 2013-02-16 17:38:37 +0000 @@ -188,8 +188,9 @@ * Connection caching:: Reusing connection related information. * Remote Programs:: How @value{tramp} finds and uses programs on the remote machine. * Remote shell setup:: Remote shell setup hints. +* Android shell setup:: Android shell setup hints. +* Auto-save and Backup:: Auto-save and Backup. * Windows setup hints:: Issues with Cygwin ssh. -* Auto-save and Backup:: Auto-save and Backup. Using @value{tramp} @@ -515,6 +516,7 @@ * Connection caching:: Reusing connection related information. * Remote Programs:: How @value{tramp} finds and uses programs on the remote machine. * Remote shell setup:: Remote shell setup hints. +* Android shell setup:: Android shell setup hints. * Auto-save and Backup:: Auto-save and Backup. * Windows setup hints:: Issues with Cygwin ssh. @end menu @@ -557,9 +559,10 @@ External methods should be configured such a way that they don't require a password (with @command{ssh-agent}, or such alike). Modern @command{scp} implementations offer options to reuse existing -@command{ssh} connections, see method @command{scpc}. If it isn't -possible, you should consider @ref{Password handling}, otherwise you -will be prompted for a password every copy action. +@command{ssh} connections, which will be enabled by default if +available. If it isn't possible, you should consider @ref{Password +handling}, otherwise you will be prompted for a password every copy +action. @node Inline methods @@ -867,51 +870,6 @@ This method supports the @samp{-p} argument. -@item @option{scpc}---@command{ssh} and @command{scp} -@cindex method scpc -@cindex scpc method -@cindex scp (with scpc method) -@cindex ssh (with scpc method) - -Newer versions of @option{ssh} (for example OpenSSH 4) offer an option -@option{ControlMaster}. This allows @option{scp} to reuse an existing -@option{ssh} channel, which increases performance. - -Before you use this method, you should check whether your @option{ssh} -implementation supports this option. Try from the command line - -@example -ssh localhost -o ControlMaster=yes /bin/true -@end example - -If that command succeeds silently, then you can use @option{scpc}; but -if it fails like - -@example -command-line: line 0: Bad configuration option: ControlMaster -@end example - -then you cannot use it. Note, that the option -@option{ControlPersist}, if it is supported by your @option{ssh} -version, must be set to @option{no}. - -This method supports the @samp{-p} argument. - - -@item @option{rsyncc}---@command{ssh} and @command{rsync} -@cindex method rsyncc -@cindex rsyncc method -@cindex rsync (with rsyncc method) -@cindex ssh (with rsyncc method) - -Like the @option{scpc} method, @option{rsyncc} improves the underlying -@command{ssh} connection by the option @option{ControlMaster}. This -allows @command{rsync} to reuse an existing @command{ssh} channel, -which increases performance. - -This method supports the @samp{-p} argument. - - @item @option{pscp}---@command{plink} and @command{pscp} @cindex method pscp @cindex pscp method @@ -1240,7 +1198,7 @@ shortened syntax for the @samp{root} account, like @file{@trampfn{su, , , /etc/motd}}. -People who edit large files may want to consider @option{scpc} instead +People who edit large files may want to consider @option{scp} instead of @option{ssh}, or @option{pscp} instead of @option{plink}. These external methods are faster than inline methods for large files. Note, however, that external methods suffer from some limitations. @@ -1343,7 +1301,7 @@ hosts for certain method/user combinations via the variable @code{tramp-default-host-alist}. Usually, this isn't necessary, because @code{tramp-default-host} should be sufficient. For some -methods, like @code{adb}, that default value must be overwritten, +methods, like @option{adb}, that default value must be overwritten, which is already the initial value of @code{tramp-default-host-alist}. @noindent @@ -2047,6 +2005,50 @@ @end table +@node Android shell setup +@section Android shell setup hints +@cindex android shell setup + +Android devices use a restricted shell. They can be accessed via the +@option{adb} method. However, this restricts the access to a USB +connection, and it requires the installation of the Android SDK on the +local machine. + +When an @command{sshd} process runs on the Android device, like +provided by the @code{SSHDroid} app, any @option{ssh}-based method can +be used. However, this requires some special settings. + +The default shell @code{/bin/sh} does not exist. Instead, you shall +use just @code{sh}, which invokes the shell installed on the device. +You can instruct @value{tramp} by this form: + +@lisp +(add-to-list 'tramp-connection-properties + (list (regexp-quote "192.168.0.26") "remote-shell" "sh")) +@end lisp + +@noindent +with @samp{192.168.0.26} being the IP address of your Android device. + +The user settings for the @code{$PATH} environment valiable must be +preserved. Add this setting: + +@lisp +(add-to-list 'tramp-remote-path 'tramp-own-remote-path) +@end lisp + +If the Android device is not @samp{rooted}, you must give the shell a +writable directory for temporary files. You could use this setting: + +@lisp +(add-to-list 'tramp-remote-process-environment "TMPDIR=$HOME") +@end lisp + +Now you shall be able to open a remote connection with @kbd{C-x C-f +@trampfn{ssh, , 192.168.0.26#2222, }}, given that @command{sshd} +listens on port @samp{2222}. + + @node Auto-save and Backup @section Auto-save and Backup configuration @cindex auto-save @@ -2942,7 +2944,7 @@ In order to speed up @value{tramp}, one could either try to avoid some of the operations, or one could try to improve their performance. -Use an external method, like @option{scpc}. +Use an external method, like @option{scp}. Use caching. This is already enabled by default. Information about the remote host as well as the remote files are cached for reuse. The @@ -3068,20 +3070,6 @@ @item -How can I use @samp{ControlPersist}? - -When @samp{ControlPersist} is set to @samp{yes}, the @option{scpc} -method does not work. You can use @option{scpx} instead with the -following settings in @file{~/.ssh/config}: - -@example -Host * - ControlMaster auto - ControlPersist yes -@end example - - -@item File name completion does not work with @value{tramp} When you log in to the remote machine, do you see the output of ------------------------------------------------------------ revno: 111807 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8660 author: Kevin Ryde committer: Stefan Monnier branch nick: trunk timestamp: Sat 2013-02-16 12:20:43 -0500 message: * lisp/info-look.el (info-lookup-select-mode): If major-mode has no info-lookup-alist entry then search up derived-mode-parent. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-16 09:26:42 +0000 +++ lisp/ChangeLog 2013-02-16 17:20:43 +0000 @@ -1,3 +1,8 @@ +2013-02-16 Kevin Ryde + + * info-look.el (info-lookup-select-mode): If major-mode has no + info-lookup-alist entry then search up derived-mode-parent (bug#8660). + 2013-02-16 Jambunathan K * replace.el (read-regexp): Tighten the regexp that matches tag. === modified file 'lisp/info-look.el' --- lisp/info-look.el 2013-01-01 09:11:05 +0000 +++ lisp/info-look.el 2013-02-16 17:20:43 +0000 @@ -298,6 +298,21 @@ (when (string-match (caar file-name-alist) file-name) (setq info-lookup-mode (cdar file-name-alist))) (setq file-name-alist (cdr file-name-alist))))) + + ;; If major-mode has no setups in info-lookup-alist, under any topic, then + ;; search up through derived-mode-parent to find a parent mode which does + ;; have some setups. This means that a `define-derived-mode' with no + ;; setups of its own will select its parent mode for lookups, if one of + ;; its parents has some setups. Good for example on `makefile-gmake-mode' + ;; and similar derivatives of `makefile-mode'. + ;; + (let ((mode major-mode)) ;; Look for `mode' with some setups. + (while (and mode (not info-lookup-mode)) + (dolist (topic-cell info-lookup-alist) ;; Usually only two topics here. + (if (info-lookup->mode-value (car topic-cell) mode) + (setq info-lookup-mode mode))) + (setq mode (get mode 'derived-mode-parent)))) + (or info-lookup-mode (setq info-lookup-mode major-mode))) (defun info-lookup-change-mode (topic) ------------------------------------------------------------ revno: 111806 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-02-16 16:16:07 +0200 message: Remove functions and macros unused on MS-Windows. src/w32.c (sys_chown): Remove unused function. nt/inc/ms-w32.h (chown, logb): Remove, unused. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-02-16 13:59:37 +0000 +++ nt/ChangeLog 2013-02-16 14:16:07 +0000 @@ -2,6 +2,7 @@ * inc/ms-w32.h (__STDC__): Fiddle with value only for MSVC. (Bug#9066) + (chown, logb): Remove, unused. 2013-02-13 Juanma Barranquero === modified file 'nt/inc/ms-w32.h' --- nt/inc/ms-w32.h 2013-02-16 13:59:37 +0000 +++ nt/inc/ms-w32.h 2013-02-16 14:16:07 +0000 @@ -149,7 +149,6 @@ #define chdir sys_chdir #undef chmod #define chmod sys_chmod -#define chown sys_chown #undef close #define close sys_close #undef creat @@ -222,7 +221,6 @@ #define strtoll _strtoi64 #endif #define isatty _isatty -#define logb _logb #define _longjmp longjmp #define lseek _lseek #define popen _popen === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-16 13:59:37 +0000 +++ src/ChangeLog 2013-02-16 14:16:07 +0000 @@ -1,5 +1,7 @@ 2013-02-16 Eli Zaretskii + * w32.c (sys_chown): Remove unused function. + * w32term.c : Declare 'volatile' unconditionally. (Bug#9066) === modified file 'src/w32.c' --- src/w32.c 2013-02-16 11:08:49 +0000 +++ src/w32.c 2013-02-16 14:16:07 +0000 @@ -3220,14 +3220,6 @@ } int -sys_chown (const char *path, uid_t owner, gid_t group) -{ - if (sys_chmod (path, S_IREAD) == -1) /* check if file exists */ - return -1; - return 0; -} - -int sys_creat (const char * path, int mode) { return _creat (map_w32_filename (path, NULL), mode); ------------------------------------------------------------ revno: 111805 fixes bug: http://debbugs.gnu.org/9066 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-02-16 15:59:37 +0200 message: Don't use __STDC__ on MS-Windows unless necessary (Bug #9066). nt/inc/ms-w32.h (__STDC__): Fiddle with value only for MSVC. src/w32term.c : Declare 'volatile' unconditionally. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-02-13 00:52:04 +0000 +++ nt/ChangeLog 2013-02-16 13:59:37 +0000 @@ -1,3 +1,8 @@ +2013-02-16 Eli Zaretskii + + * inc/ms-w32.h (__STDC__): Fiddle with value only for MSVC. + (Bug#9066) + 2013-02-13 Juanma Barranquero * config.nt: Sync with autogen/config.in. === modified file 'nt/inc/ms-w32.h' --- nt/inc/ms-w32.h 2013-02-12 03:52:04 +0000 +++ nt/inc/ms-w32.h 2013-02-16 13:59:37 +0000 @@ -265,8 +265,11 @@ extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict); extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict); +#ifdef _MSC_VER /* This is hacky, but is necessary to avoid warnings about macro - redefinitions using the SDK compilers. */ + redefinitions using the MSVC compilers, since, when __STDC__ is + undefined or zero, those compilers declare functions like fileno, + lseek, and chdir, for which we defined macros above. */ #ifndef __STDC__ #define __STDC__ 1 #define MUST_UNDEF__STDC__ @@ -278,6 +281,11 @@ #undef __STDC__ #undef MUST_UNDEF__STDC__ #endif +#else /* !_MSC_VER */ +#include +#include +#include +#endif /* !_MSC_VER */ /* Defines that we need that aren't in the standard signal.h. */ #define SIGHUP 1 /* Hang up */ === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-16 11:08:49 +0000 +++ src/ChangeLog 2013-02-16 13:59:37 +0000 @@ -1,5 +1,8 @@ 2013-02-16 Eli Zaretskii + * w32term.c : Declare 'volatile' + unconditionally. (Bug#9066) + * w32.c (set_errno): Reset h_errno and don't set it to any other value. Set errno instead. (check_errno): Reset h_errno. === modified file 'src/w32term.c' --- src/w32term.c 2013-01-24 05:41:28 +0000 +++ src/w32term.c 2013-02-16 13:59:37 +0000 @@ -191,11 +191,7 @@ /* Incremented by w32_read_socket whenever it really tries to read events. */ -#ifdef __STDC__ static int volatile input_signal_count; -#else -static int input_signal_count; -#endif #ifdef CYGWIN int w32_message_fd = -1; ------------------------------------------------------------ revno: 111804 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-02-16 13:08:49 +0200 message: Don't set h_errno on MS-Windows except in gethostbyname. See http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00293.html and the following discussion for the details. src/w32.c (set_errno): Reset h_errno and don't set it to any other value. Set errno instead. (check_errno): Reset h_errno. (sys_socket, socket_to_fd, sys_bind, sys_connect) (sys_gethostname, sys_getservbyname, sys_getpeername) (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname) (sys_accept, sys_recvfrom, sys_sendto, fcntl, sys_read): Don't set h_errno. (sys_gethostbyname): Set h_errno only errors detected. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-15 19:37:29 +0000 +++ src/ChangeLog 2013-02-16 11:08:49 +0000 @@ -1,3 +1,15 @@ +2013-02-16 Eli Zaretskii + + * w32.c (set_errno): Reset h_errno and don't set it to any other + value. Set errno instead. + (check_errno): Reset h_errno. + (sys_socket, socket_to_fd, sys_bind, sys_connect) + (sys_gethostname, sys_getservbyname, sys_getpeername) + (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname) + (sys_accept, sys_recvfrom, sys_sendto, fcntl, sys_read): Don't set + h_errno. + (sys_gethostbyname): Set h_errno only errors detected. + 2013-02-15 Paul Eggert * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl. === modified file 'src/w32.c' --- src/w32.c 2013-02-15 17:31:12 +0000 +++ src/w32.c 2013-02-16 11:08:49 +0000 @@ -6092,35 +6092,39 @@ int h_errno = 0; -/* function to set h_errno for compatibility; map winsock error codes to - normal system codes where they overlap (non-overlapping definitions - are already in */ +/* Function to map winsock error codes to errno codes for those errno + code defined in errno.h (errno values not defined by errno.h are + already in nt/inc/sys/socket.h). */ static void set_errno (void) { + int wsa_err; + + h_errno = 0; if (winsock_lib == NULL) - h_errno = EINVAL; + wsa_err = EINVAL; else - h_errno = pfn_WSAGetLastError (); + wsa_err = pfn_WSAGetLastError (); - switch (h_errno) + switch (wsa_err) { - case WSAEACCES: h_errno = EACCES; break; - case WSAEBADF: h_errno = EBADF; break; - case WSAEFAULT: h_errno = EFAULT; break; - case WSAEINTR: h_errno = EINTR; break; - case WSAEINVAL: h_errno = EINVAL; break; - case WSAEMFILE: h_errno = EMFILE; break; - case WSAENAMETOOLONG: h_errno = ENAMETOOLONG; break; - case WSAENOTEMPTY: h_errno = ENOTEMPTY; break; + case WSAEACCES: errno = EACCES; break; + case WSAEBADF: errno = EBADF; break; + case WSAEFAULT: errno = EFAULT; break; + case WSAEINTR: errno = EINTR; break; + case WSAEINVAL: errno = EINVAL; break; + case WSAEMFILE: errno = EMFILE; break; + case WSAENAMETOOLONG: errno = ENAMETOOLONG; break; + case WSAENOTEMPTY: errno = ENOTEMPTY; break; + default: errno = wsa_err; break; } - errno = h_errno; } static void check_errno (void) { - if (h_errno == 0 && winsock_lib != NULL) + h_errno = 0; + if (winsock_lib != NULL) pfn_WSASetLastError (0); } @@ -6232,7 +6236,7 @@ if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return INVALID_SOCKET; } @@ -6242,13 +6246,7 @@ s = pfn_socket (af, type, protocol); if (s != INVALID_SOCKET) - { - int retval = socket_to_fd (s); - - if (retval == -1) - errno = h_errno; - return retval; - } + return socket_to_fd (s); set_errno (); return -1; @@ -6344,8 +6342,9 @@ /* clean up */ _close (fd); } + else pfn_closesocket (s); - h_errno = EMFILE; + errno = EMFILE; return -1; } @@ -6354,7 +6353,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6366,7 +6365,7 @@ set_errno (); return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6375,7 +6374,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6387,7 +6386,7 @@ set_errno (); return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6416,12 +6415,20 @@ sys_gethostname (char * name, int namelen) { if (winsock_lib != NULL) - return pfn_gethostname (name, namelen); + { + int retval; + + check_errno (); + retval = pfn_gethostname (name, namelen); + if (retval == SOCKET_ERROR) + set_errno (); + return retval; + } if (namelen > MAX_COMPUTERNAME_LENGTH) return !GetComputerName (name, (DWORD *)&namelen); - errno = h_errno = EFAULT; + errno = EFAULT; return SOCKET_ERROR; } @@ -6429,17 +6436,24 @@ sys_gethostbyname (const char * name) { struct hostent * host; + int h_err = h_errno; if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + h_errno = NO_RECOVERY; + errno = ENETDOWN; return NULL; } check_errno (); host = pfn_gethostbyname (name); if (!host) - set_errno (); + { + set_errno (); + h_errno = errno; + } + else + h_errno = h_err; return host; } @@ -6450,7 +6464,7 @@ if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return NULL; } @@ -6466,7 +6480,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return SOCKET_ERROR; } @@ -6478,7 +6492,7 @@ set_errno (); return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6487,7 +6501,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return SOCKET_ERROR; } @@ -6499,7 +6513,7 @@ set_errno (); return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6508,7 +6522,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return SOCKET_ERROR; } @@ -6521,7 +6535,7 @@ set_errno (); return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6530,7 +6544,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return SOCKET_ERROR; } @@ -6544,7 +6558,7 @@ fd_info[s].flags |= FILE_LISTEN; return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6553,7 +6567,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return SOCKET_ERROR; } @@ -6565,7 +6579,7 @@ set_errno (); return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6574,7 +6588,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return -1; } @@ -6586,11 +6600,7 @@ if (t == INVALID_SOCKET) set_errno (); else - { - fd = socket_to_fd (t); - if (fd < 0) - errno = h_errno; /* socket_to_fd sets h_errno */ - } + fd = socket_to_fd (t); if (fd >= 0) { @@ -6599,7 +6609,7 @@ } return fd; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return -1; } @@ -6609,7 +6619,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return SOCKET_ERROR; } @@ -6621,7 +6631,7 @@ set_errno (); return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6631,7 +6641,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return SOCKET_ERROR; } @@ -6643,7 +6653,7 @@ set_errno (); return rc; } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -6654,7 +6664,7 @@ { if (winsock_lib == NULL) { - errno = h_errno = ENETDOWN; + errno = ENETDOWN; return -1; } @@ -6673,11 +6683,11 @@ } else { - h_errno = EINVAL; + errno = EINVAL; return SOCKET_ERROR; } } - errno = h_errno = ENOTSOCK; + errno = ENOTSOCK; return SOCKET_ERROR; } @@ -7108,7 +7118,7 @@ pfn_ioctlsocket (SOCK_HANDLE (fd), FIONREAD, &waiting); if (waiting == 0 && nchars == 0) { - h_errno = errno = EWOULDBLOCK; + errno = EWOULDBLOCK; return -1; } ------------------------------------------------------------ revno: 111803 committer: Jambunathan K branch nick: trunk timestamp: Sat 2013-02-16 14:56:42 +0530 message: (read-regexp): Add regexp for symbol at point to the defaults (Bug#13687). * lisp/replace.el (read-regexp): Tighten the regexp that matches tag. When tag is retrieved with `find-tag-default', use regexp that matches tag at point. Also update docstring. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-16 09:13:40 +0000 +++ lisp/ChangeLog 2013-02-16 09:26:42 +0000 @@ -1,3 +1,9 @@ +2013-02-16 Jambunathan K + + * replace.el (read-regexp): Tighten the regexp that matches tag. + When tag is retrieved with `find-tag-default', use regexp that + matches tag at point. Also update docstring (Bug#13687). + 2013-02-16 Eli Zaretskii * autorevert.el (auto-revert-notify-add-watch): With 'w32notify', === modified file 'lisp/replace.el' --- lisp/replace.el 2013-02-01 23:38:41 +0000 +++ lisp/replace.el 2013-02-16 09:26:42 +0000 @@ -585,27 +585,32 @@ When PROMPT doesn't end with a colon and space, it adds a final \": \". If DEFAULTS is non-nil, it displays the first default in the prompt. -Non-nil optional arg DEFAULTS is a string or a list of strings that -are prepended to a list of standard default values, which include the -string at point, the last isearch regexp, the last isearch string, and -the last replacement regexp. +Optional arg DEFAULTS is a string or a list of strings that are +prepended to a list of standard default values, which include the +tag at point, the last isearch regexp, the last isearch string, +and the last replacement regexp. Non-nil HISTORY is a symbol to use for the history list. If HISTORY is nil, `regexp-history' is used." - (let* ((default (if (consp defaults) (car defaults) defaults)) - (defaults + (let* ((defaults (append (if (listp defaults) defaults (list defaults)) - (list (regexp-quote - (or (funcall (or find-tag-default-function + (list + ;; Regexp for tag at point. + (let* ((tagf (or find-tag-default-function (get major-mode 'find-tag-default-function) 'find-tag-default)) - "")) + (tag (funcall tagf))) + (cond ((not tag) "") + ((eq tagf 'find-tag-default) + (format "\\_<%s\\_>" (regexp-quote tag))) + (t (regexp-quote tag)))) (car regexp-search-ring) (regexp-quote (or (car search-ring) "")) (car (symbol-value query-replace-from-history-variable))))) (defaults (delete-dups (delq nil (delete "" defaults)))) + (default (car defaults)) ;; Do not automatically add default to the history for empty input. (history-add-new-input nil) (input (read-from-minibuffer ------------------------------------------------------------ revno: 111802 fixes bug: http://debbugs.gnu.org/13725 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-02-16 11:13:40 +0200 message: Fix bug #13725 with file notifications on MS-Windows. lisp/autorevert.el (auto-revert-notify-add-watch): With 'w32notify', add watch for the file, not its parent directory, since w32notify sets up the watch for the directory internally. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-16 03:39:12 +0000 +++ lisp/ChangeLog 2013-02-16 09:13:40 +0000 @@ -1,3 +1,9 @@ +2013-02-16 Eli Zaretskii + + * autorevert.el (auto-revert-notify-add-watch): With 'w32notify', + add watch for the file, not its parent directory, since w32notify + sets up the watch for the directory internally. (Bug#13725) + 2013-02-16 Glenn Morris * image.el (image-default-frame-delay): New variable. === modified file 'lisp/autorevert.el' --- lisp/autorevert.el 2013-01-30 19:20:46 +0000 +++ lisp/autorevert.el 2013-02-16 09:13:40 +0000 @@ -519,12 +519,13 @@ (let ((func (if (fboundp 'inotify-add-watch) 'inotify-add-watch 'w32notify-add-watch)) (aspect (if (fboundp 'inotify-add-watch) - '(create modify moved-to) '(size last-write-time)))) + '(create modify moved-to) '(size last-write-time))) + (file (if (fboundp 'inotify-add-watch) + (directory-file-name (expand-file-name default-directory)) + (buffer-file-name)))) (setq auto-revert-notify-watch-descriptor (ignore-errors - (funcall - func (directory-file-name (expand-file-name default-directory)) - aspect 'auto-revert-notify-handler))) + (funcall func file aspect 'auto-revert-notify-handler))) (if auto-revert-notify-watch-descriptor (progn (puthash ------------------------------------------------------------ revno: 111801 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-02-15 19:39:12 -0800 message: Add variables for default/minimum animated image frame delay * lisp/image.el (image-default-frame-delay): New variable. (image-animated-p): Use image-default-frame-delay. (image-minimum-frame-delay): New constant. (image-animate-timeout): Use image-minimum-frame-delay. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-16 03:29:39 +0000 +++ lisp/ChangeLog 2013-02-16 03:39:12 +0000 @@ -1,5 +1,10 @@ 2013-02-16 Glenn Morris + * image.el (image-default-frame-delay): New variable. + (image-animated-p): Use image-default-frame-delay. + (image-minimum-frame-delay): New constant. + (image-animate-timeout): Use image-minimum-frame-delay. + * image.el (image-nth-frame): New, split from image-animate-timeout. (image-animate-timeout): Use image-nth-frame. * image-mode.el (image-goto-frame, image-next-frame) === modified file 'lisp/image.el' --- lisp/image.el 2013-02-16 03:29:39 +0000 +++ lisp/image.el 2013-02-16 03:39:12 +0000 @@ -609,6 +609,10 @@ (defconst image-animated-types '(gif) "List of supported animated image types.") +(defvar image-default-frame-delay 0.1 + "Default interval in seconds between frames of a multi-frame image. +Only used if the image does not specify a value.") + (defun image-animated-p (image) "Return non-nil if IMAGE can be animated. To be capable of being animated, an image must be of a type @@ -623,7 +627,7 @@ (images (plist-get metadata 'count)) (delay (plist-get metadata 'delay))) (when (and images (> images 1) (numberp delay)) - (if (< delay 0) (setq delay 0.1)) + (if (< delay 0) (setq delay image-default-frame-delay)) (cons images delay)))))) ;; "Destructively"? @@ -657,6 +661,9 @@ (setq timer nil))) timer)) +(defconst image-minimum-frame-delay 0.01 + "Minimum interval in seconds between frames of an animated image.") + (defvar-local image-current-frame nil "The frame index of the current animated image.") @@ -684,7 +691,7 @@ 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 0.01s." +The minimum delay between successive frames is `image-minimum-frame-delay'." (image-nth-frame image n t) (setq n (1+ n)) (let* ((time (float-time)) @@ -692,7 +699,7 @@ ;; Subtract off the time we took to load the image from the ;; stated delay time. (delay (max (+ (cdr animation) time (- (float-time))) - 0.01)) + image-minimum-frame-delay)) done) (if (>= n count) (if limit