1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-04 20:27:45 +00:00

5118 Commits

Author SHA1 Message Date
Michael Albinus
04c768b95b ; Fix wording in etc/NEWS 2018-12-23 09:50:27 +01:00
Philipp Stephani
039be4e025 Add file name handler support for 'make-process' (Bug#28691)
* src/process.c (Fmake_process): Add new keyword argument
':file-handler'.
(syms_of_process) <make-process, :file-handler>: Define new symbols.

* lisp/files.el (file-name-non-special): Add support for
'make-process'.

* test/src/process-tests.el (make-process/file-handler/found)
(make-process/file-handler/not-found)
(make-process/file-handler/disable): New unit tests.
(process-tests--file-handler): New helper function.

* test/lisp/files-tests.el
(files-tests-file-name-non-special-make-process): New unit test.

* doc/lispref/files.texi (Magic File Names): Document that
'make-process' can invoke file name handlers.

* doc/lispref/processes.texi (Asynchronous Processes): Document
':file-handlers' argument to 'make-process'.

* etc/NEWS (Lisp Changes in Emacs 27.1): Mention new
:file-handler argument for 'make-process'.
2018-12-22 22:10:48 +01:00
Michael Albinus
2931016831 ; Cosmetic changes in etc/NEWS 2018-12-22 14:18:59 +01:00
Michael Albinus
36c270daaf ; Cosmetic changes to etc/NEWS 2018-12-22 14:07:49 +01:00
Juri Linkov
157ada833f * lisp/windmove.el (windmove-delete-in-direction): Change prefix arg C-u
to kill the buffer.  Add prefix arg M-0 to delete the selected window.
(Bug#32790)
2018-12-21 01:41:25 +02:00
Juri Linkov
3f36651c64 * lisp/window.el (switch-to-buffer-obey-display-actions): New defcustom.
(switch-to-buffer): Use it.  (Bug#32790)
(switch-to-buffer-preserve-window-point):  Mention it in docstring.

* lisp/windmove.el (windmove-display-in-direction): Mention it in docstring.

* doc/lispref/windows.texi (Switching Buffers):
Document switch-to-buffer-obey-display-actions.
2018-12-21 01:28:31 +02:00
Stefan Monnier
f68f2eb472 * lisp/emacs-lisp/map.el: Add support for plists
(map--plist-p, map--plist-delete): New functions.
(map-elt, map-delete, map-length, map-into, map-put!, map-insert)
(map-apply, map-do): Handle the plist case.

* test/lisp/emacs-lisp/map-tests.el (with-maps-do): Add sample plist.
(test-map-put!): The behavior of map-put! is not the same for plists as
for alists.
2018-12-20 08:40:43 -05:00
Juri Linkov
6973b1489b Syntactic fontification of diff hunks (bug#33567)
* lisp/vc/diff-mode.el (diff-font-lock-syntax): New defcustom.
(diff-default-directory): New buffer-local variable.
(diff-indicator-removed, diff-indicator-added)
(diff-indicator-changed): Set foreground to distinctive colors.
(diff-context): Remove colors to make room for syntax highlighting.
(diff-font-lock-keywords): Add diff--font-lock-syntax.
(diff--font-lock-cleanup): Remove diff-mode syntax overlays.
(diff--font-lock-syntax, diff--font-lock-syntax--refresh)
(diff-syntax-fontify-revisions, diff-syntax-fontify-hunk)
(diff-syntax-fontify-props): New functions.

* lisp/vc/diff.el (diff-no-select): Set diff-default-directory to
default-directory.

* doc/emacs/files.texi (Diff Mode): Document diff-font-lock-syntax.
2018-12-18 01:11:15 +02:00
Stefan Monnier
55838e4e6a * lisp/emacs-lisp/map.el: Avoid special casing lists.
(map-not-inplace, map-inplace): New errors.
(map-insert): New generic function.
(map-put!): Signal map-not-inplace rather than a generic 'error'.
(map-elt): Use map-not-inplace and map-insert to avoid hardcoding
a special case for lists.

* test/lisp/emacs-lisp/map-tests.el (test-map-put!): Rename from
test-map-put.  Also test the errors signaled.
2018-12-17 14:51:01 -05:00
Alex Branham
36b05dc842 New function flatten-tree
Co-authored-by: Basil L. Contovounesios <contovob@tcd.ie>

* doc/lispref/lists.texi: Document `flatten-tree'.

* lisp/progmodes/js.el (js--maybe-join):
* lisp/printing.el (pr-switches):
* lisp/lpr.el (lpr-print-region):
* lisp/gnus/nnimap.el (nnimap-find-wanted-parts):
* lisp/gnus/message.el (message-talkative-question):
* lisp/gnus/gnus-sum.el (gnus-remove-thread)
(gnus-thread-highest-number, gnus-thread-latest-date):
* lisp/eshell/esh-util.el (eshell-flatten-and-stringify):
* lisp/eshell/esh-opt.el (eshell-eval-using-options):
* lisp/eshell/esh-ext.el (eshell-external-command):
* lisp/eshell/em-xtra.el (eshell/expr):
* lisp/eshell/em-unix.el (eshell/rm, eshell-mvcpln-template)
(eshell/cat, eshell/make, eshell-poor-mans-grep, eshell-grep)
(eshell/du, eshell/time, eshell/diff, eshell/locate):
* lisp/eshell/em-tramp.el (eshell/su, eshell/sudo):
* lisp/eshell/em-term.el (eshell-exec-visual):
* lisp/eshell/em-dirs.el (eshell-dirs-substitute-cd, eshell/cd):
* lisp/eshell/em-basic.el (eshell/printnl):
Use new flatten-tree.

* lisp/progmodes/js.el (js--flatten-list):
* lisp/lpr.el (lpr-flatten-list):
* lisp/gnus/message.el (message-flatten-list):
* lisp/eshell/esh-util.el (eshell-flatten-list):
Obsolete in favor of Emacs-wide `flatten-tree'.

* lisp/subr.el (flatten-list): Alias to `flatten-tree' for
discoverability.

* lisp/subr.el (flatten-tree): New defun.

* test/lisp/subr-tests.el (subr-tests-flatten-tree): New test.
2018-12-17 12:15:09 +01:00
Michael Albinus
e8199e765f Add Tramp sudoedit method
* doc/misc/tramp.texi (Quick Start Guide): New section "Using sudoedit".
(External methods) <sudoedit>: Describe.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist)
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add handler.

* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-uid-gid): Rename from
`tramp-sh-handle-set-file-uid-gid'.  Handle only remote file names.

* lisp/net/tramp-sudoedit.el: New file.

* lisp/net/tramp.el (tramp-file-name-for-operation): Handle also
`tramp-set-file-uid-gid'.
(tramp-set-file-uid-gid): New defun.
(tramp-get-local-uid, tramp-get-local-gid): Cache result.

* test/lisp/net/tramp-tests.el (tramp--test-sudoedit-p): New defun.
(tramp-test20-file-modes, tramp-test22-file-times)
(tramp--test-sudoedit-p): Use it.
2018-12-16 15:49:07 +01:00
Paul Eggert
0cf5d63000 Default to --with-harfbuzz
* configure.ac: By default, configure with HarfBuzz if available.
2018-12-13 12:13:38 -08:00
Stefan Monnier
1691a51094 * lisp/emacs-lisp/map.el: Make the functions generic
Make them document their delegation relationship, to clarify when
a method is needed.
(map--dispatch): Give more info in the error message.
(map-elt): Make it generic and deprecate the 'testfn' arg.
(map-put): Make it obsolete.
(map-length): Make it work on hash-tables.
(map-apply): Define it in terms of map-do.
(map-do, map-into): Use cl-generic dispatch instead of map--dispatch.
(map-empty-p): Define it in terms of map-length.
(map-contains-key): Deprecate 'testfn'.  Make it return a boolean, so
it can return non-nil even if 'key' is nil.  Improve implementation to
avoid constructing an intermediate list of all keys.
(map-merge-with): Use 'eql' rather than `eq'.
(map-put!): Rename from map--put and make it generic, to replace map-put.
(map--apply-alist, map--apply-hash-table, map--apply-array):
Turn them into methods of map-apply.
(map--do-alist, map--do-array): Turn them into methods of map-do.
(map--into-hash-table): Turn it into a method of map-into.
2018-12-11 17:54:13 -05:00
Juri Linkov
712e74a9fb * lisp/vc/vc.el (vc-root-version-diff): New command (bug#33650).
(vc-root-diff): Call it interactively on a prefix argument.
2018-12-11 01:54:20 +02:00
Eli Zaretskii
7e9f62c0bc Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2018-12-08 11:13:28 +02:00
Eli Zaretskii
2877471fef Document that Eshell follows symlinks in history file names
* etc/NEWS: Mention that Eshell now follows symlinks in
history file names.
2018-12-08 11:12:38 +02:00
Martin Rudalics
d2b3a37886 New buffer display action alist entry 'window-min-height' (Bug#32825)
* lisp/window.el (display-buffer-below-selected): Handle
'window-min-height' action alist entry (Bug#32825).
* doc/lispref/windows.texi (Buffer Display Action Functions)
(Buffer Display Action Alists): Add documentation for
'window-min-height' action alist entries.
* etc/NEWS: Mention 'window-min-height' action alist entry.
2018-12-08 09:37:40 +01:00
Paul Eggert
0e8e5da1e8 Mention EMACS_SOCKET_NAME, not XDG_RUNTIME_DIR. 2018-12-06 13:00:14 -08:00
Paul Eggert
b1d7f19ae7 Mention unsetting XDG_RUNTIME_DIR in doc. 2018-12-06 11:07:47 -08:00
Eli Zaretskii
6d89891898 Support IBM038 (a.k.a. "EBCDIC-INT") encoding
* lisp/international/mule-conf.el (ibm038): New charset.
(ebcdic-int, cp038): Alias charsets of ibm038.
* lisp/language/english.el (ibm038): New coding-system.
(ebcdic-int, cp038): Alias coding-systems of ibm038.
(Bug#33612)

* etc/NEWS: Announce the new coding system ibm038.
2018-12-04 20:27:20 +02:00
Juri Linkov
f745cf8c43 * lisp/isearch.el (isearch-yank-on-move): New defcustom
with shift-move related options extracted from `search-exit-option'.
(isearch-pre-command-hook): Rename search-exit-option to
isearch-yank-on-move in shift-move related places.
(isearch-post-command-hook): Check for isearch-pre-move-point
instead of search-exit-option.  (Bug#15839)

* doc/emacs/search.texi (Not Exiting Isearch): Rename
search-exit-option to isearch-yank-on-move.

* lisp/menu-bar.el (menu-bar-i-search-menu): Add more isearch commands.
2018-12-04 02:41:54 +02:00
Juri Linkov
beafe2bf50 * lisp/isearch.el (isearch-allow-scroll): New option `unlimited'.
(isearch-pre-command-hook): Call isearch-pre-scroll-point unless
isearch-allow-scroll is 'unlimited'.
(isearch-post-command-hook): Use `when' instead of `cond'.
Call isearch-lazy-highlight-new-loop when isearch-allow-scroll is
'unlimited'.  (Bug#15839)
2018-12-04 02:24:29 +02:00
Paul Eggert
92282cb502 emacsclient: prefer XDG_RUNTIME_DIR (Bug#33367)
* lib-src/emacsclient.c: Disable -Wformat-truncation=2,
to avoid false alarms about the new snprintf calls.
(local_sockname): New function.
(set_local_socket): Use it.  Prefer XDG_RUNTIME_DIR (if set)
for location of socket directory.  Avoid unnecessary memory
allocation by using snprintf to destination.
* lisp/server.el (server-socket-dir): Prefer XDG_RUNTIME_DIR if set.
2018-12-01 23:08:48 -08:00
Alan Third
317b354782 ; Add notes about cross-compiling macOS versions 2018-12-01 17:14:27 +00:00
Juri Linkov
df108bf927 * lisp/windmove.el: Directional window deletion (bug#32790)
* lisp/windmove.el (windmove-delete-in-direction)
(windmove-delete-left, windmove-delete-up)
(windmove-delete-right, windmove-delete-down)
(windmove-delete-default-keybindings): New functions.
2018-11-25 23:40:00 +02:00
Michael Albinus
dcacff4195 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2018-11-24 14:01:53 +01:00
Michael Albinus
a7d9c38da5 Add Tramp rclone method
* doc/misc/tramp.texi (Top): Remove "History".
(History): Remove node.
(Quick Start Guide): New section "Using rclone".
(External methods) <rclone>: Describe.

* etc/NEWS: Mention Tramp rclone method.

* lisp/net/tramp-rclone.el: New file.
2018-11-24 14:01:36 +01:00
Charles A. Roelli
57b14370cd Add tool-bar and menu-bar menu for Isearch (Bug#32990)
* etc/NEWS (Search and Replace): Mention this change.

* lisp/isearch.el: Declare the new, non-autoloaded function
'tmm-menubar-keymap'.
(isearch-tmm-menubar): New function.
(isearch-menu-bar-commands): New variable.
(isearch-menu-bar-yank-map, isearch-menu-bar-map): New variables.
(isearch-mode-map): Define a menu-bar search menu and remap
'tmm-menubar' bindings to point to 'isearch-tmm-menubar'.
(isearch-tool-bar-old-map): New variable.
(isearch-tool-bar-image): New function.
(isearch-tool-bar-map): New variable.
(minor-mode-map-alist): Add an entry for Isearch so that
'isearch-menu-bar-map' shows during search.
(isearch-mode, isearch-done): Save and restore possible
buffer-local 'tool-bar-map' using 'isearch-tool-bar-old-map'.
(iseacrh-mouse-commands): New variable.
(isearch-mouse-leave-buffer): Allow commands in
isearch-mouse-commands.
(with-isearch-suspended): Only push changed states of Isearch
after running the body argument of this macro.
(isearch-pre-command-hook): Additionally allow bindings in
'isearch-tool-bar-map' to pass through, as well as commands
in isearch-menu-bar-commands.
(isearch-post-command-hook): Call 'force-mode-line-update' at its
end to make sure the menu- and tool-bars are up-to-date.

* lisp/tmm.el (tmm-menubar-keymap): New function factored out from
'tmm-menubar'.
(tmm-menubar): Use 'tmm-menubar-keymap'.
(tmm-prompt): New optional argument 'no-execute'.
2018-11-24 13:48:57 +01:00
Glenn Morris
3c643e73b2 ; NEWS tweak 2018-11-22 15:34:48 -08:00
Juri Linkov
4dc7326956 Add Isearch commands for going to absolute occurrence of matches (bug#29321)
* lisp/isearch.el (isearch-mode-map): Bind 'M-s M-<' to
'isearch-beginning-of-buffer' and 'isearch-end-of-buffer' to 'M-s M->'.
(isearch-beginning-of-buffer, isearch-end-of-buffer): New commands.
2018-11-23 00:02:56 +02:00
Eli Zaretskii
9c09b1d231 ; * etc/NES: Minor change in the description of Dired's 'Z'. 2018-11-22 20:54:05 +02:00
Juri Linkov
cdb0d080f1 Add prefix arg to isearch-forward-symbol-at-point (bug#29321)
* lisp/isearch.el (isearch-forward-symbol-at-point): Add optional arg.
2018-11-21 23:33:22 +02:00
Eli Zaretskii
93242b1476 * etc/NEWS: Clarify what 'Z' does in Dired. (Bug#33450) 2018-11-21 17:11:43 +02:00
Michael Albinus
fb200f3e57 Let Tramp sudo sessions expire after a timeout
* doc/misc/tramp.texi (Inline methods) <sudo, doas>: Both methods expire
the underlying session per default.
(Predefined connection information): Explain "session-timeout".

* etc/NEWS: Mention Tramp session expiration.

* lisp/net/tramp-sh.el (tramp-methods) <sudo, doas>:
Add `tramp-session-timeout'.
(tramp-timeout-session): New defun.
(tramp-maybe-open-connection): Handle session timeout.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-equal-remote): Extend.
2018-11-21 13:23:01 +01:00
Juri Linkov
166f6274b4 Add prefix arg to isearch-repeat-forward/backward (bug#14563, bug#29321)
* lisp/isearch.el (isearch-repeat): Add optional arg COUNT.
Add a while-loop that calls `isearch-search' COUNT times.
(isearch-repeat-forward, isearch-repeat-backward):
Add optional prefix ARG passed down to `isearch-repeat'.
Handle reversed directions.
2018-11-21 01:43:21 +02:00
Stefan Monnier
81f0e05a02 * src/cmds.c (Fself_insert_command): Get last-command-event via (new) arg. 2018-11-17 10:47:48 -05:00
Michael Albinus
f7cbe83e3b ; Further cosmetic changes in etc/NEWS 2018-11-16 13:47:51 +01:00
Eli Zaretskii
936a8f3093 Document Emacs 26 behavior of Dired's 'Z' on directories
* doc/emacs/dired.texi (Operating on Files): Document behavior
of 'Z' on directories.

* etc/NEWS: Belatedly announce the new behavior of Dired's 'Z'
on directory names and on .tar.gz archives.
2018-11-16 10:19:22 +02:00
Juri Linkov
2cf9d9fed7 * lisp/windmove.el: Directional window display (bug#32790)
* lisp/windmove.el (windmove-display-no-select): New defcustom.
(windmove-display-in-direction, windmove-display-left)
(windmove-display-up, windmove-display-right)
(windmove-display-down, windmove-display-same-window)
(windmove-display-default-keybindings): New functions.
2018-11-16 01:40:15 +02:00
Juri Linkov
f22a16ae06 * lisp/windmove.el: Support more prefix args (bug#32790)
* lisp/windmove.el (windmove-left, windmove-up, windmove-right)
(windmove-down): Use prefix-numeric-value to support more prefix args
like 'C-u' and 'M--'.  Doc fix.
2018-11-16 01:09:54 +02:00
Juri Linkov
35a88c809e Isearch hit count. (Bug#29321)
* lisp/isearch.el (isearch-lazy-count): New defcustom.
(lazy-count): New defgroup.
(lazy-count-prefix-format, lazy-count-suffix-format): New defcustom.
(isearch-lazy-count-format): New function.
(isearch-message-prefix, isearch-message-suffix): Use it.
(isearch-lazy-highlight-window-start-changed)
(isearch-lazy-highlight-window-end-changed)
(isearch-lazy-count-current, isearch-lazy-count-total)
(isearch-lazy-count-hash): New variables.
(isearch-lazy-highlight-new-loop): Reset isearch-lazy-count-total
and update isearch-lazy-count-current for isearch-message.
(isearch-lazy-highlight-update): Run full-buffer loop for
isearch-lazy-count.
(isearch-lazy-highlight-buffer-update): Count isearch-lazy-count-total.
Set isearch-lazy-count-current at the end.
2018-11-15 00:23:47 +02:00
Eli Zaretskii
5fe81ebbb5 Minor copyedits in documentation of HOME handling
* etc/NEWS: Reword the recent entry regarding the change in
how relative file names are interpreted in $HOME.

* doc/emacs/cmdargs.texi (General Variables): Advise against
using relative directory names in $HOME.
2018-11-14 21:45:41 +02:00
Paul Eggert
454f7923a7 Document recent change to HOME handling
* doc/emacs/cmdargs.texi (General Variables):
* doc/emacs/custom.texi (Find Init):
* doc/lispref/files.texi (File Name Expansion):
* etc/NEWS: Document behavior when HOME is a relative file name.
2018-11-14 09:32:28 -08:00
Juri Linkov
f561c6a112 New option vc-find-revision-no-save to not write revision to file
* lisp/vc/vc.el (vc-find-revision-no-save): New defcustom (bug#33319).
(vc-find-revision): Depending on vc-find-revision-no-save,
call either vc-find-revision-no-save or vc-find-revision-save.
(vc-find-revision-save): Rename from vc-find-revision.
(vc-find-revision-no-save): New function.

* lisp/vc/diff-mode.el (diff-find-source-location):
Let-bind vc-find-revision-no-save to t.
2018-11-14 02:23:04 +02:00
Juri Linkov
2ccfb4b5f4 Support VC revisions in diff-goto-source (bug#33319)
* lisp/vc/diff-mode.el (diff-vc-revisions): New defvar.
(diff-find-source-location): Call vc-find-revision for
non-nil values of 'other', diff-vc-backend, diff-vc-revisions.

* lisp/vc/vc.el (vc-diff-internal): Set buffer-local
diff-vc-revisions to the list of used revisions.

* doc/emacs/files.texi (Diff Mode): Update diff-goto-source
for VC-related prefix argument.
2018-11-14 02:14:52 +02:00
Glenn Morris
5c0d8bb95b Root emacsclient no longer connects to non-root sockets
* lib-src/emacsclient.c (set_local_socket): Don't ignore socket
ownership when run by root.
Ref: http://lists.gnu.org/r/emacs-devel/2018-11/msg00019.html
2018-11-13 13:15:39 -05:00
Michael Albinus
b8d5075476 ; Cosmetic changes in etc/NEWS 2018-11-13 11:04:20 +01:00
Michael Albinus
acee0a8f20 ; Cosmetic changes in etc/NEWS 2018-11-13 09:45:42 +01:00
Michael Albinus
a062fc4137 Provide branch information for both Emacs and Tramp (Bug#33328)
* doc/lispref/intro.texi (Version Info):
Document `emacs-repository-version' and `emacs-repository-branch'.

* etc/NEWS: Mention `emacs-repository-branch'.

* lisp/loadup.el: Initialize `emacs-repository-branch'.

* lisp/version.el (emacs-repository-branch): New variable.
(emacs-repository-branch-git, emacs-repository-get-branch):
New defuns.

* lisp/mail/emacsbug.el (report-emacs-bug):
Insert `emacs-repository-branch'.

* lisp/net/tramp.el (tramp-get-local-gid):
Use `group-name' if available.
(tramp-debug-message):
* lisp/net/tramp-cmds.el (tramp-bug): Report also
`tramp-repository-branch' and `tramp-repository-version'.

* lisp/net/trampver.el (tramp-repository-branch)
(tramp-repository-version): New defconst.
(tramp-repository-get-version): Remove.
2018-11-10 16:03:12 +01:00
Allen Li
70c75167ed Add setter for 'xref-marker-ring-length'
* lisp/progmodes/xref.el (xref-marker-ring-length): Add setter.
* etc/NEWS: Document last change.  (Bug#32849)
2018-11-10 11:43:39 +02:00