From 64677d90749766d47fde828c1fb56dd016679db2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 6 Feb 2012 00:19:09 -0800 Subject: Comment fix. --- src/xfaces.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/xfaces.c b/src/xfaces.c index 617097d056b..bcb04188aeb 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3360,7 +3360,7 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param, /* Changing the background color might change the background mode, so that we have to load new defface specs. - Call frame-update-face-colors to do that. */ + Call frame-set-background-mode to do that. */ XSETFRAME (frame, f); call1 (Qframe_set_background_mode, frame); -- cgit v1.2.1 From 1449fa1d08009f384f1867aecf1aa8a46220dcc4 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 6 Feb 2012 21:43:39 +0800 Subject: * doc.c (store_function_docstring): Avoid applying docstring of alias to base function. Fixes: debbugs:2603 --- src/ChangeLog | 5 +++++ src/doc.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 2353cc1eca2..860a0592e29 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-02-06 Chong Yidong + + * doc.c (store_function_docstring): Avoid applying docstring of + alias to base function (Bug#2603). + 2012-02-04 Andreas Schwab * .gdbinit (pp1, pv1): Remove redundant defines. diff --git a/src/doc.c b/src/doc.c index 7bdb8c658b0..ad2c667e771 100644 --- a/src/doc.c +++ b/src/doc.c @@ -502,10 +502,12 @@ aren't strings. */) /* Scanning the DOC files and placing docstring offsets into functions. */ static void -store_function_docstring (Lisp_Object fun, EMACS_INT offset) +store_function_docstring (Lisp_Object sym, EMACS_INT offset) /* Use EMACS_INT because we get offset from pointer subtraction. */ { - fun = indirect_function (fun); + /* Don't use indirect_function here, or defaliases will apply their + docstrings to the base functions (Bug#2603). */ + Lisp_Object fun = XSYMBOL (sym)->function; /* The type determines where the docstring is stored. */ -- cgit v1.2.1 From 4a6c7bb8744bbbadf3b3b0be8660a2100ae3e7aa Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Feb 2012 00:53:51 +0800 Subject: * doc.c (store_function_docstring): Fix last change. --- src/doc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/doc.c b/src/doc.c index ad2c667e771..02db4dde072 100644 --- a/src/doc.c +++ b/src/doc.c @@ -502,12 +502,12 @@ aren't strings. */) /* Scanning the DOC files and placing docstring offsets into functions. */ static void -store_function_docstring (Lisp_Object sym, EMACS_INT offset) +store_function_docstring (Lisp_Object obj, EMACS_INT offset) /* Use EMACS_INT because we get offset from pointer subtraction. */ { /* Don't use indirect_function here, or defaliases will apply their docstrings to the base functions (Bug#2603). */ - Lisp_Object fun = XSYMBOL (sym)->function; + Lisp_Object fun = SYMBOLP (obj) ? XSYMBOL (obj)->function : obj; /* The type determines where the docstring is stored. */ -- cgit v1.2.1 From af008560fea31dff76f6d7df3e386cf2af623a8d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 6 Feb 2012 19:31:29 -0800 Subject: imagemagick-render-type fixes * src/image.c (imagemagick-render-type): Change it from a lisp object to an integer. Move the doc here from the lisp manual. Treat all values not equal to 0 the same. * doc/lispref/display.texi (ImageMagick Images): Move most details of imagemagick-render-type to the variable's doc. * lisp/cus-start.el (imagemagick-render-type): Add it. --- src/ChangeLog | 6 ++++++ src/image.c | 22 ++++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 860a0592e29..6438f054432 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-02-07 Glenn Morris + + * image.c (imagemagick-render-type): Change it from a lisp object + to an integer. Move the doc here from the lisp manual. + Treat all values not equal to 0 the same. + 2012-02-06 Chong Yidong * doc.c (store_function_docstring): Avoid applying docstring of diff --git a/src/image.c b/src/image.c index f4def3e681e..21f97c32a0c 100644 --- a/src/image.c +++ b/src/image.c @@ -7617,7 +7617,6 @@ imagemagick_load_image (struct frame *f, struct image *img, EMACS_INT ino; int desired_width, desired_height; double rotation; - EMACS_INT imagemagick_rendermethod; int pixelwidth; ImageInfo *image_info; ExceptionInfo *exception; @@ -7798,9 +7797,8 @@ imagemagick_load_image (struct frame *f, struct image *img, went ok. */ init_color_table (); - imagemagick_rendermethod = (INTEGERP (Vimagemagick_render_type) - ? XINT (Vimagemagick_render_type) : 0); - if (imagemagick_rendermethod == 0) + + if (imagemagick_render_type == 0) { size_t image_height; @@ -7850,8 +7848,7 @@ imagemagick_load_image (struct frame *f, struct image *img, } DestroyPixelIterator (iterator); } - - if (imagemagick_rendermethod == 1) + else /* imagemagick_render_type != 0 */ { /* Magicexportimage is normally faster than pixelpushing. This method is also well tested. Some aspects of this method are @@ -8958,8 +8955,17 @@ The value can also be nil, meaning the cache is never cleared. The function `clear-image-cache' disregards this variable. */); Vimage_cache_eviction_delay = make_number (300); #ifdef HAVE_IMAGEMAGICK - DEFVAR_LISP ("imagemagick-render-type", Vimagemagick_render_type, - doc: /* Choose between ImageMagick render methods. */); + DEFVAR_INT ("imagemagick-render-type", imagemagick_render_type, + doc: /* Integer indicating which ImageMagick rendering method to use. +The options are: + 0 -- the default method (pixel pushing) + 1 -- a newer method ("MagickExportImagePixels") that may perform + better (speed etc) in some cases, but has not been as thoroughly + tested with Emacs as the default method. This method requires + ImageMagick version 6.4.6 (approximately) or later. +*/); + /* MagickExportImagePixels is in 6.4.6-9, but not 6.4.4-10. */ + imagemagick_render_type = 0; #endif } -- cgit v1.2.1 From dd605cc4a63834731b278c92ac9719c8a67492ea Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 6 Feb 2012 19:46:18 -0800 Subject: Small imagemagick doc fixes * lisp/image.el (imagemagick-types-inhibit): Doc fix. * src/image.c (Fimagemagick_types): Doc fix. --- src/ChangeLog | 2 ++ src/image.c | 1 + 2 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 6438f054432..5e4d995d857 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2012-02-07 Glenn Morris + * image.c (Fimagemagick_types): Doc fix. + * image.c (imagemagick-render-type): Change it from a lisp object to an integer. Move the doc here from the lisp manual. Treat all values not equal to 0 the same. diff --git a/src/image.c b/src/image.c index 21f97c32a0c..b2951dd70fb 100644 --- a/src/image.c +++ b/src/image.c @@ -7983,6 +7983,7 @@ DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, Each entry in this list is a symbol named after an ImageMagick format tag. See the ImageMagick manual for a list of ImageMagick formats and their descriptions (http://www.imagemagick.org/script/formats.php). +You can also try the shell command: `identify -list format'. Note that ImageMagick recognizes many file-types that Emacs does not recognize as images, such as C. See `imagemagick-types-inhibit'. */) -- cgit v1.2.1 From 0992bd9c06b90c8f316187467bcc005cbe51050e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Feb 2012 14:34:52 +0800 Subject: Fix and doc-fix for `buffer-local-variables'. * src/buffer.c (Fbuffer_local_variables) (buffer_lisp_local_variables): Handle unbound vars correctly; don't let Qunbound leak into Lisp. * doc/lispref/variables.texi (Creating Buffer-Local): Minor clarification to buffer-local-variables doc. Fixes: debbugs:10715 --- src/ChangeLog | 6 ++++++ src/buffer.c | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 5e4d995d857..71af862cdac 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-02-07 Chong Yidong + + * buffer.c (Fbuffer_local_variables) + (buffer_lisp_local_variables): Handle unbound vars correctly; + don't let Qunbound leak into Lisp. + 2012-02-07 Glenn Morris * image.c (Fimagemagick_types): Doc fix. diff --git a/src/buffer.c b/src/buffer.c index 01418956c8d..a6f61a1936a 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1022,7 +1022,10 @@ buffer_lisp_local_variables (struct buffer *buf) if (buf != current_buffer) val = XCDR (elt); - result = Fcons (Fcons (XCAR (elt), val), result); + result = Fcons (EQ (val, Qunbound) + ? XCAR (elt) + : Fcons (XCAR (elt), val), + result); } return result; @@ -1064,9 +1067,12 @@ No argument or nil as argument means use current buffer as BUFFER. */) idx = PER_BUFFER_IDX (offset); if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx)) && SYMBOLP (PER_BUFFER_SYMBOL (offset))) - result = Fcons (Fcons (PER_BUFFER_SYMBOL (offset), - PER_BUFFER_VALUE (buf, offset)), - result); + { + Lisp_Object sym = PER_BUFFER_SYMBOL (offset); + Lisp_Object val = PER_BUFFER_VALUE (buf, offset); + result = Fcons (EQ (val, Qunbound) ? sym : Fcons (sym, val), + result); + } } } -- cgit v1.2.1