João Távora [Mon, 18 Feb 2019 20:41:09 +0000 (20:41 +0000)]
cycle-sort-function prevails in completion-all-sorted-completions
* lisp/minibuffer.el (completion-all-sorted-completions): If
completion table has cycle-sort-function, that prevails over other
sorting strategies.
João Távora [Mon, 18 Feb 2019 20:32:38 +0000 (20:32 +0000)]
switch-to-buffer's completion table uses its own sorting
* src/minibuf.c (Finternal_complete_buffer): Add
Qcycle_sort_function to completion table's metadata.
(syms_of_minibuf): New symbol Qcycle_sort_function.
Michael R. Mauger [Tue, 19 Feb 2019 04:31:21 +0000 (23:31 -0500)]
Merge branch 'wallet'
Michael R. Mauger [Tue, 19 Feb 2019 04:15:54 +0000 (23:15 -0500)]
* lisp/progmodes/sql.el: Added password wallet using
`auth-source' package.
(sql-auth-source-search-wallet): New function.
(sql-password-wallet): New variable.
(sql-password-search-wallet-function): New variable.
(sql-get-login): Handle password wallet search.
(sql-product-interactive): Handle password function.
* test/lisp/progmodes/sql-test.el: Test wallet changes.
(sql-test-login-params): New test variable.
(with-sql-test-connect-harness): New macro to wrap test
configuration around calls to `sql-connect'.
(sql-test-connect, sql-test-connect-password-func)
(sql-test-connect-wallet-server-database)
(sql-test-connect-wallet-database)
(sql-test-connect-wallet-server): New ERT tests.
* etc/NEWS: Updated SQL Mode descriptions.
Stefan Monnier [Tue, 19 Feb 2019 04:11:25 +0000 (23:11 -0500)]
* lisp/mh-e/mh-acros.el (mh-defstruct): Minor simplification
Stefan Monnier [Tue, 19 Feb 2019 03:49:30 +0000 (22:49 -0500)]
* lisp/erc/erc.el (erc-version-string): Remove, unused
Michael R. Mauger [Tue, 19 Feb 2019 02:51:09 +0000 (21:51 -0500)]
* lisp/progmodes/sql.el defensive programming
(sql-statement-regexp): if 'ansi' dialect is not defined, use "select"
(sql-interactive-mode): establish process sentinel iff there is a
process. Default values for :prompt-regexp and :prompt-length.
(sql-product-interactive): only check process status iff there is a
process.
Stefan Monnier [Tue, 19 Feb 2019 00:00:44 +0000 (19:00 -0500)]
* lisp/elec-pair.el: Do modify+undo more carefully
(electric-pair-inhibit-if-helps-balance): Use the undo system
instead of undoing by hand.
Paul Eggert [Mon, 18 Feb 2019 22:51:26 +0000 (14:51 -0800)]
Speed up cl-list-length
* lisp/emacs-lisp/cl-extra.el (cl-list-length): Use ‘length’
to do the real work; this is simpler and uses a better algorithm.
Paul Eggert [Mon, 18 Feb 2019 22:42:45 +0000 (14:42 -0800)]
Minor profiler improvements
* src/profiler.c (evict_lower_half, record_backtrace)
(setup_cpu_timer, cmpfn_profiler, hashfn_profiler):
Assume C99. Use bool for boolean.
(timer_getoverrun): Remove; simplify use to not need it.
(Fprofiler_cpu_start): Any negative return from setup_cpu_timer fails.
(Fprofiler_cpu_stop): Simplify initialization.
Stefan Monnier [Mon, 18 Feb 2019 18:16:57 +0000 (13:16 -0500)]
* lisp/emacs-lisp/cl-lib.el (cl-endp): Move to cl-seq.el
Use 'cl-check-type'.
Ken Brown [Sun, 17 Feb 2019 17:10:26 +0000 (12:10 -0500)]
Use 'timer_getoverrun' on Cygwin when possible
* configure.ac: Add a check for the 'timer_getoverrun' function.
* src/profiler.c [CYGWIN] : Define 'timer_getoverrun' as a
macro only on versions of Cygwin where it is not already
defined as a function.
Stefan Monnier [Mon, 18 Feb 2019 14:43:59 +0000 (09:43 -0500)]
* lisp/vc/smerge-mode.el (smerge-change-buffer-confirm): New var
(smerge-vc-next-conflict): Obey it. Save buffer before going to
the next. Don't emit message when vc-find-conflicted-file can't find
other conflicted file.
* lisp/vc/vc-hooks.el: Use lexical-binding.
* lisp/vc/vc.el: Remove redundant :groups.
(vc-find-conflicted-file): Autoload.
Konstantin Kharlamov [Mon, 18 Feb 2019 14:15:08 +0000 (09:15 -0500)]
* lisp/vc/smerge-mode.el (smerge-vc-next-conflict): New command
Copyright-paperwork-exempt: yes
Michael Albinus [Mon, 18 Feb 2019 09:54:45 +0000 (10:54 +0100)]
Increase timeout on emba for Tramp
* test/lisp/net/tramp-tests.el
(tramp--test-shell-command-to-string-asynchronously):
Increase timeout on emba.
Paul Eggert [Mon, 18 Feb 2019 08:18:11 +0000 (00:18 -0800)]
* src/fns.c: Fix comment.
Paul Eggert [Mon, 18 Feb 2019 07:17:12 +0000 (23:17 -0800)]
emacs-init-time outputs more digits now
* lisp/time.el (emacs-init-time): Output more digits;
formerly this was always outputting "0.0 seconds" for me
because the number of seconds was less than 0.1.
Paul Eggert [Mon, 18 Feb 2019 05:35:19 +0000 (21:35 -0800)]
* lisp/emacs-lisp/cl-lib.el (cl-endp): Remove stray 'x.
Juri Linkov [Sun, 17 Feb 2019 21:07:43 +0000 (23:07 +0200)]
* lisp/tar-mode.el (tar--try-jka-compr): Remove. (Bug#34251)
(tar-extract): Call archive-try-jka-compr instead of tar--try-jka-compr.
* lisp/arc-mode.el (archive-try-jka-compr): Call set-buffer-multibyte
after erase-buffer.
Alan Mackenzie [Sun, 17 Feb 2019 18:57:10 +0000 (18:57 +0000)]
Fontify C function identifiers in parentheses correctly (e.g. in lisp.h)
Fix handling of CC Mode's syntactic WS cache. Make noise-macro option
variables buffer local.
* lisp/progmodes/cc-engine.el (c-put-is-sws, c-put-in-sws, c-remove-is-sws)
(c-remove-in-sws c-remove-is-and-in-sws): Add edebug specs.
(c-invalidate-sws-region-before): Add a `beg' parameter. Handle noise
macros like other literals.
(c-invalidate-sws-region-after-del): Move the adjustment of (cdr
c-sws-lit-limits) due to buffer change to c-invalidate-sws-region-after.
(c-invalidate-sws-region-after-ins): Move (goto-char end) to the correct
place.
(c-invalidate-sws-region-after): Adjust (cdr c-sws-lit-limits) due to buffer
change. Handle noise macros.
(c-backward-sws): Set simple-ws-beg appropriately when the start point is in
the middle of a noise macro.
(c-forward-decl-or-cast-1): Recognize a function identifier being declared in
parentheses.
* lisp/promodes/cc-mode.el (c-before-change): Supply a `beg' argument to
c-invalidate-sws-region-before.
* lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
(c-noise-macro-name-re, c-noise-macro-names, c-noise-macro-with-parens-names):
Make these buffer local variables.
Alan Mackenzie [Sun, 17 Feb 2019 18:33:54 +0000 (18:33 +0000)]
* Put INLINE and ATTRIBUTE_NO_SANITIZE_UNDEFINED into c-noise-macro-names
* .dir-locals (entry for c-mode): Put the two strings into
c-noise-macro-names.
Paul Eggert [Sat, 16 Feb 2019 18:17:33 +0000 (10:17 -0800)]
* src/lread.c (readevalloop): Simplify via suffix_p.
Eli Zaretskii [Sat, 16 Feb 2019 14:52:53 +0000 (16:52 +0200)]
* lisp/startup.el (load--user-init-file): Support early-init.elc as well.
Stefan Monnier [Sat, 16 Feb 2019 14:19:33 +0000 (09:19 -0500)]
* lisp/startup.el: Rename load-user-init-file
Remove redundant :groups.
(startup--load-user-init-file): Rename from load-user-init-file.
Mattias Engdegård [Fri, 15 Feb 2019 18:27:48 +0000 (19:27 +0100)]
Prevent over-eager rx character range condensation
`rx' incorrectly considers character ranges between ASCII and raw bytes to
cover all codes in-between, which includes all non-ASCII Unicode chars.
This causes (any "\000-\377" ?Å) to be simplified to (any "\000-\377"),
which is not at all the same thing: [\000-\377] really means
[\000-\177\200-\377] (Bug#34492).
* lisp/emacs-lisp/rx.el (rx-any-condense-range): Split ranges going
from ASCII to raw bytes.
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any-raw-byte): Add test case.
* etc/NEWS: Mention the overall change (Bug#33205).
Paul Eggert [Sat, 16 Feb 2019 08:27:53 +0000 (09:27 +0100)]
Port tramp-adb to various 'touch' platforms
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Try nanoseconds first, then plain seconds, then touch -t.
Eli Zaretskii [Sat, 16 Feb 2019 07:15:40 +0000 (09:15 +0200)]
Fix 'early-init-file' value when file is missing
* lisp/startup.el (command-line): Pass 'early-init.el', with
an explicit .el extension, to load-user-init-file.
Reported by Radon Rosborough <radon.neon@gmail.com> in
http://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00314.html.
Stefan Monnier [Sat, 16 Feb 2019 00:07:20 +0000 (19:07 -0500)]
* lisp/progmodes/cc-engine.el: Remove unneeded require of 'cl'
Stefan Monnier [Fri, 15 Feb 2019 23:34:38 +0000 (18:34 -0500)]
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk
Stefan Monnier [Fri, 15 Feb 2019 23:02:40 +0000 (18:02 -0500)]
* src/lread.c (readevalloop): Use filename to decide macroexpansion
Glenn Morris [Fri, 15 Feb 2019 21:49:27 +0000 (16:49 -0500)]
* test/lisp/textmodes/conf-mode-tests.el (conf-test-align-assignments):
Fix whitespace.
Glenn Morris [Fri, 15 Feb 2019 21:25:31 +0000 (13:25 -0800)]
Merge from origin/emacs-26
f721084 (origin/emacs-26) Avoid errors in erc-dcc.el when erc-dcc-ver...
3cba92d Fix faces in compilation messages
Glenn Morris [Fri, 15 Feb 2019 21:25:31 +0000 (13:25 -0800)]
; Merge from origin/emacs-26
The following commit was skipped:
834ca18 * doc/misc/eshell.texi (Built-ins): Fix alias description
Glenn Morris [Fri, 15 Feb 2019 21:25:31 +0000 (13:25 -0800)]
Merge from origin/emacs-26
25d9fe2 Work for empty MIME attachments (related to bug#34387)
Glenn Morris [Fri, 15 Feb 2019 21:25:30 +0000 (13:25 -0800)]
; Merge from origin/emacs-26
The following commits were skipped:
58e0e92 Backport: js-indent-align-list-continuation: Make variable safe
6d89120 Avoid crashes upon C-g in nested invocations of 'read_char'
Glenn Morris [Fri, 15 Feb 2019 21:25:30 +0000 (13:25 -0800)]
Merge from origin/emacs-26
3f4b8e9 * src/data.c (Fmake_local_variable): Fix bug#34318
b384996 Minor fixes in ELisp manual wrt syntax-table properties
71fc6d2 * admin/notes/emba: New file.
3aaa2d2 Fix Hunspell invocation for discovering its dictionaries
# Conflicts:
# test/src/data-tests.el
Stefan Monnier [Fri, 15 Feb 2019 15:29:02 +0000 (10:29 -0500)]
* lisp/progmodes/compile.el: Remove redundant :groups
(compilation-shell-minor-mode, compilation-minor-mode): Use :lighter
rather than the old positional args.
(compilation-next-error): Make "No error here" into a user-error.
Eli Zaretskii [Fri, 15 Feb 2019 13:45:23 +0000 (15:45 +0200)]
Make ls-lisp.el behave like Posix hosts when directory doesn't exist
* lisp/ls-lisp.el (ls-lisp-insert-directory): For a directory
that cannot be accessed, signal an error, like insert-directory
does on Posix systems. This causes files-tests.el to pass on
MS-Windows.
Eli Zaretskii [Fri, 15 Feb 2019 10:22:49 +0000 (12:22 +0200)]
Support ~USER for some names on MS-Windows
* src/w32.c (getpwnam): Support usernames provided through
LOGNAME or USERNAME environment variables, to mimic what
editfns.c:init_editfns does.
Alex Branham [Mon, 11 Feb 2019 22:08:55 +0000 (16:08 -0600)]
Add basic conf-mode tests
* test/lisp/textmodes/conf-mode-tests.el: New file with tests for
conf-mode. Mostly taken from conf-mode docstrings. (Bug#34419)
Alex Branham [Sun, 10 Feb 2019 20:32:29 +0000 (14:32 -0600)]
Use lexical binding for conf-mode
* lisp/textmodes/conf-mode.el: Use lexical binding.
(conf-align-assignments, conf-quote-normal, conf-mode-initialize):
Doc fix. (Bug#34419)
Eli Zaretskii [Fri, 15 Feb 2019 08:33:01 +0000 (10:33 +0200)]
Add documentation for last change in eww.el
* doc/misc/eww.texi (Basics): Document the prefix arg effect
on "M-x eww". (Bug#34374)
* etc/NEWS: Mention the change in behavior of 'eww'.
İ. Göktuğ Kayaalp [Sat, 9 Feb 2019 14:41:31 +0000 (17:41 +0300)]
* lisp/net/eww.el (eww): With prefix arg, open url in new buffer.
Bug#34374
Victor J. Orlikowski [Sun, 10 Feb 2019 16:13:57 +0000 (11:13 -0500)]
Avoid errors in erc-dcc.el when erc-dcc-verbose is non-nil
* lisp/erc/erc-dcc.el (erc-dcc-get-filter): Don't assume STR
is always a string. Use 'buffer-name' to get the DCC file
name, as buffer-file-name is not set in the process buffer.
Copyright-paperwork-exempt: yes
Daniel Lopez [Thu, 14 Feb 2019 16:05:10 +0000 (16:05 +0000)]
Fix faces in compilation messages
* lisp/progmodes/compile.el (compilation-parse-errors): Don't
clobber the value of TYPE inside the loop. (Bug#34479)
Copyright-paperwork-exempt: yes
Gregor Zattler [Wed, 13 Feb 2019 20:01:17 +0000 (21:01 +0100)]
* doc/misc/eshell.texi (Built-ins): Fix alias description
Dear eamcs developers, eshells current documentation first states
that alias definitions are not saved to an alias file, later that
they are saved to an alias file. I tested it and the latter is
correct.
Please find attached a patch which fixes this.
Thanks for working on emacs which is really great, Gregor
>From
1fe51cc769ab7a30d0896fb3d6105c0561243fa7 Mon Sep 17 00:00:00 2001
From: Gregor Zattler <telegraph@gmx.net>
Date: Wed, 13 Feb 2019 20:19:38 +0100
Subject: * doc/misc/eshell.texi (Built-ins): Fix alias description.
Bring description of built-in 'alias' in line with (info "(eshell) Aliases"),
which describes the actual behaviur.
(cherry picked from commit
a48099ce7ff63cda416a870766fe61f5b8ac7c2c)
João Távora [Thu, 14 Feb 2019 23:33:49 +0000 (23:33 +0000)]
Change scoring strategy for 'flex' completion style
The previous strategy had problems comparing scores of matches to
strings of different lengths. This one seems slightly more sensible,
and uses a new constant `flex-score-match-tightness' instead of the
more abstract `flex-score-falloff'.
It's not completely without problems, and I think it shouldn't count
"holes" at the front and at the back, but that needs a different
"pattern-to-regexp" conversion in completion-pcm--hilit-commonality.
(defun test ()
(mapcar (lambda (a)
(cons (substring-no-properties a)
(get-text-property 0 'completion-score a)))
(sort (completion-pcm--hilit-commonality
'(prefix "f" star "o" star "o" point)
'("foo"
"barfoobaz"
"foobarbaz"
"barbazfoo"
"fabrobazo"
"foot"
"foto"
"fotttttttttttttttttttttttto"))
(lambda (a b)
(> (get-text-property 0 'completion-score a)
(get-text-property 0 'completion-score b))))))
(let ((flex-score-match-tightness 100)) (test))
=> (("foo" . 1.0)
("foot" . 0.375)
("foto" . 0.375)
("foobarbaz" . 0.
16260162601626016) ;; one hole
("barbazfoo" . 0.
16260162601626016) ;; one hole
("barfoobaz" . 0.
10964912280701755) ;; two holes
("fabrobazo" . 0.
10964912280701755) ;; two holes
("fotttttttttttttttttttttttto" . 0.
04982561036372696))
(let ((flex-score-match-tightness 0.1)) (test))
=> (("foo" . 1.0)
("foot" . 0.375)
("foto" . 0.375)
("barfoobaz" . 0.
007751937984496124) ;; two holes
("fabrobazo" . 0.
007751937984496124) ;; two holes
("foobarbaz" . 0.
00641025641025641) ;; one hole
("barbazfoo" . 0.
00641025641025641) ;; one hole
("fotttttttttttttttttttttttto" . 0.
0004789272030651341))
* lisp/minibuffer.el (flex-score-falloff): Rename to
flex-score-match-tightness.
(completion-pcm--hilit-commonality): Update function.
Mattias Engdegård [Thu, 14 Feb 2019 15:09:55 +0000 (16:09 +0100)]
Add categories L, R, SPC and . to `rx' doc string
* lisp/emacs-lisp/rx.el (rx): Add new categories to doc string.
Mattias Engdegård [Thu, 14 Feb 2019 12:20:08 +0000 (13:20 +0100)]
Use lexical-binding in rx.el
* lisp/emacs-lisp/rx.el: Use lexical-binding.
(rx-form): Use `let' to bind the dynamic variable `rx-parent' instead
of binding it as an argument.
João Távora [Thu, 14 Feb 2019 13:46:07 +0000 (13:46 +0000)]
* lisp/minibuffer.el (completion-styles-alist): Tweak flex's docstring
Michael Albinus [Thu, 14 Feb 2019 11:36:18 +0000 (12:36 +0100)]
Adapt tramp-adb-handle-set-file-times
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Use 'touch -d', 'touch -t' does not seem to work. Use Universal Time.
João Távora [Thu, 14 Feb 2019 10:36:40 +0000 (10:36 +0000)]
; * etc/NEWS (New 'flex' completion style): New entry
Katsumi Yamaoka [Thu, 14 Feb 2019 02:16:05 +0000 (02:16 +0000)]
Work for empty MIME attachments (related to bug#34387)
* mm-view.el (mm-inline-text):
Make undisplayer do nothing if the part is empty.
* mm-decode.el (mm-copy-to-buffer): Work for empty MIME part.
* mml.el (mime-to-mml): Ditto.
Jackson Ray Hamilton [Sat, 9 Feb 2019 19:50:05 +0000 (11:50 -0800)]
Backport: js-indent-align-list-continuation: Make variable safe
* lisp/progmodes/js.el (js-indent-align-list-continuation): Indicate
variable is safe as a file-local variable. This fixes the
js-indent-align-list-continuation-nil test when run with make.
(cherry picked from commit
dd319f2711f895eec87c1017b82cd9d88d9ecd0a)
Dmitry Gutov [Thu, 14 Feb 2019 01:08:44 +0000 (04:08 +0300)]
Rename project-query-replace to project-query-replace-regexp
* lisp/progmodes/project.el (project-query-replace): Rename to
project-query-replace-regexp.
Gregor Zattler [Wed, 13 Feb 2019 20:01:17 +0000 (21:01 +0100)]
* doc/misc/eshell.texi (Built-ins): Fix alias description
Dear eamcs developers, eshells current documentation first states
that alias definitions are not saved to an alias file, later that
they are saved to an alias file. I tested it and the latter is
correct.
Please find attached a patch which fixes this.
Thanks for working on emacs which is really great, Gregor
>From
1fe51cc769ab7a30d0896fb3d6105c0561243fa7 Mon Sep 17 00:00:00 2001
From: Gregor Zattler <telegraph@gmx.net>
Date: Wed, 13 Feb 2019 20:19:38 +0100
Subject: * doc/misc/eshell.texi (Built-ins): Fix alias description.
Bring description of built-in 'alias' in line with (info "(eshell) Aliases"),
which describes the actual behaviur.
Paul Eggert [Wed, 13 Feb 2019 23:03:01 +0000 (15:03 -0800)]
Add missing dependency to ucs-normalize.el
* lisp/international/ucs-normalize.el:
Require regexp-opt when compiling. Problem reported by hx in:
https://lists.gnu.org/r/emacs-devel/2019-02/msg00334.html
João Távora [Tue, 12 Feb 2019 21:55:34 +0000 (21:55 +0000)]
Score flex-style completions according to match tightness
The new completion style needs to score completion matches so that we
can use it later on when sorting the completions. This is because
"foo" can flex-match "foobar", "frodo" and "barfromsober" but we
probably want "foobar" to appear at the top of the completion list.
This change introduces a scoring formula and adds scoring hints in the
candidate string's `completion-score' property.
* lisp/minibuffer.el (completion-pcm--hilit-commonality): Propertize
completion with 'completion-score
(flex-score-falloff): New variable.
João Távora [Tue, 12 Feb 2019 21:48:24 +0000 (21:48 +0000)]
Add a new 'flex' completion style
* lisp/minibuffer.el (completion-styles-alist): Add flex.
(completion-substring--all-completions): Accept
transform-pattern-fn arg.
(completion-flex-all-completions, completion-flex-try-completion)
(completion-flex--make-flex-pattern): New functions.
Eli Zaretskii [Wed, 13 Feb 2019 15:39:31 +0000 (17:39 +0200)]
Avoid crashes upon C-g in nested invocations of 'read_char'
* src/keyboard.c (read_char, read_event_from_main_queue):
Ensure the global value of getcjmp is restored when the stack
is unwound by the likes of 'throw', by calling
record_unwind_protect_ptr instead of restoring the value
manually. (Bug#34394)
(restore_getcjmp): Argument is now 'void *', to match the
signature of record_unwind_protect_ptr.
(cherry picked from commit
10527fca66e39d7067986904161fa33741abcd26)
Eli Zaretskii [Wed, 13 Feb 2019 15:39:31 +0000 (17:39 +0200)]
Avoid crashes upon C-g in nested invocations of 'read_char'
* src/keyboard.c (read_char, read_event_from_main_queue):
Ensure the global value of getcjmp is restored when the stack
is unwound by the likes of 'throw', by calling
record_unwind_protect_ptr instead of restoring the value
manually. (Bug#34394)
(restore_getcjmp): Argument is now 'void *', to match the
signature of record_unwind_protect_ptr.
Paul Eggert [Wed, 13 Feb 2019 08:50:19 +0000 (00:50 -0800)]
Don’t assume CURRENT_TIME_LIST
* lisp/progmodes/cc-cmds.el (c-progress-init)
(c-progress-update):
* lisp/progmodes/cperl-mode.el (cperl-time-fontification):
* lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
(vhdl-fix-case-region-1):
Don’t assume (current-time) returns a list.
Fix unlikely bug if we’re called 65536 seconds apart.
Paul Eggert [Wed, 13 Feb 2019 08:23:23 +0000 (00:23 -0800)]
Don’t assume CURRENT_TIME_LIST
* lisp/url/url-util.el (url-lazy-message):
Don’t assume (current-time) returns a list.
Fix unlikely bug if we’re called 65536 seconds apart.
Paul Eggert [Wed, 13 Feb 2019 02:24:59 +0000 (18:24 -0800)]
Simplify nnspool-request-newgroups arithmetic
* lisp/gnus/nnspool.el (nnspool-request-newgroups):
Simplify by compute time stamps as integers, not floats,
since integers don’t overflow any more.
Jackson Ray Hamilton [Sat, 9 Feb 2019 20:26:21 +0000 (12:26 -0800)]
Indent arrows’ expression bodies like function bodies (Bug#25904)
* lisp/progmodes/js.el (js--continued-expression-p): Don’t confuse
‘=>’ for a ‘>’ operator.
(js--line-terminating-arrow-re): New variable.
(js--looking-at-broken-arrow-function-p): New function.
(js--proper-indentation): Don’t align arrow functions’ expression
bodies starting on new lines like list continuations, instead align
them like function bodies (js-indent-align-list-continuation need not
be nil).
* test/manual/indent/js.js: Add test for Bug#25904.
Co-authored-by: Felipe Ochoa <felipe@fov.space>
Jackson Ray Hamilton [Sat, 9 Feb 2019 19:50:05 +0000 (11:50 -0800)]
js-indent-align-list-continuation: Make variable safe
* lisp/progmodes/js.el (js-indent-align-list-continuation): Indicate
variable is safe as a file-local variable. This fixes the
js-indent-align-list-continuation-nil test when run with make.
Paul Eggert [Tue, 12 Feb 2019 23:20:40 +0000 (15:20 -0800)]
Make xterm-mouse-truncate-wrap obsolete
* lisp/xt-mouse.el (xterm-mouse-truncate-wrap): Now obsolete,
since we no longer need to worry about integer overflow.
(xterm-mouse-event): Use plain ‘truncate’ instead.
Stefan Monnier [Tue, 12 Feb 2019 21:33:23 +0000 (16:33 -0500)]
* src/data.c (Fmake_local_variable): Fix bug#34318
Revert part of
ed962f2b8a.
* test/src/data-tests.el (data-tests-make-local-forwarded-var):
Add corresponding test.
Glenn Morris [Tue, 12 Feb 2019 18:57:34 +0000 (13:57 -0500)]
* admin/notes/hydra: Small updates.
Eli Zaretskii [Tue, 12 Feb 2019 17:32:55 +0000 (19:32 +0200)]
Minor fixes in ELisp manual wrt syntax-table properties
* doc/lispref/syntax.texi (Syntax Properties): Fix reference
to syntax-table properties. (Bug#34455)
(Control Parsing): Remove redundant @vindex entry.
Michael Albinus [Tue, 12 Feb 2019 11:58:15 +0000 (12:58 +0100)]
* admin/notes/emba: New file.
Mattias Engdegård [Mon, 11 Feb 2019 20:50:56 +0000 (21:50 +0100)]
Add missing categories L, R, . and SPC to rx
* lisp/emacs-lisp/rx.el (rx-categories):
Add missing categories L, R, . and SPC. (Bug#34436)
Eli Zaretskii [Mon, 11 Feb 2019 16:07:35 +0000 (18:07 +0200)]
Fix Hunspell invocation for discovering its dictionaries
* lisp/textmodes/ispell.el
(ispell-find-hunspell-dictionaries): Invoke Hunspell with the
-a switch, to prevent it from initializing its curses UI.
(Bug#34272)
Paul Eggert [Mon, 11 Feb 2019 08:08:03 +0000 (00:08 -0800)]
Simplify url-digest-auth-make-cnonce
* lisp/url/url-auth.el (url-digest-auth-make-cnonce):
Simplify by using encode-time instead of round-tripping
through a format-time-string and ‘read’.
Paul Eggert [Mon, 11 Feb 2019 07:46:24 +0000 (23:46 -0800)]
Don’t assume CURRENT_TIME_LIST
Use timestamp accessors instead of delving into a timestamp
format that is planned to change in a future version.
* lisp/find-lisp.el (find-lisp-format-time):
* lisp/gnus/gnus-group.el (gnus-group-set-timestamp):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-show-org-agenda):
Use encode-time instead of delving into timestamp format.
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
Use float-time instead of delving into timestamp format.
* lisp/gnus/nnmaildir.el (nnmaildir-request-accept-article):
Use format-time-string instead of delving into timestamp format.
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
Use time-less-p instead of delving into timestamp format.
* lisp/ido.el (ido-wash-history, ido-file-name-all-completions):
Use time-equal-p instead of delving into timestamp format.
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Use format-time-string to generate POSIX ‘test -t’ format instead
of timestamp-format-dependent code along with shell arithmetic
that can’t possibly do the right thing on a POSIX platform.
Paul Eggert [Mon, 11 Feb 2019 04:25:22 +0000 (20:25 -0800)]
Simplify use of encode-time
Most uses of (apply #'encode-time foo) can now be replaced
with (encode-time foo). Make similar simplifications.
* lisp/calendar/time-date.el (date-to-time):
* lisp/calendar/timeclock.el (timeclock-when-to-leave)
(timeclock-day-base, timeclock-generate-report):
* lisp/emacs-lisp/timer.el (timer-set-idle-time):
* lisp/eshell/esh-util.el (eshell-parse-ange-ls):
* lisp/gnus/gnus-art.el (article-make-date-line):
* lisp/gnus/gnus-delay.el (gnus-delay-article)
(gnus-delay-send-queue):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event--decode-datefield):
* lisp/gnus/gnus-logic.el (gnus-advanced-date):
* lisp/gnus/message.el (message-make-expires-date):
* lisp/gnus/nndiary.el (nndiary-compute-reminders):
* lisp/mail/ietf-drums.el (ietf-drums-parse-date):
* lisp/net/tramp-adb.el (tramp-adb-ls-output-time-less-p):
* lisp/org/org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-show-clocking-issues):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-clock.el (org-clock-get-sum-start, org-clock-sum)
(org-clocktable-steps):
* lisp/org/org-colview.el (org-colview-construct-allowed-dates)
* lisp/org/org-macro.el (org-macro--vc-modified-time):
* lisp/org/org-table.el (org-table-eval-formula):
* lisp/org/org.el (org-current-time, org-store-link)
(org-time-today, org-read-date, org-read-date-display)
(org-display-custom-time, org-time-string-to-time)
(org-timestamp-change, org-timestamp--to-internal-time):
* lisp/url/url-dav.el (url-dav-process-date-property):
* lisp/vc/vc-cvs.el (vc-cvs-annotate-current-time)
(vc-cvs-parse-entry):
Simplify use of encode-time.
* lisp/org/org-clock.el (org-clock-get-clocked-time):
(org-clock-resolve, org-resolve-clocks, org_clock_out)
(org-clock-update-time-maybe):
Avoid some rounding problems with encode-time and float-time.
* lisp/org/org-clock.el (org-clock-in, org-clock-update-time-maybe):
* lisp/org/org-colview.el (org-columns--age-to-minutes):
* lisp/org/org.el (org-get-scheduled-time, org-get-deadline-time)
(org-add-planning-info, org-2ft, org-time-string-to-absolute)
(org-closest-date):
Use org-time-string-to-time instead of doing it by hand with
encode-time.
* lisp/org/org.el (org-current-time): Simplify rounding.
(org-read-date): Avoid extra trip through encode-time.
Paul Eggert [Mon, 11 Feb 2019 07:47:43 +0000 (23:47 -0800)]
Fix doc string treatment of integer overflow
* lisp/calendar/cal-dst.el (calendar-dst-find-startend):
Fix doc string.
Paul Eggert [Mon, 11 Feb 2019 07:47:43 +0000 (23:47 -0800)]
Prefer encode-time to its alias
* lisp/calendar/icalendar.el, lisp/calendar/timeclock.el:
* lisp/emacs-lisp/timer.el, lisp/gnus/gnus-delay.el:
* lisp/gnus/gnus-sum.el, lisp/gnus/nndiary.el:
* lisp/gnus/nnrss.el, lisp/net/newst-backend.el:
* lisp/net/rcirc.el, lisp/obsolete/xesam.el:
* lisp/org/org-agenda.el, lisp/org/org-clock.el:
* lisp/org/org-element.el, lisp/org/org-timer.el:
* lisp/org/org.el, lisp/progmodes/flymake.el:
* lisp/url/url-cache.el, lisp/url/url-cookie.el:
Use encode-time instead of its alias seconds-to-time.
Stefan Monnier [Sun, 10 Feb 2019 23:12:05 +0000 (18:12 -0500)]
* test/lisp/emacs-lisp/package-tests.el: Allow extra extras
(package-test--compatible-p): New function.
(package-test-desc-from-buffer, package-test-install-single): Use it.
(package-x-test-upload-buffer, package-x-test-upload-new-version):
Don't burp in presence of extra extras.
Mattias Engdegård [Sun, 10 Feb 2019 09:39:00 +0000 (10:39 +0100)]
Document that [:cntrl:] does not match DEL (Bug#34391)
* doc/lispref/searching.texi (Character Classes):
* lisp/emacs-lisp/rx.el (rx):
Document that [:cntrl:] excludes DEL.
* test/src/regex-emacs-tests.el (regex-tests-PTESTS-whitelist):
Swap misplaced comments and fix wrong code for DEL.
João Távora [Sun, 10 Feb 2019 21:38:46 +0000 (21:38 +0000)]
Properly remove stale Flymake diagnostics on :region reports
Among other bugs fixed, modifying a list structure while iterating it
is a no-no. This would again cause duplicate diagnostics. See
https://github.com/joaotavora/eglot/issues/223 for an example.
* lisp/progmodes/flymake.el (Version): Bump to 1.0.5
(flymake--handle-report): Use cl-loop.
Eli Zaretskii [Sun, 10 Feb 2019 15:10:04 +0000 (17:10 +0200)]
Unbreak the Cygw32 build
* src/emacs.c (main) [HAVE_NTGUI]: Remove code that is only
for WINDOWSNT or condition it on WINDOWSNT. (Bug#34409)
João Távora [Sun, 10 Feb 2019 12:05:52 +0000 (12:05 +0000)]
Cleanup stale diagnostics on Flymake restart
Not doing so would cause duplicate diagnostics. See
https://github.com/joaotavora/eglot/issues/223 for an example.
* lisp/progmodes/flymake.el (Version): 1.0.4
(flymake-mode): Cleanup overlays before starting Flymake.
Paul Eggert [Sun, 10 Feb 2019 03:28:27 +0000 (19:28 -0800)]
* lisp/ecomplete.el (ecomplete-add-item): Simplify.
Paul Eggert [Sun, 10 Feb 2019 03:22:53 +0000 (19:22 -0800)]
Don’t assume CURRENT_TIME_LIST
* lisp/gnus/gnus-delay.el (gnus-delay-send-queue):
* lisp/gnus/nnmail.el (nnmail-activate):
* lisp/mh-e/mh-alias.el (mh-alias-tstamp):
* lisp/net/newst-backend.el (newsticker--cache-item-compare-by-time):
Use time-less-p instead of assuming timestamp format.
Alex Branham [Sat, 2 Feb 2019 15:45:11 +0000 (09:45 -0600)]
Fix byte compile warnings in checkdoc.el
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Fix
byte compile warnings by requiring lisp-mnt top-level, remove XEmacs
compatibility code.
Bug#34290
Tassilo Horn [Fri, 8 Feb 2019 19:39:00 +0000 (20:39 +0100)]
Impl. json-pretty-print with replace-region-contents + minimization
* lisp/json.el (json-pretty-print): Use the new
replace-region-contents. Add prefix arg for minimzation.
(json-pretty-print-buffer): Add prefix arg for minimzation.
(json-pretty-print-buffer-ordered): Add prefix arg for minimzation.
(json-pretty-print-ordered): Add prefix arg for minimzation.
Tassilo Horn [Fri, 8 Feb 2019 19:36:00 +0000 (20:36 +0100)]
Add new function replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Use lower value of
too_expensive and enable heuristic.
* lisp/subr.el (replace-region-contents): New convenient wrapper
function around replace-buffer-contents.
Stefan Monnier [Fri, 8 Feb 2019 19:16:31 +0000 (14:16 -0500)]
* lisp/emacs-lisp/package.el: Improve generated foo-pkg.el
(package-generate-description-file): Make first line more informative.
(package-buffer-info): Include keywords, to more closely match
elpa.git's archive--metadata.
Glenn Morris [Fri, 8 Feb 2019 17:20:40 +0000 (09:20 -0800)]
Merge from origin/emacs-26
0cd7b52 (origin/emacs-26) Minor improvements to do strings in callproc.c
b8c7017 Improve documentation of 'date-to-time' and 'parse-time-string'
46095a7 Fix downloading of URLs that end in a slash
3b60a0a * doc/misc/eww.texi (Basics): Fix eww keybindings. (Bug#34291)
8e22025 Fix process-thread docstring
459b669 Fix failures of vc-find-revision with non-ASCII file names
e9ff190 * doc/lispref/tips.texi (Documentation Tips): Fix quotes. (B...
3e49a08 ; * src/coding.h (struct coding_system): Fix a typo in a comm...
b657286 Add documentation for tabulated-list functions in the elisp m...
6e0f67b Fix URL in ucs-normalize.el
ce3ae1f * etc/PROBLEMS: Amend entry for profiler bug #34235 to mentio...
# Conflicts:
# doc/lispref/os.texi
Glenn Morris [Fri, 8 Feb 2019 17:18:08 +0000 (09:18 -0800)]
; Merge from origin/emacs-26
The following commit was skipped:
b51ac45 * make-dist: Remove references to src/stamp-h.in.
Glenn Morris [Fri, 8 Feb 2019 17:18:08 +0000 (09:18 -0800)]
Merge from origin/emacs-26
9d87ba1 * etc/PROBLEMS: Mention profiler-report bug (Bug#34235).
Eli Zaretskii [Fri, 8 Feb 2019 08:46:00 +0000 (10:46 +0200)]
Minor improvements to do strings in callproc.c
* src/callproc.c (Fcall_process, Fcall_process_region): Minor
fixes to doc strings. Suggested by Nicholas Drozd
<nicholasdrozd@gmail.com>. (Bug#34274)
Eli Zaretskii [Fri, 8 Feb 2019 08:33:13 +0000 (10:33 +0200)]
Improve documentation of 'date-to-time' and 'parse-time-string'
* doc/lispref/os.texi (Time Parsing): Document
'parse-time-string', and refer to it for the description of
the argument of 'date-to-time'.
* lisp/calendar/time-date.el (date-to-time): Refer in the doc
string to 'parse-time-string' for more information about the
format of the DATE argument. (Bug#34303)
Robert Pluim [Sat, 26 Jan 2019 11:31:02 +0000 (12:31 +0100)]
Unify three font info structures
* src/ftfont.h (struct font_info): New type, unifies similar types
from ftcrfont.c, ftfont.c and xftfont.c
* src/xftfont.c (struct xftfont_info): Remove, replace with struct
font_info. Adjust all uses.
* src/ftcrfont.c (struct ftcrfont_info): Likewise.
* src/ftfont.c (struct ftfont_info): Likewise.
Eli Zaretskii [Fri, 8 Feb 2019 07:53:32 +0000 (09:53 +0200)]
Minor fixes for last change
* etc/NEWS: Announce the change in EWW download behavior.
* lisp/net/eww.el (eww-download): Doc fix. (Bug#34291)
Nick Drozd [Sat, 2 Feb 2019 18:35:02 +0000 (12:35 -0600)]
Download of URL in EWW falls back on current URL
* lisp/net/eww.el (eww-download): If there's no URL at point,
download the current URL instead. Previous behavior was to
signal an error if there was no URL at point. (Bug#34291)
* doc/misc/eww.texi (Basics): Update documentation.
Nick Drozd [Sat, 2 Feb 2019 18:50:03 +0000 (12:50 -0600)]
Fix downloading of URLs that end in a slash
* lisp/net/eww.el (eww-download-callback): Fix download URL
file name. Previously this wasn't handling download URLs
correctly, resulting in all downloaded pages being named
"!", "!(1)", etc. (Bug#34291)
Nick Drozd [Sat, 2 Feb 2019 18:31:44 +0000 (12:31 -0600)]
* doc/misc/eww.texi (Basics): Fix eww keybindings. (Bug#34291)
Robert Pluim [Fri, 8 Feb 2019 07:22:34 +0000 (08:22 +0100)]
Fix process-thread docstring
* src/process.c (Fprocess_thread): Correct docstring.