Eli Zaretskii [Thu, 29 May 2014 19:19:18 +0000 (22:19 +0300)]
nt/ChangeLog: Fix last entry.
Eli Zaretskii [Thu, 29 May 2014 19:16:32 +0000 (22:16 +0300)]
Remove nt/addsection.c and don't build addsection.exe.
configure.ac (ADDSECTION, TEMACS_POST_LINK): Don't compute,
unused.
nt/Makefile.in (DONT_INSTALL): Now empty.
(addsection${EXEEXT}): Remove target.
nt/addsection.c: File removed.
src/Makefile.in (TEMACS_POST_LINK): Remove target.
(emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
(temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
Dmitry Antipov [Thu, 29 May 2014 17:16:00 +0000 (21:16 +0400)]
* xmenu.c (xdialog_show): Remove prototype, rename to
x_dialog_show, remove 2nd arg because it's always zero
and simplify accordingly.
(xw_popup_dialog): Adjust user.
* w32menu.c (w32_dialog_show): Adjust prototype, remove
2nd arg because it's always zero and simplify accordingly.
(w32_popup_dialog): Adjust user.
Eli Zaretskii [Thu, 29 May 2014 17:15:02 +0000 (20:15 +0300)]
src/ChangeLog: Fix a recent log entry.
Stefan Monnier [Thu, 29 May 2014 15:36:09 +0000 (11:36 -0400)]
* lisp/subr.el (sit-for): Remove universal-arg dependency.
Eli Zaretskii [Thu, 29 May 2014 15:21:08 +0000 (18:21 +0300)]
Add diagnostics for using private heap on MS-Windows during dumping.
src/w32heap.c (report_temacs_memory_usage): New function.
src/unexw32.c (unexec) [ENABLE_CHECKING]: Call report_temacs_memory_usage.
src/w32heap.h (report_temacs_memory_usage): Add prototype.
Paul Eggert [Thu, 29 May 2014 15:05:06 +0000 (08:05 -0700)]
Don't substitute sigprocmask for pthread_sigmask.
sigprocmask isn't portable in a multithreaded process.
* configure.ac (gl_THREADLIB): Remove dummy.
Merge from gnulib, incorporating:
2014-05-28 pthread_sigmask, timer-time: use gl_THREADLIB only if needed
* m4/pthread_sigmask.m4, m4/timer_time.m4: Update from gnulib.
* src/Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
Fixes: debbugs:17561
Eli Zaretskii [Thu, 29 May 2014 14:52:47 +0000 (17:52 +0300)]
Fix bug #17622 with crashes in mmap routines.
src/buffer.c (init_buffer): Accept an argument 'initialized'.
[USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
mmap_regions and mmap_fd, to avoid referencing stale data from the
dump phase. Add an assertion for buffer text of buffers created
in temacs before this function is called.
(mmap_regions_1, mmap_fd_1): Remove unused variables.
src/lisp.h (init_buffer): Update prototype.
src/emacs.c (main): Pass 'initialized' as the argument to init_buffer.
Dmitry Antipov [Thu, 29 May 2014 08:02:58 +0000 (12:02 +0400)]
* alloc.c (Fgarbage_collect): Fix compilation with
GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
Glenn Morris [Thu, 29 May 2014 05:55:57 +0000 (22:55 -0700)]
* test/automated/ruby-mode-test.el (ruby-assert-face): Fix typo in previous
Paul Eggert [Thu, 29 May 2014 04:47:01 +0000 (21:47 -0700)]
* frame.c, frame.h (frame_char_to_pixel_position)
(frame_set_mouse_position): Now static, and made private in
frame.c rather than public in frame.h.
Stefan Monnier [Thu, 29 May 2014 03:54:37 +0000 (23:54 -0400)]
* lisp/whitespace.el: Use font-lock-flush. Minimize refontifications.
Side benefit: it works without jit-lock.
(whitespace-point--used): New buffer-local var.
(whitespace-color-on): Initialize it and flush it. Use font-lock-flush.
(whitespace-color-off): Use font-lock-flush.
(whitespace-point--used, whitespace-point--flush-used): New functions.
(whitespace-trailing-regexp, whitespace-empty-at-bob-regexp)
(whitespace-empty-at-eob-regexp): Use them.
(whitespace-post-command-hook): Rewrite.
Stefan Monnier [Thu, 29 May 2014 03:45:29 +0000 (23:45 -0400)]
* lisp/font-lock.el (font-lock-flush, font-lock-ensure): New functions.
(font-lock-fontify-buffer): Mark interactive-only.
(font-lock-multiline, font-lock-fontified, font-lock-set-defaults):
Make buffer-local.
(font-lock-specified-p): Remove redundant boundp check.
(font-lock-flush-function, font-lock-ensure-function): New vars.
(font-lock-turn-on-thing-lock): Set them.
(font-lock-default-fontify-buffer): Obey font-lock-dont-widen.
(font-lock-after-change-function): Make `old-len' optional.
(font-lock-set-defaults): Remove redundant `set' of font-lock-defaults.
Call font-lock-flush, just in case.
* lisp/progmodes/verilog-mode.el (verilog-preprocess): Disable workaround in
recent Emacsen.
* lisp/progmodes/vera-mode.el (vera-fontify-buffer): Declare obsolete.
(vera-mode-map, vera-mode-menu): Remove bindings to it.
* lisp/progmodes/idlw-help.el (idlwave-help-fontify): Use font-lock-ensure
and with-syntax-table.
* lisp/textmodes/conf-mode.el (conf-quote-normal):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/prog-mode.el (prettify-symbols-mode):
* lisp/progmodes/f90.el (f90-font-lock-n):
* lisp/progmodes/cwarn.el (cwarn-mode):
* lisp/nxml/nxml-mode.el (nxml-toggle-char-ref-extra-display):
* lisp/progmodes/compile.el (compilation-setup, compilation--unsetup):
* lisp/hi-lock.el (hi-lock-mode, hi-lock-unface-buffer)
(hi-lock-set-pattern, hi-lock-set-file-patterns): Use font-lock-flush.
* lisp/mail/rmail.el (rmail-variables): Set font-lock-dont-widen instead of
font-lock-fontify-buffer-function and
font-lock-unfontify-buffer-function.
(rmail-unfontify-buffer-function, rmail-fontify-message):
Use with-silent-modifications.
* lisp/htmlfontify.el (hfy-force-fontification): Use jit-lock-fontify-now
and font-lock-ensure.
* lisp/bs.el (bs-show-in-buffer): Use font-lock-ensure.
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Use font-lock-ensure.
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Use font-lock-flush.
* lisp/org/org-compat.el (org-font-lock-ensure): New function.
* lisp/org/ox-odt.el (org-odt-do-format-code):
* lisp/org/ox-html.el (org-html-fontify-code):
* lisp/org/org.el (org-fontify-like-in-org-mode):
* lisp/org/org-src.el (org-src-font-lock-fontify-block):
* lisp/org/org-clock.el (org-clock-get-clocktable): Use it.
* lisp/org/ox-org.el (org-org-publish-to-org): Use it. Avoid using find-file
from Elisp.
* test/automated/ruby-mode-tests.el (ruby-assert-face): Use font-lock-ensure.
(ruby-interpolation-keeps-non-quote-syntax): Use syntax-propertize.
Glenn Morris [Thu, 29 May 2014 01:36:44 +0000 (21:36 -0400)]
* configure.ac: Explicitly drop some ancient Solaris versions.
Dmitry Antipov [Wed, 28 May 2014 15:47:13 +0000 (19:47 +0400)]
* frame.h (frame_char_to_pixel_position, frame_set_mouse_position):
Fix last change by moving these functions under HAVE_WINDOW_SYSTEM.
Dmitry Antipov [Wed, 28 May 2014 13:53:22 +0000 (17:53 +0400)]
Refactor mouse positioning stuff to avoid code duplication.
* frame.h (frame_char_to_pixel_position): New function.
(x_set_mouse_position): Rename to...
(frame_set_mouse_position): ...new function.
(frame_set_mouse_pixel_position): Add prototype.
* nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
Rename to frame_set_mouse_pixel_position.
* frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
Adjust users.
* xterm.h, w32term.h ( x_set_mouse_position)
(x_set_mouse_pixel_position): Remove prototypes.
Reuben Thomas [Wed, 28 May 2014 12:54:58 +0000 (13:54 +0100)]
etc/TODO: add note about using undo-tree for persistent undo
Dmitry Antipov [Wed, 28 May 2014 11:41:48 +0000 (15:41 +0400)]
* xterm.c (x_free_frame_resources): Fix last change.
Thien-Thi Nguyen [Wed, 28 May 2014 09:58:47 +0000 (11:58 +0200)]
* lisp/emacs-lisp/package.el (package-generate-autoloads):
Inhibit backup files.
Dmitry Antipov [Wed, 28 May 2014 08:00:10 +0000 (12:00 +0400)]
On X, always make pointer visible when deleting frame (Bug#17609).
* frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
Pass frame as arg.
* frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
Adjust prototypes.
* cmds.c (Fself_insert_command): Use SELECTED_FRAME.
* keyboard.c (gobble_input): If there is no terminal input error,
make sure the pointer is visible for all frames on this terminal.
* xterm.c (x_free_frame_resources): Always enable pointer visibility.
Glenn Morris [Wed, 28 May 2014 06:51:36 +0000 (23:51 -0700)]
* lisp/subr.el (zerop): Move later so bootstrap works.
Stefan Monnier [Wed, 28 May 2014 01:12:04 +0000 (21:12 -0400)]
* lisp/progmodes/hideshow.el (hs-hide-all): Call syntax-propertize.
Fixes: debbugs:17608
Michal Nazarewicz [Wed, 28 May 2014 01:00:44 +0000 (21:00 -0400)]
* test/automated/tildify-tests.el: New file.
* lisp/textmodes/tildify.el (tildify-buffer, tildify-region):
Add dont-ask option.
Fixes: debbugs:17547
Stefan Monnier [Wed, 28 May 2014 00:50:44 +0000 (20:50 -0400)]
* lisp/subr.el (zerop): Move from C. Add compiler-macro.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-zerop): Remove.
* src/data.c (Fzerop): Move to Elisp.
(syms_of_data): Don't defsubr it.
* src/keyboard.c (echo_keystrokes_p): New function.
(read_char, record_menu_key, read_key_sequence): Use it.
Fixes: debbugs:17475
Stefan Monnier [Wed, 28 May 2014 00:09:14 +0000 (20:09 -0400)]
* src/callint.c (Ffuncall_interactively): New function.
(Qfuncall_interactively): New var.
(Qcall_interactively): Remove.
(Fcall_interactively): Use it.
(syms_of_callint): Defsubr it.
* lisp/subr.el (internal--funcall-interactively): New.
(internal--call-interactively): Remove.
(called-interactively-p): Detect funcall-interactively instead of
call-interactively.
* lisp/simple.el (repeat-complex-command): Use funcall-interactively.
(repeat-complex-command--called-interactively-skip): Remove.
Stefan Monnier [Tue, 27 May 2014 23:48:35 +0000 (19:48 -0400)]
* src/bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
relocated from under us.
Fabrice Popineau [Tue, 27 May 2014 17:31:17 +0000 (20:31 +0300)]
Use mmap(2) emulation for buffer text on MS-Windows.
src/Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
configure.
(ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
src/lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
for MinGW, since it no longer uses gmalloc.
src/buffer.c: Do not define mmap allocations functions for Windows.
Remove mmap_find which is unused. Remove mmap_set_vars which does
nothing useful.
[WINDOWSNT]: Include w32heap.h.
(init_buffer): Always allocate new memory for buffers.
src/emacs.c: Remove mmap_set_vars calls.
src/image.c (free_image): Undef free for Windows because it is
redirected to our private version.
src/unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits
compatibility.
(copy_executable_and_dump_data): Remove dumping the heap section.
(unexec): Restore using_dynamic_heap after dumping.
src/w32heap.c (dumped_data_commit, malloc_after_dump)
(malloc_before_dump, realloc_after_dump, realloc_before_dump)
(free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
(mmap_free): New functions.
src/w32heap.h: Declare dumped_data and mmap_* function prototypes.
nt/inc/ms-w32.h: Switch to the system heap allocation scheme
instead of GNU malloc and ralloc.
nt/inc/sys/mman.h: New file.
nt/INSTALL: Update for the new build requirements.
etc/NEWS: Mention build changes on MS-Windows.
configure.ac (C_HEAP_SWITCH) define for different values of
dumped heap size depending on 32/64bits arch on Windows.
Don't check for pthreads.h on MinGW32/64, it gets in the way.
Use mmap(2) for buffers and system malloc for MinGW32/64.
Stefan Monnier [Tue, 27 May 2014 14:36:07 +0000 (10:36 -0400)]
* lisp/register.el (register-read-with-preview): Don't burp on
frame switches (e.g. due to the frame we just popped).
Stefan Monnier [Tue, 27 May 2014 14:28:07 +0000 (10:28 -0400)]
* test/indent/ps-mode.ps: New file.
* test/automated/core-elisp-tests.el
(core-elisp-test-window-configurations): New test.
* test/indent/octave.m: Add a few more tests.
* test/indent/ruby.rb: Add one more test.
Paul Eggert [Tue, 27 May 2014 06:37:29 +0000 (23:37 -0700)]
* image.c (imagemagick_load_image): Use MagickRealType for local
'color_scale', instead of double, to avoid a GCC warning about
double promotion.
Paul Eggert [Tue, 27 May 2014 06:35:54 +0000 (23:35 -0700)]
* xfns.c (Fx_window_property): Remove unused local.
Paul Eggert [Tue, 27 May 2014 05:55:18 +0000 (22:55 -0700)]
Merge from gnulib.
This incorporates:
2014-05-21 fchdir: port 'open' and 'close' redefinitions to AIX 7.1
* doc/misc/texinfo.tex, lib/openat-proc.c: Update from gnulib.
Stefan Monnier [Tue, 27 May 2014 05:01:49 +0000 (01:01 -0400)]
* lisp/mouse.el (mouse-set-region): Handle spurious drag events.
(mouse-drag-track): Annotate `mouse-drag-start' so we know we moved.
Fixes: debbugs:17562
Paul Eggert [Tue, 27 May 2014 03:46:30 +0000 (20:46 -0700)]
Don't kill already-reaped process.
* process.c (process_send_signal): Fix race condition where a
subprocess was reaped by a signal handler between the check for
liveness and calling 'kill', which meant that Emacs could in
theory kill an innocent bystander process. Do the fix by blocking
SIGCHLD in a critical section that checks liveness before killing.
Fixes: debbugs:17561
Eli Zaretskii [Mon, 26 May 2014 16:55:28 +0000 (19:55 +0300)]
Minor fixes for MS-Windows MinGW64 build.
src/w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
lib-src/ntlib.h (lseek): Don't redirect to _lseek.
Glenn Morris [Mon, 26 May 2014 16:52:28 +0000 (09:52 -0700)]
* package-test.el (package-test-install-single): Update for changed output.
Ken Brown [Mon, 26 May 2014 12:31:46 +0000 (08:31 -0400)]
* src/w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name (see bug#17510).
Jan Djärv [Mon, 26 May 2014 11:26:24 +0000 (13:26 +0200)]
* nsfns.m (Fns_do_applescript): Put code in the wrong place. Here is correct.
Fixes: debbugs:17424
Jan Djärv [Mon, 26 May 2014 11:16:47 +0000 (13:16 +0200)]
* nsfns.m (ns_do_applescript): Surround executeAndReturnError
with calls to ns_init_events, ns_finish_events.
* nsterm.h (ns_init_events, ns_finish_events): Declare.
* nsterm.m (ns_init_events, ns_finish_events): New functions.
(ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
Fixes: debbugs:17424
Glenn Morris [Mon, 26 May 2014 10:21:18 +0000 (06:21 -0400)]
Auto-commit of loaddefs files.
Glenn Morris [Mon, 26 May 2014 02:28:09 +0000 (19:28 -0700)]
Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.org
YAMAMOTO Mitsuharu [Mon, 26 May 2014 02:17:24 +0000 (19:17 -0700)]
* admin/mac/uvs.el: New file. Generates ../src/macuvs.h. (Backport from trunk)
Tassilo Horn [Sun, 25 May 2014 17:40:54 +0000 (19:40 +0200)]
Improve reftex-format-special
* lisp/textmodes/reftex-ref.el (reftex-format-special): Make it work
also for AMS Math's \eqref macro.
Thien-Thi Nguyen [Sun, 25 May 2014 16:53:28 +0000 (18:53 +0200)]
Arrange to never byte-compile the generated -pkg.el file.
* lisp/emacs-lisp/package.el (package-generate-description-file):
Output first-line comment to set buffer-local var `no-byte-compile'.
Suggested by Dmitry Gutov:
<http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00401.html>.
Thien-Thi Nguyen [Sun, 25 May 2014 16:32:08 +0000 (18:32 +0200)]
Fix bug: Properly quote args to generated -pkg.el `define-package'.
* lisp/emacs-lisp/package.el (package-generate-description-file):
Inline `package--alist-to-plist'; rewrite to selectively
quote alist values that are not self-quoting.
(package--alist-to-plist): Delete func.
Eli Zaretskii [Sun, 25 May 2014 14:18:46 +0000 (17:18 +0300)]
Fix bug #17585 with incorrect vertical motion when linum-mode is on.
src/xdisp.c (move_it_in_display_line_to): Don't record wrap position
if we are iterating over an object that generates glyphs for
marginal areas.
Jan Djärv [Sun, 25 May 2014 13:44:14 +0000 (15:44 +0200)]
* admin/mac/uvs.el: New file from Mac port. src/macuvs.h is generated by it.
Andreas Schwab [Sun, 25 May 2014 11:47:34 +0000 (13:47 +0200)]
* cus-face.el (custom-face-attributes): Add :distant-foreground.
Jan Djärv [Sun, 25 May 2014 10:28:52 +0000 (12:28 +0200)]
Simplify NS font driver draw, merge from Macport.
* macfont.m (macfont_draw): Merge changes from Macport.
* nsterm.m (ns_draw_glyph_string): Move isComposite and end from
macfont.m, call draw with adjusted arguments so font drivers
don't need to do that.
* nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
nsterm.m now.
Martin Rudalics [Sun, 25 May 2014 10:06:35 +0000 (12:06 +0200)]
Remove interactive specification from window--dump-frame.
* window.el (window--dump-frame): Remove interactive
specification.
Andreas Schwab [Sun, 25 May 2014 08:08:24 +0000 (10:08 +0200)]
Support shifted keypad keys in xterm
* term/xterm.el (xterm-function-map): Add mapping for shifted
keypad keys.
Glenn Morris [Sun, 25 May 2014 01:18:16 +0000 (18:18 -0700)]
* NEWS addition
Glenn Morris [Sun, 25 May 2014 00:31:06 +0000 (17:31 -0700)]
NEWS markup fix
Paul Eggert [Sat, 24 May 2014 22:23:47 +0000 (15:23 -0700)]
Specify coding if Latin-1 Emacs would misinterpret.
* doc/misc/htmlfontify.texi, doc/misc/org.texi:
* etc/ETAGS.EBNF, etc/NEWS, etc/ORG-NEWS: Add "coding: utf-8".
Fixes: debbugs:17575
Paul Eggert [Sat, 24 May 2014 21:28:43 +0000 (14:28 -0700)]
* xdisp.c (safe__call1, safe__eval): Now static.
Daniel Colascione [Sat, 24 May 2014 20:43:40 +0000 (13:43 -0700)]
Fix subword-mode motion
* lisp/progmodes/subword.el (subword-find-word-boundary): Move point to
correct spot before search.
Fixes: debbugs:17580
Daniel Colascione [Sat, 24 May 2014 19:51:52 +0000 (12:51 -0700)]
Unbreak the build
* lisp/emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid
breaking the build.
Eli Zaretskii [Sat, 24 May 2014 19:19:27 +0000 (22:19 +0300)]
Fix last commits in xdisp.c, which caused a crash at startup on w32.
src/xdisp.c (safe__call): Accept va_list argument instead of '...'.
(safe_call, safe__call1): Construct a va_list argument for safe_call.
(safe_call1): Call safe_call instead of safe__call directly.
Fixes: debbugs:17577
Ken Brown [Sat, 24 May 2014 17:59:22 +0000 (13:59 -0400)]
Fix bug#17510 with a pointer freed more than once (Cygwin-w32-build).
* src/w32term.c (x_delete_display) [CYGWIN]: Don't free
dpyinfo->w32_id_name, to make sure it doesn't get freed more than
once.
Stefan Monnier [Sat, 24 May 2014 15:50:05 +0000 (11:50 -0400)]
* src/xdisp.c: Bind inhibit-quit during pre-redisplay-function.
(safe__call, safe__call1, safe__eval): New functions.
(safe_call): Use it.
(prepare_menu_bars): Use it for pre-redisplay-function.
(display_mode_element): Same for `:eval'.
Fixes: debbugs:17577
Leo Liu [Sat, 24 May 2014 15:14:47 +0000 (23:14 +0800)]
* calc/calc.el (math-bignum): Handle most-negative-fixnum.
Fixes: debbugs:17556
Eli Zaretskii [Sat, 24 May 2014 12:02:25 +0000 (15:02 +0300)]
Avoid marking too deep portions of stack in mark_stack.
src/alloc.c (garbage_collect_1): New function, with all of the guts
of Fgarbage_collect.
(mark_stack): Accept an argument END and don't mark Lisp objects
on the stack beyond the address given by END. Calculation of END
was moved to Fgarbage_collect.
(Fgarbage_collect): Calculate the end address of the stack portion
that needs to be examined by mark_stack, and pass that address to
garbage_collect_1, which will pass it to mark_stack. See
http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
for more details about the underlying problems. In particular,
this avoids dumping Emacs with the large hash-table whose value is
held in purify-flag for most of the time loadup.el runs.
Jan Djärv [Sat, 24 May 2014 08:41:19 +0000 (10:41 +0200)]
* xfns.c (x_window_property_intern): New function (code from
x_window_property).
(Fx_window_property): Call x_window_property_intern. If property
not found and NILP (source) and outer window != inner window,
check outer window for property.
Fixes: debbugs:17537
Glenn Morris [Fri, 23 May 2014 18:14:24 +0000 (14:14 -0400)]
Small fix for he-line-search-regexp
* lisp/hippie-exp.el (he-line-search-regexp):
Handle comint-prompt-regexp containing subgroups.
Fixes: debbugs:17529
Stephen Berman [Fri, 23 May 2014 16:54:35 +0000 (18:54 +0200)]
todo-mode.el: Remove dependence on auto-mode-alist.
* calendar/todo-mode.el: Remove dependence on auto-mode-alist,
to avoid errors when trying to create or visit a file foo.todo
located outside to todo-directory, and to allow having such files
without them being tied to Todo mode.
(todo-show, todo-move-category, todo-merge-category, todo-find-archive)
(todo-archive-done-item, todo-find-filtered-items-file)
(todo-filter-items, todo-find-item, todo-diary-goto-entry)
(todo-category-completions, todo-read-category): When visiting a
Todo file, make sure we're in the right mode and the buffer local
variables are set.
(todo-make-categories-list, todo-reset-nondiary-marker)
(todo-reset-done-string, todo-reset-comment-string): After
processing all Todo files, kill the buffers of those files that
weren't being visited before the processing.
(todo-display-as-todo-file, todo-add-to-buffer-list)
(todo-visit-files-commands): Comment out.
(todo-modes-set-3, todo-mode): Comment out additions to find-file-hook.
(auto-mode-alist): Remove add-to-list calls making Todo file
extensions unrestrictedly tied to Todo modes.
* doc/misc/todo-mode.texi: Update in light of changes due to bug#17482.
Replace numerous mistaken uses of literal quotes with proper
Texinfo markup.
(Todo Mode Entry Points): Comment out reference to using find-file
or Dired to visit Todo files, since this has been disabled (bug#17482).
Stefan Monnier [Fri, 23 May 2014 16:17:14 +0000 (12:17 -0400)]
* lisp/emacs-lisp/nadvice.el (advice--member-p): Change second arg.
(advice-function-member-p): Tell it to check both names and functions.
(advice--add-function): Adjust call accordingly.
Fixes: debbugs:17531
Stefan Monnier [Fri, 23 May 2014 15:54:44 +0000 (11:54 -0400)]
* lisp/minibuffer.el (completion--sreverse): Remove.
(completion--common-suffix): Use `reverse' instead.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-group): Use `reverse' on strings.
Stephen Berman [Fri, 23 May 2014 12:10:50 +0000 (14:10 +0200)]
* calendar/todo-mode.el: Miscellaneous bug fixes.
(todo-delete-file): When deleting an archive but not its todo
file, make sure to update the todo file's category sexp.
(todo-move-category): Keep the moved category's name unless the
file moved to already has a category with that name. If the
numerically last category of the source file was moved, make the
first category current to avoid selecting a nonexisting category.
(todo-merge-category): Fix implementation to make merging to a
category in another file work as documented. Eliminate now
insufficient and unnecessary renaming of archive category, correct
document string accordingly, and clarify it. If the numerically
last category of the source file was merged, make the first
category current to avoid selecting a nonexisting category.
(todo-archive-done-item): When there are marked items and point
happens to be on an unmarked item, ignore the latter. Don't leave
point below last item after archiving marked items.
(todo-unarchive-items): Fix logic to ensure unarchiving an item
from an archive with only one category deletes the archive only
when the category is empty after unarchiving. Make sure the todo
file's category sexp is updated.
(todo-read-file-name): Allow an existing file name even when it is
not required (todo-move-category needs this to work as documented).
(todo-add-file): Call todo-validate-name to reject the name of an
existing todo file (needed due to fix in todo-read-file-name).
(todo-reset-nondiary-marker): Also reset in filtered items files.
(todo-reset-done-string, todo-reset-comment-string): Also reset in
regexp filtered items files.
(todo-reset-highlight-item): Also reset in filtered items files.
Fix incorrect variable reference in document string.
Glenn Morris [Thu, 22 May 2014 19:56:49 +0000 (15:56 -0400)]
* lisp/shell.el (shell-mode) <shell-dirstack-query>: Bypass bash aliases.
Paul Eggert [Thu, 22 May 2014 16:40:35 +0000 (09:40 -0700)]
Supply malloc and alloc_size attributes for extern allocators.
This documents the C API, and helps GCC generate a bit better code.
* conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
(ATTRIBUTE_MALLOC_SIZE): New macros.
* gmalloc.c (malloc, realloc, calloc):
* gtkutil.h (malloc_widget_value):
* lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
(xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
Use them.
Glenn Morris [Thu, 22 May 2014 06:36:37 +0000 (23:36 -0700)]
* window.el (window--dump-frame): Avoid error in --without-x builds.
Paul Eggert [Thu, 22 May 2014 05:00:39 +0000 (22:00 -0700)]
Fix port to 32-bit AIX.
* configure.ac (opsys): On Power Architecture, treat release 7 of
AIX like releases 5 and 6.
* src/unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
twice. _text already includes this offset.
(unrelocate_symbols): Don't cast 64-bit integer to pointer.
Fixes: debbugs:17540
Leo Liu [Thu, 22 May 2014 04:30:48 +0000 (12:30 +0800)]
* sequences.texi (Sequence Functions): Don't mention when and how
SEQ to nreverse is mutated.
Glenn Morris [Thu, 22 May 2014 02:33:07 +0000 (19:33 -0700)]
Tweak previous bytecomp-tests.el change
* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
Fix handling of temporary elc files.
Glenn Morris [Thu, 22 May 2014 01:16:37 +0000 (21:16 -0400)]
Remove some stray test tempfiles
* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
Avoid leaving empty .elc tempfiles behind.
Glenn Morris [Thu, 22 May 2014 01:09:51 +0000 (21:09 -0400)]
* fns-tests.el (fns-tests-nreverse): Update for changed string behavior.
Glenn Morris [Wed, 21 May 2014 20:07:27 +0000 (16:07 -0400)]
* lisp/nxml/nxml-mode.el (xml-mode): Only define this alias once.
Paul Eggert [Wed, 21 May 2014 19:51:58 +0000 (12:51 -0700)]
Don't assume that ImageMagick uses a 16-bit quantum.
* image.c (imagemagick_load_image): Port to hosts that do not use
a 16-bit quantum, i.e., QuantumRange does not equal 65535.
Fixes: debbugs:17519
Eli Zaretskii [Wed, 21 May 2014 16:35:31 +0000 (19:35 +0300)]
Fix bug #17532 with unclear docs of setting frame's font.
lisp/frame.el (set-frame-font): Doc fix.
lisp/menu-bar.el (menu-set-font): Doc fix.
doc/emacs/frames.texi (Fonts): Clarify which frames are affected by
setting font from the menu and in default-frame-alist.
Eli Zaretskii [Wed, 21 May 2014 15:03:18 +0000 (18:03 +0300)]
Fix bug #17539 with infinite recursion during scroll commands.
src/xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
when closest_pos is identical to to_charpos, don't recurse, since
we already tried that, and failed.
Leo Liu [Wed, 21 May 2014 03:49:58 +0000 (11:49 +0800)]
* doc/lispref/sequences.texi (Sequence Functions): Update nreverse.
* src/fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
Dmitry Gutov [Wed, 21 May 2014 02:14:38 +0000 (05:14 +0300)]
Replace uses of `save-buffer' with `write-region'
* lisp/emacs-lisp/package.el (package--download-one-archive): Use
`write-region' instead of `save-buffer' to avoid running various
hooks.
(describe-package-1): Same. Insert newline at the end of the
buffer if appropriate.
Fixes: debbugs:17155
Daniel Colascione [Wed, 21 May 2014 01:55:54 +0000 (18:55 -0700)]
File-local-variable support for sh-script; add mksh support
* lisp/files.el (interpreter-mode-alist): Add mksh.
* lisp/progmodes/sh-script.el (sh-ancestor-alist): Add mksh, a pdksh
derivative.
(sh-alias-alist): Alias /system/bin/sh (Android's system shell) to
mksh. Improve custom spec; allow regular expressions.
(sh-shell): Delegate name splitting to `sh-canonicalize-shell'.
(sh-after-hack-local-variables): New function.
(sh-mode): Use it; respect file-local `sh-shell' variable.
(sh-set-shell): Use `sh-canonicalize-shell' instead of open-coding
the normalization.
(sh-canonicalize-shell): Rewrite to support regexes.
Daniel Colascione [Wed, 21 May 2014 01:54:33 +0000 (18:54 -0700)]
File-local-variable support for sh-script; add mksh support
* lisp/files.el (interpreter-mode-alist): Add mksh.
* lisp/progmodes/sh-script.el (sh-ancestor-alist): Add mksh, a pdksh
derivative.
(sh-alias-alist): Alias /system/bin/sh (Android's system shell) to
mksh. Improve custom spec; allow regular expressions.
(sh-shell): Delegate name splitting to `sh-canonicalize-shell'.
(sh-after-hack-local-variables): New function.
(sh-mode): Use it; respect file-local `sh-shell' variable.
(sh-set-shell): Use `sh-canonicalize-shell' instead of open-coding
the normalization.
(sh-canonicalize-shell): Rewrite to support regexes.
Fixes: debbugs:17333
Leo Liu [Wed, 21 May 2014 00:41:21 +0000 (08:41 +0800)]
* emacs-lisp/cl-lib.el (cl-endp): Fix last change.
Juri Linkov [Tue, 20 May 2014 21:20:36 +0000 (00:20 +0300)]
* lisp/avoid.el (mouse-avoidance-banish-position): Fix defcustom :options
to allow changing its value with `set-variable'.
Fixes: debbugs:17439
Juri Linkov [Tue, 20 May 2014 21:14:44 +0000 (00:14 +0300)]
* lisp/avoid.el (mouse-avoidance-set-mouse-position): Don't raise frame.
(mouse-avoidance-ignore-p): Remove `switch-frame', add `focus-out'.
Add more modifiers: meta, control, shift, hyper, super, alt.
Fixes: debbugs:17439
Stefan Monnier [Tue, 20 May 2014 20:12:30 +0000 (16:12 -0400)]
* lisp/progmodes/scheme.el (scheme-mode-syntax-table): Remove hack for
#; comments.
(scheme-syntax-propertize, scheme-syntax-propertize-sexp-comment):
New functions.
(scheme-mode-variables): Set syntax-propertize-function instead of
font-lock-syntactic-face-function.
(scheme-font-lock-syntactic-face-function): Delete.
Stefan Monnier [Tue, 20 May 2014 18:55:41 +0000 (14:55 -0400)]
* lisp/emacs-lisp/lisp.el (end-of-defun): Ensure we move.
Fixes: debbugs:17274
Eli Zaretskii [Tue, 20 May 2014 16:28:39 +0000 (19:28 +0300)]
Fix bug #17524 with crashes in creating a new frame with invalid font.
src/w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
unwinding when frame's faces were not initialized yet, increment
the frame's image-cache reference count before calling
x_free_frame_resources. Don't dereference
dpyinfo->terminal->image_cache if it is NULL.
Glenn Morris [Tue, 20 May 2014 15:46:21 +0000 (08:46 -0700)]
* lisp/vc/vc-rcs.el: Comment.
Michael Albinus [Tue, 20 May 2014 08:25:18 +0000 (10:25 +0200)]
* dbusbind.c (xd_signature): Revert last 2 patches.
Paul Eggert [Tue, 20 May 2014 07:59:28 +0000 (00:59 -0700)]
Fix rcs2log problems with CVS.
Problem reported by Glenn Morris in
<http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00277.html>.
Plus, fix some security and filename quoting problems.
* rcs2log (logdir): Prefer mktemp if available.
(logdir, llogdir): Work even if TMPDIR begins with '-' or has spaces.
(output_authors, main awk script): Parse more-recent CVS output format.
Leo Liu [Tue, 20 May 2014 00:59:36 +0000 (08:59 +0800)]
* cl.texi (List Functions, Efficiency Concerns): Update cl-endp.
Paul Eggert [Mon, 19 May 2014 19:19:05 +0000 (12:19 -0700)]
Allow any non-nil value to count as true in bool-vector.
Likewise for xd_signature in dbusbind.c.
This is more consistent with the usual practice in Emacs, which is
that any non-nil value counts as true.
* doc/lispref/sequences.texi (Bool-Vectors): Coalesce discussion of how to
print them. bool-vector's args need not be t or nil.
* src/alloc.c (Fbool_vector): Don't require args to be t or nil.
* src/dbusbind.c (xd_signature): Likewise, for booleans.
* src/data.c, lisp.h (Qbooleanp):
* src/lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
Eli Zaretskii [Mon, 19 May 2014 16:59:50 +0000 (19:59 +0300)]
src/lisp.h: Fix typos in a comment.
Leo Liu [Mon, 19 May 2014 16:08:40 +0000 (00:08 +0800)]
* emacs-lisp/cl-lib.el (cl-endp): Conform to CL's semantics.
Dmitry Antipov [Mon, 19 May 2014 07:54:39 +0000 (11:54 +0400)]
* font.c (font_matching_entity): Extract font-entity object
from the vector of matching entities (Bug#17486).
Dmitry Antipov [Mon, 19 May 2014 07:49:09 +0000 (11:49 +0400)]
* src/lisp.h (CHECK_BOOLEAN): New function.
* src/alloc.c (Fbool_vector): New function.
(syms_of_alloc): Defsubr it.
* src/data.c (Qbooleanp): New symbol.
(syms_of_data): DEFSYM it.
* src/dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
* doc/lispref/sequences.texi (Bool-vectors): Mention bool-vector.
Paul Eggert [Mon, 19 May 2014 05:07:45 +0000 (22:07 -0700)]
Spelling fix.