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.
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.
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.
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.
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.
Michael Albinus [Tue, 13 May 2014 08:54:08 +0000 (10:54 +0200)]
* net/browse-url.el (browse-url):
Use `unhandled-file-name-directory' when setting `default-directory',
in order to circumvent stalled remote connections.
Glenn Morris [Sat, 10 May 2014 21:59:05 +0000 (14:59 -0700)]
admin.el tweaks
* admin/admin.el (set-version-in-file): Don't set identical version.
(set-version): Provide default version number.
(set-version, set-copyright): Give start/end messages.
Stefan Monnier [Sat, 10 May 2014 20:07:01 +0000 (16:07 -0400)]
* lisp/emacs-lisp/nadvice.el: Support adding a given function multiple times.
(advice--member-p): If name is given, only compare the name.
(advice--remove-function): Don't stop at the first match.
(advice--normalize-place): New function.
(add-function, remove-function): Use it.
(advice--add-function): Pass the name, if any, to
advice--remove-function.
Juri Linkov [Thu, 8 May 2014 19:22:43 +0000 (22:22 +0300)]
Backport dired-check-switches from trunk.
* lisp/dired.el (dired-check-switches, dired-switches-recursive-p): New functions.
(dired-switches-escape-p, dired-move-to-end-of-filename):
Use `dired-check-switches'.
(dired-insert-old-subdirs, dired-build-subdir-alist)
(dired-sort-R-check): Use `dired-switches-recursive-p'.
Glenn Morris [Thu, 8 May 2014 06:58:46 +0000 (23:58 -0700)]
test/automated/vc-bzr.el: revise previous change
* test/automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
(vc-bzr-test-faulty-bzr-autoloads):
Give bzr a temporary home-directory, in case the real one is missing.
Simply disabling logging wasn't enough.
Stefan Monnier [Thu, 8 May 2014 01:46:15 +0000 (21:46 -0400)]
* lisp/xt-mouse.el: Drop spurious/oddly shaped events.
(xterm-mouse--read-event-sequence-1000): Return nil if something looks fishy.
(xterm-mouse-event): Propagate it.
(xterm-mouse-translate-1): Handle it.
Stephen Berman [Wed, 7 May 2014 09:31:27 +0000 (11:31 +0200)]
todo-mode.el: Don't drop full parameter list.
* calendar/todo-mode.el (todo-insert-item--apply-args): When all
four slots of the parameter list are filled, make sure to pass it
to the argument list of todo-insert-item--basic.
Michael Albinus [Tue, 6 May 2014 09:51:05 +0000 (11:51 +0200)]
Fix Bug#17415.
* net/tramp-sh.el (tramp-uudecode): Replace the hard-coded temporary
file name by a format specifier.
(tramp-remote-coding-commands): Enhance docstring.
(tramp-find-inline-encoding): Replace "%t" by a temporary file name.
Michael Albinus [Tue, 6 May 2014 08:42:53 +0000 (10:42 +0200)]
Fix Bug#17295.
* net/tramp-sh.el (tramp-remote-process-environment): Remove
HISTFILE and HISTSIZE; it's too late to set them here. Add
:version entry.
(tramp-open-shell): Do not let-bind `tramp-end-of-output'. Add
"HISTSIZE=/dev/null" to the shell's env arguments. Do not send
extra "PSx=..." commands.
(tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
Glenn Morris [Tue, 6 May 2014 03:53:31 +0000 (20:53 -0700)]
find-gc.el misc fixes
The whole file looks obsolete and/or broken.
* lisp/emacs-lisp/find-gc.el (find-gc-source-directory): Give it a value.
(find-gc-source-files): Update some names.
(trace-call-tree): Simplify and update. Avoid predictable temp-file names.
Stefan Monnier [Mon, 5 May 2014 23:50:20 +0000 (19:50 -0400)]
* lisp/xt-mouse.el (xterm-mouse--read-event-sequence-1000):
Always store button numbers in the same way in xterm-mouse-last;
Don't burp is xterm-mouse-last is not set as expected.
Never return negative indices.
Dmitry Gutov [Mon, 5 May 2014 23:18:18 +0000 (03:18 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Backtrack one char if the global/char-literal var matcher hits
inside a string. The next char could be the beginning of an
expression expansion.
* test/automated/ruby-mode-tests.el
(ruby-interpolation-after-dollar-sign): New test.
Paul Eggert [Sun, 4 May 2014 18:51:32 +0000 (11:51 -0700)]
Revert recent libpng changes.
They fix only bugs that aren't being reported, so it may be better
to do them on the trunk.
* configure.ac (PNG_CFLAGS): Remove. All uses removed.
(LIBPNG): Don't be consistent about -lpng16 versus -lpng.
Ignore libpng-config's exit status. Always append -lz -lm.
* src/Makefile.in (PNG_CFLAGS): Remove; all uses removed.
* src/image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
Paul Eggert [Sat, 3 May 2014 21:06:04 +0000 (14:06 -0700)]
Require ImageMagick >= 6.3.5, due to PixelSetMagickColor.
* configure.ac (IMAGEMAGICK_MODULE): Bump prereq from 6.2.8 to 6.3.5.
A more-complicated fix would be to remove uses of PixelSetMagickColor,
introduced in ImageMagick 6.3.5 (Sept. 2007).
Paul Eggert [Sat, 3 May 2014 20:13:10 +0000 (13:13 -0700)]
Handle systems without WCONTINUED consistently.
* lib-src/emacsclient.c (WCONTINUED): Move to ../src/syswait.h.
* src/process.c (handle_child_signal): Remove WCONTINUED ifdef,
because WCONTINUED is always defined now.
* src/syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
Stefan Monnier [Sat, 3 May 2014 02:27:46 +0000 (22:27 -0400)]
* lisp/vc/ediff-diff.el (ediff-set-fine-diff-properties-in-one-buffer):
Use nil rather than `default' for the "default" appearance.
* lisp/vc/ediff-util.el (ediff-inferior-compare-regions)
(ediff-toggle-autorefine, ediff-unselect-difference): Don't use
a misleading `default' value when it's really a boolean.
* lisp/vc/ediff-init.el (ediff-set-overlay-face): Don't set help-echo if the
overlay is not visible.
Paul Eggert [Fri, 2 May 2014 19:34:03 +0000 (12:34 -0700)]
Consult libpng-config more consistently.
* configure.ac (edit_cflags): Move this up and to the top level,
so that PNG_CFLAGS can use it too.
(PNG_CFLAGS): New var.
(png_longjmp): Use PNG_CFLAGS when checking.
(LIBPNG): Be consistent about -lpng16 etc; e.g., don't use -lpng16
in some places and -lpng in others. Test libpng-config's exit
status. If it succeeds, use its output rather than appending -lz -lm.
* src/Makefile.in (PNG_CFLAGS): New var.
(ALL_CFLAGS): Use it.
* src/image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
CFLAGS now handles this.
* todo-mode.texi: Update, improve exposition, add cross
references, fix typos.
(Inserting New Items, Editing Item Headers and Text): Rewrite to
document new user interface.
Stephen Berman [Fri, 2 May 2014 13:58:23 +0000 (15:58 +0200)]
Extend todo item insertion UI to item editing.
* calendar/todo-mode.el: Reimplement item editing to have the same
basic user interface as item insertion, and make small UI and
larger internal improvements to the latter.
(todo-insert-item): Add reference to the Todo mode user manual to
the documentation string.
(todo-insert-item--basic): Rename from todo-basic-insert-item and
adjust all callers. Change signature to combine diary and
nonmarking arguments. Incorporate functionality of deleted item
copying command and add error checking. Remove detailed
descriptions of the arguments from the documentation string, since
this is treated in the Todo mode user manual.
(todo-copy-item, todo-edit-multiline-item)
(todo-edit-done-item-comment, todo-edit-item-header)
(todo-edit-item-time, todo-edit-item-date-from-calendar)
(todo-edit-item-date-to-today, todo-edit-item-date-day-name)
(todo-edit-item-date-year, todo-edit-item-date-month)
(todo-edit-item-date-day, todo-edit-item-diary-nonmarking):
Remove.
(todo-edit-item): Reimplement as wrapper command for
todo-edit-item--next-key and make it distinguish done and not done
todo items.
(todo-edit-item--text): New function, replacing old command
todo-edit-item and incorporating deleted commands
todo-edit-multiline-item and todo-edit-done-item-comment.
(todo-edit-item--header): Rename from todo-basic-edit-item-header.
Use only numeric value of prefix argument. Remove detailed
descriptions of the arguments from the documentation string, since
this is treated in the Todo mode user manual.
(todo-edit-item--diary-inclusion): New function, replacing old
command todo-edit-item-diary-inclusion and incorporating and fixing
functionality of deleted command todo-edit-item-diary-nonmarking,
making sure to remove todo-nondiary-marker when adding
diary-nonmarking-symbol.
(todo-edit-category-diary-inclusion): Make sure to delete
diary-nonmarking-symbol when adding todo-nondiary-marker.
(todo-edit-category-diary-nonmarking): Fix indentation.
(todo-insert-item--parameters): Group diary and nonmarking
parameters together.
(todo-insert-item--apply-args): Adjust to signature of
todo-insert-item--basic and incorporate copy parameter.
Make small code improvements.
(todo-insert-item--next-param): Improve prompt and adjust it to
new parameter grouping. Remove obsolete code.
(todo-edit-item--param-key-alist)
(todo-edit-item--date-param-key-alist)
(todo-edit-done-item--param-key-alist): New defconsts.
(todo-edit-item--prompt): New variable.
(todo-edit-item--next-key): New function.
(todo-key-bindings-t): Bind "e" to todo-edit-item. Remove
bindings of deleted commands.
Eli Zaretskii [Fri, 2 May 2014 12:28:10 +0000 (15:28 +0300)]
Improve indexing in trouble-related sections of Emacs User manual.
doc/emacs/trouble.texi (Lossage, DEL Does Not Delete, Stuck Recursive)
(Screen Garbled, Text Garbled, After a Crash, Emergency Escape)
(Bug Criteria, Understanding Bug Reporting, Checklist, Service):
Improve indexing.
Stefan Monnier [Thu, 1 May 2014 15:15:46 +0000 (11:15 -0400)]
* src/intervals.c: Tighten assertions.
(create_root_interval): Make sure the interval is not empty.
(intervals_equal): Use booleans.
(rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
(balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
(balance_possible_root_interval): Simplify and use booleans.
(split_interval_right, split_interval_left): Check LENGTH, and remove
now redundant assertion.
(adjust_intervals_for_insertion): Remove now redundant assertions.
(delete_node, interval_deletion_adjustment)
(adjust_intervals_for_deletion, merge_interval_right)
(merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
(reproduce_interval): Make sure the interval is not empty.