Eli Zaretskii [Tue, 20 Mar 2018 09:34:14 +0000 (11:34 +0200)]
Minor improvements in building.texi
* doc/emacs/building.texi (Compilation Shell): Mention that this
section is for local compilation buffers.
(Compilation, Compilation Mode): Mention that 'g' is bound to
'recompile' in compilation buffers.
(Grep Searching): Add a cross-reference to "Compilation Mode".
Suggested by Michael Albinus <michael.albinus@gmx.de> in
emacs-manual-bugs@gnu.org.
Andrew G Cohen [Tue, 20 Mar 2018 05:28:21 +0000 (13:28 +0800)]
Set gnus-newsgroup-selection in the summary buffer
* lisp/gnus/nnselect.el (nnselect-retrieve-headers,
nnselect-request-thread): Ensure that gnus-newsgroup-selection is
set locally in the summary buffer.
Paul Eggert [Mon, 19 Mar 2018 23:49:09 +0000 (16:49 -0700)]
Improve port to NetBSD tzalloc
Problem reported by Valery Ushakov (Bug#30738#22).
* src/editfns.c (HAVE_TZALLOC_BUG): New macro.
(tzlookup): Use it. Compile on all platforms, not just on NetBSD.
Eli Zaretskii [Mon, 19 Mar 2018 19:53:52 +0000 (21:53 +0200)]
Yet more proofreading of the Emacs manual
* doc/emacs/building.texi (Compilation, Grep Searching)
(Debuggers, GUD Customization, Source Buffers)
(Breakpoints Buffer, Threads Buffer): Minor fixes and updates.
Suggested by Michael Albinus <michael.albinus@gmx.de> in
emacs-manual-bugs@gnu.org.
Karl Fogel [Mon, 19 Mar 2018 17:21:03 +0000 (12:21 -0500)]
Revert move of interactive `transpose-regions' to Lisp
This reverts my commit 3a3aa0e056a of 2018-03-18 at 21:43:18 UTC.
I thought consensus had been reached, but it had not: Eli Zaretskii
felt the pre-3a3aa0e056a situation was fine and would not like to
see it changed without at least further discussion.
Alan Third [Mon, 19 Mar 2018 15:04:40 +0000 (15:04 +0000)]
Fix frame resize flicker on macOS (bug#30699)
* src/nsterm.h (ns_enable_screen_updates): New function.
* src/nsterm.m (ns_enable_screen_updates):
(ns_disable_screen_updates): New functions.
(disable_screen_updates_count): Count of number of times we've called
NSDisableScreenUpdates.
(x_set_window_size): Disable screen updates when not in a live resize
loop.
* src/xdisp.c (redisplay_internal): Reenable screen updates when
redisplay doesn't complete due to a popup.
(unwind_redisplay): Reenable screen updates.
* doc/emacs/rmail.texi (Rmail): Mention Gnus.
(Rmail Basics, Rmail Scrolling): Improve cross-references and
indexing.
(Rmail Motion): Minor improvements.
(Rmail Inbox): Remove outdated text about Babyl format.
(Rmail Files): Formatting changes. Comment out
set-rmail-inbox-list in the table of commands, as it is commented
out in the text that follows.
(Rmail Output, Rmail Labels, Rmail Reply, Rmail Make Summary):
Minor copyedits.
(Rmail Summary Edit): Document
rmail-summary-scroll-between-messages.
(Rmail Editing): Improve indexing.
(Movemail): Fix typos.
(Remote Mailboxes): Use "POP3" rather than "POP".
* doc/emacs/custom.texi (Early Init File): Add more details about
which variables must be set in the early init file rather than the
regular init file. See
https://lists.nongnu.org/archive/html/bug-gnu-emacs/2018-02/msg00827.html
* lisp/emacs-lisp/package.el (package-enable-at-startup): Update
docstring to note that packages are now made available before loading
the init file, rather than afterwards. See
https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00632.html
(package-load-list): Refer to "making available" rather than "loading"
for packages. See
https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00298.html
* lisp/startup.el (command-line): Call `custom-reevaluate-setting' on
predefined variables before loading the early init file and before
`package-initialize' is called. This prevents
`Info-default-directory-list' from being unbound when
`package-initialize' tries to access it during startup. See
https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00545.html
* lisp/emacs-lisp/package.el (package-initialize): Issue a warning
if called twice.
See: https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00626.html
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00301.html
Karl Fogel [Sun, 18 Mar 2018 21:43:18 +0000 (16:43 -0500)]
Move interactive `transpose-regions' to Lisp
Define `transpose-regions' in Lisp, because its complex interactive
spec was ungainly in C, and change the C version to non-interactive
`transpose-regions-internal'. The Lisp function is just a wrapper
around the C function, which still does all the work.
* lisp/simple.el (transpose-regions): New wrapper function, with
interactive spec taken from old C `transpose-regions'.
From: Karl Fogel
To: Emacs Development Cc: Richard Copley, Charles A. Roelli
Subject: Re: [Emacs-diffs] master b88e7c8: \
Make transpose-regions interactive (Bug#30343)
Date: Fri, 16 Mar 2018 10:23:31 -0500
Message-ID: <87po44jb7w.fsf@red-bean.com>
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.