Eli Zaretskii [Mon, 25 Feb 2013 16:13:42 +0000 (18:13 +0200)]
Fix bug #13743 with crashes due to recursive add-text-properties.
src/textprop.c (Fadd_text_properties, Fremove_text_properties)
(Fremove_list_of_text_properties): Skip all of the intervals in
the region between START and END that already have resp. don't
have the requested properties, not just the first one. Add
assertions that the loop afterwards always modifies the
properties.
Paul Eggert [Mon, 25 Feb 2013 05:55:37 +0000 (21:55 -0800)]
Simplify data_start configuration.
This is a followon simplification to the fix for Bug#13650.
* admin/CPP-DEFINES (DATA_START, ORDINARY_LINK): Remove.
* configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START)
(LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove.
(AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's
not always needed.
(HAVE_DATA_START): New macro.
* etc/PROBLEMS (LIBS_SYSTEM, LIBS_MACHINE, LIBS_STANDARD): Remove.
Remove legacy-systems section, as this stuff is no longer
applicable with current linking strategies.
* src/Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
(START_FILES): Remove. All uses removed.
(otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
(ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
(buildobj.h): Use it.
($(ALLOBJS)): Depend on globals.h.
(temacs$(EXEEXT)): Use $(ALLOBJS).
* src/autodeps.mk (ALLOBJS): Move to Makefile.in.
* src/deps.mk (vm-limit.o):
* src/makefile.w32-in ($(BLD)/vm-limit.$(O)):
Do not depend on mem-limits.h.
* src/emacs.c (__do_global_ctors, __do_global_ctors_aux)
(__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
[__GNUC__ && !ORDINARY_LINK]: Remove.
* src/mem-limits.h, src/pre-crt0.c: Remove.
* src/unexaix.c, src/unexcoff.c: Don't include mem-limits.h.
* src/unexcoff.c (etext): New decl.
(make_hdr): Use it instead of start_of_data.
* src/vm-limit.c: Move most of mem-limits.h's contents here.
(data_start): New decl. It's OK if this is approximate,
so simplify-away some unnecessary exactness.
(POINTER): Remove; all uses removed.
(data_space_start): Now char *, to avoid casts.
(exceeds_lisp_ptr): New function, replacing the old
EXCEEDS_LISP_PTR macro. All uses changed.
(check_memory_limits): Simplify and remove casts.
(start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
(memory_warnings): Use data_start instead of start_of_data.
Michael Albinus [Sun, 24 Feb 2013 17:58:55 +0000 (18:58 +0100)]
Port documentation to Texinfo 5.0.
* tramp.texi (top) [xxx, yyy, trampfn]: Remove superfluous @c.
(Filename Syntax): Do not use @trampfn{} in @item.
(Filename completion): Use @columnfractions in @multitable.
Jay Belanger [Sun, 24 Feb 2013 01:05:13 +0000 (19:05 -0600)]
* calc/calc-ext.el (math-to-radians-2, math-from-radians-2):
Add option to force `pi' to remain symbolic.
* calc/calcalg2.el (calcFunc-sin, calcFunc-cos, calcFunc-tan)
(calcFunc-cot, calcFunc-csc, calcFunc-sec, calcFunc-arcsin)
(calcFunc-arccos, calcFunc-arctan): Use symbolic `pi' in the
derivatives, when necessary.
Paul Eggert [Sun, 24 Feb 2013 00:21:06 +0000 (16:21 -0800)]
Fix regression introduced by July 10 filelock.c patch.
* filelock.c (fill_in_lock_file_name): Fix crash caused by the
2012-07-10 patch to this file. Reported by Eli Zaretskii in
<http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00533.html>
and diagnosed by Andreas Schwab in
<http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00534.html>.
Glenn Morris [Sat, 23 Feb 2013 21:14:36 +0000 (13:14 -0800)]
Avoid recursive byte-compile-files fighting over input/output buffers
* lisp/emacs-lisp/bytecomp.el (byte-compile-level): New.
(byte-compile-file, byte-compile-from-buffer):
Use separate input/output buffers for each level of recursive
byte-compile-file calls.
Michael Albinus [Sat, 23 Feb 2013 12:40:14 +0000 (13:40 +0100)]
* net/tramp.el (tramp-methods): Fix docstring.
(tramp-ssh-controlmaster-options): Rename it from
`tramp-ssh-controlmaster-template'. Return a string.
(tramp-default-method): Adapt check for
`tramp-ssh-controlmaster-options'.
* net/tramp-sh.el (tramp-methods): Replace
`tramp-ssh-controlmaster-template' by "%c".
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Use it in format spec. Ensure,
that it is applied for the first hop only.
David Engster [Fri, 22 Feb 2013 22:54:37 +0000 (22:54 +0000)]
gnus-registry.el (gnus-registry-save): Provide class name when calling `eieio-persistent-read' to avoid "unsafe call" warning Use `condition-case' to stay compatible with older EIEIO versions which only accept one argument
Paul Eggert [Fri, 22 Feb 2013 19:23:12 +0000 (11:23 -0800)]
Assume C89 or better.
* ralloc.c (SIZE, POINTER, NIL):
* vm-limit.c (POINTER):
Remove, replacing all uses with C89 equivalents. These old
symbols were present only for porting to pre-C89 platforms.
Paul Eggert [Thu, 21 Feb 2013 22:42:56 +0000 (14:42 -0800)]
Parallelize documentation builds.
This speeds up building of documentation on multiprocessor
platforms, and is motivated by Texinfo 5.0, which is much slower.
Add a toplevel rule 'make docs' to make all the documentation.
* .bzrignore: Add .dvi, .html, .ps.
* Makefile.in (DVIS, HTMLS, INFOS, PSS, DOCS): New macros.
($(DOCS), docs, vi, html, pdf, ps): New rules.
(info-real): Depend on $(INFOS) rather than doing it sequentially.
(dvi): Depend on $(DVIS) rather than doing it sequentially.
* doc/misc/Makefile.in (html): New rule.
Juri Linkov [Thu, 21 Feb 2013 17:45:12 +0000 (19:45 +0200)]
* lisp/isearch.el (isearch-lazy-highlight-new-loop):
Set `isearch-lazy-highlight-start' and `isearch-lazy-highlight-end'
to `isearch-other-end' if it is not nil.
* lisp/replace.el (replace-highlight): Let-bind `isearch-other-end'
to `match-beg'.
* lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay):
Let-bind `isearch-other-end' to `start', `isearch-forward' to t
and `isearch-error' to nil.
Glenn Morris [Thu, 21 Feb 2013 06:55:19 +0000 (22:55 -0800)]
Make Info-edit obsolete
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00374.html
(Warning: interminable bikeshedding in thread)
* lisp/info.el (Info-enable-edit): Remove.
(Info-edit): Disable it rather than using Info-enable.
(Info-edit-mode-hook, Info-edit-map, Info-edit-mode, Info-edit)
(Info-cease-edit): Make editing of Info files obsolete.
Stefan Monnier [Wed, 20 Feb 2013 16:37:06 +0000 (11:37 -0500)]
* lisp/simple.el (command-execute): Move from C. Add obsolete check.
(extended-command-history): Move from C.
* src/keyboard.c (Qcommand_execute): New var.
(command_loop_1, read_char): Use it.
(Fcommand_execute): Remove, replace by an Elisp implementation.
(syms_of_keyboard): Adjust accordingly.
Bastien Guerry [Wed, 20 Feb 2013 13:05:24 +0000 (14:05 +0100)]
* outline.el (outline-regexp, outline-heading-end-regexp): Use
variables, not options (bug#13731).
Setting this as a global option is likely to be useless, because it is
unlikely that all outline file will use the modified regexp.
Additionnally, if one of these variables if set through customize and
the outline keybindings don't work in a standard outline file, it is
hard to know why.
Glenn Morris [Wed, 20 Feb 2013 08:34:28 +0000 (00:34 -0800)]
Lispref updates for multi-frame images
* doc/lispref/display.texi (GIF Images, TIFF Images): Delete these nodes.
(ImageMagick Images): For :index, use an xref rather than duplicating.
(Other Image Types): Add GIF, adjust formatting.
(Multi-Frame Images): Rename from Animated Images. Expand section.
* doc/lispref/elisp.texi (Top): Update menu for these changes.
Glenn Morris [Wed, 20 Feb 2013 07:57:33 +0000 (23:57 -0800)]
Rework recent image-multi-frame stuff a little
* image.el (image-current-frame): Change from variable to function.
(image-show-frame): Rename from image-nth-frame. Update callers.
* image-mode.el (image-multi-frame): New variable.
(image-mode-map, image-mode, image-goto-frame):
Use image-multi-frame rather than image-current-frame.
(image-mode, image-goto-frame):
Use image-current-frame as function rather than as variable.
* sheap.c (report_sheap_usage): Use message, not message1, so
that we don't try to create a buffer while we're in the middle
of dumping Emacs. Explain why.
* sheap.c (report_sheap_usage): Use message, not message1, so
that we don't try to create a buffer while we're in the middle
of dumping Emacs. Explain why.
Michael Albinus [Tue, 19 Feb 2013 15:17:55 +0000 (16:17 +0100)]
* net/tramp-cache.el (tramp-get-hash-table): New defun.
(tramp-get-file-property, tramp-set-file-property)
(tramp-get-connection-property, tramp-set-connection-property): Use it.
(tramp-flush-file-property, tramp-flush-directory-property):
Rename argument to KEY.
(tramp-flush-connection-property): Simplify a little bit.
(tramp-connection-property-p): New defun.
(top): Reapply saved values only if there isn't a corresponding
entry in `tramp-connection-properties'.
Stefan Monnier [Tue, 19 Feb 2013 02:57:04 +0000 (21:57 -0500)]
Cleanup some of EIEIO's namespace.
* lisp/emacs-lisp/eieio.el (eieio--define-field-accessors): New macro.
Use it to define all the class-* and object-* field accessors (renamed
to eieio--class-* and eieio--object-*). Update all uses.
(eieio--class-num-slots, eieio--object-num-slots): Rename from
class-num-slots and object-num-slots.
(eieio--check-type): New macro.
(eieio-defclass, eieio-oref, eieio-oref-default, same-class-p)
(object-of-class-p, child-of-class-p, object-slots, class-slot-initarg)
(eieio-oset, eieio-oset-default, object-assoc, object-assoc-list)
(object-assoc-list-safe): Use it.
(eieio-defclass): Tighten regexp.
(eieio--defmethod): Use `memq'. Signal an error for unknown method kind.
Remove unreachable code.
(object-class-fast): Declare obsolete.
(eieio-class-name, eieio-object-name, eieio-object-set-name-string)
(eieio-object-class, eieio-object-class-name, eieio-class-parents)
(eieio-class-children, eieio-class-precedence-list, eieio-class-parent):
Rename from class-name, object-name, object-set-name-string,
object-class, object-class-name, class-parents, class-children,
class-precedence-list, class-parent; with obsolete alias.
(class-of, class-direct-superclasses, class-direct-subclasses):
Declare obsolete.
(eieio-defmethod): Use `memq'; remove unreachable code.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-opt.el (eieio-class-button, eieio-describe-generic)
(eieio-browse-tree, eieio-browse): Use eieio--check-type.
* net/tramp-sh.el (tramp-sh-handle-start-file-process): Let-bind
`tramp-current-connection' in order to avoid an error when several
commands are invoked in a short time in eshell and friends.
Eli Zaretskii [Sun, 17 Feb 2013 18:17:34 +0000 (20:17 +0200)]
Fix bug #13735 with network streams on MS-Windows.
Revert changes to w32proc.c done since 2012-11-30T09:23:15Z!eliz@gnu.org.
Do NOT merge to trunk!
src/w32proc.c (new_child): Remove the loop that attempted to salvage
slots of dead processes.
(new_child, delete_child, find_child_pid): Don't insist on
procinfo.hProcess be NULL for a process slot to be considered
inactive, or be non-NULL to be considered active.
(reader_thread): Don't set the FILE_AT_EOF flag of a file
descriptor if the corresponding child was deleted and its
char_avail handle is NULL.
(reap_subprocess): Don't reset the FILE_AT_EOF flag.
(sys_select): Don't pass a NULL process handle to
WaitForMultipleObjects.
Stefan Monnier [Sun, 17 Feb 2013 16:58:12 +0000 (11:58 -0500)]
Don't use font-lock-syntax-table in lisp modes.
* lisp/font-lock.el (lisp-font-lock-keywords-1, lisp-font-lock-keywords-2):
Don't assume all identifier chars have syntax word.
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables):
Remove bar-not-symbol. Adjust callers.
(lisp-mode-variables): Don't set a font-lock-syntax-table.
Eli Zaretskii [Sun, 17 Feb 2013 16:22:11 +0000 (18:22 +0200)]
Fix bug #13723 with redrawing vertical border in GUI sessions.
src/xdisp.c (x_draw_vertical_border): For a window that is neither
the leftmost nor the rightmost, redraw both the left and the right
vertical borders.
Glenn Morris [Sat, 16 Feb 2013 19:56:50 +0000 (11:56 -0800)]
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.
Eli Zaretskii [Sat, 16 Feb 2013 11:08:49 +0000 (13:08 +0200)]
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.
Jambunathan K [Sat, 16 Feb 2013 09:26:42 +0000 (14:56 +0530)]
(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.
Eli Zaretskii [Sat, 16 Feb 2013 09:13:40 +0000 (11:13 +0200)]
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.