]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoFix documentation of define-obsolete-* functions
Eli Zaretskii [Sat, 28 Dec 2019 09:13:25 +0000 (11:13 +0200)]
Fix documentation of define-obsolete-* functions

* doc/lispref/functions.texi (Obsolete Functions): Make
documentation of functions that obsolete symbols match the
advertised calling conventions.

* lisp/emacs-lisp/byte-run.el (define-obsolete-function-alias)
(define-obsolete-variable-alias, define-obsolete-face-alias):
State in the doc strings that WHEN is a mandatory argument, to be
consistent with the advertised calling convention.  (Bug#38675)

4 years agoFix recent gnus-start.el breakage
Lars Ingebrigtsen [Sat, 28 Dec 2019 00:45:12 +0000 (01:45 +0100)]
Fix recent gnus-start.el breakage

* lisp/gnus/gnus-start.el (gnus-group-change-level): Fix previous
patch that made info nil when adding new groups (thereby making
gnus-newsrc-alist invalid).

4 years ago(xref--find-buffer-visiting): Speed up by using get-file-buffer
Dmitry Gutov [Fri, 27 Dec 2019 16:17:48 +0000 (19:17 +0300)]
(xref--find-buffer-visiting): Speed up by using get-file-buffer

* lisp/progmodes/xref.el (xref--find-buffer-visiting):
Speed up by using get-file-buffer.
(xref--collect-matches): Remove the condition on remote-id.
(https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00753.html)

4 years agoproject--vc-list-files: Recurse into submodules
Dmitry Gutov [Fri, 27 Dec 2019 15:18:41 +0000 (18:18 +0300)]
project--vc-list-files: Recurse into submodules

* lisp/progmodes/project.el (project-try-vc): Do not treat a Git
submodule as a project root, go up to the parent repo.
(project--git-submodules): New function.
(project--vc-list-files): Use it.  Recurse into submodules.

4 years agoMerge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27
Eli Zaretskii [Fri, 27 Dec 2019 14:20:27 +0000 (16:20 +0200)]
Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27

4 years agoMinor improvements of buffer documentation
Eli Zaretskii [Fri, 27 Dec 2019 14:19:09 +0000 (16:19 +0200)]
Minor improvements of buffer documentation

* doc/emacs/buffers.texi (Buffers): Say that buffers are killed
when no longer needed.  Suggested by Jean-Christophe Helary
<jean.christophe.helary@traduction-libre.org>.

4 years agoxref--collect-matches: Speed up on remote
Dmitry Gutov [Fri, 27 Dec 2019 14:08:53 +0000 (17:08 +0300)]
xref--collect-matches: Speed up on remote

* lisp/progmodes/xref.el (xref--collect-matches):
Don't call find-buffer-visiting on remote file names, it's pretty
slow (bug#34343).

4 years ago; project--find-regexp-in-files: Avoid prepending remote-id twice (bug#34343)
Dmitry Gutov [Fri, 27 Dec 2019 14:06:25 +0000 (17:06 +0300)]
; project--find-regexp-in-files: Avoid prepending remote-id twice (bug#34343)

4 years ago; Use regexp type in tramp-adb-prompt (backport, do not merge)
Mattias Engdegård [Fri, 27 Dec 2019 09:25:05 +0000 (10:25 +0100)]
; Use regexp type in tramp-adb-prompt (backport, do not merge)

* lisp/net/tramp-adb.el (tramp-adb-prompt): Use 'regexp' instead
of 'string' as type for values that are regexps in defcustom
declarations.

4 years agoFix installer build
Phillip Lord [Thu, 26 Dec 2019 22:01:02 +0000 (23:01 +0100)]
Fix installer build

* admin/nt/dist-build/build-zips.sh: Ensure that NSIS build always
  uses the actual build number to locate its files.

4 years agoUpdate Windows build documentation
Phillip Lord [Thu, 26 Dec 2019 20:13:38 +0000 (21:13 +0100)]
Update Windows build documentation

* admin/nt/dist-build/README-scripts: Update with branch and snapshot
  information.

4 years agoCalc: add missing dynamic variable declarations
Mattias Engdegård [Thu, 26 Dec 2019 18:37:10 +0000 (19:37 +0100)]
Calc: add missing dynamic variable declarations

* lisp/calc/calc-alg.el (math-simplify-only, calc-simplify-mode)
(math-expand-formulas, calc-poly-div-remainder)
(math-living-dangerously, math-simplifying, calc-angle-mode)
(calc-prefer-frac, math-poly-base-variable):
Declare dynamic variables.
* test/lisp/calc/calc-tests.el (calc-poly-div):
Add test for at least one bug caused by missing declarations.

4 years ago* doc/emacs/buffers.texi (Kill Buffer): Improve indexing.
Eli Zaretskii [Thu, 26 Dec 2019 16:20:12 +0000 (18:20 +0200)]
* doc/emacs/buffers.texi (Kill Buffer): Improve indexing.

4 years agoSpeed up dired-do-find-regexp
Dmitry Gutov [Thu, 26 Dec 2019 15:39:48 +0000 (17:39 +0200)]
Speed up dired-do-find-regexp

* lisp/dired-aux.el (dired-do-find-regexp): Speed up (bug#36857).
Previously, 'find' was called for every marked file (for plain
files and directories both).  Now 'find' is only called for
directories.

4 years ago; Remove outdated declarations
Dmitry Gutov [Thu, 26 Dec 2019 15:32:30 +0000 (17:32 +0200)]
; Remove outdated declarations

4 years ago; Clarify the assumption
Dmitry Gutov [Thu, 26 Dec 2019 15:31:11 +0000 (17:31 +0200)]
; Clarify the assumption

4 years agoproject--find-regexp-in-files: Support remote files
Dmitry Gutov [Thu, 26 Dec 2019 13:38:53 +0000 (15:38 +0200)]
project--find-regexp-in-files: Support remote files

* lisp/progmodes/project.el (project--find-regexp-in-files):
Support remote files (bug#34343).

4 years agoDocument some restrictions for module functions.
Philipp Stephani [Thu, 26 Dec 2019 10:31:51 +0000 (11:31 +0100)]
Document some restrictions for module functions.

* doc/lispref/internals.texi (Module Functions): Document some
restrictions for module functions.

4 years agoDon't recommend using 'module-load' for loading modules.
Philipp Stephani [Thu, 26 Dec 2019 10:08:56 +0000 (11:08 +0100)]
Don't recommend using 'module-load' for loading modules.

'module-load' most likely doesn't do what users expect.  Users should
use 'load' and its wrappers, which do the right thing.

* doc/lispref/loading.texi (Dynamic Modules): Document
disadvantages of 'module-load' and recommend normal 'load' and
its wrappers instead.

* doc/lispref/internals.texi (Module Functions): Recommend
'load' over 'module-load'.

4 years agoPort x_get_monitor_attributes_fallback to !HAVE_GTK3
Paul Eggert [Wed, 25 Dec 2019 20:01:07 +0000 (12:01 -0800)]
Port x_get_monitor_attributes_fallback to !HAVE_GTK3

* src/xfns.c (x_get_net_workarea) [!HAVE_GTK3]:
Define in this case too, since x_get_monitor_attributes_fallback
contains a call to it regardless whether HAVE_GTK3 is defined.

4 years agoFix compilation warning in gnus-start.el
Lars Ingebrigtsen [Wed, 25 Dec 2019 16:12:10 +0000 (17:12 +0100)]
Fix compilation warning in gnus-start.el

* lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): Fix
compilation warning by not binding XEmacs-only variable.

* lisp/gnus/gnus-util.el (gnus-bind-print-variables): Ditto.
(gnus-prin1, gnus-prin1-to-string, gnus-pp, gnus-pp-to-string):
Adjust doc string.

4 years agoImprove doc string of 'files--message'
Eli Zaretskii [Wed, 25 Dec 2019 15:00:06 +0000 (17:00 +0200)]
Improve doc string of 'files--message'

* lisp/files.el (files--message): Improve the wording of doc
string.  (Bug#38737)

4 years agoImprove vc--add-line, vc--remove-regexp
Wolfgang Scherer [Mon, 26 Aug 2019 22:45:48 +0000 (00:45 +0200)]
Improve vc--add-line, vc--remove-regexp

* lisp/vc/vc.el (vc--add-line): Create file if it does not exist.
Use existing buffer to avoid discrepancies with filesytem.  Make sure
that the file ends with a newline.
(vc--remove-line): Do not create file if it does not exist.  Use
existing buffer to avoid discrepancies with filesytem. (bug#37185)

4 years agoApply the 'xref-group' property properly
Dmitry Gutov [Tue, 24 Dec 2019 20:30:02 +0000 (22:30 +0200)]
Apply the 'xref-group' property properly

* lisp/progmodes/xref.el (xref--insert-xrefs):
Apply the 'xref-group' property properly (bug#36974).

4 years ago* src/pdumper.c (Fdump_emacs_portable): Reword error message.
Philipp Stephani [Mon, 23 Dec 2019 20:26:38 +0000 (21:26 +0100)]
* src/pdumper.c (Fdump_emacs_portable): Reword error message.

(cherry picked from commit ac7b2607735a64e657d65c87d8c9f73755ff3efa)

4 years agoDon’t allow portable dumping in interactive mode (Bug#38453).
Philipp Stephani [Mon, 23 Dec 2019 19:49:15 +0000 (20:49 +0100)]
Don’t allow portable dumping in interactive mode (Bug#38453).

* src/pdumper.c (Fdump_emacs_portable): Don’t allow dumping in
interactive mode.

(cherry picked from commit e7edba42c8a525722cbd40f782b0df68e4976a62)

4 years agoDon't default to showing X-Faces externally in Gnus
Lars Ingebrigtsen [Tue, 24 Dec 2019 16:50:24 +0000 (17:50 +0100)]
Don't default to showing X-Faces externally in Gnus

* lisp/gnus/gnus-art.el (gnus-article-x-face-command): It's seldom
useful to display the face in an external command, so don't ever
default to that.  This also fixes the problem of Emacs running as
a server in mixed graphical/non-graphical environments.

4 years agoFix manual typo in Special Read Syntax
Lars Ingebrigtsen [Tue, 24 Dec 2019 16:42:28 +0000 (17:42 +0100)]
Fix manual typo in Special Read Syntax

* doc/lispref/objects.texi (Special Read Syntax): Fix typo.

4 years agoFix problem with emacs -nw / eww / svg
Robert Pluim [Tue, 24 Dec 2019 16:21:06 +0000 (17:21 +0100)]
Fix problem with emacs -nw / eww / svg

* lisp/net/shr.el (shr-parse-image-data): Don't bug out on
non-visual Emacs versions on SVG images (bug#38507).

4 years agoClarify base64 requirements and say what {en,de}code_coding_region does
Lars Ingebrigtsen [Tue, 24 Dec 2019 16:11:04 +0000 (17:11 +0100)]
Clarify base64 requirements and say what {en,de}code_coding_region does

* src/coding.c (Fencode_coding_region): Clarify what this does.
(Fdecode_coding_region): Ditto.

* src/fns.c (Fbase64_decode_region): Clarify that this function
returns bytes, not text (bug#38587).
(Fbase64_encode_region): Clarify that this function takes bytes,
not text.

4 years ago; * etc/NEWS: Fix boring oddities.
Michael Albinus [Tue, 24 Dec 2019 09:45:04 +0000 (10:45 +0100)]
; * etc/NEWS: Fix boring oddities.

4 years ago* src/emacs-module.h.in: Add reference to manual.
Philipp Stephani [Tue, 24 Dec 2019 08:47:02 +0000 (09:47 +0100)]
* src/emacs-module.h.in: Add reference to manual.

4 years agoTrivial docstring fixes
Juanma Barranquero [Tue, 24 Dec 2019 01:37:08 +0000 (02:37 +0100)]
Trivial docstring fixes

* ChangeLog.3:
* lisp/emacs-lisp/cl-macs.el (cl-flet):
* lisp/filesets.el (filesets-menu-ensure-use-cached):
* lisp/progmodes/compile.el (compilation-context-lines):
* lisp/progmodes/prolog.el (prolog-paren-indent):
* lisp/progmodes/sql.el (sql-password-search-wallet-function):
Fix typos in docstrings.

* lisp/cedet/semantic/analyze.el (semantic-analyze-push-error):
Doc fix.

* lisp/emacs-lisp/map.el (map-put, map-info): Refill docstring.
(map-contains-key): Fix typo.
(map-every-p): Doc fix.

4 years agoimagemagick-types needs to initialize ImageMagick
Dhruva Krishnamurthy [Tue, 24 Dec 2019 01:20:06 +0000 (17:20 -0800)]
imagemagick-types needs to initialize ImageMagick

* src/image.c (imagemagick_initialize): New function,
with body taken from imagemagick_load_image.
(imagemagick_load_image, Fimagemagick_types): Use it.
Copyright-paperwork-exempt: yes

4 years agoCut the emacs-27 release branch
Eli Zaretskii [Mon, 23 Dec 2019 15:41:17 +0000 (17:41 +0200)]
Cut the emacs-27 release branch

* lisp/cus-edit.el (customize-changed-options-previous-release):
Change the value to 26.3.

* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 27.0.60.

4 years agoDocument and verify that emacs_limb_t doesn’t have padding bits.
Philipp Stephani [Mon, 23 Dec 2019 14:37:49 +0000 (15:37 +0100)]
Document and verify that emacs_limb_t doesn’t have padding bits.

This is a useful property when doing further bit-twiddling with the
magnitude array before/after calling extract_big_integer or
make_big_integer.  For example, constructing an emacs_limb_t object
using repeated shift-and-add should work as expected, but relies on
the type not having padding bits.  Since the C standard already
guarantees that unsigned integers use a pure binary representation,
not having padding bits is enough to guarantee that the type has
unique object representations in the sense of C++’s
std::has_unique_object_representations.

* doc/lispref/internals.texi (Module Values): Document that
emacs_limb_t doesn’t have padding bits.

* src/emacs-module.c: Verify that emacs_limb_t doesn’t have padding
bits.

4 years agoFix extension of underline, overline, and strike-through attributes
Jimmy Aguilar Mena [Sun, 22 Dec 2019 22:46:39 +0000 (23:46 +0100)]
Fix extension of underline, overline, and strike-through attributes

* src/xdisp.c (extend_face_to_end_of_line): Don't return early
if face attributes beyond background color and box are set,
since that means these attributes need to be extended past the
EOL.

4 years ago; * lisp/mouse.el: declare functions to silence warnings
Mattias Engdegård [Mon, 23 Dec 2019 11:39:41 +0000 (12:39 +0100)]
; * lisp/mouse.el: declare functions to silence warnings

4 years agoComment on limitation of flex completion style's sorting function
João Távora [Mon, 23 Dec 2019 11:08:43 +0000 (12:08 +0100)]
Comment on limitation of flex completion style's sorting function

* lisp/minibuffer.el (completion--flex-adjust-metadata): Add
comment.

4 years agoFix a bug in completion--flex-adjust-metadata
João Távora [Mon, 23 Dec 2019 11:03:13 +0000 (12:03 +0100)]
Fix a bug in completion--flex-adjust-metadata

If minibuffer-default coincided with the first of completions, the
empty list would be returned.

* lisp/minibuffer.el (completion--flex-adjust-metadata): Make sure
to never return empty list.

4 years agoFix documentation of implied frame resizing (Bug#38684)
Martin Rudalics [Mon, 23 Dec 2019 09:50:44 +0000 (10:50 +0100)]
Fix documentation of implied frame resizing (Bug#38684)

* src/frame.c (frame_inhibit_implied_resize): Fix doc-string.
* doc/lispref/frames.texi (Implied Frame Resizing): Update and
rewrite section.

4 years agoAdded `comint-password-function' hook
Michael R. Mauger [Mon, 23 Dec 2019 04:56:05 +0000 (23:56 -0500)]
Added `comint-password-function' hook

* etc/NEWS:
* lisp/comint.el (comint-password-function): New variable.
  (comint-send-invisible): Use it.
* test/lisp/comint-tests.el (comint-test-no-password-function,
  comint-test-password-function-with-value,
  comint-test-password-function-with-nil): Test new variable.

4 years ago* lisp/files.el (save-buffers-kill-emacs): Mark "*Process List*" as dedicated.
Juri Linkov [Sun, 22 Dec 2019 23:02:22 +0000 (01:02 +0200)]
* lisp/files.el (save-buffers-kill-emacs): Mark "*Process List*" as dedicated.

Using the 'dedicated' prop for display-buffer--maybe-at-bottom marks the
window of the buffer "*Process List*" as dedicated, so it won't be replaced
by another buffer that might be visited following links to process buffers
from the buffer "*Process List*".

4 years ago* lisp/tab-bar.el: Use alist-get instead of (cdr (assq ...))
Juri Linkov [Sun, 22 Dec 2019 22:55:38 +0000 (00:55 +0200)]
* lisp/tab-bar.el: Use alist-get instead of (cdr (assq ...))

* lisp/tab-bar.el (tab-bar-mode): Bind s-0 to tab-bar-switch-to-recent-tab.

4 years ago* lisp/proced.el (proced-signal-list): Add more POSIX 1003.1-2001 signals.
Juri Linkov [Sun, 22 Dec 2019 22:51:49 +0000 (00:51 +0200)]
* lisp/proced.el (proced-signal-list): Add more POSIX 1003.1-2001 signals.

4 years agoFix bug in flex completion style's sorting and simplify
João Távora [Sun, 22 Dec 2019 21:51:08 +0000 (22:51 +0100)]
Fix bug in flex completion style's sorting and simplify

This previous commit targetting this function introduced a bug whereby
the completion table's sorting function wouldn't be called.  That is
fixed by this commit, which also simplifies the function further: it
now skips re-sorting the completions completely if there is no
minibuffer input at all (in other words, when flex isn't doing
anything useful).

* lisp/minibuffer.el (completion--flex-adjust-metadata): Simplify.

4 years ago* lisp/gnus/gnus-start.el: Use lexical-binding
Stefan Monnier [Sun, 22 Dec 2019 21:09:31 +0000 (16:09 -0500)]
* lisp/gnus/gnus-start.el: Use lexical-binding

(gnus-group-change-level, gnus-make-hashtable-from-newsrc-alist):
Use gnus-info-make.
(gnus-make-hashtable-from-newsrc-alist): Prefer `gnus-info-group`
to `car` when applied to a `gnus-info` object.
(gnus-make-hashtable-from-killed): Remove unused vars `lists` and `list`.
(gnus-gnus-to-quick-newsrc-format): Extract common code from if branches.

* lisp/gnus/gnus.el (gnus-info-make): New constructor.

4 years agoFix wording of recent documentation changes
Eli Zaretskii [Sun, 22 Dec 2019 19:02:48 +0000 (21:02 +0200)]
Fix wording of recent documentation changes

* src/xdisp.c (syms_of_xdisp):
* lisp/minibuffer.el (minibuffer-message-clear-timeout):
* etc/NEWS:
* doc/lispref/display.texi (Displaying Messages): Minor
changes of wording of a recent commit.  (Bug#38457)

4 years agoExtend tramp-tests.el for other host name syntax and file name syntax
Michael Albinus [Sun, 22 Dec 2019 12:48:36 +0000 (13:48 +0100)]
Extend tramp-tests.el for other host name syntax and file name syntax

* test/lisp/net/tramp-tests.el (inhibit-message)
(connection-local-criteria-alist)
(connection-local-profile-alist, async-shell-command-width): Declare.
(tramp-test01-file-name-syntax)
(tramp-test02-file-name-dissect): Set syntax to `default'.
(tramp-test03-file-name-defaults)
(tramp-test03-file-name-host-rules)
(tramp-test03-file-name-method-rules)
(tramp-test04-substitute-in-file-name)
(tramp-test05-expand-file-name)
(tramp-test06-directory-file-name, tramp-test44-auto-load):
Skip unless syntax is `default'.
(tramp-test06-directory-file-name, tramp-test10-write-region)
(tramp-test17-dired-with-wildcards)
(tramp-test26-file-name-completion): Handle IPv6 host names.
(tramp-test21-file-links): Support all syntaxes.
(tramp-test30-make-process, tramp-test45-unload):
Suppress compiler warnings.
(tramp-test37-make-auto-save-file-name): Skip for `separate' syntax.

4 years ago* lisp/net/trampver.el (inhibit-message): Declare.
Michael Albinus [Sun, 22 Dec 2019 12:47:38 +0000 (13:47 +0100)]
* lisp/net/trampver.el (inhibit-message): Declare.

4 years agoAdd item to Frequently Asked Questions of Tramp manual
Michael Albinus [Sun, 22 Dec 2019 12:47:29 +0000 (13:47 +0100)]
Add item to Frequently Asked Questions of Tramp manual

* doc/misc/tramp.texi (Frequently Asked Questions): Add item for
ControlMaster option on proxy hosts.  Explain changing syntax to
Ange FTP.

4 years ago* lisp/term/ns-win.el (ns-insert-working-text): Comment is obsolete.
Alan Third [Sun, 22 Dec 2019 12:03:33 +0000 (12:03 +0000)]
* lisp/term/ns-win.el (ns-insert-working-text): Comment is obsolete.

4 years agoImprove sorting of flex completion style with non-nil minibuffer-default
João Távora [Sun, 22 Dec 2019 11:52:17 +0000 (12:52 +0100)]
Improve sorting of flex completion style with non-nil minibuffer-default

This affects the behaviour of flex completion when there is a default
completion and the user hasn't entered any input pattern to flex-match
against.  It is most visible when icomplete-mode or fido-mode are
being used in conjunctio.

When using M-x man, for instance, the default completion is picked
from text around point.  Say it is "emacs" (for Emacs's man page).  It
will not match the intended completion, "emacs(1)", exactly.  If the
user hasn't yet given any input to the completion prompt, that
completion should bubble to top so that
icomplete-force-complete-and-exit will select it, but it didn't.

This new approach uses 'string-prefix-p' instead of 'equal' to find
the default to bubble to the top.  This strategy could eventually be
improved, most naturally by flex-matching the default string to all
the candidates and picking the highest scoring one.

Additionally, the new strategy only considers minibuffer-default if
there is no input in the minibuffer, which seems sensible and produces
a small but noticeable speedup.

* lisp/minibuffer.el (completion--flex-adjust-metadata):
Reformulate sorting strategy.

4 years agoFix display of working text on NS (Bug#23412, Bug#1453)
Masahiro Nakamura [Wed, 18 Dec 2019 15:32:54 +0000 (00:32 +0900)]
Fix display of working text on NS (Bug#23412, Bug#1453)

* lisp/term/ns-win.el (ns-insert-working-text):
(ns-delete-working-text): Change how working text is deleted to handle
changed order of operations.
* src/nsterm.m ([EmacsView insertText:]): Move deletion of working
text until after insertion of new text.

Copyright-paperwork-exempt: yes

4 years agoCheck if file is in iCloud drive (bug#38618)
Alan Third [Tue, 17 Dec 2019 21:17:46 +0000 (21:17 +0000)]
Check if file is in iCloud drive (bug#38618)

* src/nsfns.m (ns_set_represented_filename): Check whether the file is
a `ubiquitous item', and if so don't display a proxy icon.

4 years ago* lisp/tab-bar.el: Rename tab-bar-list to tab-switcher (bug#38624)
Juri Linkov [Sat, 21 Dec 2019 23:10:56 +0000 (01:10 +0200)]
* lisp/tab-bar.el: Rename tab-bar-list to tab-switcher (bug#38624)

4 years agoNew variable set-message-function to show message at the end of the minibuffer
Juri Linkov [Sat, 21 Dec 2019 22:02:10 +0000 (00:02 +0200)]
New variable set-message-function to show message at the end of the minibuffer

* doc/lispref/display.texi (Displaying Messages): Document
set-message-function and clear-message-function.

* lisp/minibuffer.el (minibuffer-message-clear-timeout): New defcustom.
(minibuffer-message-timer, minibuffer-message-overlay): New variables.
(set-minibuffer-message, clear-minibuffer-message): New functions.
(set-message-function, clear-message-function): Set variables to
set-minibuffer-message and clear-minibuffer-message respectively.

* src/keyboard.c (read_char): Call clear_message when
Vclear_message_function is a function.

* src/xdisp.c (set_message): Call Vset_message_function when it's a function.
(clear_message): Call Vclear_message_function when it's a function.
(syms_of_xdisp): New variables set-message-function and clear-message-function
(bug#38457).

4 years agobackup-by-copying-when-privileged-mismatch applies to file gid, too.
Stephen Gildea [Fri, 20 Dec 2019 17:15:13 +0000 (09:15 -0800)]
backup-by-copying-when-privileged-mismatch applies to file gid, too.

* lisp/files.el (backup-by-copying-when-privileged-mismatch):  In addition
to checking the file uid, a second test is added: if the file gid is not
greater than backup-by-copying-when-privileged-mismatch,
backup-by-copying-when-mismatch will also be forced on.

* doc/emacs/files.texi, doc/lispref/backups.texi: Updated documentation.

Also fixed a typo in the Emacs reference manual, changing "higher" to
"no greater" so that the limit is no longer documented reversed.

4 years ago;* src/process.c (read_process_output): Fix last change.
Eli Zaretskii [Sat, 21 Dec 2019 18:18:05 +0000 (20:18 +0200)]
;* src/process.c (read_process_output): Fix last change.

4 years agoAdd new function `python-shell-send-statement'
lin.sun [Fri, 29 Nov 2019 08:10:12 +0000 (03:10 -0500)]
Add new function `python-shell-send-statement'

* lisp/progmodes/python.el (python-shell-send-statement): New function.
(python-mode-map): Bind it to key "C-c C-e", and define a python-menu
item for it.  (Bug#38426)

4 years agoAllow control of data amount read from subprocess in one chunk
Eli Zaretskii [Sat, 21 Dec 2019 08:47:31 +0000 (10:47 +0200)]
Allow control of data amount read from subprocess in one chunk

* src/process.c (syms_of_process) <read-process-output-max>:
New variable.
(read_process_output): Use it instead of the hard-coded
constant 4096.  (Bug#38561)
Use SAFE_ALLOCA to support large buffers for reading process
output.

* etc/NEWS: Mention 'read-process-output-max'.

4 years ago* lisp/international/mule-cmds.el: Fix bug#38642
Stefan Monnier [Fri, 20 Dec 2019 22:34:38 +0000 (17:34 -0500)]
* lisp/international/mule-cmds.el: Fix bug#38642

(universal-coding-system-argument): Adjust the code to the way
`universal-argument` works nowadays.  Handle `prefix-arg` a bit more
like `command_loop` does.

* test/lisp/international/mule-tests.el
(mule-cmds--test-universal-coding-system-argument): New test.

4 years agoSpeed up vc-dir-update
Dmitry Gutov [Fri, 20 Dec 2019 22:07:08 +0000 (00:07 +0200)]
Speed up vc-dir-update

* lisp/vc/vc-dir.el (vc-dir-update): Speed up.
(https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00568.html)

4 years agoElisp manual: mention parse-partial-sexp as the source of a parser state, etc
Alan Mackenzie [Fri, 20 Dec 2019 19:55:29 +0000 (19:55 +0000)]
Elisp manual: mention parse-partial-sexp as the source of a parser state, etc

* doc/lispref/syntax.texi (Parser State): mention parse-partial-sexp as a
function returning a parser state, and the function to which one supplies a
parser state as an argument for continued parsing.
Refine the documentation of syntax-ppss-context, and correct the text
introducing it and another function.

4 years agoSupport setting OS names of threads on MS-Windows
Eli Zaretskii [Fri, 20 Dec 2019 18:59:07 +0000 (20:59 +0200)]
Support setting OS names of threads on MS-Windows

* src/w32fns.c (setup_w32_kbdhook): Don't initialize
is_debugger_present here...
(globals_of_w32fns): ...initialize it here.  Also initialize
the new global variable set_thread_description.
* src/systhread.c: [WINDOWSNT] Include mbctype.h
(w32_set_thread_name): New function.
(MS_VC_EXCEPTION): New macro.
(THREADNAME_INFO, IsDebuggerPresent_Proc)
(SetThreadDescription_Proc): New typedefs.
(w32_beginthread_wrapper): Call w32_set_thread_name to set the
name of the new thread.
* src/thread.h (struct thread_state): New member thread_name.
* src/thread.c (Fmake_thread): Set the thread_name field of
the new thread object.
(run_thread): Free the thread_name member after the thread
exits.

4 years agoFix error in tramp-process-sentinel
Michael Albinus [Fri, 20 Dec 2019 12:32:24 +0000 (13:32 +0100)]
Fix error in tramp-process-sentinel

* lisp/net/tramp.el (tramp-process-sentinel): Check, that process
buffer is alive.

4 years ago* lisp/tab-bar.el: Sort tab names by recency for tab switching (bug#38624)
Juri Linkov [Thu, 19 Dec 2019 23:18:28 +0000 (01:18 +0200)]
* lisp/tab-bar.el: Sort tab names by recency for tab switching (bug#38624)

* lisp/tab-bar.el (tab-bar--tabs-recent): New function with code
extracted from tab-bar--tab-index-recent.
(tab-bar-switch-to-tab): Use tab-bar--tabs-recent in interactive spec
to sort names of tabs by recency for default values of completing-read.
(tab-prefix-map): Bind RET to tab-bar-select-tab-by-name, and 'm' to tab-move.

4 years ago; Fix typos in ange-ftp.el (bug#38660)
Michael Albinus [Thu, 19 Dec 2019 08:34:44 +0000 (09:34 +0100)]
; Fix typos in ange-ftp.el (bug#38660)

4 years agoMore precise 'regexp-opt' documentation
Mattias Engdegård [Sun, 15 Dec 2019 21:17:11 +0000 (22:17 +0100)]
More precise 'regexp-opt' documentation

* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
* doc/lispref/searching.texi (Regexp Functions):
Be more specific about how the KEEP-ORDER argument actually works.
If nil, the regexp guarantees a longest match; this is the behaviour
that many callers implicitly rely on.

4 years agoFix an error with remote file name in compile.el
Michael Albinus [Wed, 18 Dec 2019 09:19:19 +0000 (10:19 +0100)]
Fix an error with remote file name in compile.el

* lisp/progmodes/compile.el (compilation-get-file-structure):
Compute proper remote file name.  (Bug#38648)

4 years agoVerilog-Mode collected updates.
Wilson Snyder [Tue, 17 Dec 2019 23:04:48 +0000 (18:04 -0500)]
Verilog-Mode collected updates.

* lisp/progmodes/verilog-mode.el (verilog-compiler-directives): Support
indenting `uselib.
(verilog-read-decls): Fix AUTO* to ignore `protected regions.
(verilog-read-auto-template-middle): Fix AUTO_TEMPLATEs with multiple
module templates and at-REGEXPs, msg3183.  Reported by Berk Akinci.

4 years agoImprove Tramp's file-name-completion
Michael Albinus [Tue, 17 Dec 2019 09:38:42 +0000 (10:38 +0100)]
Improve Tramp's file-name-completion

* lisp/net/tramp.el (tramp-handle-file-name-completion):
Filter out "./" and "../", if there's only one other result.

4 years agoAdjust cursor column when auto-scrolling during rectangle selection
Mattias Engdegård [Mon, 16 Dec 2019 21:42:16 +0000 (22:42 +0100)]
Adjust cursor column when auto-scrolling during rectangle selection

* lisp/mouse.el (mouse-drag-region-rectangle):
Move cursor to the correct column during auto-scrolling both when
crutches are used and not (bug#38641).  Reported by Konrad Podczeck.

4 years agoMake ls-files-unknown only return proper files, not directories
Andrii Kolomoiets [Mon, 16 Dec 2019 23:49:34 +0000 (01:49 +0200)]
Make ls-files-unknown only return proper files, not directories

* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage):
Make ls-files-unknown only return proper files, not directories
(bug#38615).

4 years agovc-git-after-dir-status-stage: Avoid erroneous up-to-date status
Dmitry Gutov [Mon, 16 Dec 2019 21:55:11 +0000 (23:55 +0200)]
vc-git-after-dir-status-stage: Avoid erroneous up-to-date status

* lisp/vc/vc-git.el (vc-git-after-dir-status-stage):
Don't set `up-to-date' status if the previous stage (`diff-index')
has assigned some other status to the file (bug#38615).

4 years agoFix face merging for display strings broken by a recent commit
Eli Zaretskii [Mon, 16 Dec 2019 15:43:30 +0000 (17:43 +0200)]
Fix face merging for display strings broken by a recent commit

* src/xfaces.c (face_at_string_position): Revert the last
change, as it cannot possibly solve bug#38563.
* src/xdisp.c (face_at_pos): Fix a typo made during last
change here, which broke face merging for display strings.
(Bug#38633)

4 years ago* lisp/isearch.el (isearch-xterm-paste): Use code like in 'xterm-paste'.
Juri Linkov [Mon, 16 Dec 2019 00:18:00 +0000 (02:18 +0200)]
* lisp/isearch.el (isearch-xterm-paste): Use code like in 'xterm-paste'.

Add arg 'event' and use it to get pasted text.
This allows pasting text on terminals to the
search string (bug#18727, bug#36950).

4 years agoRevert aa89c84e00d8dc85100e6fedab7631c415e6364d (bug#38457)
Juri Linkov [Sun, 15 Dec 2019 23:58:14 +0000 (01:58 +0200)]
Revert aa89c84e00d8dc85100e6fedab7631c415e6364d (bug#38457)

* src/editfns.c (Fmessage): Don't use minibuffer-message.
(Fmessage_in_echo_area): Remove function message-in-echo-area.
(syms_of_editfns): Remove variable message-in-echo-area.

* lisp/isearch.el (isearch--momentary-message): Remove message-in-echo-area.
* lisp/minibuffer.el (minibuffer-message): Don't record message
in the *Messages* buffer.
(minibuffer-completion-help): Remove message-in-echo-area.

* lisp/subr.el (do-after-load-evaluation): Remove discard-input (bug#38560)

4 years ago* lisp/tab-line.el (tab-line-auto-hscroll): Improve.
Juri Linkov [Sun, 15 Dec 2019 23:14:02 +0000 (01:14 +0200)]
* lisp/tab-line.el (tab-line-auto-hscroll): Improve.

Better handling of tabs scrolled to the left.
Don't scroll tabs that are already visible.

Remove setq of buffer-undo-list because undo is disabled
anyway in internal buffers with name " *temp*".

4 years ago* lisp/tab-bar.el (tab-bar-handle-mouse): Handle close button.
Juri Linkov [Sun, 15 Dec 2019 23:08:45 +0000 (01:08 +0200)]
* lisp/tab-bar.el (tab-bar-handle-mouse): Handle close button.

4 years ago* lisp/tab-bar.el (tab-bar-select-tab): Message about selected tab (bug#38624)
Juri Linkov [Sun, 15 Dec 2019 23:03:55 +0000 (01:03 +0200)]
* lisp/tab-bar.el (tab-bar-select-tab): Message about selected tab (bug#38624)

4 years ago* lisp/tab-bar.el (tab-bar-close-other-tabs): Use tab close customs
Robert Cochran [Wed, 11 Dec 2019 18:29:00 +0000 (10:29 -0800)]
* lisp/tab-bar.el (tab-bar-close-other-tabs): Use tab close customs

4 years agoDocument variables that affect tabs in function docstrings
Robert Cochran [Wed, 11 Dec 2019 18:04:06 +0000 (10:04 -0800)]
Document variables that affect tabs in function docstrings

* lisp/tab-bar.el (tab-bar-new-tab-to): Mention
tab-bar-post-open-functions in docstring.
(tab-bar-close-tab): Mention tab-bar-prevent-tab-functions,
tab-bar-tab-pre-close-functions, and tab-bar-close-last-tab-choice.

4 years agoNew command 'diff-buffers'
Phil Sainty [Sat, 14 Dec 2019 07:49:41 +0000 (20:49 +1300)]
New command 'diff-buffers'

* lisp/vc/diff.el (diff-buffers): New command.
(diff, diff-no-select, diff-file-local-copy): Improve docstrings.
* doc/emacs/files.texi:
* etc/NEWS: Document new command, and the previously-undocumented
ability for 'diff' to compare buffers.

4 years agoAdjust intptr_t advice
Paul Eggert [Sat, 14 Dec 2019 22:22:03 +0000 (14:22 -0800)]
Adjust intptr_t advice

* doc/lispref/internals.texi (C Integer Types): Say to prefer
uintptr_t when pointer arithmetic might overflow intptr_t.

4 years agoRemove nothing from union output_data
Paul Eggert [Sat, 14 Dec 2019 22:13:10 +0000 (14:13 -0800)]
Remove nothing from union output_data

* src/frame.h (union output_data): Remove ‘nothing’ member.
It has had no effect for quite some time.
All uses removed.

4 years agoUpdate documentation of pure-space overflow
Eli Zaretskii [Sat, 14 Dec 2019 18:02:11 +0000 (20:02 +0200)]
Update documentation of pure-space overflow

* doc/lispref/internals.texi (Garbage Collection)
(Pure Storage):
* src/alloc.c (Fgarbage_collect): Update the documentation of
pure-space overflow for when pdumper is used.  (Bug#38492)

4 years ago* lisp/minibuffer.el (completion-pcm--find-all-completions): Simplify a bit
Stefan Monnier [Sat, 14 Dec 2019 17:40:29 +0000 (12:40 -0500)]
* lisp/minibuffer.el (completion-pcm--find-all-completions): Simplify a bit

4 years ago* lisp/net/tramp.el (tramp-initial-file-name-regexp): Make it more precise.
Michael Albinus [Sat, 14 Dec 2019 13:20:00 +0000 (14:20 +0100)]
* lisp/net/tramp.el (tramp-initial-file-name-regexp): Make it more precise.

4 years agoFix cross-references in ELisp manual
Eli Zaretskii [Sat, 14 Dec 2019 11:56:29 +0000 (13:56 +0200)]
Fix cross-references in ELisp manual

* doc/lispref/commands.texi (Misc Events, Special Events): Fix
cross-references.  (Bug#38520)

4 years agoDon't warn about pure-space overflow
Eli Zaretskii [Sat, 14 Dec 2019 11:39:26 +0000 (13:39 +0200)]
Don't warn about pure-space overflow

* lisp/startup.el (command-line-1): Don't warn about
pure-space overflow if we were dumped with pdumper.
(Bug#38492)

4 years agoFix typo that broke GNU/Linux unexec build
Paul Eggert [Sat, 14 Dec 2019 01:06:52 +0000 (17:06 -0800)]
Fix typo that broke GNU/Linux unexec build

* src/emacs.c (Fdump_emacs): Remove stray closing brace that
breaks the build when configured with --with-dumping=unexec on
GNU/Linux.  (Apparently everybody is using pdumper now.)
I introduced the bug in 2019-07-09T00:50:39Z!eggert@cs.ucla.edu.

4 years agoxfaces.c: Silence spurious maybe-uninitialized compiler warning
Juanma Barranquero [Fri, 13 Dec 2019 17:52:49 +0000 (18:52 +0100)]
xfaces.c: Silence spurious maybe-uninitialized compiler warning

* src/xfaces.c (face_inherited_attr): Initialize 'ok' to false.

4 years agoDisable undo in the process buffers of a JSONRPC connection
João Távora [Wed, 11 Dec 2019 21:26:35 +0000 (22:26 +0100)]
Disable undo in the process buffers of a JSONRPC connection

* lisp/jsonrpc.el (initialize-instance jsonrpc-process-connection):
Use buffer-disable-undo in stdout and stderr buffers.

* lisp/jsonrpc.el (Version): Bump to 1.0.9

4 years ago* lisp/net/tramp.el (tramp-unload-tramp): Autoload function body.
Michael Albinus [Fri, 13 Dec 2019 15:36:57 +0000 (16:36 +0100)]
* lisp/net/tramp.el (tramp-unload-tramp): Autoload function body.

4 years agopython-shell-completion-at-point: respect simple-operator (Bug#37808)
Andrii Kolomoiets [Fri, 18 Oct 2019 13:04:32 +0000 (16:04 +0300)]
python-shell-completion-at-point: respect simple-operator (Bug#37808)

* lisp/progmodes/python.el (python-shell-completion-at-point): Also
stop on simple-operator while parsing input.

4 years agoAllow characters and single-char strings in rx charsets
Mattias Engdegård [Fri, 13 Dec 2019 12:10:58 +0000 (13:10 +0100)]
Allow characters and single-char strings in rx charsets

The `not' and `intersection' forms, and `or' inside these forms,
now accept characters and single-character strings as arguments.
Previously, they had to be wrapped in `any' forms.
This does not add expressive power but is a convenience and is easily
understood.

* doc/lispref/searching.texi (Rx Constructs): Amend the documentation.
* etc/NEWS: Announce the change.
* lisp/emacs-lisp/rx.el (rx--charset-p, rx--translate-not)
(rx--charset-intervals, rx): Accept characters and 1-char strings in
more places.
* test/lisp/emacs-lisp/rx-tests.el (rx-not, rx-charset-or)
(rx-def-in-charset-or, rx-intersection): Test the change.

4 years ago; * src/emacs-module.h.in: Sort includes alphabetically.
Philipp Stephani [Fri, 13 Dec 2019 12:21:36 +0000 (13:21 +0100)]
; * src/emacs-module.h.in: Sort includes alphabetically.

4 years agoAdd prefix to help.el uni-confusable* vars
Noam Postavsky [Fri, 13 Dec 2019 11:36:02 +0000 (06:36 -0500)]
Add prefix to help.el uni-confusable* vars

* lisp/help.el (help-uni-confusables, help-uni-confusables-regexp):
Rename from uni-confusable and uni-confusables-regexp, respectively.
(help-uni-confusable-suggestions): Use ngettext.  Use new variable
name.
* lisp/emacs-lisp/lisp-mode.el (lisp--match-confusable-symbol-character):
Use new variable name.

4 years agoA better fix for extension of overlay string's faces
Eli Zaretskii [Fri, 13 Dec 2019 10:29:05 +0000 (12:29 +0200)]
A better fix for extension of overlay string's faces

* src/xdisp.c (face_at_pos): Revert previous change that
rejected the underlying face if it failed the filtering
criteria.
* src/xfaces.c (face_at_string_position): Reset the base face's
attribute used for filtering faces if the attribute is t.
(Bug#38563)