]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoDocument :type-error property for customization types
Mauro Aranda [Fri, 4 Sep 2020 12:50:40 +0000 (14:50 +0200)]
Document :type-error property for customization types

* doc/lispref/customize.texi (Type Keywords): Document :type-error, so
Lisp programs can display a more correct message when the value of a
user option doesn't match its type (bug#23975).

4 years agoAllow "lambda" spelling for ucs-insert
Noam Postavsky [Fri, 4 Sep 2020 04:43:13 +0000 (06:43 +0200)]
Allow "lambda" spelling for ucs-insert

* lisp/international/mule-cmds.el (ucs-names): Add a "LAMBDA"
completion variant for every "LAMDA" name (bug#30513).

4 years agoShow log suppression buttons in display-warning buffer
Robert Pluim [Fri, 4 Sep 2020 04:28:21 +0000 (06:28 +0200)]
Show log suppression buttons in display-warning buffer

* etc/NEWS: Describe 'display-warning' button change (bug#30757).
* lisp/emacs-lisp/warnings.el (warning-suppress-warning):
Define button.
(warning-suppress-action): New function.
(warning-suppress-log-warning): Define button.
(warning-suppress-log-action): New function.
(display-warning): Show buttons to allow permanent
modification of warning-suppress-types and
warning-suppress-log-types per warning.

4 years agowdired-do-renames: Speed up for long Emacs sessions
Tino Calancha [Fri, 4 Sep 2020 04:09:23 +0000 (06:09 +0200)]
wdired-do-renames: Speed up for long Emacs sessions

`dired-rename-file' calls unconditionally `dired-rename-subdir'.
The second function performs performs a loop on all the Emacs
buffers; this step is only needed if FILE is a directory (bug#32899).

In a long lived Emacs session, this can make a difference
when renaming a bunch of files with `wdired'.
For instance, in my 40 days old Emacs session, with ~ 700 buffers,
this patch increases the speed to rename 2000 files a factor ~ 15.

* lisp/dired-aux.el (dired-rename-file): Call `dired-rename-subdir'
iif FILE is a directory.  Add docstring.
(dired-rename-subdir, dired-remove-entry)
(dired-remove-file): Add docstring.

(dired-remove-entry): Move definition into `dired.el'.

* lisp/wdired.el (wdired-do-renames): Use a progress-reporter.

* lisp/dired.el (dired-delete-entry):
Use `dired-remove-entry'.  Add docstring.

(dired-buffers-for-dir, dired-fun-in-all-buffers):
Change comment into docstring.
(dired-fun-in-all-buffers): Prefer `when' and `push' here.

4 years agoFix infloop when indenting in cperl-mode
Harald Jörg [Fri, 4 Sep 2020 03:13:43 +0000 (05:13 +0200)]
Fix infloop when indenting in cperl-mode

* lisp/progmodes/cperl-mode.el (cperl-indent-exp): Fix (Bug#10483)
Perl expressions (e.g. function calls) ending in ")" without
statement terminator on the same line no longer loop endlessly.

4 years agoFix previous buffer name fixup in save-some-buffers
Lars Ingebrigtsen [Fri, 4 Sep 2020 02:58:17 +0000 (04:58 +0200)]
Fix previous buffer name fixup in save-some-buffers

* lisp/files.el (save-some-buffers): Get the file name for the
correct buffer in the buffer name check (bug#43192).

4 years agoDon't display the Gnus splash on gnus-read-ephemeral-emacs-bug-group
Lars Ingebrigtsen [Fri, 4 Sep 2020 02:45:49 +0000 (04:45 +0200)]
Don't display the Gnus splash on gnus-read-ephemeral-emacs-bug-group

* lisp/gnus/gnus.el: Don't display the Gnus splash at load time
(bug#43123).

4 years ago* lisp/mail/mspools.el: Use lexical-scoping. Autoload `mspools-show`.
Stefan Monnier [Fri, 4 Sep 2020 02:03:46 +0000 (22:03 -0400)]
* lisp/mail/mspools.el: Use lexical-scoping.  Autoload `mspools-show`.

(mspools-mode-map): Remove bindings made redundant by `special-mode-map`.
(mspools-show): Autoload.  Use `erase-buffer`.
(mspools-visit-spool): Use `inhibit-read-only`; simplify a bit.
(mspools-get-spool-files): Avoid `setq`.  Use `pcase-dolist`.
(mspools-revert-buffer): Make (unused) args optional.
(mspools-help, mspools-show-again, mspools-quit): Declare obsolete.

4 years agoFix ElDoc's eldoc-documentation-enthusiast strategy
João Távora [Thu, 3 Sep 2020 21:17:29 +0000 (22:17 +0100)]
Fix ElDoc's eldoc-documentation-enthusiast strategy

As soon as we get a response from any of the user functions/sources in
eldoc-documentation-functions, we must make sure to call the
display-doc local function, just like in the other strategies.

That is even if that response produced nil, meaning that there's no
doc coming from that source.  Failure to do so when none of the
sources produced non-nil would keep stale documentation displaying.

First reported in https://github.com/joaotavora/eglot/issues/503

* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Fix
:enthusiast strategy.
(Version): Bump to 1.10.0

4 years agoFix freeze in cperl-mode when editing a regexp
Harald Jörg [Thu, 3 Sep 2020 20:11:47 +0000 (22:11 +0200)]
Fix freeze in cperl-mode when editing a regexp

* lisp/progmodes/cperl-mode.el (cperl-forward-group-in-re): Make
sure that an error is reported back to the caller (Bug#16368).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-bug-16368):
Tests for balanced (no error) and unbalanced (caught exception)
cases of `cperl-forward-group-in-re'.

4 years ago* configure.ac (GNU_OBJC_CFLAGS): Check ObjC defaults to C99. (bug#43167)
Alan Third [Thu, 3 Sep 2020 20:56:03 +0000 (21:56 +0100)]
* configure.ac (GNU_OBJC_CFLAGS): Check ObjC defaults to C99. (bug#43167)

4 years ago; * test/lisp/progmodes/cperl-mode-tests.el: Add license statement.
Stefan Kangas [Thu, 3 Sep 2020 19:57:06 +0000 (21:57 +0200)]
; * test/lisp/progmodes/cperl-mode-tests.el: Add license statement.

4 years ago* src/image.c (svg_load_image): Use xmalloc and xfree. (bug#43135)
Alan Third [Tue, 1 Sep 2020 18:53:01 +0000 (19:53 +0100)]
* src/image.c (svg_load_image): Use xmalloc and xfree. (bug#43135)

4 years agoRevert recent GC-related changes (Bug#43152)
Paul Eggert [Thu, 3 Sep 2020 19:10:26 +0000 (12:10 -0700)]
Revert recent GC-related changes (Bug#43152)

* src/alloc.c (live_string_holding, live_cons_holding)
(live_symbol_holding, live_large_vector_holding)
(live_small_vector_holding):
Go back to old approach of treating every would-be pointer to any
byte in the object (though not to just past the object end) as
addressing the object.
(live_float_p): Require that the would-be float point
to the start of the Lisp_Float, and not anywhere else.
(live_vector_pointer, live_float_holding, mark_objects):
Remove.  All uses removed.
(mark_maybe_object, mark_maybe_objects):
Bring back these functions.
* src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): Do not clear the
new slots, as they're now checked via mark_maybe_objects,
not via mark_objects.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 3 Sep 2020 17:20:56 +0000 (20:20 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years agoFix 'expand-file-name' for remote files
Eli Zaretskii [Thu, 3 Sep 2020 17:16:33 +0000 (20:16 +0300)]
Fix 'expand-file-name' for remote files

This reverts most of commit 14fb657ba82da346d36f05f88da26f1c5498b798
and its followup fixes, and instead fixes the original bugs in a
different manner that doesn't affect any unrelated use cases.  As
part of this, the code which caused 'expand-file-name' to enforce
a trailing slash on expanded directories is removed, as this kind
of semantic processing is outside of 'expand-file-name's scope.
* src/fileio.c (Fexpand_file_name): If expanding default_directory
yields a remote file name, call its handlers.  (Bug#26911)
(Bug#34834)

* doc/lispref/files.texi (File Name Expansion): Remove the
requirement that expanding a directory name yields a directory
name, i.e. that the expansion must end in a slash.

* etc/NEWS: Remove the announcement of the changed behavior of
'expand-file-name' wrt trailing slashes.

* test/src/fileio-tests.el (fileio-tests--HOME-trailing-slash)
(fileio-tests--expand-file-name-trailing-slash): Remove tests.
* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name): No
need to expect different results in Emacs 28 and later.

4 years agoFix my previous change to cancel world-clock timer
Stefan Kangas [Thu, 3 Sep 2020 15:19:15 +0000 (17:19 +0200)]
Fix my previous change to cancel world-clock timer

* lisp/time.el (subr-x): Require when compiling.
(world-clock): Set 'kill-buffer-hook' buffer locally only.
(world-clock-update): Break out timer cancellation from here...
(world-clock-cancel-timer): ...to here, and don't rely on variable to
find the timer to cancel.
(world-clock-timer): Delete now superfluous variable.

4 years agoFix vertical cursor motion when 'visual-line-mode' is in effect
Eli Zaretskii [Thu, 3 Sep 2020 12:59:46 +0000 (15:59 +0300)]
Fix vertical cursor motion when 'visual-line-mode' is in effect

* src/xdisp.c (move_it_in_display_line_to): Fix a logic error made
as part of introducing the 'word-wrap-by-category' feature; that
error brought back bug#8155.

4 years agoUnbreak project.el, the GNU Elpa package, for Emacs 26.3
João Távora [Thu, 3 Sep 2020 12:34:08 +0000 (13:34 +0100)]
Unbreak project.el, the GNU Elpa package, for Emacs 26.3

Fixes: bug#43164
* lisp/progmodes/project.el: Bump to 0.5.2
(bound-and-true-p): Check that tab-prefix-map is bound before binding.

4 years ago* lisp/eshell/esh-mode.el: Remove redundant :group args.
Stefan Kangas [Thu, 3 Sep 2020 12:31:46 +0000 (14:31 +0200)]
* lisp/eshell/esh-mode.el: Remove redundant :group args.

4 years agoSupport bookmarking Eshell buffers
Stefan Kangas [Thu, 3 Sep 2020 12:30:53 +0000 (14:30 +0200)]
Support bookmarking Eshell buffers

* lisp/eshell/esh-mode.el (eshell-bookmark-name)
(eshell-bookmark-make-record, eshell-bookmark-jump): New defuns.
(eshell-mode): Set up bookmark handler.

4 years agoCancel timer when world-clock buffer is killed
Stefan Kangas [Thu, 3 Sep 2020 10:54:30 +0000 (12:54 +0200)]
Cancel timer when world-clock buffer is killed

* lisp/time.el (world-clock-timer): New variable.
(world-clock-cancel-timer): New defun.
(world-clock): Add 'world-clock-cancel-timer' to 'kill-buffer-hook'.

4 years agoUse lexical-binding in mwheel.el
Stefan Kangas [Wed, 2 Sep 2020 21:11:27 +0000 (23:11 +0200)]
Use lexical-binding in mwheel.el

4 years agoSimplify mwheel-mode by using alist instead of two variables
Stefan Kangas [Wed, 2 Sep 2020 21:10:27 +0000 (23:10 +0200)]
Simplify mwheel-mode by using alist instead of two variables

* lisp/mwheel.el (mouse-wheel--remove-bindings): Update call
signature to take no arguments.  Doc fix.
(mouse-wheel--add-binding): Break out from...
(mouse-wheel-mode): ...here.  Simplify by using above functions.
(mouse-wheel--installed-bindings-alist): New variable.
(mwheel-installed-bindings): Make obsolete.
(mwheel-installed-text-scale-bindings): Make obsolete.
* test/lisp/mwheel-tests.el (mwheel-test-enable/disable):
New test.

4 years agoFix binding mouse wheel with modifiers in buffer area
Stefan Kangas [Wed, 2 Sep 2020 20:54:47 +0000 (22:54 +0200)]
Fix binding mouse wheel with modifiers in buffer area

* test/lisp/mwheel-tests.el (mwheel-test--create-scroll-keys): Fix
binding mouse wheel with modifiers in buffer area, while ignoring them
for fringes, margins, etc.  My previous change mistakenly ignored all
modifiers in `mouse-wheel-scroll-amount'.
* lisp/mwheel.el (mouse-wheel--create-scroll-keys): Fix test to
reflect the above.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Ulf Jasper [Wed, 2 Sep 2020 17:59:57 +0000 (19:59 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years agoApply icalendar.el patch by Thomas Plass <thunk2@arcor.de>. Fix bug#34315.
Ulf Jasper [Wed, 2 Sep 2020 17:58:56 +0000 (19:58 +0200)]
Apply icalendar.el patch by Thomas Plass <thunk2@arcor.de>.  Fix bug#34315.

* lisp/calendar/icalendar.el (icalendar--convert-tz-offset): No DST
  when RDATE is present.
* lisp/calendar/icalendar.el (icalendar--parse-vtimezone): Use
  `icalendar--get-most-recent-observance'.
* (icalendar--get-most-recent-observance): New.
* (icalendar--decode-isodatetime): Add parameters source-zone, result-zone.
* (icalendar--decode-isoduration): Fix decoding days.
* test/lisp/calendar/icalendar-tests.el (icalendar--decode-isoduration):
  Add testcases.

4 years agoFix bug in dbus.el
Michael Albinus [Wed, 2 Sep 2020 17:50:14 +0000 (19:50 +0200)]
Fix bug in dbus.el

* lisp/net/dbus.el (dbus-register-property)
(dbus-property-handler): Handle properties of the same interface
at different object paths properly.  (Bug#43146)

4 years agoAdd unit tests for icalendar.el
Ulf Jasper [Wed, 2 Sep 2020 17:37:45 +0000 (19:37 +0200)]
Add unit tests for icalendar.el

* test/lisp/calendar/icalendar-tests.el (icalendar--parse-vtimezone,
  icalendar--decode-isodatetime): Add testcases.
* test/lisp/calendar/icalendar-tests.el (icalendar--convert-tz-offset,
  icalendar--decode-isoduration): New.

4 years agoHandle different IMAP server responses to COPY and MOVE
Eric Abrahamsen [Wed, 2 Sep 2020 16:07:35 +0000 (09:07 -0700)]
Handle different IMAP server responses to COPY and MOVE

* lisp/gnus/nnimap.el (nnimap-request-move-article): Need to examine
different parts of the result.

4 years agoFix OBOE in flyspell-check-previous-highlighted-word
Stefan Kangas [Wed, 2 Sep 2020 15:31:08 +0000 (17:31 +0200)]
Fix OBOE in flyspell-check-previous-highlighted-word

* lisp/textmodes/flyspell.el
(flyspell-check-previous-highlighted-word): Fix off-by-one error when
word is at (point-min).  (Bug#39898)

Suggested by OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>.

4 years agoUse lexical-binding in pcmpl-unix.el
Stefan Kangas [Wed, 2 Sep 2020 14:37:13 +0000 (16:37 +0200)]
Use lexical-binding in pcmpl-unix.el

* lisp/pcmpl-unix.el: Use lexical-binding.
(pcmpl-ssh-known-hosts, pcmpl-ssh-config-hosts, pcmpl-ssh-hosts):
Adjust for lexical-binding.

4 years agoUse lexical-binding in pcmpl-linux.el and add tests
Stefan Kangas [Wed, 2 Sep 2020 03:02:18 +0000 (05:02 +0200)]
Use lexical-binding in pcmpl-linux.el and add tests

* lisp/pcmpl-linux.el: Use lexical-binding.
(pcmpl-linux-fs-modules-path-format)
(pcmpl-linux-mtab-file): New constants.
(pcmpl-linux-fs-types, pcmpl-linux-mounted-directories): Use above
new constants.
* test/lisp/pcmpl-linux-resources/fs/ext4/.keep:
* test/lisp/pcmpl-linux-resources/mtab:
* test/lisp/pcmpl-linux-tests.el: New files.

4 years agoStrip carriage returns from received password prompts (comint)
Robert Pluim [Tue, 1 Sep 2020 14:59:50 +0000 (16:59 +0200)]
Strip carriage returns from received password prompts (comint)

* comint.el (comint-password-prompt-regexp): Strip carriage
returns from the received prompt before matching.  (Bug#43003)

4 years agoImprove documentation for custom :options
Mauro Aranda [Tue, 1 Sep 2020 14:59:58 +0000 (16:59 +0200)]
Improve documentation for custom :options

* doc/lispref/customize.texi (Variable Definitions):
Mention that re-evaluating a defcustom form doesn't reset custom
options (bug#30101).

4 years agoDocument 'smtp-auth' in auth-source info
Robert Pluim [Tue, 1 Sep 2020 13:59:43 +0000 (15:59 +0200)]
Document 'smtp-auth' in auth-source info

* doc/misc/auth.texi (Help for users): Mention 'smtp-auth' key,
add cross-reference to smtpmail.info.
* doc/misc/smtpmail.texi (Authentication): Fix markup.

4 years agoMention C-c C-w in the signature section of the Message manual
Lars Ingebrigtsen [Tue, 1 Sep 2020 13:42:16 +0000 (15:42 +0200)]
Mention C-c C-w in the signature section of the Message manual

* doc/misc/message.texi (Insertion Variables): Mention the C-c C-w
command (bug#43136).  Text suggested by Dan Jacobson.

4 years agoRemove spurious @ character in smtpmail.texi
Lars Ingebrigtsen [Tue, 1 Sep 2020 13:34:32 +0000 (15:34 +0200)]
Remove spurious @ character in smtpmail.texi

* doc/misc/smtpmail.texi (Authentication): Remove a presumably
spurious @ character.

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

4 years ago; Document choice of smtp authentication method
Andrew G Cohen [Tue, 1 Sep 2020 11:38:36 +0000 (19:38 +0800)]
; Document choice of smtp authentication method

* doc/misc/smtpmail.texi (Authentication): Document smtp-auth.
* etc/NEWS: Advertise the feature.

4 years agoUse lexical-binding in pong.el
Stefan Kangas [Mon, 31 Aug 2020 18:41:45 +0000 (20:41 +0200)]
Use lexical-binding in pong.el

* lisp/play/pong.el: Use lexical-binding.
Remove redundant :group args.

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 31 Aug 2020 17:45:54 +0000 (10:45 -0700)]
Merge from origin/emacs-27

f20169399d (origin/emacs-27) Fix typo in Introduction to Emacs Lisp
7605060d51 Update Elisp Manual reference to which-function-mode
29708cbde7 Some precisions to bug handling
dddc971f0e CC Mode: Fix processing for when c-multiline-string-start-...
4a73fb9668 Fix description of %-constructs in 'mode-line-format'

4 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 31 Aug 2020 17:45:54 +0000 (10:45 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

df5c669709 Adapt tramp-tests.el, don't merge with master

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 31 Aug 2020 17:45:54 +0000 (10:45 -0700)]
Merge from origin/emacs-27

da4840af12 Adapt reminder-for-release-blocking-bugs

4 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 31 Aug 2020 17:45:54 +0000 (10:45 -0700)]
; Merge from origin/emacs-27

The following commits were skipped:

eb77572257 Fix replace-region-contents performance bug
a142bbd288 * admin/admin.el (reminder-for-release-blocking-bugs): New...
4657f08b7e Sync with Tramp 2.4.5-pre

4 years agoMake quoted-printable-encode-region work in multibyte buffers
Lars Ingebrigtsen [Mon, 31 Aug 2020 17:13:23 +0000 (19:13 +0200)]
Make quoted-printable-encode-region work in multibyte buffers

* lisp/mail/qp.el (quoted-printable-encode-region): If we're in a
multibyte buffer (that has been encoded with some coding system),
then get-byte will get the correct byte value.

4 years agoAdd a new function dom-print
Lars Ingebrigtsen [Mon, 31 Aug 2020 17:12:12 +0000 (19:12 +0200)]
Add a new function dom-print

* doc/lispref/text.texi (Document Object Model): Document it.

* lisp/dom.el (dom-print): New function.

4 years ago* lisp/dired-x.el (dired-omit-mode): Add autoload cookie.
Stefan Kangas [Sat, 29 Aug 2020 18:18:19 +0000 (20:18 +0200)]
* lisp/dired-x.el (dired-omit-mode): Add autoload cookie.

4 years ago* .gitlab-ci.yml (test-all): Add lib/*.{h,c}.
Michael Albinus [Mon, 31 Aug 2020 11:31:46 +0000 (13:31 +0200)]
* .gitlab-ci.yml (test-all): Add lib/*.{h,c}.

4 years agoFix minibuffer default of ephemeral debbugs group
Stefan Kangas [Mon, 31 Aug 2020 09:43:52 +0000 (11:43 +0200)]
Fix minibuffer default of ephemeral debbugs group

* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids): Don't read
number in "bug-123" as a negative bug ID; they are always positive.

4 years agoFix typo in Introduction to Emacs Lisp
Stefan Kangas [Mon, 31 Aug 2020 09:34:18 +0000 (11:34 +0200)]
Fix typo in Introduction to Emacs Lisp

* doc/lispintro/emacs-lisp-intro.texi (type-of-animal in detail):
Remove extraneous parenthesis.

4 years ago* .gitlab-ci.yml (test-all): Change .m to .c for standard C files.
Alan Third [Mon, 31 Aug 2020 08:19:45 +0000 (09:19 +0100)]
* .gitlab-ci.yml (test-all): Change .m to .c for standard C files.

4 years ago* src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op.
Paul Eggert [Mon, 31 Aug 2020 07:15:22 +0000 (00:15 -0700)]
* src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op.

4 years ago* src/lisp.h (lisp_h_XPL, XPL): Remove; unused.
Paul Eggert [Mon, 31 Aug 2020 06:56:39 +0000 (23:56 -0700)]
* src/lisp.h (lisp_h_XPL, XPL): Remove; unused.

4 years agoUse mark_objects elsewhere too
Paul Eggert [Mon, 31 Aug 2020 06:40:11 +0000 (23:40 -0700)]
Use mark_objects elsewhere too

* src/alloc.c (mark_vectorlike, mark_face_cache):
* src/eval.c (mark_specpdl):
* src/fringe.c (mark_fringe_data):
* src/keyboard.c (mark_kboards):
Use mark_objects instead of doing it by hand.

4 years agoRemove mark_maybe_object
Paul Eggert [Mon, 31 Aug 2020 06:40:11 +0000 (23:40 -0700)]
Remove mark_maybe_object

* src/alloc.c (mark_maybe_object, mark_maybe_objects): Remove.
(mark_objects): New function.
* src/eval.c (mark_specpdl): Use mark_objects instead of
mark_maybe_objects, since the array now has only valid Lisp objects.
* src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): When allocating a large
array, clear it so that it contains only valid Lisp objects.  This
is simpler and safer, and does not hurt performance significantly
on my usual benchmark as the code is executed so rarely.

4 years agoAvoid some false matches in mark_maybe_pointer
Paul Eggert [Mon, 31 Aug 2020 06:40:11 +0000 (23:40 -0700)]
Avoid some false matches in mark_maybe_pointer

This lets Emacs avoid marking some garbage as if it were in use.
On one test platform (RHEL 7.8, Intel Xeon Silver 4116) it
sped up ‘cd lisp; make compile-always’ by a bit over 1%.
* src/alloc.c (live_string_holding, live_cons_holding)
(live_symbol_holding, live_large_vector_holding)
(live_small_vector_holding):
Count only pointers that point to a struct component,
or are a tagged pointer to the start of the struct.
Exception: for non-bool-vector pseudovectors,
count any pointer past the header, since it’s too much
of a pain to write code for every pseudovector.
(live_vector_pointer): New function.

4 years agoOmit no-longer-needed stack mark_maybe_object
Paul Eggert [Mon, 31 Aug 2020 06:40:11 +0000 (23:40 -0700)]
Omit no-longer-needed stack mark_maybe_object

* src/alloc.c (mark_memory): Do not bother using mark_maybe_object
on the stack, since mark_maybe_pointer now marks everything that
mark_maybe_object would.

4 years agoFix GC bug with Lisp floats and --with-wide-int
Paul Eggert [Mon, 31 Aug 2020 06:40:11 +0000 (23:40 -0700)]
Fix GC bug with Lisp floats and --with-wide-int

On --with-wide-int platforms where Lisp_Object can be
put into non-adjacent registers, mark_maybe_pointer failed
to mark a float whose only reference was as a tagged pointer.
* src/alloc.c (live_float_holding): New function,
a generalization of the old live_float_p.
(live_float_p): Use it.
(mark_maybe_pointer): Use live_float_holding, not live_float_p.

4 years agoUpdate Elisp Manual reference to which-function-mode
Stefan Kangas [Mon, 31 Aug 2020 02:35:17 +0000 (04:35 +0200)]
Update Elisp Manual reference to which-function-mode

* doc/lispref/modes.texi (Mode Line Top, Mode Line Variables)
Don't refer to obsolete alias for 'which-function-mode'.
(Bug#13716)

4 years agoBind 'n' and 'p' in compilation-mode-map
Stefan Kangas [Thu, 20 Aug 2020 14:41:50 +0000 (16:41 +0200)]
Bind 'n' and 'p' in compilation-mode-map

* lisp/progmodes/compile.el (compilation-mode-map): Bind
'(next|previous)-error-no-select' to 'n' and 'p'.  (Bug#41844)

4 years agoUse lexical-binding in life.el and add tests
Stefan Kangas [Sun, 30 Aug 2020 17:33:10 +0000 (19:33 +0200)]
Use lexical-binding in life.el and add tests

* lisp/play/life.el: Use lexical-binding.
(life--tick): Extract from...
(life): ...here.
(life--max-width, life--max-height): New variables.
(life-mode, life-setup): Use above variables.

* test/lisp/play/life-tests.el: New file.

4 years agoVarious life.el improvements
Stefan Kangas [Sun, 30 Aug 2020 16:21:11 +0000 (18:21 +0200)]
Various life.el improvements

* lisp/play/life.el (life): New defgroup.
(life-step-time): New defcustom (lower default from 1 to 0.5).
(life): Use above new variable.  Make prefix arguments set step time
in tenths of a second instead of whole seconds.
(life-expand-plane-if-needed): Rename argument to step-time.

(life-setup): Fix running `M-x life' with existing buffer.

(life-patterns): Add three more classic patterns.

4 years agoRemove some XEmacs compat code from gamegrid.el
Stefan Kangas [Sun, 30 Aug 2020 11:37:37 +0000 (13:37 +0200)]
Remove some XEmacs compat code from gamegrid.el

* lisp/play/gamegrid.el (gamegrid-setup-face): Remove XEmacs
compat code.

4 years ago* lisp/play/tetris.el: Use lexical-binding.
Stefan Kangas [Sun, 30 Aug 2020 11:06:12 +0000 (13:06 +0200)]
* lisp/play/tetris.el: Use lexical-binding.

4 years agoTweak background colours in shr when there's indentation
Lars Ingebrigtsen [Sun, 30 Aug 2020 15:03:05 +0000 (17:03 +0200)]
Tweak background colours in shr when there's indentation

* lisp/net/shr.el (shr-fill-line): Get the background colour right
for the indentation, too.

4 years agoRespect :must-match for file types in customization buffers
Mauro Aranda [Sun, 30 Aug 2020 13:55:19 +0000 (15:55 +0200)]
Respect :must-match for file types in customization buffers

* lisp/wid-edit.el (file widget): Add a :match and a :validate
function to the 'file widget, to be able to check if the widget
value is an existent file, when required (bug#25678).

4 years agoPlace flymake-eldoc-function at the end of eldoc-documentation-functions
João Távora [Sat, 29 Aug 2020 15:39:47 +0000 (16:39 +0100)]
Place flymake-eldoc-function at the end of eldoc-documentation-functions

Having it placed in the beginning of that hook meant it was mostly
impossible to track the args to a function call while writing it from
scratch, since most compilers issue a diagnostic about incorrect
number of arguments.

See bug#43103.

* lisp/progmodes/flymake.el (flymake-mode): Lower priority of
flymake-eldoc-function.

4 years ago; tiny indentation fix to lisp/progmodes/elisp-mode.el
João Távora [Sat, 29 Aug 2020 14:45:26 +0000 (15:45 +0100)]
; tiny indentation fix to lisp/progmodes/elisp-mode.el

* lisp/progmodes/elisp-mode.el (elisp-eldoc-var-docstring): Fix
indentation.

4 years agoSome precisions to bug handling
Michael Albinus [Sun, 30 Aug 2020 13:43:58 +0000 (15:43 +0200)]
Some precisions to bug handling

* admin/admin.el (reminder-for-release-blocking-bugs): Add date to subject.

* admin/notes/bug-triage:
* admin/notes/bugtracker: Minor precisions.

4 years agoMake format-prompt interpret a nil default value as "no default"
Lars Ingebrigtsen [Sun, 30 Aug 2020 13:22:20 +0000 (15:22 +0200)]
Make format-prompt interpret a nil default value as "no default"

* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.

* lisp/help-fns.el (describe-function): Adjust the caller.

* lisp/minibuffer.el (format-prompt): Interpret a nil default
value as "no default".

4 years agoFix compilation warning in snake.el
Lars Ingebrigtsen [Sun, 30 Aug 2020 12:16:07 +0000 (14:16 +0200)]
Fix compilation warning in snake.el

* lisp/play/snake.el (snake-reset-game): Avoid warning about
unused variable.

4 years ago* .gitlab-ci.yml (test-all): Run only when needed.
Michael Albinus [Sun, 30 Aug 2020 12:05:55 +0000 (14:05 +0200)]
* .gitlab-ci.yml (test-all): Run only when needed.

4 years agoConvert manual rmailmm tests to ert
Stefan Kangas [Sun, 30 Aug 2020 00:38:22 +0000 (02:38 +0200)]
Convert manual rmailmm tests to ert

* test/manual/rmailmm.el: Move from here...
* test/lisp/mail/rmailmm-tests.el: ...to here, and convert to ert.

4 years agoConvert unsafep tests to ert
Stefan Kangas [Sat, 29 Aug 2020 21:27:51 +0000 (23:27 +0200)]
Convert unsafep tests to ert

* lisp/emacs-lisp/tcover-unsafep.el: Move from here...
* test/lisp/emacs-lisp/unsafep-tests.el: ...to here, and convert to
use ert instead of tcover.

4 years ago* lisp/play/snake.el: Use lexical-binding.
Stefan Kangas [Sat, 29 Aug 2020 20:47:39 +0000 (22:47 +0200)]
* lisp/play/snake.el: Use lexical-binding.

4 years agoUse lexical-binding in more tests
Stefan Kangas [Sat, 29 Aug 2020 18:55:46 +0000 (20:55 +0200)]
Use lexical-binding in more tests

* test/lib-src/emacsclient-tests.el:
* test/lisp/emacs-lisp/hierarchy-tests.el:
* test/lisp/eshell/eshell-tests.el:
* test/lisp/gnus/gnus-util-tests.el:
* test/lisp/progmodes/js-tests.el:
* test/lisp/textmodes/bibtex-tests.el:
* test/src/editfns-tests.el:
* test/src/fns-tests.el: Use lexical-binding.

* test/lisp/emacs-lisp/hierarchy-tests.el
(hierarchy-leafs-includes-lonely-roots):
* test/src/editfns-tests.el (transpose-test-get-byte-positions):
* test/src/fns-tests.el (fns-tests-func-arity):
Adjust for lexical-binding.

4 years agoMark failing fileio test on MS-Windows
Paul Eggert [Sat, 29 Aug 2020 20:34:06 +0000 (13:34 -0700)]
Mark failing fileio test on MS-Windows

* test/src/fileio-tests.el (fileio-tests--HOME-trailing-slash):
Expect failure on MS-Windows.

4 years agoCC Mode: Fix processing for when c-multiline-string-start-char is a character
Alan Mackenzie [Sat, 29 Aug 2020 19:29:54 +0000 (19:29 +0000)]
CC Mode: Fix processing for when c-multiline-string-start-char is a character

* lisp/progmodes/cc-mode.el (c-pps-to-string-delim)
(c-multiline-string-check-final-quote): Replace c-clear-char-property by
c-clear-syn-tab.
(c-multiline-string-check-final-quote): Replace c-put-char-property by
c-put-syn-tab.

4 years agoRun GNUstep build test more often
Alan Third [Sat, 29 Aug 2020 15:31:52 +0000 (16:31 +0100)]
Run GNUstep build test more often

* .gitlab-ci.yml (test-gnustep): Include more files that may affect
the GNUstep build.

4 years ago* lisp/mail/mspools.el: Remove redundant :group args.
Stefan Kangas [Sat, 29 Aug 2020 14:13:05 +0000 (16:13 +0200)]
* lisp/mail/mspools.el: Remove redundant :group args.

4 years agoPrevent ElDoc blinking when eldoc-documentation-enthusiast is used
João Távora [Sat, 29 Aug 2020 13:28:54 +0000 (14:28 +0100)]
Prevent ElDoc blinking when eldoc-documentation-enthusiast is used

This eldoc-documentation-strategy function didn't always obey protocol
since it returned nil sometimes, which the eldoc engine took it as a
hint for the "old" protocol to clear the echo area.

* lisp/emacs-lisp/eldoc.el (eldoc-documentation-enthusiast):
Return t.
(Version): Bump to 1.9.0

4 years agoDelete duplicate definition for koi8-u coding system
Ulrich Müller [Sat, 29 Aug 2020 10:29:13 +0000 (12:29 +0200)]
Delete duplicate definition for koi8-u coding system

* lisp/language/cyrillic.el (koi8-u): Delete duplicate definition.

4 years ago* test/lisp/emacs-lisp/rx-tests.el: Improve test coverage.
Mattias Engdegård [Sat, 29 Aug 2020 11:10:18 +0000 (13:10 +0200)]
* test/lisp/emacs-lisp/rx-tests.el: Improve test coverage.

4 years agoFix description of %-constructs in 'mode-line-format'
Eli Zaretskii [Sat, 29 Aug 2020 06:45:51 +0000 (09:45 +0300)]
Fix description of %-constructs in 'mode-line-format'

* doc/lispref/modes.texi (%-Constructs): Document %@ and remove
%M, which is no longer supported.   (Bug#43092)

4 years agoRevert recent expand-file-name changes if DOS_NT
Paul Eggert [Sat, 29 Aug 2020 05:37:29 +0000 (22:37 -0700)]
Revert recent expand-file-name changes if DOS_NT

* src/fileio.c (Fexpand_file_name): Restore pre-August-26
behavior, if DOS_NT.  This should fix the recently-introduced
expand-file-name bugs on DOS_NT (Bug#26911).

4 years ago* src/fileio.c (Fexpand_file_name): Omit unnecessary assignment.
Paul Eggert [Sat, 29 Aug 2020 05:35:54 +0000 (22:35 -0700)]
* src/fileio.c (Fexpand_file_name): Omit unnecessary assignment.

4 years agoAllow direct choice of smtp authentication method
Andrew G Cohen [Sat, 29 Aug 2020 04:22:40 +0000 (12:22 +0800)]
Allow direct choice of smtp authentication method

* lisp/mail/smtpmail.el (smtpmail-try-auth-methods): Let the
authorization credentials have an entry with key :smtp-auth containing
a preferred authentication mechanism.

4 years ago; Bump seq version to 2.22
Stefan Kangas [Fri, 28 Aug 2020 22:38:57 +0000 (00:38 +0200)]
; Bump seq version to 2.22

4 years agoFix Objective-C C99 build problem
Alan Third [Thu, 27 Aug 2020 19:50:42 +0000 (20:50 +0100)]
Fix Objective-C C99 build problem

* configure.ac (NS_IMPL_GNUSTEP): GCC appears to need to be told to
use C99 when compiling Objective-C.

4 years agoAdd GNUstep build to Gitlab CI/CD
Alan Third [Thu, 27 Aug 2020 17:33:31 +0000 (18:33 +0100)]
Add GNUstep build to Gitlab CI/CD

* .gitlab-ci.yml (test-gnustep): New test target.

4 years agoAdd support for parsing column numbers in Visual Studio messages
Daniel Martín [Sun, 26 Jul 2020 13:24:59 +0000 (15:24 +0200)]
Add support for parsing column numbers in Visual Studio messages

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Extend regular expression to match optional column numbers.
*
test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
Add a test.
* test/lisp/progmodes/compile-tests.el (compile-test-error-regexps):
Update the total number of compilation errors in a test.
* etc/compilation.txt: Update compilation.txt with the newly supported
message format.
* etc/NEWS: Advertise the feature.

4 years agoFix Bug#43052
Michael Albinus [Fri, 28 Aug 2020 17:54:50 +0000 (19:54 +0200)]
Fix Bug#43052

* test/lisp/net/tramp-tests.el (tramp-test04-substitute-in-file-name):
Make user name unique.  (Bug#43052)

4 years agoAdd commands to run shell commands in project root
Stefan Kangas [Fri, 28 Aug 2020 17:23:01 +0000 (19:23 +0200)]
Add commands to run shell commands in project root

* lisp/progmodes/project.el (project-async-shell-command)
(project-shell-command): New commands to run 'async-shell-command'
and 'shell-command' in project's root directory.
(project-prefix-map): Bind commands to '!' and '&'.
* doc/emacs/maintaining.texi (Project File Commands): Document the
new commands.
* etc/NEWS: Announce the new commands.

4 years agoMake XEmacs compat aliases obsolete in warnings.el
Stefan Kangas [Fri, 28 Aug 2020 15:29:31 +0000 (17:29 +0200)]
Make XEmacs compat aliases obsolete in warnings.el

* lisp/emacs-lisp/warnings.el (display-warning-minimum-level)
(log-warning-minimum-level): Make XEmacs compat aliases into obsolete
aliases for 'warning-minimum-level' and 'warning-minimum-log-level'.

4 years agoUse lexical-binding in warnings.el and add tests
Stefan Kangas [Fri, 28 Aug 2020 15:18:15 +0000 (17:18 +0200)]
Use lexical-binding in warnings.el and add tests

* lisp/warnings.el: Use lexical-binding.
Remove redundant :group args.

* test/lisp/warnings-tests.el: New file.

4 years agoNew eieio-persistent-make-instance generic function
Eric Abrahamsen [Fri, 28 Aug 2020 00:58:03 +0000 (17:58 -0700)]
New eieio-persistent-make-instance generic function

This allows override of the read process for eieio-persistent objects,
providing the possibility of matching read/write customization for
eieio-persistent subclasses.

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-make-instance): New
generic function for constructing instances from object data written
to disk. Previously known as eieio-persistent-convert-list-to-object.

4 years agoRemove redundant slot validation in eieio-persistent-read
Eric Abrahamsen [Fri, 28 Aug 2020 00:17:19 +0000 (17:17 -0700)]
Remove redundant slot validation in eieio-persistent-read

Actual object creation (in `make-instance') will later run all slot
values through cl-typep, which does a better job of validation. This
validation is redundant, and slows the read process down.

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-fix-value): Rename
from `eieio-persistent-validate/fix-slot-value', as we no longer
validate, and we don't care about the slot definition.
(eieio-persistent-slot-type-is-class-p): Delete function.
(eieio-persistent-convert-list-to-object): Still call
`eieio--full-class-object', to trigger an autoload if necessary, but
discard the return value.

4 years agoFix indent-region for identifiers with underscores in cperl-mode
Harald Jörg [Fri, 28 Aug 2020 14:33:13 +0000 (16:33 +0200)]
Fix indent-region for identifiers with underscores in cperl-mode

 * lisp/progmodes/cperl-mode.el (cperl-fix-line-spacing): Fix Bug#18985.
 Hash keys or function names starting with a Perl keyword followed
 by an underscore (as in "for_me" are no longer split into two words
 by M-x indent-region.

4 years ago* lisp/mwheel.el: Improve package description.
Stefan Kangas [Fri, 28 Aug 2020 14:10:09 +0000 (16:10 +0200)]
* lisp/mwheel.el: Improve package description.