(cl--old-macroexpand): Remove.
(cl--sm-macroexpand): Change its calling convention, so it can use
advice-add. Extend re-binding treatment of vars so it applies to all
var-introducing forms rather than only to 'let'.
(cl-symbol-macrolet): Use advice-add rather than fset.
Juri Linkov [Tue, 6 Feb 2018 21:20:10 +0000 (23:20 +0200)]
Support occur command operating on the region from Isearch.
* lisp/isearch.el (isearch-occur): Use region-bounds as region arg of occur.
(isearch-query-replace): Use use-region-p.
* lisp/replace.el (occur--region-start-line): Rename from
occur--matches-threshold.
(occur): Use complete lines when region is active for line-oriented occur.
(occur-engine): Count lines either from occur--region-start-line or 1.
Juri Linkov [Mon, 5 Feb 2018 21:54:27 +0000 (23:54 +0200)]
Support list-matching-lines-jump-to-current-line for context lines.
* lisp/replace.el (occur--orig-line-str): Remove.
(occur): Remove occur--orig-line-str.
(occur-engine): Use add-face-text-property to add the face
list-matching-lines-current-line-face to the current line.
Use previous-single-property-change to find occur--final-pos.
(occur-context-lines): New args orig-line and multi-occur-p.
Find the current line in context lines and add face to it.
(Bug#30281)
Eli Zaretskii [Sun, 4 Feb 2018 20:15:05 +0000 (22:15 +0200)]
Yet another round of fixing the Emacs manual
* doc/emacs/cmdargs.texi (Action Arguments): Rearrange text
describing what happens when Emacs is invoked with several file
arguments. Suggested by Grant Rettke <gcr@wisdomandwonder.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/xresources.texi (GTK styles):
* doc/emacs/mini.texi (Passwords):
* doc/emacs/frames.texi (Scroll Bars): Use "cannot" instead of
"can not".
* doc/emacs/macos.texi (Mac / GNUstep Basics): Clarify the effect
of ns-right-alternate-modifier when its value is 'none'.
Suggested by Wanderson Ferreira <iagwanderson@gmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/calendar.texi (Importing Diary, Appointments): Now
sub-sections of Diary.
* doc/emacs/emacs.texi (Top):
* doc/emacs/calendar.texi (Diary): Adjust menus to the above
change. Suggested by Isaac Carter <icarter1391@gmail.com> in
emacs-manual-bugs@gnu.org.
Philipp Stephani [Wed, 30 Mar 2016 17:22:56 +0000 (19:22 +0200)]
Fix handling of modifier keys on macOS
* src/nsterm.m (keyDown:): Distinguish between shift-like and
control-like modifier keys. Allow treating ⌘ as shift-like
modifier (e.g. for the Gujarati – QUERTY input method, where ⌘
switches to QUERTY.)
* lisp/cus-start.el (standard): Change nil to none for
ns-command-modifier; update description.
Michael Albinus [Sun, 4 Feb 2018 12:25:10 +0000 (13:25 +0100)]
Make tramp-archive fit for older Emacsen
* lisp/net/tramp-archive.el (tramp-archive-enabled)
(tramp-archive-file-name-handler-alist)
(tramp-archive-file-name-handler): Adapt docstring.
(tramp-register-archive-file-name-handler): Remove it from
`after-init-hook' when unloading.
(tramp-archive-gvfs-host): New defsubst.
(tramp-archive-dissect-file-name): Use it.
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections):
Check that `tramp-archive-enabled' is bound.
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test42-auto-load):
Check also that tramp-archive is not loaded when Tramp is loaded.
(tramp-archive-test42-delay-load): Adapt test messages.
Fix deferred display of async shell-command buffers
* lisp/simple.el (shell-command): Display async shell buffer on
process output for every, not just first, command invocation. Check
buffer liveness, not name, before displaying. (bug#30213, bug#30280)
Paul Eggert [Sat, 3 Feb 2018 20:10:19 +0000 (12:10 -0800)]
Avoid EOVERFLOW problems with file-directory-p
This fixes a bug where (file-directory-p FOO) would fail if FOO
had an inode number out of range for ‘stat’.
* src/fileio.c (file_directory_p): Accept a Lisp string instead of
a C string. All callers changed. On non-MS-Windows hosts, use
openat with O_PATH|O_DIRECTORY if available, otherwise
file_accessible_directory_p unless it fails due to EACCESS,
otherwise stat.
Noam Postavsky [Sat, 3 Feb 2018 05:44:45 +0000 (00:44 -0500)]
Don't require all file-attributes to be equal (Bug#30327)
* test/lisp/files-tests.el (files-tests-file-attributes-equal): New
function.
(files-tests-file-name-non-special-directory-files-and-attributes)
(files-tests-file-name-non-special-file-attributes): Use it instead of
`equal'.
Michael Albinus [Sat, 3 Feb 2018 17:49:56 +0000 (18:49 +0100)]
Prevent loading tramp-archive when it cannot be used
* lisp/files.el (locate-dominating-file): Check, that FILE is
a directory when traversing the tree.
* lisp/net/tramp-archive.el (tramp-archive-enabled): New defvar.
(tramp-archive-file-name-regexp): Protect against errors.
(tramp-archive-file-name-handler)
(tramp-register-archive-file-name-handler): Use it.
(all) Call `tramp-register-archive-file-name-handler'.
* lisp/net/tramp.el (tramp-register-file-name-handlers):
Use `tramp-archive-enabled'.
* test/lisp/net/tramp-archive-tests.el (all):
Use `tramp-archive-enabled' instead of `tramp-gvfs-enabled'.
(tramp-archive--test-emacs27-p): New defun.
(tramp-archive-test42-auto-load): Skip for older Emacsen.
(tramp-archive-test42-delay-load): Skip for older Emacsen.
Test also behavior when `tramp-archive-enabled' is nil.
Michael Albinus [Sat, 3 Feb 2018 12:22:56 +0000 (13:22 +0100)]
Autoload tramp-archive
* doc/misc/tramp.texi (Archive file names): Do not require to
load Tramp explicitly, this is autoloaded now also for file archives.
* lisp/net/tramp-archive.el (tramp-archive-suffixes)
(tramp-archive-compression-suffixes): Autoload them.
(tramp-archive-autoload-file-name-regexp): New defmacro.
(tramp-archive-file-name-regexp): Use it.
(tramp-register-archive-file-name-handler): New defun. Call
it in `after-init-hook'.
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test40-file-system-info): Rename from
`tramp-archive-test40-archive-file-system-info.
(tramp-archive-test42-auto-load)
(tramp-archive-test42-delay-load): New tests.
Eli Zaretskii [Sat, 3 Feb 2018 11:50:38 +0000 (13:50 +0200)]
Yest another round of manual copyedits
* doc/emacs/fixit.texi (Transpose, Spelling): Minor stylistic
changes. Suggested by myq larson <myqlarson@gmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/calendar.texi (Appointments, Time Intervals): Mention
relevant Org features. Suggested by Alex Branham
<alex.branham@gmail.com> in emacs-manual-bugs@gnu.org.
* doc/emacs/dired.texi (Operating on Files)
(Shell Commands in Dired, Image-Dired): Minor stylistic edits.
Suggested by Francis Wright <f.j.wright@live.co.uk> in
emacs-manual-bugs@gnu.org.
* doc/emacs/commands.texi (User Input): Explain "C-M-a".
Suggested by Martin Luethi <martin.luethi@geo.uzh.ch> in
emacs-manual-bugs@gnu.org.
Noam Postavsky [Fri, 2 Feb 2018 02:12:09 +0000 (21:12 -0500)]
; Avoid process kill query during term tests
* test/lisp/term-tests.el (term-test-screen-from-input): Just unset
the process query-on-exit flag to rather than trying to end the
process before the end of test (which is generally unreliable).
Alan Mackenzie [Fri, 2 Feb 2018 20:46:35 +0000 (20:46 +0000)]
CC Mode: Fix an enum intro being parsed as defun-block-intro
* lisp/progmodes/cc-engine.el (c-inside-bracelist-p): Return a bufpos rather
than t for the enum case.
(c-add-stmt-syntax, c-guess-continued-construct): Replace
c-looking-at-or-maybe-in-bracelist by c-inside-bracelist-p, since the former
does not recognize enum brace lists, but the latter does.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Replace
c-looking-at-or-maybe-in-bracelist by c-inside-bracelist-p.
Philipp Stephani [Sun, 28 Jan 2018 20:36:03 +0000 (21:36 +0100)]
Properly integrate modules into the loading process (Bug#30164).
* src/lread.c (Fload): Don't defer to module-load immediately when
encountering a module, but use the normal loading machinery to
properly set up load-history, check for recursive loads, print
messages, etc.
* test/src/emacs-module-tests.el (module/load-history): New test.
(module/describe-function-1): Adapt test.
Michael Albinus [Fri, 2 Feb 2018 16:06:22 +0000 (17:06 +0100)]
Minor tweaks in tramp-archive.el
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Bind `tramp-unknown-id-integer' and `tramp-unknown-id-string'
in order to have minimal ownership information.
Eli Zaretskii [Fri, 2 Feb 2018 15:41:38 +0000 (17:41 +0200)]
Another round of manual fixups
* doc/emacs/killing.texi (Killing by Lines): Clarify wording.
Reported by David Bonnafous <dbonnafo@gmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/windows.texi (Other Window): Improve wording.
Reported by Rasmus Sjostrom <ras.sjostrom@gmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/display.texi (Display Custom): Mention that line
numbers are not displayed in the minibuffer and tooltips.
* doc/emacs/mini.texi (Basic Minibuffer): Improve wording.
* doc/emacs/regs.texi (Registers): More comma removal. Suggested
by "root@vxid.pw root@vxid.pw" <root@vxid.pw> in
emacs-manual-bugs@gnu.org.
* doc/emacs/display.texi (Auto Scrolling): Fix a typo. Reported
by Kevin Foley <kfoley15@gmail.com> in emacs-manual-bugs@gnu.org.
* doc/emacs/display.texi (Scrolling): Fix grammar.
(Horizontal Scrolling): Mention reasonable limits for hscroll-step
float values. Suggested by Jerome Truong <jerometruong@gmail.com>
in emacs-manual-bugs@gnu.org.
* doc/emacs/mini.texi (Minibuffer Edit): Add a missing comma.
* doc/emacs/basic.texi (Position Info, Arguments, Repeating):
Remove redundant commas. Suggested by oldgaro
<oldgaro@protonmail.com> in emacs-manual-bugs@gnu.org.
* doc/emacs/kmacro.texi (Save Keyboard Macro): Clarify wording.
Suggested by clemens.radermacher@posteo.de in
emacs-manual-bugs@gnu.org.
* doc/emacs/building.texi (Compilation Mode): Improve and simplify
wording. Suggested by drone <yoorobot@gmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/dired.texi (Dired Enter): Clarify wording.
(Dired Deletion): Fix a typo.
(Marks vs Flags): Mention that M-DEL in Dired asks for the mark
character. Fix typos.
* doc/emacs/basic.texi (Moving Point, Erasing, Basic Undo)
(Arguments): Some additional information about keys. Reported by
Francis Wright <f.j.wright@live.co.uk> in
emacs-manual-bugs@gnu.org.
Noam Postavsky [Thu, 25 Jan 2018 05:37:50 +0000 (00:37 -0500)]
Test and fix "/:" quoted file name handlers (Bug#30243)
Some w32 specific problems were discovered, but only worked around, as
these are not serious, and not the focus of this bug fix:
- The w32 implementation of `insert-directory doesn't handle a nil
SWITCHES argument.
- `dired-compress-file' does not operate correctly if the unquoted
filename contains a ":" (e.g., C:/foo/bar).
* lisp/files.el (file-name-non-special): Strip the "/:" from
`default-directory' for `temporary-file-directory' operation; both
arguments to `file-name-completion', `file-name-all-completion', and
`file-equal-p' operations; `buffer-file-name' for
`make-auto-save-file-name' and 'set-visited-file-modtime' operations.
Don't touch any operands of `file-notify-rm-watch' and
`file-notify-valid-p' as they receive descriptors; not file
names (this is not sufficient to fix these operations for "/:" quoted
file names though, these are fixed in a later commit).
Michael Albinus [Thu, 1 Feb 2018 14:49:18 +0000 (15:49 +0100)]
Adapt tramp-tests.el according to Bug#30243
* test/lisp/net/tramp-tests.el (tramp--test-emacs27-p): New defun.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files): Use it.
Eli Zaretskii [Wed, 31 Jan 2018 16:23:17 +0000 (18:23 +0200)]
Another round of manual fixes from proofreading
* doc/emacs/search.texi (Incremental Search)
(Nonincremental Search): Mention the menu bar and fix typos.
Reported by David Bonnafous <dbonnafo@gmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/building.texi (Compilation): Improve wording.
Suggested by drone <yoorobot@gmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/kmacro.texi (Basic Keyboard Macro): Clarify text.
Suggested by Robert Pluim <rpluim@gmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/display.texi (Highlight Interactively, Fringes):
Improve wording. Suggested by Justin Heyes-Jones
<justinhj@gmail.com> in emacs-manual-bugs@gnu.org.
* doc/emacs/commands.texi (User Input, Commands): Add missing
commas.
* doc/emacs/screen.texi (Menu Bar): Mention keyboard keys to
navigate menus. Suggested by oldgaro <oldgaro@protonmail.com> in
emacs-manual-bugs@gnu.org.
* doc/emacs/search.texi (Not Exiting Isearch): Fix a typo.
Reported by "Kocken, I.J. (Ilja)" <I.J.Kocken@uu.nl> in
emacs-manual-bugs@gnu.org.
* doc/emacs/basic.texi (Inserting Text): Mention one more label of
RET. Suggested by Francis Wright <f.j.wright@live.co.uk> in
emacs-manual-bugs@gnu.org.
* doc/emacs/text.texi (Paragraphs): Clarify text. Reported by
Marcin Borkowski <mbork@mbork.pl> in emacs-manual-bugs@gnu.org.
* doc/emacs/maintaining.texi (Introduction to VC)
(Why Version Control?, VCS Merging): Fix typos and section
capitalization. Suggested by "R. P. Dillon"
<rpdillon@killring.org> in emacs-manual-bugs@gnu.org.
* doc/emacs/modes.texi (Major Modes, Choosing Modes): Fix typos.
Reported by clemens.radermacher@posteo.de in
emacs-manual-bugs@gnu.org.
Glenn Morris [Wed, 31 Jan 2018 15:50:23 +0000 (07:50 -0800)]
Merge from origin/emacs-26
22922c7 (origin/emacs-26) * doc/emacs/entering.texi (Entering Emacs):... 59657c4 Document 'window-at-side-p' in the Elisp manual 2b35ed0 Document external-debugging-output in the Elisp Manual (Bug#2... db6564c Fix scroll-margin docstring (Bug#13791) 732d1b9 Clarify that `ansi-term' is almost the same as `term' (Bug#18... f706c59 Update manual description of locate-file (Bug#23650) 1602262 Clarify effect of print-gensym (Bug#27776) 53e9fa2 * lisp/custom.el (defcustom): Fix docstring (Bug#27891). 607cc4e Define cl-type-definition button type as needed (Bug#28899) 9e6889c Emphasize that GPG passphrase caching is temporary (Bug#29907) 4b5711b Fix @examples in cc-mode.info, where lines were getting glued... 71961f1 Minor change in "Mode Line" section of Emacs manual 55a2b76 More fixes in the Emacs manual
Michael Albinus [Wed, 31 Jan 2018 14:02:46 +0000 (15:02 +0100)]
Fix Bug#30293
* lisp/net/tramp-archive.el (tramp-archive-file-name-for-operation):
New defsubst.
(tramp-archive-file-name-archive, tramp-archive-file-name-localname):
New defuns.
(tramp-archive-file-name-handler, tramp-archive-dissect-file-name)
(tramp-archive-handle-not-implemented): Use them. (Bug#30293)
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test-directory):
New defconst.
(tramp-archive-test01-file-name-syntax): Extend test.
(tramp-archive-test05-expand-file-name-non-archive-directory):
New test. (Bug#30293)
* test/lisp/net/tramp-archive-resources/foo.iso/foo: New file.
Glenn Morris [Wed, 31 Jan 2018 02:43:28 +0000 (21:43 -0500)]
automerge: handle upstream changes during operation
* admin/automerge (merge): New function, split from pre-existing code.
(main): If upstream changed during building and testing,
reset local and try merging again.
Stefan Monnier [Tue, 30 Jan 2018 22:37:20 +0000 (17:37 -0500)]
* test/lisp/mouse-tests.el: Fix tests broken by mouse.el change
* test/lisp/mouse-tests.el (bug23288-use-return-value)
(bug23288-translate-to-mouse-2): Don't rely as much on details of the
implementation, so it also works with the new code.
Stefan Monnier [Tue, 30 Jan 2018 17:41:29 +0000 (12:41 -0500)]
* lisp/mouse.el: Rework the mouse-1-click remapping
Avoid peeking ahead at the next event because this had undesirable effects,
such as making 'this-single-command-raw-keys' return bogus information.
(mouse--last-down): New variable.
(mouse--down-1-maybe-follows-link): Don't do the remapping here.
Instead, just keep track of the time when the down happened.
(mouse--down-1-maybe-follows-link): Do the remapping here.
(key-translation-map): Add bindings for (double-)mouse-1.
Stefan Monnier [Tue, 30 Jan 2018 16:57:40 +0000 (11:57 -0500)]
* lisp/help.el: Rework describe-key's handling of up and double clicks
Use lexical-binding.
(help--binding-undefined-p): New function, extracted from help--analyze-key.
(help--analyze-key): Use it.
(help--filter-info-list): New function.
(describe-key-briefly): Change calling convention.
Handle a list of key sequences now.
(help--binding-locus): Remove unused var 'found'.
(help--read-key-sequence): Rename from help-read-key-sequence.
Almost complete rewrite, with a different return value.
(help-downify-mouse-event-type): Remove.
(describe-key): Change calling convention.
Handle a list of key sequences now.
Michael Albinus [Tue, 30 Jan 2018 16:34:02 +0000 (17:34 +0100)]
Fix Bug#30262
* lisp/net/tramp-archive.el (tramp-archive-hash): Document (changed)
layout.
(tramp-archive-dissect-file-name): Merge with
`tramp-archive-local-copy', which has been removed by this.
(tramp-archive-cleanup-hash): Adapt to changed
`tramp-archive-hash'. (Bug#30262)
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test01-file-name-syntax)
(tramp-archive-test02-file-name-dissect)
(tramp-archive-test16-directory-files)
(tramp-archive-test26-file-name-completion): Adapt to changed
test file.
(tramp-archive-test08-file-local-copy): Be more robust in cleanup.
* test/lisp/net/tramp-archive-resources/foo.tar.gz: Adapt to
extended test.
Eli Zaretskii [Tue, 30 Jan 2018 16:24:08 +0000 (18:24 +0200)]
Minor change in "Mode Line" section of Emacs manual
* doc/emacs/screen.texi (Mode Line): Mention tooltips shown when
hovering the mouse over the mode line. Suggested by Eduardo
Mercovich <eduardo@mercovich.net> in emacs-manual-bugs@gnu.org.