Nicolas Petton [Tue, 13 Mar 2018 21:07:08 +0000 (22:07 +0100)]
Add URL handler for file-name-directory (Bug#30444)
* lisp/url/url-handlers.el (url-handler-file-name-directory): New
function which handles special cases for `file-name-directory' and
URLs.
* test/lisp/url/url-handlers-test.el: New file. Add tests for
`url-handler-file-name-directory'.
Michael Albinus [Sat, 17 Mar 2018 14:10:46 +0000 (15:10 +0100)]
Optimize tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp--test-expensive-test):
Make it a defsubst. Adapt all callees.
(tramp--test-print-duration): New defmacro.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links, tramp--test-special-characters):
Run some parts only if expensive tests are enabled. (Bug#30807)
Aaron Jensen [Sat, 17 Mar 2018 09:58:17 +0000 (10:58 +0100)]
In frameset save pixel values with frame-resize-pixelwise non-nil (Bug#30141)
* lisp/frameset.el (frameset--record-relationships): Replace
check for text width/height and replace with check for
frame-resize-pixelwise. (Bug#30141)
Noam Postavsky [Wed, 14 Mar 2018 02:17:43 +0000 (22:17 -0400)]
Improve word motion docs (Bug#30815)
* doc/lispref/positions.texi (Word Motion): Fix reference to
`char-script-table'.
* lisp/simple.el (backward-word):
* src/syntax.c (forward-word): Mention `char-script-table' and add
link to the 'Word Motion' manual section.
Reuben Thomas [Fri, 16 Mar 2018 10:50:21 +0000 (10:50 +0000)]
Call enchant-lsmod correctly when Enchant is installed with a suffix
* lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Cope with a
version suffix on the binary name, so enchant-2 is converted to
enchant-lsmod-2, not enchant-2-lsmod.
Paul Eggert [Thu, 15 Mar 2018 16:35:33 +0000 (09:35 -0700)]
Improve port to NetBSD tzalloc
Problem reported by Valery Ushakov (Bug#30738#13).
* src/editfns.c (tzlookup) [__NetBSD_Version__ < 700000000]:
If tzalloc fails for any reason other than memory exhaustion,
assume it’s because NetBSD 6 does not support tzalloc on
POSIX-format TZ strings, and fall back on tzdb if possible.
Eli Zaretskii [Thu, 15 Mar 2018 13:23:01 +0000 (15:23 +0200)]
Support variable-unquoting syntax in bat-mode
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Fontify
argument numbers in %~n. Suggested by Jostein Kjønigsen
<jostein@secure.kjonigsen.net> in emacs-devel.
* test/lisp/progmodes/bat-mode-tests.el
(bat-test-fontification-iter-var-1): Update the test to check also
the %~n construct.
Eli Zaretskii [Thu, 15 Mar 2018 06:36:09 +0000 (08:36 +0200)]
Minor copyedits in mule.texi
* doc/emacs/mule.texi (Recognize Coding, Fontsets): Minor changes
in wording. Suggested by Richard Stallman <rms@gnu.org> in
emacs-manual-bugs@gnu.org.
Stefan Monnier [Wed, 14 Mar 2018 16:14:01 +0000 (12:14 -0400)]
* lisp/desktop.el: Make use some "new" functionality
(desktop-files-not-to-save, desktop-clear):
Use \` and \' when we don't intend to match newlines.
(desktop-minor-mode-table): Remove auto-fill-function entry.
(desktop-buffer-info): Use :minor-mode-function instead.
(desktop--v2s): Use a closure rather than a backquoted lambda.
(desktop-save): Set 'lexical-binding' in the saved file.
Use 'utf-8-emacs' encoding rather than the old 'emacs-mule'.
(desktop-read): Use 'default-value' to get the global part of a hook.
Michael Albinus [Wed, 14 Mar 2018 15:21:06 +0000 (16:21 +0100)]
Extend ert to print duration of single tests
* lisp/emacs-lisp/ert.el (ert-test-result): New slot ´duration'.
(ert-run-or-rerun-test): Set it.
(ert-batch-print-duration): New defvar.
(ert-run-tests-batch): Print duration if needed.
* test/Makefile.in (TEST_PRINT_TEST_DURATION): New variable.
Noam Postavsky [Mon, 12 Mar 2018 00:47:12 +0000 (20:47 -0400)]
Fix line-wrapping for term.el (Bug#30775)
* lisp/term.el (term-emulate-terminal): Leave line-wrapping state if
point was moved after we entered it.
* test/lisp/term-tests.el (term-line-wrapping-then-motion): New test.
Eli Zaretskii [Tue, 13 Mar 2018 17:40:24 +0000 (19:40 +0200)]
Minor changes in mule.texi
* doc/emacs/mule.texi (International, Coding Systems)
(Bidirectional Editing): Minor wording changes and typo fixes.
Suggested by Michael Albinus <michael.albinus@gmx.de> in
emacs-manual-bugs@gnu.org.
Eli Zaretskii [Tue, 13 Mar 2018 16:00:23 +0000 (18:00 +0200)]
Avoid assertion violation under visual-order-cursor-movement
* src/xdisp.c (Fmove_point_visually): Don't let point exceed the
BEGV..ZV range. Signal Beginning of buffer error when there's a
before-string at BEGV. (Bug#30787)
* lisp/vc/ediff-util.el (ediff-recenter):
Don't try focus-frame on Emacs.
; * etc/NEWS: Mention this.
; Comments in subr.el mention VM as a user, however this is untrue since
; 2010-07. Ref https://bazaar.launchpad.net/~vm/vm/trunk/revision/840
; and 853.
Glenn Morris [Mon, 12 Mar 2018 18:25:40 +0000 (11:25 -0700)]
Replace use of the obsolete write-contents-hooks
* lisp/play/gametree.el (gametree-mode):
Replace write-contents-hooks, obsolete since 22.1,
with write-contents-functions.
; * lisp/files.el: Related comment.
Paul Eggert [Mon, 12 Mar 2018 17:35:25 +0000 (10:35 -0700)]
Revert overenthusiastic procfs fixup
Also, be more systematic in calls to string_to_number.
* src/sysdep.c (list_system_processes) [HAVE_PROCFS]: Allow pids
to be floating-point if they exceed fixnum range. This partially
reverts my patch 2018-03-09T20:06:05Z!eggert@cs.ucla.edu, which
went too far in fixing string-to-number mishandling.
Allow toggling Grep command abbreviation, and rename related symbols
* lisp/progmodes/grep.el (grep-find-hide): Rename 'grep-find-hide'
to 'grep-find-abbreviate'.
(grep-find-hide-properties): Rename to
'grep-find-abbreviate-properties'.
(grep-mode-font-lock-keywords): Even when 'grep-find-abbreviate'
is nil, fontify the verbose command options with property
'abbreviated-command', so that the toggling command can later find
these parts without refontifying.
(grep-find-show): Rename to 'grep-find-toggle-abbreviation',
simplify the code, and permit toggling the hidden command options.
(grep-mode-map): Add a menu-bar item and new separator for
'grep-find-toggle-abbreviation', and fix the incumbent separators
in the "Grep" menu-bar, of which only one was showing before this
commit, even though two were specified.
* etc/NEWS (grep):
* doc/emacs/building.texi (Grep Searching): Document these
changes, and mention 'grep-find-toggle-abbreviation'.
* doc/emacs/fixit.texi (Transpose): Mention and explain the new
command.
* editfns.c (Ftranspose_regions): Add an interactive calling
specification, and add documentation for it.
* lisp/image.el (image--get-image): Add documentation, and
check overlays for images too (since function 'put-image' from
the same library uses overlays to insert images).
(image-save): Use 'image--get-image'.
Paul Eggert [Sun, 11 Mar 2018 08:18:34 +0000 (00:18 -0800)]
Port to NetBSD tzalloc
Problem reported by Valery Ushakov (Bug#30738).
* src/editfns.c (xtzalloc): Remove.
(invalid_time_zone_specification): New function.
(tzlookup): Port to NetBSD, where tzalloc can fail when the TZ
string has an invalid value.
* doc/lispref/display.texi (ImageMagick Images): Remove an
outdated comment that references a fixed bug.
(SVG Images): Fix grammar, and call functions functions (there are
no commands in lisp/svg.el).
Eli Zaretskii [Sat, 10 Mar 2018 11:48:49 +0000 (13:48 +0200)]
Improve support for desktop restoration in daemon mode
* lisp/server.el (server-after-make-frame-hook): New hook.
(server-execute): Call it after creating a new frame or before
switching to a buffer shown in a client frame. (Bug#30421)
* doc/emacs/misc.texi (Saving Emacs Sessions): Adjust advice for
restoring desktop in daemon mode to the new hook.
* doc/lispref/frames.texi (Creating Frames, Standard Hooks):
Document server-after-make-frame-hook.
Paul Eggert [Fri, 9 Mar 2018 20:06:05 +0000 (12:06 -0800)]
Fix string-to-number C-level mishandling
* src/sysdep.c (list_system_processes):
* src/xfaces.c (Finternal_set_lisp_face_attribute_from_resource):
Defend against Fstring_to_number returning a float or a nonsense
integer.
Paul Eggert [Fri, 9 Mar 2018 04:55:55 +0000 (20:55 -0800)]
Avoid losing info when formatting integers
* doc/lispref/numbers.texi (Integer Basics): Clarify that
out-of-range integers are treated as floating point only when the
integers are decimal.
* etc/NEWS: Mention changes.
* src/editfns.c (styled_format): Use %.0f when formatting %d or %i
values outside machine integer range, to avoid losing info.
Signal an error for %o or %x values that are too large to be
formatted, to avoid losing info.
* doc/emacs/mini.texi (Completion Commands): Mention other keys
for 'next-completion' and 'previous-completion', and explain 'q'
and 'z' which are relatively new additions.
Eli Zaretskii [Thu, 8 Mar 2018 15:53:09 +0000 (17:53 +0200)]
More minor changes in the manual
* doc/emacs/display.texi (Useless Whitespace): Don't upcase "TAB"
and "SPC" when alluding to characters. Suggested by Richard
Stallman <rms@gnu.org>.
* doc/emacs/buffers.texi (Misc Buffer): Clarify what "read-only"
means for buffers.
(Buffers): Define and describe "buffer contents". Suggested by
Richard Stallman <rms@gnu.org>. (Bug#30685)
Eli Zaretskii [Thu, 8 Mar 2018 13:32:23 +0000 (15:32 +0200)]
Fix 'window-text-pixel-size' when display properties are around
* src/xdisp.c (Fwindow_text_pixel_size): Correct the result when
there's a display property at the TO position, and the call to
move_it_to overshoots. (Bug#30746)
Eli Zaretskii [Wed, 7 Mar 2018 19:51:59 +0000 (21:51 +0200)]
Minor improvements in manuals
* doc/lispref/variables.texi (Local Variables): Make more clear
that local bindings of 'let' are in effect only within the body.
Suggested by Marcin Borkowski <mbork@mbork.pl>, see
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00217.html
for the details.
* doc/emacs/programs.texi (Matching): Fix a typo. Reported by
Alex Branham <alex.branham@gmail.com> in emacs-manual-bugs@gnu.org.
Improve indexing.
Eli Zaretskii [Wed, 7 Mar 2018 19:02:24 +0000 (21:02 +0200)]
Minor copyedits in display.texi
* doc/emacs/display.texi (Highlight Interactively)
(Useless Whitespace, Line Truncation, Visual Line Mode): Minor
changes of wording and typo corrections. Suggested by Michael
Albinus <michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org.