aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2011-06-11 20:54:09 -0700
committerPaul Eggert2011-06-11 20:54:09 -0700
commit2d3c217e8ccd3ddfdd57ee9f46a2f2599d6d67c6 (patch)
tree36cb5ed5a8252a12ecacad0f642f04e9c4ca9ca2 /lisp
parent73dba34265faf12a46cef1edabe066af3159122a (diff)
parent1384b89ea7e51c190ab1df16e38cbef1d02400b4 (diff)
downloademacs-2d3c217e8ccd3ddfdd57ee9f46a2f2599d6d67c6.tar.gz
emacs-2d3c217e8ccd3ddfdd57ee9f46a2f2599d6d67c6.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog19
-rw-r--r--lisp/emacs-lisp/syntax.el2
-rw-r--r--lisp/image.el48
-rw-r--r--lisp/progmodes/f90.el12
-rw-r--r--lisp/progmodes/fortran.el1
5 files changed, 46 insertions, 36 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 08a3e4b3f3e..c14655699e7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,22 @@
12011-06-12 Glenn Morris <rgm@gnu.org>
2
3 * progmodes/fortran.el (fortran-mode-syntax-table):
4 * progmodes/f90.el (f90-mode-syntax-table):
5 Set % to punctuation. (Bug#8820)
6 (f90-find-tag-default): Remove, no longer needed.
7
82011-06-12 Daniel Colascione <dan.colascione@gmail.com>
9
10 * emacs-lisp/syntax.el (syntax-ppss): Clarify which items are invalid.
11
122011-06-11 Chong Yidong <cyd@stupidchicken.com>
13
14 * image.el (image-animated-p): Return animation delay in seconds.
15 Avoid bit manipulation in Lisp; use `delay' entry in the metadata.
16 (image-animate-timeout): Remove DELAY argument. Don't assume
17 every subimage has the same delay; get it from image-animated-p.
18 (image-animate): Caller changed.
19
12011-06-11 Michael Albinus <michael.albinus@gmx.de> 202011-06-11 Michael Albinus <michael.albinus@gmx.de>
2 21
3 * net/tramp.el (tramp-debug-message): Add `tramp-with-progress-reporter' 22 * net/tramp.el (tramp-debug-message): Add `tramp-with-progress-reporter'
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index c012e48b590..7ba7b13af44 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -399,7 +399,7 @@ point (where the PPSS is equivalent to nil).")
399(defun syntax-ppss (&optional pos) 399(defun syntax-ppss (&optional pos)
400 "Parse-Partial-Sexp State at POS, defaulting to point. 400 "Parse-Partial-Sexp State at POS, defaulting to point.
401The returned value is the same as `parse-partial-sexp' except that 401The returned value is the same as `parse-partial-sexp' except that
402the 2nd and 6th values of the returned state cannot be relied upon. 402values 2 and 6 values of the returned state cannot be relied upon.
403Point is at POS when this function returns." 403Point is at POS when this function returns."
404 ;; Default values. 404 ;; Default values.
405 (unless pos (setq pos (point))) 405 (unless pos (setq pos (point)))
diff --git a/lisp/image.el b/lisp/image.el
index e076c2d09f1..91c0f3c9292 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -597,20 +597,16 @@ Example:
597 "Return non-nil if image can be animated. 597 "Return non-nil if image can be animated.
598Actually, the return value is a cons (NIMAGES . DELAY), where 598Actually, the return value is a cons (NIMAGES . DELAY), where
599NIMAGES is the number of sub-images in the animated image and 599NIMAGES is the number of sub-images in the animated image and
600DELAY is the delay in 100ths of a second until the next sub-image 600DELAY is the delay in second until the next sub-image shall be
601shall be displayed." 601displayed."
602 (cond 602 (cond
603 ((eq (plist-get (cdr image) :type) 'gif) 603 ((eq (plist-get (cdr image) :type) 'gif)
604 (let* ((metadata (image-metadata image)) 604 (let* ((metadata (image-metadata image))
605 (images (plist-get metadata 'count)) 605 (images (plist-get metadata 'count))
606 (extdata (plist-get metadata 'extension-data)) 606 (delay (plist-get metadata 'delay)))
607 (anim (plist-get extdata #xF9)) 607 (when (and images (> images 1) (numberp delay))
608 (tmo (and (integerp images) (> images 1) 608 (if (< delay 0) (setq delay 0.1))
609 (stringp anim) (>= (length anim) 4) 609 (cons images delay))))))
610 (+ (aref anim 1) (* (aref anim 2) 256)))))
611 (when tmo
612 (if (eq tmo 0) (setq tmo 10))
613 (cons images tmo))))))
614 610
615(defun image-animate (image &optional index limit) 611(defun image-animate (image &optional index limit)
616 "Start animating IMAGE. 612 "Start animating IMAGE.
@@ -620,15 +616,14 @@ With optional INDEX, begin animating from that animation frame.
620LIMIT specifies how long to animate the image. If omitted or 616LIMIT specifies how long to animate the image. If omitted or
621nil, play the animation until the end. If t, loop forever. If a 617nil, play the animation until the end. If t, loop forever. If a
622number, play until that number of seconds has elapsed." 618number, play until that number of seconds has elapsed."
623 (let ((anim (image-animated-p image)) 619 (let ((animation (image-animated-p image))
624 delay timer) 620 timer)
625 (when anim 621 (when animation
626 (if (setq timer (image-animate-timer image)) 622 (if (setq timer (image-animate-timer image))
627 (cancel-timer timer)) 623 (cancel-timer timer))
628 (setq delay (max (* (cdr anim) 0.01) 0.025)) 624 (run-with-timer 0.2 nil 'image-animate-timeout
629 (run-with-timer 0.2 nil #'image-animate-timeout 625 image (or index 0) (car animation)
630 image (or index 0) (car anim) 626 0 limit))))
631 delay 0 limit))))
632 627
633(defun image-animate-timer (image) 628(defun image-animate-timer (image)
634 "Return the animation timer for image IMAGE." 629 "Return the animation timer for image IMAGE."
@@ -643,7 +638,7 @@ number, play until that number of seconds has elapsed."
643 (setq timer nil))) 638 (setq timer nil)))
644 timer)) 639 timer))
645 640
646(defun image-animate-timeout (image n count delay time-elapsed limit) 641(defun image-animate-timeout (image n count time-elapsed limit)
647 "Display animation frame N of IMAGE. 642 "Display animation frame N of IMAGE.
648N=0 refers to the initial animation frame. 643N=0 refers to the initial animation frame.
649COUNT is the total number of frames in the animation. 644COUNT is the total number of frames in the animation.
@@ -653,10 +648,16 @@ TIME-ELAPSED is the total time that has elapsed since
653LIMIT determines when to stop. If t, loop forever. If nil, stop 648LIMIT determines when to stop. If t, loop forever. If nil, stop
654 after displaying the last animation frame. Otherwise, stop 649 after displaying the last animation frame. Otherwise, stop
655 after LIMIT seconds have elapsed." 650 after LIMIT seconds have elapsed."
656 (let (done) 651 (plist-put (cdr image) :index n)
657 (plist-put (cdr image) :index n) 652 (force-window-update)
658 (force-window-update) 653 (setq n (1+ n))
659 (setq n (1+ n)) 654 (let* ((time (float-time))
655 (animation (image-animated-p image))
656 ;; Subtract off the time we took to load the image from the
657 ;; stated delay time.
658 (delay (max (+ (cdr animation) time (- (float-time)))
659 0.01))
660 done)
660 (if (>= n count) 661 (if (>= n count)
661 (if limit 662 (if limit
662 (setq n 0) 663 (setq n 0)
@@ -666,8 +667,7 @@ LIMIT determines when to stop. If t, loop forever. If nil, stop
666 (setq done (>= time-elapsed limit))) 667 (setq done (>= time-elapsed limit)))
667 (unless done 668 (unless done
668 (run-with-timer delay nil 'image-animate-timeout 669 (run-with-timer delay nil 'image-animate-timeout
669 image n count delay 670 image n count time-elapsed limit))))
670 time-elapsed limit))))
671 671
672 672
673(defcustom imagemagick-types-inhibit 673(defcustom imagemagick-types-inhibit
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 28f5d329fd5..849b9c0c3f7 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -629,6 +629,7 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
629 (modify-syntax-entry ?= "." table) 629 (modify-syntax-entry ?= "." table)
630 (modify-syntax-entry ?* "." table) 630 (modify-syntax-entry ?* "." table)
631 (modify-syntax-entry ?/ "." table) 631 (modify-syntax-entry ?/ "." table)
632 (modify-syntax-entry ?% "." table) ; bug#8820
632 ;; I think that the f95 standard leaves the behavior of \ 633 ;; I think that the f95 standard leaves the behavior of \
633 ;; unspecified, but that f2k will require it to be non-special. 634 ;; unspecified, but that f2k will require it to be non-special.
634 ;; Use `f90-backslash-not-special' to change. 635 ;; Use `f90-backslash-not-special' to change.
@@ -2199,17 +2200,6 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word."
2199 (save-excursion 2200 (save-excursion
2200 (nth 1 (f90-beginning-of-subprogram)))) 2201 (nth 1 (f90-beginning-of-subprogram))))
2201 2202
2202(defun f90-find-tag-default ()
2203 "Function to use for `find-tag-default-function' property in F90 mode."
2204 (let ((tag (find-tag-default)))
2205 (or (and tag
2206 ;; See bug#7919. TODO I imagine there are other cases...?
2207 (string-match "%\\([^%]+\\)\\'" tag)
2208 (match-string-no-properties 1 tag))
2209 tag)))
2210
2211(put 'f90-mode 'find-tag-default-function 'f90-find-tag-default)
2212
2213(defun f90-backslash-not-special (&optional all) 2203(defun f90-backslash-not-special (&optional all)
2214 "Make the backslash character (\\) be non-special in the current buffer. 2204 "Make the backslash character (\\) be non-special in the current buffer.
2215With optional argument ALL, change the default for all present 2205With optional argument ALL, change the default for all present
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index f03d2013467..d30b9673d09 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -600,6 +600,7 @@ Used in the Fortran entry in `hs-special-modes-alist'.")
600 (modify-syntax-entry ?= "." table) 600 (modify-syntax-entry ?= "." table)
601 (modify-syntax-entry ?* "." table) 601 (modify-syntax-entry ?* "." table)
602 (modify-syntax-entry ?/ "." table) 602 (modify-syntax-entry ?/ "." table)
603 (modify-syntax-entry ?% "." table) ; bug#8820
603 (modify-syntax-entry ?\' "\"" table) 604 (modify-syntax-entry ?\' "\"" table)
604 (modify-syntax-entry ?\" "\"" table) 605 (modify-syntax-entry ?\" "\"" table)
605 ;; Consistent with GNU Fortran's default -- see the manual. 606 ;; Consistent with GNU Fortran's default -- see the manual.