Eric Abrahamsen [Sat, 30 Dec 2017 18:12:22 +0000 (10:12 -0800)]
Adjust eieio persistence tests for expected failure
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
(eieio-test-persist-hash-and-vector,
eieio-test-persist-interior-lists): Persistence does not currently
handle deeply-nested objects. Expect current failures, and mark for
future fixes.
Eric Abrahamsen [Fri, 29 Dec 2017 02:14:47 +0000 (18:14 -0800)]
Let eieio-persistent-read read what object-write has written
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
`object-write' may quote lists inside hash tables and vectors, so
unquote those lists here.
This patch allows the eieio-persistent write/restore process to
perform a clean round trip. It only handles a very specific and
limited range of object structures, but at least the write and read
procedures match.
Eric Abrahamsen [Tue, 19 Dec 2017 22:56:13 +0000 (14:56 -0800)]
Handle possible classtype values in eieio-persistent-read
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
The function `eieio-persistent-slot-type-is-class-p' could return
either a single class, or a list of classes.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
(hash-equal): New comparison test for hash-tables.
(persist-test-save-and-compare): Use test for hash-tables.
(eieio-test-persist-hash-and-vector,
eieio-test-persist-interior-lists): New tests.
Paul Eggert [Wed, 21 Mar 2018 23:08:27 +0000 (16:08 -0700)]
Port data-tests-popcnt to 32-bit Emacs
* test/src/data-tests.el (data-tests-popcnt):
Don’t assume Emacs integers can represent 32-bit quantities.
Change to a simple and straightforward approach, since runtime
performance is not important here.
* lisp/vc/vc-git.el (vc-git-stash-read-history)
(vc-git-stash-read): New history variable and function.
(vc-git-stash-show, vc-git-stash-apply, vc-git-stash-pop): Update
their interactive specifications.
Glenn Morris [Wed, 21 Mar 2018 18:13:53 +0000 (14:13 -0400)]
Quieten eieio-test compilation
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el:
Remove obsolete name args where not being explicitly tested.
Alan Mackenzie [Wed, 21 Mar 2018 17:36:34 +0000 (17:36 +0000)]
Firm up documentation of generalized variables
* doc/lispref/variables.texi (Generalized Variables)
(Setting Generalized Variables): Define a generalized variable as something
setf can write to. Remove the insinuation that hackers have poor memories.
State explicitly that the list of GVs given is complete. Remove the
suggestion that `setf' has superseded, or is in the process of superseding,
`setq'. Make minor corrections to the English.
Eli Zaretskii [Wed, 21 Mar 2018 16:57:41 +0000 (18:57 +0200)]
Improve documentation of Auto-Revert mode
* doc/emacs/files.texi (Reverting): Mention that Aut-Revert
applies to Dired buffers as well. Suggested by Michael Albinus
<michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org.
Eli Zaretskii [Wed, 21 Mar 2018 16:49:29 +0000 (18:49 +0200)]
Improvements in dired.texi
* doc/emacs/dired.texi (Dired): Mention that Dired works with
remote directories.
(Dired Enter): ls-lisp is used on some remote systems as well.
(Dired Navigation): Mention and index the command names.
(Dired Deletion): Document the 'always' value of
dired-recursive-deletes. Mention the alternative deletion method.
(Marks vs Flags): Fix spelling of Auto-Revert mode. Document what
marking does on a subdirectory header line.
(Operating on Files): Document that 'Z' uses gzip or compress.
(Comparison in Dired): Mention ediff-files.
(Misc Dired Features): Fix a typo. Suggested by Michael Albinus
<michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org.
Noam Postavsky [Tue, 20 Mar 2018 23:18:33 +0000 (19:18 -0400)]
Revert "Support all perl variable declarators and prefixes"
It highlights normal variable names in perl programs (Bug#30812).
* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression)
(perl-font-lock-keywords-2): Restore values prior to Bug#27613 fix.
Don't merge to master, we will fix Bug#27613 properly there (it's too
close to release to do that on emacs-26).
Paul Eggert [Tue, 20 Mar 2018 16:54:20 +0000 (09:54 -0700)]
Port to 32-bit sparc64
Problem reported by Ulrich Mueller; fix suggested by Eli Zaretskii
and Andreas Schwab (Bug#30855).
* src/alloc.c (mark_memory): Call mark_maybe_object only on
pointers that are properly aligned for Lisp_Object.
Nick Helm [Sun, 18 Mar 2018 08:05:44 +0000 (21:05 +1300)]
Improve documentation of 'with-help-window'
* doc/lispref/help.texi (Help Functions): Change variable name
to 'buffer-or-name'.
* lisp/help.el (with-help-window): Change variable name to
'buffer-or-name' and rewrite the doc string, adding reference
to 'help-window-setup'. (Bug#30792)
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)