Merge from trunk.
This commit is contained in:
commit
2d3c217e8c
8 changed files with 117 additions and 123 deletions
|
@ -1,3 +1,22 @@
|
|||
2011-06-12 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* progmodes/fortran.el (fortran-mode-syntax-table):
|
||||
* progmodes/f90.el (f90-mode-syntax-table):
|
||||
Set % to punctuation. (Bug#8820)
|
||||
(f90-find-tag-default): Remove, no longer needed.
|
||||
|
||||
2011-06-12 Daniel Colascione <dan.colascione@gmail.com>
|
||||
|
||||
* emacs-lisp/syntax.el (syntax-ppss): Clarify which items are invalid.
|
||||
|
||||
2011-06-11 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* image.el (image-animated-p): Return animation delay in seconds.
|
||||
Avoid bit manipulation in Lisp; use `delay' entry in the metadata.
|
||||
(image-animate-timeout): Remove DELAY argument. Don't assume
|
||||
every subimage has the same delay; get it from image-animated-p.
|
||||
(image-animate): Caller changed.
|
||||
|
||||
2011-06-11 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-debug-message): Add `tramp-with-progress-reporter'
|
||||
|
|
|
@ -399,7 +399,7 @@ point (where the PPSS is equivalent to nil).")
|
|||
(defun syntax-ppss (&optional pos)
|
||||
"Parse-Partial-Sexp State at POS, defaulting to point.
|
||||
The returned value is the same as `parse-partial-sexp' except that
|
||||
the 2nd and 6th values of the returned state cannot be relied upon.
|
||||
values 2 and 6 values of the returned state cannot be relied upon.
|
||||
Point is at POS when this function returns."
|
||||
;; Default values.
|
||||
(unless pos (setq pos (point)))
|
||||
|
|
|
@ -597,20 +597,16 @@ Example:
|
|||
"Return non-nil if image can be animated.
|
||||
Actually, the 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 100ths of a second until the next sub-image
|
||||
shall be displayed."
|
||||
DELAY is the delay in second until the next sub-image shall be
|
||||
displayed."
|
||||
(cond
|
||||
((eq (plist-get (cdr image) :type) 'gif)
|
||||
(let* ((metadata (image-metadata image))
|
||||
(images (plist-get metadata 'count))
|
||||
(extdata (plist-get metadata 'extension-data))
|
||||
(anim (plist-get extdata #xF9))
|
||||
(tmo (and (integerp images) (> images 1)
|
||||
(stringp anim) (>= (length anim) 4)
|
||||
(+ (aref anim 1) (* (aref anim 2) 256)))))
|
||||
(when tmo
|
||||
(if (eq tmo 0) (setq tmo 10))
|
||||
(cons images tmo))))))
|
||||
(delay (plist-get metadata 'delay)))
|
||||
(when (and images (> images 1) (numberp delay))
|
||||
(if (< delay 0) (setq delay 0.1))
|
||||
(cons images delay))))))
|
||||
|
||||
(defun image-animate (image &optional index limit)
|
||||
"Start animating IMAGE.
|
||||
|
@ -620,15 +616,14 @@ With optional INDEX, begin animating from that animation frame.
|
|||
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 ((anim (image-animated-p image))
|
||||
delay timer)
|
||||
(when anim
|
||||
(let ((animation (image-animated-p image))
|
||||
timer)
|
||||
(when animation
|
||||
(if (setq timer (image-animate-timer image))
|
||||
(cancel-timer timer))
|
||||
(setq delay (max (* (cdr anim) 0.01) 0.025))
|
||||
(run-with-timer 0.2 nil #'image-animate-timeout
|
||||
image (or index 0) (car anim)
|
||||
delay 0 limit))))
|
||||
(run-with-timer 0.2 nil 'image-animate-timeout
|
||||
image (or index 0) (car animation)
|
||||
0 limit))))
|
||||
|
||||
(defun image-animate-timer (image)
|
||||
"Return the animation timer for image IMAGE."
|
||||
|
@ -643,7 +638,7 @@ number, play until that number of seconds has elapsed."
|
|||
(setq timer nil)))
|
||||
timer))
|
||||
|
||||
(defun image-animate-timeout (image n count delay time-elapsed limit)
|
||||
(defun image-animate-timeout (image n count time-elapsed limit)
|
||||
"Display animation frame N of IMAGE.
|
||||
N=0 refers to the initial animation frame.
|
||||
COUNT is the total number of frames in the animation.
|
||||
|
@ -653,10 +648,16 @@ TIME-ELAPSED is the total time that has elapsed since
|
|||
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."
|
||||
(let (done)
|
||||
(plist-put (cdr image) :index n)
|
||||
(force-window-update)
|
||||
(setq n (1+ n))
|
||||
(plist-put (cdr image) :index n)
|
||||
(force-window-update)
|
||||
(setq n (1+ n))
|
||||
(let* ((time (float-time))
|
||||
(animation (image-animated-p image))
|
||||
;; Subtract off the time we took to load the image from the
|
||||
;; stated delay time.
|
||||
(delay (max (+ (cdr animation) time (- (float-time)))
|
||||
0.01))
|
||||
done)
|
||||
(if (>= n count)
|
||||
(if limit
|
||||
(setq n 0)
|
||||
|
@ -666,8 +667,7 @@ LIMIT determines when to stop. If t, loop forever. If nil, stop
|
|||
(setq done (>= time-elapsed limit)))
|
||||
(unless done
|
||||
(run-with-timer delay nil 'image-animate-timeout
|
||||
image n count delay
|
||||
time-elapsed limit))))
|
||||
image n count time-elapsed limit))))
|
||||
|
||||
|
||||
(defcustom imagemagick-types-inhibit
|
||||
|
|
|
@ -629,6 +629,7 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
|
|||
(modify-syntax-entry ?= "." table)
|
||||
(modify-syntax-entry ?* "." table)
|
||||
(modify-syntax-entry ?/ "." table)
|
||||
(modify-syntax-entry ?% "." table) ; bug#8820
|
||||
;; I think that the f95 standard leaves the behavior of \
|
||||
;; unspecified, but that f2k will require it to be non-special.
|
||||
;; Use `f90-backslash-not-special' to change.
|
||||
|
@ -2199,17 +2200,6 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word."
|
|||
(save-excursion
|
||||
(nth 1 (f90-beginning-of-subprogram))))
|
||||
|
||||
(defun f90-find-tag-default ()
|
||||
"Function to use for `find-tag-default-function' property in F90 mode."
|
||||
(let ((tag (find-tag-default)))
|
||||
(or (and tag
|
||||
;; See bug#7919. TODO I imagine there are other cases...?
|
||||
(string-match "%\\([^%]+\\)\\'" tag)
|
||||
(match-string-no-properties 1 tag))
|
||||
tag)))
|
||||
|
||||
(put 'f90-mode 'find-tag-default-function 'f90-find-tag-default)
|
||||
|
||||
(defun f90-backslash-not-special (&optional all)
|
||||
"Make the backslash character (\\) be non-special in the current buffer.
|
||||
With optional argument ALL, change the default for all present
|
||||
|
|
|
@ -600,6 +600,7 @@ Used in the Fortran entry in `hs-special-modes-alist'.")
|
|||
(modify-syntax-entry ?= "." table)
|
||||
(modify-syntax-entry ?* "." table)
|
||||
(modify-syntax-entry ?/ "." table)
|
||||
(modify-syntax-entry ?% "." table) ; bug#8820
|
||||
(modify-syntax-entry ?\' "\"" table)
|
||||
(modify-syntax-entry ?\" "\"" table)
|
||||
;; Consistent with GNU Fortran's default -- see the manual.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
2011-06-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||
2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* buffer.c (Qclone_number): Remove for now, as it's unused.
|
||||
(record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
|
||||
|
@ -27,6 +27,16 @@
|
|||
* xterm.h: Likewise.
|
||||
(x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
|
||||
|
||||
2011-06-12 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* makefile.w32-in: Update dependencies.
|
||||
(LISP_H): Add lib/intprops.h.
|
||||
|
||||
2011-06-11 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* image.c (gif_load): Add animation frame delay to the metadata.
|
||||
(syms_of_image): Use DEFSYM. New symbol `delay'.
|
||||
|
||||
2011-06-11 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* window.c (delete_deletable_window): Re-add.
|
||||
|
|
139
src/image.c
139
src/image.c
|
@ -564,7 +564,6 @@ static Lisp_Object Qxbm;
|
|||
/* Keywords. */
|
||||
|
||||
Lisp_Object QCascent, QCmargin, QCrelief;
|
||||
static Lisp_Object Qcount, Qextension_data;
|
||||
Lisp_Object QCconversion;
|
||||
static Lisp_Object QCheuristic_mask;
|
||||
static Lisp_Object QCcolor_symbols;
|
||||
|
@ -573,6 +572,7 @@ static Lisp_Object QCcrop, QCrotation;
|
|||
|
||||
/* Other symbols. */
|
||||
|
||||
static Lisp_Object Qcount, Qextension_data, Qdelay;
|
||||
static Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic;
|
||||
|
||||
/* Function prototypes. */
|
||||
|
@ -7315,16 +7315,31 @@ gif_load (struct frame *f, struct image *img)
|
|||
img->lisp_data = Qnil;
|
||||
if (gif->SavedImages[idx].ExtensionBlockCount > 0)
|
||||
{
|
||||
unsigned int delay = 0;
|
||||
ExtensionBlock *ext = gif->SavedImages[idx].ExtensionBlocks;
|
||||
for (i = 0; i < gif->SavedImages[idx].ExtensionBlockCount; i++, ext++)
|
||||
/* Append (... FUNCTION "BYTES") */
|
||||
img->lisp_data = Fcons (make_unibyte_string (ext->Bytes, ext->ByteCount),
|
||||
Fcons (make_number (ext->Function),
|
||||
img->lisp_data));
|
||||
{
|
||||
img->lisp_data
|
||||
= Fcons (make_number (ext->Function),
|
||||
Fcons (make_unibyte_string (ext->Bytes, ext->ByteCount),
|
||||
img->lisp_data));
|
||||
if (ext->Function == GIF_LOCAL_DESCRIPTOR_EXTENSION
|
||||
&& ext->ByteCount == 4)
|
||||
{
|
||||
delay = ext->Bytes[2] << CHAR_BIT;
|
||||
delay |= ext->Bytes[1];
|
||||
}
|
||||
}
|
||||
img->lisp_data = Fcons (Qextension_data,
|
||||
Fcons (Fnreverse (img->lisp_data),
|
||||
Qnil));
|
||||
Fcons (img->lisp_data, Qnil));
|
||||
if (delay)
|
||||
img->lisp_data
|
||||
= Fcons (Qdelay,
|
||||
Fcons (make_float (((double) delay) * 0.01),
|
||||
img->lisp_data));
|
||||
}
|
||||
|
||||
if (gif->ImageCount > 1)
|
||||
img->lisp_data = Fcons (Qcount,
|
||||
Fcons (make_number (gif->ImageCount),
|
||||
|
@ -8688,75 +8703,49 @@ as a ratio to the frame height and width. If the value is
|
|||
non-numeric, there is no explicit limit on the size of images. */);
|
||||
Vmax_image_size = make_float (MAX_IMAGE_SIZE);
|
||||
|
||||
Qpbm = intern_c_string ("pbm");
|
||||
staticpro (&Qpbm);
|
||||
DEFSYM (Qpbm, "pbm");
|
||||
ADD_IMAGE_TYPE (Qpbm);
|
||||
|
||||
Qxbm = intern_c_string ("xbm");
|
||||
staticpro (&Qxbm);
|
||||
DEFSYM (Qxbm, "xbm");
|
||||
ADD_IMAGE_TYPE (Qxbm);
|
||||
|
||||
define_image_type (&xbm_type, 1);
|
||||
define_image_type (&pbm_type, 1);
|
||||
|
||||
Qcount = intern_c_string ("count");
|
||||
staticpro (&Qcount);
|
||||
Qextension_data = intern_c_string ("extension-data");
|
||||
staticpro (&Qextension_data);
|
||||
DEFSYM (Qcount, "count");
|
||||
DEFSYM (Qextension_data, "extension-data");
|
||||
DEFSYM (Qdelay, "delay");
|
||||
|
||||
QCascent = intern_c_string (":ascent");
|
||||
staticpro (&QCascent);
|
||||
QCmargin = intern_c_string (":margin");
|
||||
staticpro (&QCmargin);
|
||||
QCrelief = intern_c_string (":relief");
|
||||
staticpro (&QCrelief);
|
||||
QCconversion = intern_c_string (":conversion");
|
||||
staticpro (&QCconversion);
|
||||
QCcolor_symbols = intern_c_string (":color-symbols");
|
||||
staticpro (&QCcolor_symbols);
|
||||
QCheuristic_mask = intern_c_string (":heuristic-mask");
|
||||
staticpro (&QCheuristic_mask);
|
||||
QCindex = intern_c_string (":index");
|
||||
staticpro (&QCindex);
|
||||
QCgeometry = intern_c_string (":geometry");
|
||||
staticpro (&QCgeometry);
|
||||
QCcrop = intern_c_string (":crop");
|
||||
staticpro (&QCcrop);
|
||||
QCrotation = intern_c_string (":rotation");
|
||||
staticpro (&QCrotation);
|
||||
QCmatrix = intern_c_string (":matrix");
|
||||
staticpro (&QCmatrix);
|
||||
QCcolor_adjustment = intern_c_string (":color-adjustment");
|
||||
staticpro (&QCcolor_adjustment);
|
||||
QCmask = intern_c_string (":mask");
|
||||
staticpro (&QCmask);
|
||||
DEFSYM (QCascent, ":ascent");
|
||||
DEFSYM (QCmargin, ":margin");
|
||||
DEFSYM (QCrelief, ":relief");
|
||||
DEFSYM (QCconversion, ":conversion");
|
||||
DEFSYM (QCcolor_symbols, ":color-symbols");
|
||||
DEFSYM (QCheuristic_mask, ":heuristic-mask");
|
||||
DEFSYM (QCindex, ":index");
|
||||
DEFSYM (QCgeometry, ":geometry");
|
||||
DEFSYM (QCcrop, ":crop");
|
||||
DEFSYM (QCrotation, ":rotation");
|
||||
DEFSYM (QCmatrix, ":matrix");
|
||||
DEFSYM (QCcolor_adjustment, ":color-adjustment");
|
||||
DEFSYM (QCmask, ":mask");
|
||||
|
||||
Qlaplace = intern_c_string ("laplace");
|
||||
staticpro (&Qlaplace);
|
||||
Qemboss = intern_c_string ("emboss");
|
||||
staticpro (&Qemboss);
|
||||
Qedge_detection = intern_c_string ("edge-detection");
|
||||
staticpro (&Qedge_detection);
|
||||
Qheuristic = intern_c_string ("heuristic");
|
||||
staticpro (&Qheuristic);
|
||||
DEFSYM (Qlaplace, "laplace");
|
||||
DEFSYM (Qemboss, "emboss");
|
||||
DEFSYM (Qedge_detection, "edge-detection");
|
||||
DEFSYM (Qheuristic, "heuristic");
|
||||
|
||||
Qpostscript = intern_c_string ("postscript");
|
||||
staticpro (&Qpostscript);
|
||||
DEFSYM (Qpostscript, "postscript");
|
||||
#ifdef HAVE_GHOSTSCRIPT
|
||||
ADD_IMAGE_TYPE (Qpostscript);
|
||||
QCloader = intern_c_string (":loader");
|
||||
staticpro (&QCloader);
|
||||
QCbounding_box = intern_c_string (":bounding-box");
|
||||
staticpro (&QCbounding_box);
|
||||
QCpt_width = intern_c_string (":pt-width");
|
||||
staticpro (&QCpt_width);
|
||||
QCpt_height = intern_c_string (":pt-height");
|
||||
staticpro (&QCpt_height);
|
||||
DEFSYM (QCloader, ":loader");
|
||||
DEFSYM (QCbounding_box, ":bounding-box");
|
||||
DEFSYM (QCpt_width, ":pt-width");
|
||||
DEFSYM (QCpt_height, ":pt-height");
|
||||
#endif /* HAVE_GHOSTSCRIPT */
|
||||
|
||||
#ifdef HAVE_NTGUI
|
||||
Qlibpng_version = intern_c_string ("libpng-version");
|
||||
staticpro (&Qlibpng_version);
|
||||
DEFSYM (Qlibpng_version, "libpng-version");
|
||||
Fset (Qlibpng_version,
|
||||
#if HAVE_PNG
|
||||
make_number (PNG_LIBPNG_VER)
|
||||
|
@ -8767,53 +8756,43 @@ non-numeric, there is no explicit limit on the size of images. */);
|
|||
#endif
|
||||
|
||||
#if defined (HAVE_XPM) || defined (HAVE_NS)
|
||||
Qxpm = intern_c_string ("xpm");
|
||||
staticpro (&Qxpm);
|
||||
DEFSYM (Qxpm, "xpm");
|
||||
ADD_IMAGE_TYPE (Qxpm);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_JPEG) || defined (HAVE_NS)
|
||||
Qjpeg = intern_c_string ("jpeg");
|
||||
staticpro (&Qjpeg);
|
||||
DEFSYM (Qjpeg, "jpeg");
|
||||
ADD_IMAGE_TYPE (Qjpeg);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_TIFF) || defined (HAVE_NS)
|
||||
Qtiff = intern_c_string ("tiff");
|
||||
staticpro (&Qtiff);
|
||||
DEFSYM (Qtiff, "tiff");
|
||||
ADD_IMAGE_TYPE (Qtiff);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_GIF) || defined (HAVE_NS)
|
||||
Qgif = intern_c_string ("gif");
|
||||
staticpro (&Qgif);
|
||||
DEFSYM (Qgif, "gif");
|
||||
ADD_IMAGE_TYPE (Qgif);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_PNG) || defined (HAVE_NS)
|
||||
Qpng = intern_c_string ("png");
|
||||
staticpro (&Qpng);
|
||||
DEFSYM (Qpng, "png");
|
||||
ADD_IMAGE_TYPE (Qpng);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_IMAGEMAGICK)
|
||||
Qimagemagick = intern_c_string ("imagemagick");
|
||||
staticpro (&Qimagemagick);
|
||||
DEFSYM (Qimagemagick, "imagemagick");
|
||||
ADD_IMAGE_TYPE (Qimagemagick);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_RSVG)
|
||||
Qsvg = intern_c_string ("svg");
|
||||
staticpro (&Qsvg);
|
||||
DEFSYM (Qsvg, "svg");
|
||||
ADD_IMAGE_TYPE (Qsvg);
|
||||
#ifdef HAVE_NTGUI
|
||||
/* Other libraries used directly by svg code. */
|
||||
Qgdk_pixbuf = intern_c_string ("gdk-pixbuf");
|
||||
staticpro (&Qgdk_pixbuf);
|
||||
Qglib = intern_c_string ("glib");
|
||||
staticpro (&Qglib);
|
||||
Qgobject = intern_c_string ("gobject");
|
||||
staticpro (&Qgobject);
|
||||
DEFSYM (Qgdk_pixbuf, "gdk-pixbuf");
|
||||
DEFSYM (Qglib, "glib");
|
||||
DEFSYM (Qgobject, "gobject");
|
||||
#endif /* HAVE_NTGUI */
|
||||
#endif /* HAVE_RSVG */
|
||||
|
||||
|
|
|
@ -388,6 +388,7 @@ CONFIG_H = $(EMACS_ROOT)/src/s/ms-w32.h \
|
|||
$(EMACS_ROOT)/nt/inc/sys/stat.h
|
||||
LISP_H = $(SRC)/lisp.h \
|
||||
$(SRC)/globals.h \
|
||||
$(EMACS_ROOT)/lib/intprops.h \
|
||||
$(EMACS_ROOT)/nt/inc/inttypes.h \
|
||||
$(EMACS_ROOT)/nt/inc/stdint.h
|
||||
PROCESS_H = $(SRC)/process.h \
|
||||
|
@ -566,7 +567,6 @@ $(BLD)/ccl.$(O) : \
|
|||
$(BLD)/character.$(O) : \
|
||||
$(SRC)/character.c \
|
||||
$(CONFIG_H) \
|
||||
$(EMACS_ROOT)/lib/intprops.h \
|
||||
$(LISP_H) \
|
||||
$(SRC)/buffer.h \
|
||||
$(SRC)/character.h \
|
||||
|
@ -654,7 +654,6 @@ $(BLD)/data.$(O) : \
|
|||
$(SRC)/data.c \
|
||||
$(CONFIG_H) \
|
||||
$(EMACS_ROOT)/nt/inc/sys/time.h \
|
||||
$(EMACS_ROOT)/lib/intprops.h \
|
||||
$(LISP_H) \
|
||||
$(SRC)/buffer.h \
|
||||
$(SRC)/ccl.h \
|
||||
|
@ -752,7 +751,6 @@ $(BLD)/editfns.$(O) : \
|
|||
$(EMACS_ROOT)/nt/inc/pwd.h \
|
||||
$(EMACS_ROOT)/nt/inc/unistd.h \
|
||||
$(EMACS_ROOT)/nt/inc/sys/time.h \
|
||||
$(EMACS_ROOT)/lib/intprops.h \
|
||||
$(EMACS_ROOT)/lib/strftime.h \
|
||||
$(EMACS_ROOT)/lib/verify.h \
|
||||
$(LISP_H) \
|
||||
|
@ -1034,7 +1032,6 @@ $(BLD)/insdel.$(O) : \
|
|||
$(SRC)/insdel.c \
|
||||
$(CONFIG_H) \
|
||||
$(EMACS_ROOT)/nt/inc/sys/time.h \
|
||||
$(EMACS_ROOT)/lib/intprops.h \
|
||||
$(LISP_H) \
|
||||
$(SRC)/atimer.h \
|
||||
$(SRC)/blockinput.h \
|
||||
|
@ -1052,7 +1049,6 @@ $(BLD)/intervals.$(O) : \
|
|||
$(SRC)/intervals.c \
|
||||
$(CONFIG_H) \
|
||||
$(EMACS_ROOT)/nt/inc/sys/time.h \
|
||||
$(EMACS_ROOT)/lib/intprops.h \
|
||||
$(LISP_H) \
|
||||
$(SRC)/buffer.h \
|
||||
$(SRC)/coding.h \
|
||||
|
@ -1305,7 +1301,6 @@ $(BLD)/print.$(O) : \
|
|||
$(EMACS_ROOT)/nt/inc/unistd.h \
|
||||
$(EMACS_ROOT)/nt/inc/sys/time.h \
|
||||
$(EMACS_ROOT)/lib/ftoastr.h \
|
||||
$(EMACS_ROOT)/lib/intprops.h \
|
||||
$(LISP_H) \
|
||||
$(PROCESS_H) \
|
||||
$(SRC)/atimer.h \
|
||||
|
|
Loading…
Add table
Reference in a new issue