]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years ago; * test/lisp/emacs-lisp/generator-tests.el: Checkdoc fixes
Philipp Stephani [Wed, 10 Jun 2020 13:49:57 +0000 (15:49 +0200)]
; * test/lisp/emacs-lisp/generator-tests.el: Checkdoc fixes

4 years agoSlightly improve commit 73be4d1ed5b190bd93e9bad6aebe43d0dea0d7d3.
Philipp Stephani [Wed, 10 Jun 2020 13:46:12 +0000 (15:46 +0200)]
Slightly improve commit 73be4d1ed5b190bd93e9bad6aebe43d0dea0d7d3.

* lisp/emacs-lisp/cl-macs.el (cl-lambda-list, cl-lambda-list1)
(cl-macro-list, cl-macro-list1): Use exactly the same specification as
for &optional (sans the third optional list element).

4 years agoAllow destructuring in &aux sections when using edebug (Bug#40431)
Philipp Stephani [Wed, 10 Jun 2020 13:34:41 +0000 (15:34 +0200)]
Allow destructuring in &aux sections when using edebug (Bug#40431)

* lisp/emacs-lisp/cl-macs.el (cl-lambda-list, cl-lambda-list1)
(cl-macro-list, cl-macro-list1): Allow arbitrary 'cl-lambda'
arguments in the &aux section.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-aux-edebug): New
regression test.

4 years ago; Simplify last change
Basil L. Contovounesios [Wed, 10 Jun 2020 00:00:01 +0000 (01:00 +0100)]
; Simplify last change

* lisp/progmodes/project.el (project--read-project-list): We are
already at BOB after insert-file-contents.

4 years agoSave project list as lisp data
Simen Heggestøyl [Fri, 5 Jun 2020 17:32:30 +0000 (19:32 +0200)]
Save project list as lisp data

Save the project list file as lisp data instead of line separated
strings to make it more extendable in the future.

* lisp/progmodes/project.el (project--read-project-list)
(project--write-project-list, project--add-to-project-list-front)
(project--remove-from-project-list): Adjust to `project--list' now
being an alist.

4 years agoOrthographical amendments to commit 145aab0672ae259736ee9230f8e0ff4effa5f4fd
Alan Mackenzie [Tue, 9 Jun 2020 16:58:52 +0000 (16:58 +0000)]
Orthographical amendments to commit 145aab0672ae259736ee9230f8e0ff4effa5f4fd

* etc/NEWS: Correct the spelling of CC Mode.

* lisp/progmodes/cc-fonts.el (doxygen-font-lock-doc-comments): Replace curly
  quotes in comments by ASCII ones.

4 years agoContinue implementation of tramp-crypt.el
Michael Albinus [Tue, 9 Jun 2020 11:43:30 +0000 (13:43 +0200)]
Continue implementation of tramp-crypt.el

* lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file):
Add leading "/" to infile.
(tramp-crypt-add-directory): Fix docstring.  Expand NAME.
(tramp-crypt-remove-directory)
(tramp-crypt-handle-file-name-all-completions)
(tramp-crypt-handle-set-file-times): New defuns.
(tramp-crypt-handle-file-executable-p)
(tramp-crypt-handle-file-readable-p)
(tramp-crypt-handle-file-system-info)
(tramp-crypt-handle-set-file-modes): Fix implementation.

* test/lisp/net/tramp-tests.el: Adapt call convention
for (tramp--test-crypt-p).

4 years ago* lisp/simple.el (shell-command-on-region): Handle nil replace on rectangles.
Juri Linkov [Mon, 8 Jun 2020 23:34:53 +0000 (02:34 +0300)]
* lisp/simple.el (shell-command-on-region): Handle nil replace on rectangles.

When 'region-noncontiguous-p' is non-nil (rectangular region)
but 'replace' is nil, pop up the shell output buffer (bug#41440).
When 'replace' is non-nil, trim the trailing newline.

4 years agoMore robust NS hex colour string parsing
Mattias Engdegård [Mon, 8 Jun 2020 11:06:51 +0000 (13:06 +0200)]
More robust NS hex colour string parsing

Invalid arguments to color-values, such as "#abcdefg" or "#1234", or
valid ones like "#111222333", should not yield nonsense values.

* src/nsterm.m (ns_get_color):
Only accept "#RGB" strings with 1-4 digits per components, equal number
of digits each, and no trailing characters.  Parse 12-bit colours
correctly.

4 years agoAdd autoload problem in tramp-crypt.el.
Michael Albinus [Mon, 8 Jun 2020 08:18:35 +0000 (10:18 +0200)]
Add autoload problem in tramp-crypt.el.

* lisp/net/tramp-crypt.el (tramp-crypt-encfs-config):
Add ;;;###tramp-autoload cookie.
(tramp-crypt-directories): Move it up.
(tramp-crypt-file-name-p): Move it up.  Add ;;;###tramp-autoload
cookie.  Make it a defsubst.

* test/lisp/net/tramp-tests.el (tramp-crypt): Do not require.

4 years agoUse lexical-binding in lunar.el and add tests
Stefan Kangas [Sun, 7 Jun 2020 17:57:45 +0000 (19:57 +0200)]
Use lexical-binding in lunar.el and add tests

* lisp/calendar/lunar.el: Use lexical-binding.
(lunar-phases, diary-lunar-phases): Silence byte-compiler.
* test/lisp/calendar/lunar-tests.el: New file.

4 years ago* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add `make-byte-code'.
Andrea Corallo [Sun, 7 Jun 2020 13:09:38 +0000 (15:09 +0200)]
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add `make-byte-code'.

`make-byte-code' wraps `vector' doing some sanity check on the input
arguments.  `vector' is in side-effect-and-error-free-fns so add
`make-byte-code' to side-effect-free-fns.

4 years ago* test/lisp/net/tramp-tests.el: tramp-crypt-file-name-p not autoloaded.
Glenn Morris [Sun, 7 Jun 2020 17:37:29 +0000 (10:37 -0700)]
* test/lisp/net/tramp-tests.el: tramp-crypt-file-name-p not autoloaded.

4 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 7 Jun 2020 16:03:59 +0000 (09:03 -0700)]
Merge from origin/emacs-27

35661ef943 (origin/emacs-27) Fix typo in "(elisp) Type Keywords"
1af0e95fec Gnus nnir-summary-line-format has no effect
dd366b5d3b Improve documentation of 'window-text-pixel-size'
fbd49f969e * src/xdisp.c (Fwindow_text_pixel_size): Doc fix.  (Bug#41...
d8593fd19f Minor improvements to EDE and EIEIO manuals
3916e63f9e Have Fido mode also imitate Ido mode in ignore-case options
cc35b197c7 Update package-menu-quick-help
bf09106256 Improve documentation of 'sort-subr'
73749efa13 Update Ukrainian transliteration
30a7ee505a Fix Arabic shaping when eww/shr fill the text to be rendered
7d323f07c0 Silence some byte-compiler warnings in tests
cf473e742f * test/lisp/battery-tests.el: New file.
b07e3b1d97 Improve format-spec documentation (bug#41571)

# Conflicts:
# test/lisp/emacs-lisp/package-tests.el

4 years agoFix typo in "(elisp) Type Keywords"
Basil L. Contovounesios [Sun, 7 Jun 2020 15:46:12 +0000 (16:46 +0100)]
Fix typo in "(elisp) Type Keywords"

* doc/lispref/customize.texi (Type Keywords): Fix typo of 'choice'
composite type.  (Bug#41749)

4 years ago* lisp/progmodes/js.el (js-mode): Remove second call to c-init-language-vars
Alan Mackenzie [Sun, 7 Jun 2020 15:14:15 +0000 (15:14 +0000)]
* lisp/progmodes/js.el (js-mode): Remove second call to c-init-language-vars

This spurious second call fouled up already set configuration variables.
Fixes bug #41649.

4 years agoAdd file encryption to Tramp
Michael Albinus [Sun, 7 Jun 2020 14:57:32 +0000 (16:57 +0200)]
Add file encryption to Tramp

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

* lisp/net/tramp.el (tramp-run-real-handler):
Add `tramp-crypt-file-name-handler'.
(tramp-register-file-name-handlers):
Call `tramp-register-crypt-file-name-handler'.
(tramp-handle-insert-file-contents, tramp-local-host-p): Check for
`tramp-crypt-enabled'

* test/lisp/net/tramp-tests.el (tramp--test-crypt-p): New defun.
(tramp-test24-file-acl, tramp-test25-file-selinux)
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test31-interrupt-process)
(tramp-test32-shell-command)
(tramp-test32-shell-command-dont-erase-buffer)
(tramp-test33-environment-variables)
(tramp-test33-environment-variables-and-port-numbers)
(tramp-test34-explicit-shell-file-name, tramp-test35-exec-path)
(tramp-test35-remote-path, tramp-test36-vc-registered)
(tramp--test-check-files, tramp-test43-asynchronous-requests): Use it.

4 years agoTramp code cleanup
Michael Albinus [Sun, 7 Jun 2020 14:56:59 +0000 (16:56 +0200)]
Tramp code cleanup

* lisp/net/tramp-cache.el (tramp-get-connection-property): Cleanup.

* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Delete also
connection processes.

* lisp/net/tramp-sh.el (tramp-set-remote-path): Cache 4096 even if
PIPE_BUF doesn't exist.

4 years agoUse 65535 as color-values scale value in the NS backend
Mattias Engdegård [Sat, 6 Jun 2020 09:23:48 +0000 (11:23 +0200)]
Use 65535 as color-values scale value in the NS backend

* src/nsfns.m (Fxw_color_values): Scale with 65535 instead of 65280, for
uniformity with other backends.
* lisp/faces.el (color-values): Update doc string.
* doc/lispref/frames.texi (Color Names): Update examples.

4 years agoGnus nnir-summary-line-format has no effect
Tassilo Horn [Sun, 7 Jun 2020 08:01:41 +0000 (10:01 +0200)]
Gnus nnir-summary-line-format has no effect

* lisp/gnus/nnir.el (nnir-mode): Update summary format specs if
nnir-summary-line-format is set and different from
gnus-summary-line-format.
(nnir-open-server): Run nnir-mode in gnus-summary-generate-hook
instead of gnus-summary-prepared-hook.

4 years agoThe key prefix 'C-x t t' displays next command buffer in a new tab (bug#41691)
Juri Linkov [Sat, 6 Jun 2020 23:42:24 +0000 (02:42 +0300)]
The key prefix 'C-x t t' displays next command buffer in a new tab (bug#41691)

* lisp/tab-bar.el (other-tab-prefix): New command.
(tab-prefix-map): Bind key 'C-x t t' to other-tab-prefix.

* lisp/windmove.el (windmove-display-in-direction):
Use display-buffer-override-next-command.

* lisp/window.el (display-buffer-override-next-command):
New function refactored from windmove-display-in-direction.

4 years agomake-text-button no longer modifies its string arg
Paul Eggert [Sat, 6 Jun 2020 19:05:10 +0000 (12:05 -0700)]
make-text-button no longer modifies its string arg

* etc/NEWS: Mention this.
* lisp/apropos.el (apropos-library-button):
* lisp/ibuf-ext.el (ibuffer-old-saved-filters-warning):
There’s no longer a need copy make-text-button’s string arg.
* lisp/button.el (make-text-button): Return a copy of a string arg.
Delay making the copy until after error-checking.

4 years agoImprove documentation of 'window-text-pixel-size'
Eli Zaretskii [Sat, 6 Jun 2020 17:10:37 +0000 (20:10 +0300)]
Improve documentation of 'window-text-pixel-size'

* doc/lispref/display.texi (Size of Displayed Text): Clarify the
description of 'window-text-pixel-size'.

4 years ago* src/xdisp.c (Fwindow_text_pixel_size): Doc fix. (Bug#41737)
Eli Zaretskii [Sat, 6 Jun 2020 16:53:08 +0000 (19:53 +0300)]
* src/xdisp.c (Fwindow_text_pixel_size): Doc fix.  (Bug#41737)

4 years agoUn-deprecate oset and oset-default
Basil L. Contovounesios [Wed, 3 Jun 2020 16:35:59 +0000 (17:35 +0100)]
Un-deprecate oset and oset-default

For discussion see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00630.html
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00674.html
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00099.html

* lisp/emacs-lisp/eieio.el (oset, oset-default): Un-deprecate.
* lisp/emacs-lisp/eieio-core.el (eieio-oref): Declare gv-setter here
instead of in lisp/emacs-lisp/eieio.el.  Suggested by
Stefan Monnier <monnier@iro.umontreal.ca>.
(eieio-oref-default): Add gv-setter declaration.
* etc/NEWS: Announce these changes.
* doc/misc/eieio.texi (Accessing Slots): Document oref and
oref-default as generalized variables.  Consistently document
getters before setters.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Use
lexical-binding.
(eieio-test-13-init-methods): Simplify.
(eieio-test-33-instance-tracker): Declare IT-list as special.

4 years agoMinor improvements to EDE and EIEIO manuals
Basil L. Contovounesios [Wed, 3 Jun 2020 16:31:44 +0000 (17:31 +0100)]
Minor improvements to EDE and EIEIO manuals

For discussion, see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00630.html
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00099.html

* doc/misc/ede.texi (ede-generic-project): Clean up example.
* doc/misc/eieio.texi (Accessing Slots): Document slot-value as a
generalized variable and set-slot-value as obsolete.
(Predicates): Fix typo.
(Introspection): Document eieio-class-slots in place of the obsolete
object-slots.

4 years agoImprove battery status display via GNU/Linux sysfs
Ellington Santos [Tue, 26 May 2020 14:37:04 +0000 (11:37 -0300)]
Improve battery status display via GNU/Linux sysfs

* lisp/battery.el (battery-linux-sysfs): Support %b format.
Improve the display of %p.  (Bug#41542)

Copyright-paperwork-exempt: yes

4 years agoHave Fido mode also imitate Ido mode in ignore-case options
João Távora [Fri, 5 Jun 2020 22:36:55 +0000 (23:36 +0100)]
Have Fido mode also imitate Ido mode in ignore-case options

Suggested by Sean Whitton <spwhitton@spwhitton.name>.

* lisp/icomplete.el (icomplete--fido-mode-setup): Set ignore-case
options.

4 years agoUpdate package-menu-quick-help
Basil L. Contovounesios [Fri, 5 Jun 2020 13:02:41 +0000 (14:02 +0100)]
Update package-menu-quick-help

* lisp/emacs-lisp/package.el (package--quick-help-keys): Filtering
is now bound to the prefix '/', not the key 'f' (bug#41721).
Advertise only the standard 'g' binding now that both it and 'r' are
bound to revert-buffer (bug#35504).
(package--prettify-quick-help-key): Avoid modifying string literals.
(package-menu-filter): Reintroduce as obsolete alias of
package-menu-filter-by-keyword for backward
compatibility (bug#36981).

4 years agoAvoid zero-width glyphs and the resulting cursor artifacts
Pip Cet [Thu, 4 Jun 2020 22:28:53 +0000 (22:28 +0000)]
Avoid zero-width glyphs and the resulting cursor artifacts

* src/xdisp.c (fill_gstring_glyph_string): Handle unavailable glyphs.
(append_composite_glyph): Mark unavailable glyphs.
(gui_produce_glyphs): Make glyphs unavailable for zero-width
compositions.  (Bug#41645)

4 years agoImprove documentation of 'sort-subr'
Eli Zaretskii [Fri, 5 Jun 2020 08:30:03 +0000 (11:30 +0300)]
Improve documentation of 'sort-subr'

* doc/lispref/text.texi (Sorting): Clarify the meaning and use of
PREDICATE argument to 'sort-subr'.  (Bug#41706)

4 years agoUpdate Ukrainian transliteration
Andrii Kolomoiets [Wed, 3 Jun 2020 11:14:57 +0000 (14:14 +0300)]
Update Ukrainian transliteration

* lisp/language/cyril-util.el (standard-display-cyrillic-translit):
Add missing letter "ґ"; tweak letter "г".  (Bug#41683)

4 years agoFix Arabic shaping when eww/shr fill the text to be rendered
Eli Zaretskii [Fri, 5 Jun 2020 07:56:01 +0000 (10:56 +0300)]
Fix Arabic shaping when eww/shr fill the text to be rendered

* src/hbfont.c (hbfont_shape): Don't use DIRECTION if the current
buffer has bidi reordering disabled.  (Bug#41005)

4 years agoStreamline live_*_holding
Paul Eggert [Fri, 5 Jun 2020 01:46:11 +0000 (18:46 -0700)]
Streamline live_*_holding

(live_string_holding, live_cons_holding, live_symbol_holding)
(live_float_p, live_vector_holding):
Assert that m->type is correct, instead of testing this at
runtime.  All callers changed.
(live_large_vector_holding, live_small_vector_holding):
Now two functions instead of the old live_vector_holding.
All callers changed.
(live_large_vector_p, live_small_vector_p):
Now two functions instead of the old live_vector_p.
All callers changed.
(mark_maybe_object): Ignore Lisp_Type_Unused0 quickly too,
since that cannot possibly be an object.
(CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
New arg MEM_TYPE.  All callers changed.
(CHECK_ALLOCATED_AND_LIVE_SYMBOL): Simplify by combining
GC_CHECK_MARKED_OBJECTS code.

4 years agoMake live_*_p more accurate
Paul Eggert [Fri, 5 Jun 2020 01:46:10 +0000 (18:46 -0700)]
Make live_*_p more accurate

* src/alloc.c (live_string_holding, live_cons_holding)
(live_symbol_holding, live_vector_holding):
Return a C pointer, not a Lisp_Object.  All callers changed.
This helps the compiler a bit.
(live_string_p, live_cons_p, live_symbol_p, live_vector_p):
Require that P point directly at the object, rather than
somewhere within the object.  This fixes some false positives
with valid_lisp_object_p (used only in debugging).
(mark_maybe_object): Rely on the new accuracy.

4 years agoFix some side-effecting uses of make-text-button
Basil L. Contovounesios [Thu, 4 Jun 2020 22:08:28 +0000 (23:08 +0100)]
Fix some side-effecting uses of make-text-button

For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00117.html

* lisp/apropos.el (apropos-library-button):
* lisp/help-fns.el (help-fns--first-release): Return result of
make-text-button instead of relying on its side effects.
* lisp/ibuf-ext.el (ibuffer-old-saved-filters-warning): Avoid
modifying an immutable string.

4 years ago* lisp/dired.el (dired-toggle-marks): Use region for non-nil dired-mark-region
Juri Linkov [Thu, 4 Jun 2020 22:17:30 +0000 (01:17 +0300)]
* lisp/dired.el (dired-toggle-marks): Use region for non-nil dired-mark-region

(dired-mark--region-use-p, dired-mark--region-beginning)
(dired-mark--region-end): New internal functions.
(dired-mark-if): Use new functions.  (Bug#39902)

4 years agoChange default project list filename to "projects"
Simen Heggestøyl [Thu, 4 Jun 2020 17:58:36 +0000 (19:58 +0200)]
Change default project list filename to "projects"

* lisp/progmodes/project.el (project-list-file): Change the default
filename to "projects".

4 years agoUse characters for keys in project-switch-commands
Simen Heggestøyl [Thu, 4 Jun 2020 17:56:32 +0000 (19:56 +0200)]
Use characters for keys in project-switch-commands

* lisp/progmodes/project.el (project-switch-commands): Use
characters for keys instead of string for better future
compatibility with 'read-multiple-choice'.
(project-switch-project): Adjust to above change.

4 years ago; Small cleanup in project.el
Simen Heggestøyl [Thu, 4 Jun 2020 17:29:10 +0000 (19:29 +0200)]
; Small cleanup in project.el

* lisp/progmodes/project.el (project--add-to-project-list-front):
Minor simplification after recent changes.

4 years ago* lisp/font-lock.el (font-lock--syntax-table-affects-ppss): New var
Stefan Monnier [Thu, 4 Jun 2020 13:58:22 +0000 (09:58 -0400)]
* lisp/font-lock.el (font-lock--syntax-table-affects-ppss): New var

This tries to make `font-lock-syntax-table` work correctly even when
it changes the parsing of strings and comments, as was the case in
`font-latex.el`.

We should probably deprecate the use of `font-lock-syntax-table` since
the present fix is still not 100% and since it comes with performance
problems in large files.

(font-lock-set-defaults): Set it.
(font-lock-fontify-syntactically-region): Don't use `syntax-ppss`
when we think that `font-lock-syntax-table` would interfere.

4 years ago; * test/src/xfaces-tests.el (xfaces-color-distance): Fix bug id
Mattias Engdegård [Thu, 4 Jun 2020 08:55:16 +0000 (10:55 +0200)]
; * test/src/xfaces-tests.el (xfaces-color-distance): Fix bug id

4 years agoDon’t default to Valgrind unless ENABLE_CHECKING
Paul Eggert [Thu, 4 Jun 2020 01:58:45 +0000 (18:58 -0700)]
Don’t default to Valgrind unless ENABLE_CHECKING

* src/alloc.c (USE_VALGRIND): If not defined, don’t default it to
1 unless ENABLE_CHECKING.  The Valgrind hooks bloat the garbage
collector a bit in production, and there’s no need for them these
days if one has a Valgrind suppressions file (which one needs anyway).
(mark_maybe_pointer): Use ‘#if USE_VALGRIND’ instead of ‘#ifdef
USE_VALGRIND’ for consistency with other uses of USE_VALGRIND.
This is in case someone builds with ‘-DENABLE_CHECKING
-DUSE_VALGRIND=0’ in CFLAGS.

4 years agoRevert make-text-button string copy
Paul Eggert [Thu, 4 Jun 2020 01:15:54 +0000 (18:15 -0700)]
Revert make-text-button string copy

* lisp/button.el (make-text-button): Don’t make a copy of
a button’s string label.  This reverts the change made in
2020-05-17T05:23:28Z!eggert@cs.ucla.edu, which broke SLY.
Problem reported by João Távora in:
https://lists.gnu.org/r/emacs-devel/2020-06/msg00117.html
However, we’ll need a better fix for this once string
literals become contents, if SLY uses string constants
for text button labels.

4 years agoFix make-text-button bug with string copy
Paul Eggert [Wed, 3 Jun 2020 22:39:29 +0000 (15:39 -0700)]
Fix make-text-button bug with string copy

* lisp/button.el (make-text-button): Use the copy of BEG
uniformly, instead of in just one place.  This fixes a typo
introduced in 2020-05-17T05:23:28Z!eggert@cs.ucla.edu.
Problem reported by João Távora in:
https://lists.gnu.org/r/emacs-devel/2020-06/msg00117.html

4 years agoEnsure Jsonrpc processes are created in correct buffer
João Távora [Wed, 3 Jun 2020 19:53:35 +0000 (20:53 +0100)]
Ensure Jsonrpc processes are created in correct buffer

Report and original implementation by Steve Purcell
<steve@sanityinc.com>.  See also See
https://github.com/joaotavora/eglot/pull/493 for details

* lisp/jsonrpc.el (initialize-instance): Make process in original
buffer.
(Version): Bump to 1.0.12

4 years agoMake color-distance symmetric and more accurate
Mattias Engdegård [Tue, 2 Jun 2020 20:31:14 +0000 (22:31 +0200)]
Make color-distance symmetric and more accurate

* src/xfaces.c (color_distance): Don't throw away the low 8 bits of
the colours, and make the function symmetric (bug41544)
(Fcolor_distance): Add caution about this not being a true metric.
* test/src/xfaces-tests.el: New file.

4 years ago; Clean up recent project.el additions
Basil L. Contovounesios [Wed, 3 Jun 2020 10:45:54 +0000 (11:45 +0100)]
; Clean up recent project.el additions

* lisp/progmodes/project.el (project): Add :version tag.
(project-list-file): Fix custom :type and add :version tag.

4 years agoHandle mid-gstring face changes
Pip Cet [Sun, 31 May 2020 19:55:48 +0000 (19:55 +0000)]
Handle mid-gstring face changes

* src/xdisp.c (fill_gstring_glyph_string): Don't extend the glyph
string past face changes.  (Bug#41454)

4 years agoFix bug in recent byte-code checking hoist
Paul Eggert [Wed, 3 Jun 2020 01:40:10 +0000 (18:40 -0700)]
Fix bug in recent byte-code checking hoist

Problem reported by Daniel Colascione (Bug#41680).
* src/lread.c (read1): Check that AREF (tmp, COMPILED_BYTECODE)
is a string before subjecting it to STRING_MULTIBYTE.
Be more consistent about using AREF in the neighborhood,
to help prevent this sort of problem from recurring.

4 years agoSilence some byte-compiler warnings in tests
Basil L. Contovounesios [Tue, 2 Jun 2020 22:14:23 +0000 (23:14 +0100)]
Silence some byte-compiler warnings in tests

* test/lisp/emacs-lisp/cl-generic-tests.el:
* test/lisp/progmodes/elisp-mode-tests.el: Declare functions
referred to within macroexpansions.
(xref-elisp-overloadable-no-default)
(xref-elisp-overloadable-co-located-default)
(xref-elisp-overloadable-separate-default): Prefix unused arguments
with underscore.

* test/lisp/international/ccl-tests.el:
* test/lisp/wdired-tests.el:
* test/lisp/emacs-lisp/package-tests.el: Declare functions used.
(package-test-update-archives, package-test-signed): Use
revert-buffer in place of its obsolete alias package-menu-refresh.

* test/lisp/eshell/eshell-tests.el:
* test/lisp/mail/footnote-tests.el:
* test/src/buffer-tests.el: Require dependencies used.

* test/lisp/image/exif-tests.el: Remove unneeded (require 'seq).
(test-exit-direct-ascii-value): Actually perform the test.
* test/lisp/progmodes/sql-tests.el (sql-test-add-existing-product):
Fix typo.

* test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer):
* test/src/data-tests.el (test-bool-vector-bv-from-hex-string)
(test-bool-vector-apply-mock-op): Remove unused local variables.

4 years ago* test/lisp/battery-tests.el: New file.
Basil L. Contovounesios [Tue, 2 Jun 2020 20:05:28 +0000 (21:05 +0100)]
* test/lisp/battery-tests.el: New file.

4 years agoAvoid losing composition state in handle_stop_backwards
Pip Cet [Sun, 31 May 2020 16:58:19 +0000 (16:58 +0000)]
Avoid losing composition state in handle_stop_backwards

* src/xdisp.c (handle_stop_backwards): Save composition iterator state
across our forward scan.  (Bug#41626)

4 years ago; NEWS updates
Dmitry Gutov [Tue, 2 Jun 2020 22:10:16 +0000 (01:10 +0300)]
; NEWS updates

4 years agoSmall cleanup
Dmitry Gutov [Tue, 2 Jun 2020 21:33:14 +0000 (00:33 +0300)]
Small cleanup

* lisp/progmodes/project.el (project--add-to-project-list-front):
Small simplification.
(project--remove-from-project-list): Remove oudated comment.

4 years agoproject-list-file: New user option
Dmitry Gutov [Tue, 2 Jun 2020 21:27:29 +0000 (00:27 +0300)]
project-list-file: New user option

* lisp/progmodes/project.el (project): New custom group.
(project-vc): Use it as parent.
(project-vc-merge-submodules): Tag with Emacs version.
(project-read-file-name-function): Assign to the 'project' group.
(project-list-file): New user option (bug#41600).
(project--write-project-list, project--read-project-list): Use it.

4 years ago; * src/composite.c (syms_of_composite): Fix last change.
Eli Zaretskii [Tue, 2 Jun 2020 17:46:26 +0000 (20:46 +0300)]
; * src/composite.c (syms_of_composite): Fix last change.

4 years agoFix Arabic composition rules
Eli Zaretskii [Tue, 2 Jun 2020 17:44:59 +0000 (20:44 +0300)]
Fix Arabic composition rules

* lisp/language/misc-lang.el (composition-function-table): Reorder
Arabic composition rules in descending order of lookback.

* src/composite.c (syms_of_composite): Document the order of rules
in 'composition-function-table'.

4 years agoWrite project list to file only when changed
Simen Heggestøyl [Tue, 2 Jun 2020 17:20:14 +0000 (19:20 +0200)]
Write project list to file only when changed

* lisp/progmodes/project.el (project--add-to-project-list-front):
Write the project list to file only when it has changed.

4 years agoRemove 'project--ensure-file-exists'
Simen Heggestøyl [Fri, 29 May 2020 14:58:09 +0000 (16:58 +0200)]
Remove 'project--ensure-file-exists'

* lisp/progmodes/project.el (project--ensure-file-exists): Remove.
(project--read-project-list): Set 'project--list' to nil when the
project list file doesn't exist.

4 years agoFix handling of CGJ in Hebrew text
Eli Zaretskii [Tue, 2 Jun 2020 15:42:09 +0000 (18:42 +0300)]
Fix handling of CGJ in Hebrew text

* lisp/language/hebrew.el (hebrew): Add CGJ U+034F to the
combining characters supported in Hebrew compositions. (Bug#41645)

4 years agoImprove format-spec documentation (bug#41571)
Basil L. Contovounesios [Wed, 27 May 2020 23:53:42 +0000 (00:53 +0100)]
Improve format-spec documentation (bug#41571)

* doc/lispref/text.texi (Interpolated Strings): Move from here...
* doc/lispref/strings.texi (Custom Format Strings): ...to here,
renaming the node and clarifying the documentation.
(Formatting Strings): End node with sentence referring to the next
one.
* lisp/format-spec.el (format-spec): Clarify docstring.

4 years agoSimplify and regularize some offset tests in alloc.c
Paul Eggert [Tue, 2 Jun 2020 05:41:33 +0000 (22:41 -0700)]
Simplify and regularize some offset tests in alloc.c

* src/alloc.c (live_string_holding, live_cons_holding)
(live_symbol_holding, live_float_p): Simplify and regularize.

4 years agoMerge from origin/emacs-27
Paul Eggert [Tue, 2 Jun 2020 05:26:33 +0000 (22:26 -0700)]
Merge from origin/emacs-27

0260d2d2db Don't call 'mbrtowc' on WINDOWSNT

4 years ago; Merge from origin/emacs-27
Paul Eggert [Tue, 2 Jun 2020 05:26:33 +0000 (22:26 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

fb90f46f47 ; Auto-commit of loaddefs files.

4 years agoMerge from origin/emacs-27
Paul Eggert [Tue, 2 Jun 2020 05:26:32 +0000 (22:26 -0700)]
Merge from origin/emacs-27

44c0e074f7 * doc/emacs/buffers.texi (Icomplete): Mention icomplete-mi...
68b6dad1d8 Be more aggressive in marking objects during GC
36f508f589 ; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.
cc340da1fe Fix bug #41618 "(byte-compile 'foo) errors when foo is a m...
41232e6797 Avoid crashes due to bidi cache being reset during redisplay
f72bb4ce36 * lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize ...
d3e0023aaa ; * etc/TODO: Fix formatting.  (Bug#41497)
a8ad94cd2f Fix mingw.org's MinGW GCC 9 warning about 'execve'

# Conflicts:
# lisp/tab-bar.el
# nt/inc/ms-w32.h
# src/alloc.c

4 years ago* lisp/progmodes/project.el (project-vc-dir, project-shell): New commands.
Juri Linkov [Mon, 1 Jun 2020 23:01:25 +0000 (02:01 +0300)]
* lisp/progmodes/project.el (project-vc-dir, project-shell): New commands.

(project-compile): Add args and interactive spec like in 'compile'.
(project-switch-commands): Bind project-vc-dir to "v",
project-shell to "s", and rebind project-find-regexp from "s" to "r".

* doc/emacs/maintaining.texi (Project File Commands):
Describe project-vc-dir and project-shell.

4 years agoDon't call 'mbrtowc' on WINDOWSNT
Eli Zaretskii [Mon, 1 Jun 2020 15:57:39 +0000 (18:57 +0300)]
Don't call 'mbrtowc' on WINDOWSNT

* src/emacs.c (using_utf8): Don't call 'mbrtowc' on WINDOWSNT
systems, as it's not available on Windows 9X.

4 years ago; Fix some recent byte-compilation warnings
Basil L. Contovounesios [Mon, 1 Jun 2020 15:56:26 +0000 (16:56 +0100)]
; Fix some recent byte-compilation warnings

For discussion of the autoloaded function declaration, see
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00910.html.

* lisp/dnd.el (dnd-handle-one-url): It is no longer necessary to
declare the autoloaded function browse-url-select-handler after
ldefs-boot.el was updated.
* lisp/progmodes/elisp-mode.el: Declare xref.el function to silence
byte-compiler.

4 years agoBug #41061 patch: Fix typos and amend code slightly
Alan Mackenzie [Mon, 1 Jun 2020 15:21:54 +0000 (15:21 +0000)]
Bug #41061 patch: Fix typos and amend code slightly

* lisp/progmodes/cc-align.el (c-lineup-ternary-bodies)
* doc/misc/cc-mode.texi (Operator Line-Up): Fix typos and amend code.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Jun 2020 13:27:51 +0000 (06:27 -0700)]
; Auto-commit of loaddefs files.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Jun 2020 13:11:55 +0000 (06:11 -0700)]
; Auto-commit of loaddefs files.

4 years agoChange xref-find-apropos to pass PATTERN to backend verbatim
Dmitry Gutov [Mon, 1 Jun 2020 01:44:33 +0000 (04:44 +0300)]
Change xref-find-apropos to pass PATTERN to backend verbatim

* lisp/progmodes/xref.el (xref-backend-apropos): Rename this
generic's second arg to PATTERN, to clarify that it should be
handled entirely in the backend, with no pre-processing by the
command.
(xref-find-apropos): Update accordingly, but keep compatibility
with backends in older Emacs versions.
(xref-apropos-regexp): Extract from xref-find-apropos.

* lisp/progmodes/etags.el (xref-backend-apropos): Use it here.

* lisp/progmodes/elisp-mode.el (xref-backend-apropos): And here.

4 years ago* doc/emacs/buffers.texi (Icomplete): Mention icomplete-minibuffer-setup-hook.
João Távora [Mon, 1 Jun 2020 00:29:50 +0000 (01:29 +0100)]
* doc/emacs/buffers.texi (Icomplete): Mention icomplete-minibuffer-setup-hook.

4 years agoBe more aggressive in marking objects during GC
Paul Eggert [Sun, 31 May 2020 22:29:23 +0000 (15:29 -0700)]
Be more aggressive in marking objects during GC

Simplified version of a patch from Pip Cet (Bug#41321#299).
* src/alloc.c (maybe_lisp_pointer): Remove.  All uses removed.
(mark_memory): Also look at the pointer offset by ‘lispsym’,
for symbols.

4 years agoUnbreak compilation with CHECK_STRUCTS defined.
Philipp Stephani [Sun, 31 May 2020 17:50:04 +0000 (19:50 +0200)]
Unbreak compilation with CHECK_STRUCTS defined.

* src/pdumper.c (dump_float): Update hash value after commit
9f7bfb6cb06f1480a0904184cabf187e03628e55.  The struct layout is still
compatible.

4 years ago; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.
Eli Zaretskii [Sun, 31 May 2020 17:34:00 +0000 (20:34 +0300)]
; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.

4 years agoFix bug #41618 "(byte-compile 'foo) errors when foo is a macro."
Alan Mackenzie [Sun, 31 May 2020 16:46:06 +0000 (16:46 +0000)]
Fix bug #41618 "(byte-compile 'foo) errors when foo is a macro."

* lisp/emacs-lisp/bytecomp.el (byte-compile): Disentangle the eval of the
final form from the pushing of 'macro onto it, doing the former first.

4 years agoRemove mhtml--extend-font-lock-region (Bug#41441)
Tom Tromey [Sun, 31 May 2020 16:20:12 +0000 (10:20 -0600)]
Remove mhtml--extend-font-lock-region (Bug#41441)

* lisp/textmodes/mhtml-mode.el (mhtml--extend-font-lock-region):
Remove.
(mhtml-mode): Don't set font-lock-extend-region-functions.

4 years agoProtect bidi cache from inadvertent resets
Eli Zaretskii [Sun, 31 May 2020 14:34:09 +0000 (17:34 +0300)]
Protect bidi cache from inadvertent resets

* src/xdisp.c (Fline_pixel_height, Fmove_point_visually): Save and
restore the bidi cache, to avoid inadvertently resetting it by
starting a new iteration through buffer text.  This could cause
trouble if these functions are called during a redisplay cycle,
especially while we were processing RTL text.

4 years agoAvoid crashes due to bidi cache being reset during redisplay
Eli Zaretskii [Sun, 31 May 2020 14:23:11 +0000 (17:23 +0300)]
Avoid crashes due to bidi cache being reset during redisplay

If automatic character composition triggers GC, and
'garbage-collection-messages' are turned on, we could have the
bidi cache reset while processing RTL text, which would then
consistently crash.
* src/xdisp.c (display_echo_area_1): Protect the bidi cache
against changes inside 'try_window'.

4 years agooccur: Add bindings for next-error-no-select
Tino Calancha [Sun, 31 May 2020 10:31:27 +0000 (12:31 +0200)]
occur: Add bindings for next-error-no-select

Make the navigation in the occur buffer closer
to the navigation in the compilation buffer.

Add bindings to navigate the occur matches (Bug#39121).
Honor `next-error-highlight' and `next-error-highlight-no-select'
when navigating the occurrences.

* lisp/replace.el (occur-highlight-regexp, occur-highlight-overlay):
New variables.
(occur-1): Set `occur-highlight-regexp' to the searched regexp.
(occur-goto-locus-delete-o, occur--highlight-occurrence): New defuns.
(occur-mode-display-occurrence, occur-mode-goto-occurrence):
Use `occur--highlight-occurrence'.
(occur-mode-map): Bind n to `next-error-no-select'
and p to `previous-error-no-select'

* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1):
Announce this change.

* test/lisp/replace-tests.el (replace-tests-with-highlighted-occurrence):
Add helper macro.
(occur-highlight-occurrence): Add test.

4 years ago* lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize buffer.
Juri Linkov [Sat, 30 May 2020 22:30:34 +0000 (01:30 +0300)]
* lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize buffer.

* lisp/tab-bar.el (switch-to-buffer-other-tab): Use
'window-normalize-buffer-to-switch-to' on 'buffer-or-name',
like does 'pop-to-buffer' used by 'switch-to-buffer-other-frame',
instead of raising the error "Invalid buffer" on a non-existent buffer name.

4 years agoDon't return transient projects with MAYBE-PROMPT=nil
Dmitry Gutov [Sat, 30 May 2020 16:57:06 +0000 (19:57 +0300)]
Don't return transient projects with MAYBE-PROMPT=nil

* lisp/progmodes/project.el (project-current): Only return
transient projects when called with non-nil MAYBE-PROMPT.
Also only update the known projects lists in this case.
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03375.html).

4 years ago; * etc/TODO: Fix formatting. (Bug#41497)
Eli Zaretskii [Sat, 30 May 2020 16:10:14 +0000 (19:10 +0300)]
; * etc/TODO: Fix formatting.  (Bug#41497)

4 years agoMinor fix in 'find-alternate-file'
immerrr [Sun, 17 May 2020 11:47:23 +0000 (13:47 +0200)]
Minor fix in 'find-alternate-file'

This fixes the use case when, for example, 'find-file-hooks'
fails.
* lisp/files.el (find-alternate-file): If buffer 'oname' exists,
kill it before renaming the new one.  (Bug#41359)

4 years agoRemove private prototype for 'execve' and its uses in MinGW build
Eli Zaretskii [Sat, 30 May 2020 10:56:20 +0000 (13:56 +0300)]
Remove private prototype for 'execve' and its uses in MinGW build

* src/sysdep.c (emacs_exec_file): Don't compile this function
anymore on WINDOWSNT, since it is not used there.  This function
was the only reason for having 'execve' prototype in ms-w32.h.

* nt/inc/ms-w32.h (execve): Remove prototype and the MinGW64 vs
ming.org mess that it causes.

4 years agoFix mingw.org's MinGW GCC 9 warning about 'execve'
Eli Zaretskii [Sat, 30 May 2020 10:19:13 +0000 (13:19 +0300)]
Fix mingw.org's MinGW GCC 9 warning about 'execve'

* nt/inc/ms-w32.h (execve) [__GNUC__ > 9]: Provide a different
prototype for mingw.org's MinGW as well, to match the GCC builtin.

4 years agoAnother fix of display of line-prefix with fringe bitmaps
Eli Zaretskii [Fri, 29 May 2020 20:02:10 +0000 (23:02 +0300)]
Another fix of display of line-prefix with fringe bitmaps

* src/xdisp.c (redisplay_internal): Don't use "optimization 1"
if a glyph row from which to start display begins with a display
property that draws into the fringes.  (Bug#41584)

4 years ago* lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indent
Stefan Monnier [Fri, 29 May 2020 19:01:58 +0000 (15:01 -0400)]
* lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indent

Use the new "space after paren" convention to get the desired indentation

4 years agoproject-prompt-project-dir: Use more consistent prompts
Dmitry Gutov [Fri, 29 May 2020 18:37:12 +0000 (21:37 +0300)]
project-prompt-project-dir: Use more consistent prompts

* lisp/progmodes/project.el (project-prompt-project-dir):
Use more consistent prompts.

4 years agoFix display of line-prefix with fringe bitmaps
Eli Zaretskii [Fri, 29 May 2020 14:00:52 +0000 (17:00 +0300)]
Fix display of line-prefix with fringe bitmaps

* src/xdisp.c (try_window_id): Don't use this optimization if a
glyph row from which to start display begins with a display
property that draws into the fringes.  (Bug#41584)

4 years agoCommit indian.el forgotten in previous change.
Eli Zaretskii [Fri, 29 May 2020 13:30:44 +0000 (16:30 +0300)]
Commit indian.el forgotten in previous change.

4 years ago* lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_INVALID_PARAMETER".
Michael Albinus [Fri, 29 May 2020 09:41:54 +0000 (11:41 +0200)]
* lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_INVALID_PARAMETER".

4 years ago* lisp/emacs-lisp/lisp-mode.el: Add new indentation convention
akater [Fri, 29 May 2020 04:26:09 +0000 (00:26 -0400)]
* lisp/emacs-lisp/lisp-mode.el: Add new indentation convention

(calculate-lisp-indent): To distinguish code and data when indenting,
introduce the convention that a space between an open paren and
a symbol indicate that this should be indented as a simple data list.

4 years agoCreate a buffer-local binding to improve performance
Arnold Noronha [Thu, 28 May 2020 23:35:58 +0000 (02:35 +0300)]
Create a buffer-local binding to improve performance

* lisp/ido.el (ido-make-buffer-list-1):
Create a buffer-local binding to improve performance when a lot of
buffers are open (bug#41029).

Copyright-paperwork-exempt: yes

4 years agonext-error-find-buffer-function: Back to #'ignore
Dmitry Gutov [Thu, 28 May 2020 23:03:41 +0000 (02:03 +0300)]
next-error-find-buffer-function: Back to #'ignore

* lisp/simple.el (next-error-find-buffer-function):
Change the default back, to simplify the default behavior
(bug#40919).

4 years ago; project.el: Update TODO
Dmitry Gutov [Thu, 28 May 2020 20:01:08 +0000 (23:01 +0300)]
; project.el: Update TODO

4 years agoImprove Malayalam language transliteration
James Thomas [Mon, 27 Apr 2020 02:36:48 +0000 (08:06 +0530)]
Improve Malayalam language transliteration

The existing ITRANS scheme did not support some characters and
language quirks like 'chillu's.  The Inscript method had errors.
* lisp/language/ind-util.el (indian-mlm-base-table): Add archaic
chars, Mozhi combos; cleanup.
(indian-mlm-mozhi-table): New scheme Mozhi.
* lisp/leim/quail/indian.el (inscript-mlm-keytable): Correct
errors.  Add Inscript chillus & zero-width chars, Mozhi scheme.
* etc/NEWS: Mention the changes.

4 years agoMerge branch 'feature/project-switching'
Simen Heggestøyl [Thu, 28 May 2020 15:02:17 +0000 (17:02 +0200)]
Merge branch 'feature/project-switching'