* src/dispextern.h (struct image_type): Add new slot, storing a type
initialization function.
* src/image.c (define_image_type): Call the image initializer function
if it is defined. Arguments and return value changed.
(valid_image_p, make_image): Callers changed.
(xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
(gif_type, imagemagick_type, svg_type, gs_type): Add
initialization functions.
(Finit_image_library): Call lookup_image_type.
(CHECK_LIB_AVAILABLE): Macro deleted.
(lookup_image_type): Call define_image_type here, rather than via
Finit_image_library, and without using CHECK_LIB_AVAILABLE.
(syms_of_image): Move define_image_type calls for xbm_type and
pbm_type to lookup_image_type.
Eli Zaretskii [Sat, 22 Sep 2012 13:16:03 +0000 (16:16 +0300)]
Fix bugs #12447 and #12326 with infloop causes by idle timers, update docs.
src/keyboard.c (timer_check_2): Move calculation of 'timers' and
'idle_timers' from here ...
(timer_check): ... to here. Use Fcopy_sequence to copy the timer
lists, to avoid infloops when the timer does something stupid,
like reinvoke itself with the same or smaller time-out.
lisp/emacs-lisp/timer.el (run-with-idle-timer)
(timer-activate-when-idle): Warn against reinvoking an idle timer
from within its own timer action.
doc/lispref/os.texi (Idle Timers): Warn against reinvoking an idle timer
from within its own timer action.
Martin Rudalics [Sat, 22 Sep 2012 12:56:08 +0000 (14:56 +0200)]
Make Temp Buffer Resize Mode less intrusive (Bug#1806).
* window.c (Fsplit_window_internal): Handle only Qt value of
Vwindow_combination_limit separately.
(Qtemp_buffer_resize): New symbol.
(Vwindow_combination_limit): New default value. Rewrite
doc-string.
* cus-start.el (window-combination-limit): Add new optional
values.
* window.el (temp-buffer-window-show)
(window--try-to-split-window): Obey new values of
window-combination-limit.
(split-window): Test window-combination-limit for t instead of
non-nil.
(display-buffer-at-bottom): New buffer display action function.
* help.el (temp-buffer-resize-regexps): New option.
(temp-buffer-resize-mode): Rewrite doc-string.
(resize-temp-buffer-window): Obey temp-buffer-resize-regexps.
Don't resize reused window. Suggested by Glen Morris.
Eli Zaretskii [Sat, 22 Sep 2012 12:31:05 +0000 (15:31 +0300)]
Fix bug #10159 with crashes in auto-complete package.
src/xdisp.c (next_overlay_string): Initialize it->end_charpos for
the new overlay string. Otherwise, the call to composition_compute_stop_pos
in compute_stop_pos uses a wrong it->end_charpos value, and crashes because
it runs off the end of the overlay string.
Stefan Merten [Sat, 22 Sep 2012 09:16:00 +0000 (11:16 +0200)]
* rst.el: Revamp section title faces.
(rst-official-version)
(rst-package-emacs-version-alist): Sync with official version
V1.4.0.
(rst-faces-defaults, rst-set-level-default)
(rst-level-face-max, rst-level-face-base-color)
(rst-level-face-base-light, rst-level-face-format-light)
(rst-level-face-step-light, rst-define-level-faces): Obsolete.
(rst-adornment-faces-alist): Match new setup.
(rst-level-1, rst-level-2, rst-level-3, rst-level-4)
(rst-level-5, rst-level-6): New faces.
Juri Linkov [Thu, 20 Sep 2012 21:57:13 +0000 (00:57 +0300)]
* lisp/replace.el (query-replace-read-from): Use `read-regexp' instead
of `read-from-minibuffer' when `regexp-flag' is non-nil.
(occur-read-primary-args): Use `read-regexp' instead of
`read-string'.
(multi-occur-in-matching-buffers): Use `read-regexp' instead of
`read-from-minibuffer'.
* lisp/isearch.el (isearch-occur): Use `read-regexp' instead of
`read-string'.
* lisp/dired.el (dired-read-regexp): Use `read-regexp' instead of
`read-from-minibuffer'.
* lisp/progmodes/grep.el (grep-read-regexp): Use `read-regexp' instead
of `read-string'.
Juri Linkov [Thu, 20 Sep 2012 21:35:40 +0000 (00:35 +0300)]
* lisp/replace.el (read-regexp): Rename DEFAULT-VALUE arg to DEFAULTS
and allow accepting a list of strings prepended to a list of
standard default values. Doc fix.
Stefan Monnier [Thu, 20 Sep 2012 13:46:36 +0000 (09:46 -0400)]
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): New function.
(macroexp--expand-all): Use it.
(macroexp--funcall-and-return): Remove by folding it into its sole
caller (macroexp--warn-and-return).
* lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete):
Use macroexp--obsolete-warning.
Stefan Monnier [Thu, 20 Sep 2012 03:10:52 +0000 (23:10 -0400)]
* src/alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
calling mark_vectorlike since that's the one that marks the window.
(mark_discard_killed_buffers): Mark the final cdr.
* src/window.h (struct window): Move prev/next_buffers to the
non-standard fields.
* src/window.c (make_window): Initialize prev/next_buffers manually.
Juri Linkov [Wed, 19 Sep 2012 20:09:55 +0000 (23:09 +0300)]
* lisp/dired-aux.el (dired-diff): Add (require 'diff) because
`diff-latest-backup-file' is not autoloaded.
(dired-do-chxxx, dired-do-chmod): Set `no-error-if-not-filep' arg
of `dired-get-filename' to t to not report error when there is
no default file on the current line.
Stefan Monnier [Wed, 19 Sep 2012 19:59:52 +0000 (15:59 -0400)]
* lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Rename from
macroexp--eval-if-compile.
(macroexp--funcall-and-return, macroexp--warn-and-return): New funs.
(macroexp--expand-all): Use them.
New feature: set optimal slice from BoundingBox information.
* doc-view.el (doc-view-mode-map): Add keybinding.
(doc-view-menu): Add menu entry.
(doc-view-set-slice): Adapt docstring.
(doc-view-get-bounding-box, doc-view-guess-paper-size)
(doc-view-scale-bounding-box)
(doc-view-set-slice-from-bounding-box): New functions.
(doc-view-paper-sizes): New defvar.
* doc/emacs/misc.texi (DocView Slicing): Document new slice from
BoundingBox feature.
Jan Djärv [Wed, 19 Sep 2012 06:47:01 +0000 (08:47 +0200)]
* lisp/startup.el (command-line-ns-option-alist): Add -g and --geometry.
* src/frame.c (read_integer, XParseGeometry): Moved from w32xfns.c.
(Fx_parse_geometry): If there is a space in string, call
Qns_parse_geometry, otherwise do as on other terms.
* src/w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
* src/nsfns.m (XParseGeometry): Remove.
(Fx_create_frame): Call x_set_offset to correctly interpret
top_pos in geometry.
Juri Linkov [Tue, 18 Sep 2012 23:40:39 +0000 (02:40 +0300)]
* lisp/dired-aux.el (dired-diff): Restore original functionality of
getting the default value, but keep new feature of using the
latest existing backup file (`diff-latest-backup-file').
Juri Linkov [Tue, 18 Sep 2012 23:18:06 +0000 (02:18 +0300)]
* lisp/dired.el (dired-mark): If the region is active in Transient Mark
mode, mark all files in the active region. Doc fix.
(dired-unmark, dired-flag-file-deletion, dired-unmark-backward):
Doc fix.
Juri Linkov [Tue, 18 Sep 2012 22:57:45 +0000 (01:57 +0300)]
* lisp/dired-aux.el (dired-do-chxxx, dired-do-chmod): Default file
attributes for M-n are pulled from the file at point.
(dired-do-chgrp, dired-do-chown, dired-do-touch): Doc fix.
Suggested by Drew Adams.
* lisp/progmodes/ruby-mode.el (ruby-brace-to-do-end): Don't add extra
whitespace after "end".
(ruby-do-end-to-brace): Collapse block to one line if it fits
within fill-column.
* doc/lispref/customize.texi (Customization): Define customization more
carefully.
(Common Keywords): Add xref to Constant Variables.
* doc/lispref/display.texi (Faces): Discuss anonymous faces.
(Face Attributes): Tweak intro.
(Defining Faces): Move after the Face Attributes node. Copyedits.
(Displaying Faces): Describe role of inheritance.
* doc/lispref/variables.texi (Defining Variables): Link to defcustom's node
instead of the higher-level Customization chapter.
Andreas Schwab [Mon, 17 Sep 2012 22:43:12 +0000 (00:43 +0200)]
* Makefile.in (bootstrap): Revert last change. Run config.status
after config.status --recheck, run configure from $(srcdir).
(config.status): Run configure from $(srcdir).
Paul Eggert [Mon, 17 Sep 2012 22:35:28 +0000 (15:35 -0700)]
* Makefile.in: Run autogen/copy_autogen if autogen.sh fails,
to create 'configure'; problem reported by Andreas Schwab in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00438.html>.
* autogen.sh: Exit with status 1 when failing due to missing tools,
reverting the 2012-09-10 change to this file.
* autogen/copy_autogen: Fail if one of the subsidiary actions fail.
Use 'cp -f' for the build-aux files, since the destinations are
typically read-only.
Paul Eggert [Mon, 17 Sep 2012 21:33:14 +0000 (14:33 -0700)]
* Makefile.in: Fix build error on FreeBSD.
($(MAKEFILE_NAME)): Pass MAKE='$(MAKE)' to config.status's env.
Suggested by Wolfgang Jenker in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00430.html>.
(MAKE_CONFIG_STATUS): Remove. Remaining use expanded.
This undoes part of the 2012-09-10 patch.
(bootstrap): Run ./configure, rather than trying to run config.status
if it exists. That builds src/epaths.h more reliably.
Eli Zaretskii [Mon, 17 Sep 2012 07:54:32 +0000 (10:54 +0300)]
Fix the value of __malloc_extra_blocks.
src/ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
__malloc_extra_blocks to 32 instead of 64, like alloc.c did in
emacs_blocked_malloc, now deleted.
* etc/refcards/emacsver.tex: New file.
* etc/refcards/calccard.tex, etc/refcards/cs-dired-ref.tex:
* etc/refcards/cs-refcard.tex, etc/refcards/cs-survival.tex:
* etc/refcards/de-refcard.tex, etc/refcards/dired-ref.tex:
* refcards/emacsver.tex, etc/refcards/fr-dired-ref.tex:
* etc/refcards/fr-refcard.tex, etc/refcards/fr-survival.tex:
* etc/refcards/orgcard.tex, etc/refcards/pl-refcard.tex:
* etc/refcards/pt-br-refcard.tex, etc/refcards/refcard.tex:
* etc/refcards/sk-dired-ref.tex, etc/refcards/sk-refcard.tex:
* etc/refcards/sk-survival.tex, etc/refcards/survival.tex:
* etc/refcards/vipcard.tex, etc/refcards/viperCard.tex: Include emacsver.tex.
* refcards/calccard.tex (\emacsversionnumber):
Rename to \versionemacs, same as all the other refcards.
* etc/refcards/Makefile (ENVADD): New variable.
(sk-dired-ref.pdf, sk-survival.pdf, pl-refcard.pdf)
(%.pdf, %,dvi, sk-dired-ref.dvi, sk-survival.dvi, pl-refcard.dvi):
Depend on emacsver.tex. Add "." to TEXINPUTS for TeX commands.
* admin/admin.el (set-version): Set major version in
etc/refcards/ru-refcard.tex and etc/refcards/emacsver.tex.
(set-copyright): In etc/refcards, only change ru-refcard.tex
and emacsver.tex.
* admin.el (cusver-scan, cusver-check): Bind local variables.
Paul Eggert [Mon, 17 Sep 2012 01:02:11 +0000 (18:02 -0700)]
Remove no-longer-needed Solaris 2.4 vfork bug workaround.
The workaround was for improving performance on Solaris 2.4, but
is getting in the way now. Emacs will still work if someone is
still running Solaris 2.4 in a museum somewhere; Sun dropped
support for Solaris 2.4 in 2003.
* configure.ac (ac_cv_func_vfork_works): Default to 'no' on
Solaris 2.4, so that AC_FUNC_VFORK doesn't think vfork works.
* src/callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
* src/process.c (create_process) [HAVE_WORKING_VFORK]:
Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
since Emacs no longer uses vfork on that platform.
Reduce the number of versioned files storing the short copyright string
* configure.ac (copyright): New output variable.
(COPYRIGHT): New AC_DEFINE.
* admin/admin.el (set-copyright): No more need to set copyrights for
nextstep, or .c files. Add configure.ac and config.nt.
* lib-src/ebrowse.c (version):
* lib-src/etags.c (print_version): Use COPYRIGHT.
* nextstep/templates/Info-gnustep.plist.in:
* nextstep/templates/InfoPlist.strings.in:
* nextstep/templates/Info.plist.in: Let configure set copyright.