]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoUpdate from Gnulib
Paul Eggert [Sat, 9 May 2020 15:47:05 +0000 (08:47 -0700)]
Update from Gnulib

This incorporates:
2020-05-09 stdio: don't redefine _GL_ATTRIBUTE_FORMAT
2020-05-09 dirent, stdlib, string: don't redefine _GL_ATTRIBUTE_PURE
2020-05-08 limits-h: define LONG_BIT correctly on Haiku/x86_64
2020-05-08 ignore-value tests: use module 'attribute'
2020-05-06 attribute: minor style fixes
* build-aux/config.sub, doc/misc/texinfo.tex, lib/attribute.h:
* lib/dirent.in.h, lib/limits.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/string.in.h, m4/gnulib-common.m4:
Copy from Gnulib.

4 years agocc-mode: extend regexp used by ‘c-or-c++-mode’
Michal Nazarewicz [Mon, 4 May 2020 18:08:10 +0000 (19:08 +0100)]
cc-mode: extend regexp used by ‘c-or-c++-mode’

* lisp/progmodes/cc-mode (c-or-c++-mode--regexp): Expand the regexp to
match some more C++-only constructs and recognise a few more standard
C++ header files.  Also make sure identifiers start with non-digit.
(c-or-c++-mode): Add ‘(interactive)’ declaration.

* test/lisp/progmodes/cc-mode-tests.el (c-or-c++-mode): Add test case
for the newly recognised constructs.

4 years agocc-mode: add ‘c-lineup-ternary-bodies’ (bug#41061)
Michal Nazarewicz [Sun, 3 May 2020 15:32:47 +0000 (16:32 +0100)]
cc-mode: add ‘c-lineup-ternary-bodies’  (bug#41061)

Introduce ‘c-lineup-ternary-bodies’ function which, when used as
a c lineup function, aligns question mark and colon of a ternary
operator.  For example:

    return arg % 2 == 0 ? arg / 2
                        : (3 * arg + 1);

* lisp/progmodes/cc-align.el (c-lineup-ternary-bodies): New function.
* doc/misc/cc-mode.texi (Operator Line-Up Functions): Document the
new function.
* test/lisp/progmodes/cc-mode-tests.el (c-lineup-ternary-bodies): New
test case.

4 years agoOnly treat display strings as buttons if they have 'button' property
Clément Pit-Claudel [Sun, 26 Apr 2020 16:41:42 +0000 (12:41 -0400)]
Only treat display strings as buttons if they have 'button' property

* lisp/button.el (push-button): Use 'posn-point' instead of
'posn-string' if the string doesn't have the 'button'
property (Bug#40859).

4 years agoPrevent hanging in next-single-char-property-change
Federico Tedin [Sun, 3 May 2020 13:47:56 +0000 (15:47 +0200)]
Prevent hanging in next-single-char-property-change

* src/textprop.c (Fnext_single_char_property_change): Clarify in
the doc string the behavior when LIMIT is past the end of OBJECT.
Stop the search when position gets to end of buffer, for when LIMIT
is beyond that.  (Bug#40000)

4 years agoFix reading kind argument in browse-url-with-browser-kind.
Tassilo Horn [Fri, 8 May 2020 19:07:56 +0000 (21:07 +0200)]
Fix reading kind argument in browse-url-with-browser-kind.

* lisp/net/browse-url.el (browse-url-with-browser-kind): Convert KIND
argument queried from the user to a symbol.

4 years agoAllow predicates for matching in browse-url-handlers.
Tassilo Horn [Fri, 8 May 2020 18:57:19 +0000 (20:57 +0200)]
Allow predicates for matching in browse-url-handlers.

* lisp/net/browse-url.el (browse-url-handlers): Allow predicates for
matching in browse-url-handlers.  Adapt docs and customize type.
(browse-url-select-handler): Support predicates in addition to
regexes.
(browse-url--non-html-file-url-p): New defun.
(browse-url-default-handlers): Use above predicate entry instead of
two entries.

4 years agoMake pcase pattern 'eieio' respect slot access related functions.
Zhu Zihao [Fri, 8 May 2020 09:01:56 +0000 (17:01 +0800)]
Make pcase pattern 'eieio' respect slot access related functions.

* lisp/emacs-lisp/eieio.el: Make pcase pattern respect slot-missing and
slot-unbound

4 years ago; Update recent function declaration in dnd.el
Basil L. Contovounesios [Thu, 7 May 2020 20:40:09 +0000 (21:40 +0100)]
; Update recent function declaration in dnd.el

* lisp/dnd.el (dnd-handle-one-url): Update arglist declaration for
browse-url-select-handler following recent change.

4 years agoAllow browsing an URL explicitly with an internal or external browser.
Tassilo Horn [Thu, 7 May 2020 17:38:57 +0000 (19:38 +0200)]
Allow browsing an URL explicitly with an internal or external browser.

* lisp/net/browse-url.el (browse-url-with-browser-kind): New command.

4 years agoCategorize browse-url functions into internal and external ones.
Tassilo Horn [Thu, 7 May 2020 11:02:13 +0000 (13:02 +0200)]
Categorize browse-url functions into internal and external ones.

* lisp/net/browse-url.el: Write package documentation explaining
browse-url-browser-kind symbol property.  Categorize existing
browse-url functions into internal and external ones.
(browse-url--browser-kind, browse-url--browser-kind-mailto)
(browse-url--browser-kind-man, browse-url--browser-kind-browser): New
functions.
(browse-url-select-handler): Add KIND argument to restrict selection.
* lisp/dnd.el (dnd-handle-one-url): Only select browse-url handler of
kind `internal'.
* lisp/net/eww.el (eww): Add `browse-url-browser-kind' symbol property
with value `internal'.

4 years ago; Fix recent byte-compiler warning in dnd.el again
Basil L. Contovounesios [Thu, 7 May 2020 17:36:53 +0000 (18:36 +0100)]
; Fix recent byte-compiler warning in dnd.el again

* lisp/dnd.el (dnd-handle-one-url): Declare new autoloaded function
browse-url-select-handler to silence the byte-compiler during 'make
bootstrap'.

4 years ago; Improve recent change to browse-url.el
Basil L. Contovounesios [Thu, 7 May 2020 15:59:26 +0000 (16:59 +0100)]
; Improve recent change to browse-url.el

* lisp/net/browse-url.el (browse-url-select-handler): Use lwarn with
specific warning type, as recommended in "(elisp) Warning Basics".

4 years agoDon't increment array index in cl-loop twice (Bug#40727)
Noam Postavsky [Thu, 30 Apr 2020 22:55:40 +0000 (18:55 -0400)]
Don't increment array index in cl-loop twice (Bug#40727)

* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause): Put the temp-idx
increment in cl--loop-body, leaving just the side-effect free testing
of the index for both cl--loop-body and cl--loop-conditions.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-and-arrays):
Extend test to cover this case.

4 years agoRevert "cl-loop: Calculate the array length just once"
Noam Postavsky [Thu, 30 Apr 2020 11:54:49 +0000 (07:54 -0400)]
Revert "cl-loop: Calculate the array length just once"

It fails when using 'and' (parallel bindings) for arrays (Bug#40727).
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause): Revert to
recomputing array length.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-and-arrays): New
test.

4 years agoFix browse-url (remove debugging leftover).
Tassilo Horn [Thu, 7 May 2020 11:10:44 +0000 (13:10 +0200)]
Fix browse-url (remove debugging leftover).

* lisp/net/browse-url.el (browse-url): Fix "No suitable browser for
URL" always popping up.

4 years agoHandle signals in Tramp's process-file
Michael Albinus [Thu, 7 May 2020 08:27:14 +0000 (10:27 +0200)]
Handle signals in Tramp's process-file

* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Handle signals.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.

4 years agoRefactor browse-url handler selection into separate function.
Tassilo Horn [Thu, 7 May 2020 07:53:54 +0000 (09:53 +0200)]
Refactor browse-url handler selection into separate function.

* lisp/net/browse-url.el (browse-url-select-handler): New function.
(browse-url): Use it.
* lisp/dnd.el (dnd-handle-one-url): Use it.

4 years ago; Fix recent byte-compiler warnings in dnd.el
Basil L. Contovounesios [Thu, 7 May 2020 00:52:50 +0000 (01:52 +0100)]
; Fix recent byte-compiler warnings in dnd.el

* lisp/dnd.el (dnd-handle-one-url): Don't require browse-url twice
in the same function.  Declare non-autoloaded browse-url-handlers to
silence byte-compiler.

4 years agoRestore HTML rendering behavior of browse-url-of-buffer/file.
Tassilo Horn [Wed, 6 May 2020 20:23:03 +0000 (22:23 +0200)]
Restore HTML rendering behavior of browse-url-of-buffer/file.

* lisp/net/browse-url.el (browse-url-default-handlers): Add a browser
handler for HTML page file:// URLs before the generic file:// handler.
(browse-url--browser): New defun.

4 years agoPacify buggy old GCC with a cast
Paul Eggert [Wed, 6 May 2020 17:57:18 +0000 (10:57 -0700)]
Pacify buggy old GCC with a cast

* src/bignum.h (bignum_integer): Pacify GCC 4.8.5.
Problem reported by Andreas Schwab in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00781.html

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 6 May 2020 16:28:36 +0000 (09:28 -0700)]
Merge from origin/emacs-27

76516465bf (origin/emacs-27) * doc/emacs/modes.texi (Major Modes): Fi...
f8e6cd11b3 Fix docstring quoting

4 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 6 May 2020 16:28:36 +0000 (09:28 -0700)]
; Merge from origin/emacs-27

The following commits were skipped:

1e09364d67 ; Mark Bug#29799 tests as failing since we reverted the fix
de1b33f5a8 Revert "cl-loop: Calculate the array length just once"
caf155c463 Revert "cl-loop: Add missing guard condition"
79e133da03 Revert "Refix conditional step clauses in cl-loop"

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 6 May 2020 16:28:36 +0000 (09:28 -0700)]
Merge from origin/emacs-27

7be160d800 Improve "Help Summary" section in user manual
f6d6ccc984 Clarify message-sendmail-extra-arguments docstring
95fde1a851 * src/editfns.c (Fformat): Small documentation fix.

4 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 6 May 2020 16:28:36 +0000 (09:28 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

9f5999b08d Remove calls to non-existent functions from edebug.el.

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 6 May 2020 16:28:36 +0000 (09:28 -0700)]
Merge from origin/emacs-27

4b419083f9 Honor search-upper-case
310112fdc7 Fix eww-follow-link on URLs with #target

# Conflicts:
# lisp/fileloop.el

4 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 6 May 2020 16:22:55 +0000 (09:22 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

f5cb5bb828 Revert part of recent commit 85544f8ef5 (bug#40808)

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 6 May 2020 16:22:55 +0000 (09:22 -0700)]
Merge from origin/emacs-27

f9fa726ced Improve doc strings of makunbound and fmakunbound

4 years agoConsult browse-url-{default-,}handlers in drag&drop.
Tassilo Horn [Wed, 6 May 2020 14:48:57 +0000 (16:48 +0200)]
Consult browse-url-{default-,}handlers in drag&drop.

* lisp/dnd.el (dnd-handle-one-url): Consult `browse-url-handlers' and
`browse-url-default-handlers' for a matching handler.  Adapt
docstring.
* doc/lispref/frames.texi (Drag and Drop): Remove the docs for the
deprecated alist choice of `browse-url-browser-function' and mention
`browse-url-handlers' and `browse-url-default-handlers'.

4 years ago* doc/emacs/modes.texi (Major Modes): Fix quoting. (Bug#41110)
Eli Zaretskii [Wed, 6 May 2020 14:13:55 +0000 (17:13 +0300)]
* doc/emacs/modes.texi (Major Modes): Fix quoting.  (Bug#41110)

4 years agoprocess-file in Tramp must return exit code (Bug#41099)
Michael Albinus [Wed, 6 May 2020 08:36:43 +0000 (10:36 +0200)]
process-file in Tramp must return exit code (Bug#41099)

* lisp/net/tramp-adb.el (tramp-adb-send-command-and-check): Add optional
argument EXIT-STATUS.
(tramp-adb-handle-process-file): Use it.

* lisp/net/tramp-sh.el (tramp-send-command-and-check): Add optional
argument EXIT-STATUS.
(tramp-sh-handle-process-file): Use it.  (Bug#41099)

* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.

4 years agoAllow for custom URL handlers in browse-url.
Tassilo Horn [Mon, 4 May 2020 09:24:08 +0000 (11:24 +0200)]
Allow for custom URL handlers in browse-url.

* lisp/net/browse-url.el (browse-url-handlers): New defcustom.
(browse-url-default-handlers): New defvar.
(browse-url): Use them.  Adapt docstring.  Issue a warning pointing to
browse-url-handlers when browse-url-browser-function is an alist.
(browse-url--mailto, browse-url--man): New functions.
(browse-url--browser-defcustom-type): Add :doc that the alist usage is
deprecated.
(browse-url-browser-function): Remove documentation referring to the
alist usage and mention browse-url-handlers.
* doc/emacs/misc.texi: Document browse-url-handlers in Browse-URL
node.
* etc/NEWS: Mention browse-url-default-handlers and
browse-url-handlers.

4 years agoPrefer 'strong' and 'em' to 'b' and 'i' in html-mode
Stefan Kangas [Wed, 6 May 2020 01:30:20 +0000 (03:30 +0200)]
Prefer 'strong' and 'em' to 'b' and 'i' in html-mode

* lisp/textmodes/sgml-mode.el (html-face-tag-alist): Prefer inserting
'strong' and 'em' tags to 'b' and 'i' in html-mode.  (Bug#41031)
* lisp/textmodes/sgml-mode.el (html-mode): Update docstring to do the
same.

4 years agoFix docstring quoting
Noam Postavsky [Wed, 6 May 2020 01:11:18 +0000 (21:11 -0400)]
Fix docstring quoting

* lisp/gnus/message.el (message-sendmail-extra-arguments): Fix
escaping of quotes in docstring.

4 years ago; Mark Bug#29799 tests as failing since we reverted the fix
Noam Postavsky [Thu, 30 Apr 2020 23:35:45 +0000 (19:35 -0400)]
; Mark Bug#29799 tests as failing since we reverted the fix

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-for-as-equals-and)
(cl-macs-loop-conditional-step-clauses): Set :expected-result to
:failed.

Don't merge to master.  The mentioned reverts are a safe-for-release
fix for Bug#40727.

4 years agoRevert "cl-loop: Calculate the array length just once"
Noam Postavsky [Thu, 30 Apr 2020 23:33:51 +0000 (19:33 -0400)]
Revert "cl-loop: Calculate the array length just once"

Don't merge to master.  This is a safe-for-release fix for Bug#40727.

4 years agoRevert "cl-loop: Add missing guard condition"
Noam Postavsky [Thu, 30 Apr 2020 23:33:50 +0000 (19:33 -0400)]
Revert "cl-loop: Add missing guard condition"

Don't merge to master.  This is a safe-for-release fix for Bug#40727.

4 years agoRevert "Refix conditional step clauses in cl-loop"
Noam Postavsky [Thu, 30 Apr 2020 23:33:34 +0000 (19:33 -0400)]
Revert "Refix conditional step clauses in cl-loop"

Don't merge to master.  This is a safe-for-release fix for Bug#40727.

4 years agoDon’t assume __has_attribute in emacs-module.c
Paul Eggert [Wed, 6 May 2020 00:16:49 +0000 (17:16 -0700)]
Don’t assume __has_attribute in emacs-module.c

Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00724.html
* src/emacs-module.c: Use HAS_ATTRIBUTE instead of assuming
the compiler supports __has_attribute.

4 years agoTry and improve the *Help* layout for things like `diff-refine`.
Stefan Monnier [Tue, 5 May 2020 21:53:23 +0000 (17:53 -0400)]
Try and improve the *Help* layout for things like `diff-refine`.

* lisp/help-fns.el (describe-variable-custom-version-info): Follow the
usual format of other `help-fns-describe-variable-functions`.

4 years agoImprove "Help Summary" section in user manual
Eli Zaretskii [Tue, 5 May 2020 14:47:33 +0000 (17:47 +0300)]
Improve "Help Summary" section in user manual

* doc/emacs/help.texi (Help Summary): Add cross-references to
sections with details of each Help command.

4 years agoClarify message-sendmail-extra-arguments docstring
Stefan Kangas [Tue, 5 May 2020 14:44:02 +0000 (16:44 +0200)]
Clarify message-sendmail-extra-arguments docstring

* lisp/gnus/message.el (message-sendmail-extra-arguments): Clarify
docstring.

4 years ago* src/editfns.c (Fformat): Small documentation fix.
Philipp Stephani [Tue, 5 May 2020 12:58:24 +0000 (14:58 +0200)]
* src/editfns.c (Fformat): Small documentation fix.

4 years agoFix typos in recent attribute.h simplification
Paul Eggert [Tue, 5 May 2020 07:48:48 +0000 (00:48 -0700)]
Fix typos in recent attribute.h simplification

Problem reported by Andreas Schwab in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00650.html
* src/conf_post.h (HAS_ATTR_no_sanitize): Define to false in case
cpp is picky, fixing a longstanding glitch here.
(ATTRIBUTE_NO_SANITIZE_ADDRESS, ATTRIBUTE_NO_SANITIZE_UNDEFINED):
Use HAS_ATTRIBUTE, not __has_attribute.

4 years agoRemove calls to non-existent functions from edebug.el.
Alan Mackenzie [Mon, 4 May 2020 18:26:38 +0000 (18:26 +0000)]
Remove calls to non-existent functions from edebug.el.

Do not merge to master.

*lisp/emacs-lisp/edebug.el (edebug--display-1)
(edebug-toggle-disable-breakpoint): Remove calls to
edebug--overlay-breakpoints and edebug--overlay-breakpoints-removed which had
been overlooked in a recent changed to edebug.

4 years agoAdapt Tramp tests
Michael Albinus [Mon, 4 May 2020 11:09:32 +0000 (13:09 +0200)]
Adapt Tramp tests

* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Adapt test.

4 years agoFix setting of INSIDE_EMACS in Tramp
Michael Albinus [Mon, 4 May 2020 08:43:58 +0000 (10:43 +0200)]
Fix setting of INSIDE_EMACS in Tramp

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
(tramp-sh-handle-process-file, tramp-open-shell): Set proper
INSIDE_EMACS environment variable.

4 years agoHonor search-upper-case
Dmitry Gutov [Sun, 3 May 2020 23:56:10 +0000 (02:56 +0300)]
Honor search-upper-case

* lisp/fileloop.el (fileloop--case-fold):
Extract from existing code.  Honor search-upper-case (bug#40940).
(fileloop-initialize-replace, fileloop-initialize-search): Use it.
Update the docstring.

4 years agoFix eww-follow-link on URLs with #target
Basil L. Contovounesios [Wed, 22 Apr 2020 10:42:17 +0000 (11:42 +0100)]
Fix eww-follow-link on URLs with #target

* lisp/net/eww.el (eww-display-html): Ensure shr-target-id is set as
callers depend on this (bug#28441, bug#40532).

4 years agoRevert part of recent commit 85544f8ef5 (bug#40808)
Juri Linkov [Sun, 3 May 2020 22:31:44 +0000 (01:31 +0300)]
Revert part of recent commit 85544f8ef5 (bug#40808)

* lisp/isearch.el (isearch-lazy-highlight-search): Remove recent fix of
lazy-highlighting of hidden matches.  In emacs-27 leave only the fix for
lazy-counting of hidden matches when isearch-lazy-count is non-nil.

; Do not merge to master.

4 years agoSimplify by using attribute.h macros
Paul Eggert [Sun, 3 May 2020 22:06:58 +0000 (15:06 -0700)]
Simplify by using attribute.h macros

attribute.h is partly designed for C2X forward compatibility,
since C2X will add some standard attributes.  Using its macros
should help insulate Emacs from C2X teething problems.
* src/conf_post.h: Include attribute.h.
(HAS_ATTRIBUTE, HAS_FEATURE): Rename from __has_attribute and
__has_feature, to avoid polluting the builtin namespace.
All uses changed.
(ATTRIBUTE_COLD, ATTRIBUTE_FORMAT, FALLTHROUGH, ATTRIBUTE_CONST)
(ATTRIBUTE_PURE, ATTRIBUTE_UNUSED, ATTRIBUTE_MAY_ALIAS)
(ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
(ATTRIBUTE_RETURNS_NONNULL): Remove, as attribute.h does this now.
(NO_INLINE, EXTERNALLY_VISIBLE, ARG_NONNULL, ATTRIBUTE_UNUSED):
Simplify by defining in terms of attribute.h macros.
* src/systhread.h (ATTRIBUTE_WARN_UNUSED_RESULT): Remove.
All uses replaced by attribute.h’s NODISCARD.

4 years agoUpdate from Gnulib
Paul Eggert [Sun, 3 May 2020 21:57:10 +0000 (14:57 -0700)]
Update from Gnulib

This incorporates:
2020-05-03 attribute: new module
2020-04-13 explicit_bzero: improve code style
2020-04-13 explicit_bzero: On native Windows, use SecureZeroMemory
2020-04-13 explicit_bzero: use memset_s() when available
2020-04-04 maint: remove a stray inter-word space
* build-aux/config.guess, build-aux/config.sub:
* build-aux/gitlog-to-changelog, build-aux/update-copyright:
* doc/misc/texinfo.tex, lib/explicit_bzero.c, lib/ieee754.in.h:
* lib/nstrftime.c, m4/explicit_bzero.m4, m4/gnulib-common.m4:
Copy from Gnulib.
* lib/attribute.h: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.

4 years ago* lisp/emacs-lisp/eieio.el (oset, oset-default): Mark as obsolete
Stefan Monnier [Sun, 3 May 2020 22:05:16 +0000 (18:05 -0400)]
* lisp/emacs-lisp/eieio.el (oset, oset-default): Mark as obsolete

4 years agoImprove doc strings of makunbound and fmakunbound
Stefan Kangas [Sun, 3 May 2020 20:00:02 +0000 (22:00 +0200)]
Improve doc strings of makunbound and fmakunbound

* src/data.c (Fmakunbound, Ffmakunbound): Improve doc
strings.  (Bug#41026)

4 years agoUse lexical-binding in check-declare.el and add tests
Simen Heggestøyl [Sun, 3 May 2020 17:49:55 +0000 (19:49 +0200)]
Use lexical-binding in check-declare.el and add tests

* lisp/emacs-lisp/check-declare.el: Use lexical-binding.
(check-declare-warn): Silence byte compiler warning about unused
lexical argument.

* test/lisp/emacs-lisp/check-declare-tests.el: New file with tests
for check-declare.el.

4 years ago; admin/notes/git-workflow
Glenn Morris [Sun, 3 May 2020 17:21:21 +0000 (10:21 -0700)]
; admin/notes/git-workflow

Mention reverting on release branch.

4 years ago; admin/notes/git-workflow
Glenn Morris [Sun, 3 May 2020 17:18:04 +0000 (10:18 -0700)]
; admin/notes/git-workflow

Prefer "release branch" to a specific branch that can only ever get outdated.

4 years agoFix calculator division truncation (bug#40892)
Mattias Engdegård [Thu, 30 Apr 2020 13:06:06 +0000 (15:06 +0200)]
Fix calculator division truncation (bug#40892)

* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in f248292ede.
Reported by Aitor Soroa.

4 years agoFix initial frame resizing issue on NS (bug#40200)
Alan Third [Sat, 18 Apr 2020 15:22:06 +0000 (16:22 +0100)]
Fix initial frame resizing issue on NS (bug#40200)

* src/nsterm.m ([EmacsView viewDidResize:]): Don't try to determine
the old size when not drawing to the buffer.

4 years agocc-mode: document Doxygen ‘c-doc-comment-style’ (bug#40877)
Michal Nazarewicz [Sun, 3 May 2020 15:12:05 +0000 (16:12 +0100)]
cc-mode: document Doxygen ‘c-doc-comment-style’  (bug#40877)

* doc/misc/cc-mode.texi (Documentation Comments): mention Doxygen markup.

4 years ago; Merge from origin/emacs-27
Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

e90b7b9ef2 (origin/emacs-27) Revert "Mark breakpoints in edebug with ...

4 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
Merge from origin/emacs-27

0a3731feef Make memq etc. examples more like they were
ed25282b82 Document effect of 'search-upper-case' on replacement comm...
5a5d8a8ec0 * lisp/desktop.el (desktop-save): Doc fix.  (Bug#41007)

4 years ago; Merge from origin/emacs-27
Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

fc8e02a4d5 (emacs-27) ; Auto-commit of loaddefs files.

4 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
Merge from origin/emacs-27

1d477a0fec Recommend to avoid unnecessary abbreviations in doc
aea1b4db72 Revert "Fix calculator division truncation (bug#40892)"

4 years ago; Merge from origin/emacs-27
Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

82140c510c Fix calculator division truncation (bug#40892)

4 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 3 May 2020 14:50:20 +0000 (07:50 -0700)]
Merge from origin/emacs-27

1f17193e00 Expand file name for remote dirs as well
7a12ab5ea2 Fix project.el commands in "transient" projects
274ec97e3c Make sure alist-related functions say so in their doc

4 years agoRemove redundant :groups args missed in last commit
Stefan Kangas [Sun, 3 May 2020 14:21:51 +0000 (16:21 +0200)]
Remove redundant :groups args missed in last commit

* lisp/emacs-lisp/cl-indent.el (lisp-lambda-list-keyword-alignment)
(lisp-lambda-list-keyword-parameter-indentation)
(lisp-lambda-list-keyword-parameter-alignment)
(lisp-indent-backquote-substitution-mode): Remove redundant :group args.

4 years agoImprove indentation of 'loop' forms
Stefan Kangas [Sun, 3 May 2020 14:19:09 +0000 (16:19 +0200)]
Improve indentation of 'loop' forms

* lisp/emacs-lisp/cl-indent.el (lisp-loop-keyword-indentation)
(lisp-loop-forms-indentation, lisp-simple-loop-indentation): Use a
more standard indentation of 'loop' forms.  (Bug#2160)

(lisp-indent-maximum-backtracking, lisp-tag-indentation)
(lisp-tag-body-indentation, lisp-backquote-indentation)
(lisp-loop-keyword-indentation, lisp-loop-forms-indentation)
(lisp-simple-loop-indentation): Remove redundant :group args.

4 years agoUse lexical-binding in w32-vars.el
Stefan Kangas [Sun, 3 May 2020 14:17:08 +0000 (16:17 +0200)]
Use lexical-binding in w32-vars.el

* lisp/w32-vars.el: Use lexical-binding.
(w32-use-w32-font-dialog, w32-allow-system-shell
(w32-system-shells, w32-fixed-font-alist): Remove redundant :group
args.

4 years agoImprove accuracy of apropos commands that search doc strings
Eli Zaretskii [Sun, 3 May 2020 13:53:53 +0000 (16:53 +0300)]
Improve accuracy of apropos commands that search doc strings

It is conceptually wrong for apropos commands that search doc
strings to look for matches of several words only on the same
line, because division of doc strings between lines is
ephemeral.
* lisp/apropos.el (apropos-parse-pattern): Accept an optional
argument MULTILINE-P, and if that is non-nil, produce regexps that
match words in the list even if they are separated by line
boundaries.
(apropos-value, apropos-local-value, apropos-documentation): Use
the new optional argument in apropos commands that search
multiline text, such as doc strings.

* src/search.c (Fposix_looking_at, Fposix_string_match)
(Fposix_search_backward, Fposix_search_forward): Make sure Posix
appears in the doc strings near REGEXP, for better matches.

4 years agoRegexps cannot infloop; fix manual
Mattias Engdegård [Sun, 3 May 2020 12:22:50 +0000 (14:22 +0200)]
Regexps cannot infloop; fix manual

* doc/lispref/searching.texi (Regexp Special): Edit erroneous
statements about infinite looping in regexps.

4 years agoDo not delete asynchronous Tramp processes due to session timeout
Michael Albinus [Sun, 3 May 2020 11:59:50 +0000 (13:59 +0200)]
Do not delete asynchronous Tramp processes due to session timeout

* lisp/net/tramp-cmds.el (tramp-cleanup-connection): New optional
argument KEEP-PROCESSES.

* lisp/net/tramp-sh.el (tramp-timeout-session): Use it.  (Bug#41042)

4 years agoImprove Tramp debug messages
Michael Albinus [Sun, 3 May 2020 11:59:08 +0000 (13:59 +0200)]
Improve Tramp debug messages

* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-get-connection-property): Improve debug messages.
Suggested by Marc Herbert <marc.herbert@gmail.com>.

4 years agoRevert "Mark breakpoints in edebug with highlights". This fixes bug #40992
Alan Mackenzie [Sun, 3 May 2020 11:25:19 +0000 (11:25 +0000)]
Revert "Mark breakpoints in edebug with highlights".  This fixes bug #40992

Do not merge to master.

This reverts commit e8b3a15cb6ff187ce08afcb43bd9a0b7907268ca.

4 years agoUse lexical-binding for some term libraries
Stefan Kangas [Sat, 2 May 2020 20:50:14 +0000 (22:50 +0200)]
Use lexical-binding for some term libraries

This takes care of the most trivial cases, but there are more that
could be easily converted.

* lisp/term/bobcat.el:
* lisp/term/cygwin.el:
* lisp/term/konsole.el:
* lisp/term/linux.el:
* lisp/term/vt100.el:
* lisp/term/vt200.el: Use lexical-binding.

4 years agoMake memq etc. examples more like they were
Paul Eggert [Sat, 2 May 2020 20:48:21 +0000 (13:48 -0700)]
Make memq etc. examples more like they were

Problem reported by Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00130.html
* doc/lispref/lists.texi (Sets And Lists, Association Lists):
Revert examples to be more like the way they were, using
self-evaluating expressions.  Be more consistent about listing
unspecified results.

4 years agoImprove Info-mode doc and menu
Stefan Kangas [Sat, 2 May 2020 20:41:20 +0000 (22:41 +0200)]
Improve Info-mode doc and menu

* lisp/info.el (Info-mode-menu): Re-arrange to be more logical, move
items into submenus, add 'Info-directory' and separators.
(Info-mode): Add 'end-of-buffer' to doc string.  (Bug#39042)

4 years ago;; Revert recent change in tramp-cache.el
Michael Albinus [Sat, 2 May 2020 10:48:55 +0000 (12:48 +0200)]
;; Revert recent change in tramp-cache.el

* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Remove compatibility code dumping the persistency file.  Use
`emacs-lisp-mode' for backward compatibility.

4 years agoFix 'count-screen-lines' when lines are truncated
Eli Zaretskii [Sat, 2 May 2020 08:45:05 +0000 (11:45 +0300)]
Fix 'count-screen-lines' when lines are truncated

* lisp/window.el (count-screen-lines): Fix the return value when
lines are truncated in the window, and the end of the region is
invisible due to this truncation.  (Bug#40849)

4 years agoDocument effect of 'search-upper-case' on replacement commands
Eli Zaretskii [Sat, 2 May 2020 07:54:01 +0000 (10:54 +0300)]
Document effect of 'search-upper-case' on replacement commands

* doc/emacs/search.texi (Replacement and Lax Matches): Document
the role of 'search-upper-case' in replacement commands.
(Lax Search): Document the value 'not-yanks' of
'search-upper-case' where the variable itself is documented.

* lisp/replace.el (query-replace-regexp, query-replace): Mention
'search-upper-case' and its effect in doc strings.  (Bug#40940)

4 years agoProperly fix embarassing missing paren typo in jsonrpc.el
João Távora [Fri, 1 May 2020 23:10:51 +0000 (00:10 +0100)]
Properly fix embarassing missing paren typo in jsonrpc.el

Paul Eggert had fixed it in practice, but the missing paren
was meant to close a previous with-current-buffer.

* lisp/jsonrpc.el (initialize-instance): Put parenthesis in right spot.
(Version): Bump to 1.0.11

4 years ago* lisp/desktop.el (desktop-save): Doc fix. (Bug#41007)
Eli Zaretskii [Fri, 1 May 2020 19:59:27 +0000 (22:59 +0300)]
* lisp/desktop.el (desktop-save): Doc fix.  (Bug#41007)

4 years agoInhibit modification hooks when saving eieio-persistent's
Michael Heerdegen [Fri, 1 May 2020 00:08:17 +0000 (02:08 +0200)]
Inhibit modification hooks when saving eieio-persistent's

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-save): Bind
inhibit-modification-hooks -> t.

4 years agocc-mode: add support for Doxygen documentation style
Michal Nazarewicz [Sun, 26 Apr 2020 18:30:41 +0000 (19:30 +0100)]
cc-mode: add support for Doxygen documentation style

* lisp/progmodes/cc-fonts.el (doxygen-font-lock-doc-comments,
  doxygen-font-lock-keywords): New constants defining Doxygen
  comment style support.
* lisp/progmodes/cc-vars.el (c-doc-comment-style): Updated docstring
  to mention now-supported Doxygen mode.

4 years ago* lisp/jsonrpc.el (initialize-instance): Fix closing-paren typo.
Paul Eggert [Fri, 1 May 2020 17:50:03 +0000 (10:50 -0700)]
* lisp/jsonrpc.el (initialize-instance): Fix closing-paren typo.

4 years agoConsolidate lisp/jsonrpc.el logging in single events buffer
João Távora [Fri, 1 May 2020 12:24:56 +0000 (13:24 +0100)]
Consolidate lisp/jsonrpc.el logging in single events buffer

For inferior processes having useful stderr, it is no longer
cumbersome to switch between different buffers to correlate error
messages with transport-level JSONRPC messages.

The existing stderr and stdout buffers can still be found hidden away
from the normal buffer list.

An original idea of Tobias Rittweiler <trittweiler@gmail.com>.

* lisp/jsonrpc.el (initialize-instance jsonrpc-process-connection):
Setup after-change functions stderr buffer.  Hide stderr and stdout
buffers.
(jsonrpc--log-event): Don't output extra newline.  Tweak log format.
(Version): Bump to 1.0.10

4 years ago; Fix recent additions with lisp-data-mode
Basil L. Contovounesios [Fri, 1 May 2020 13:44:56 +0000 (14:44 +0100)]
; Fix recent additions with lisp-data-mode

* lisp/bookmark.el (bookmark-insert-file-format-version-stamp)
(save-place-alist-to-file): Delimit file-local variables on the -*-
line with semicolons.
* lisp/files.el (auto-mode-alist): Use shy regexp group.

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

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

4 years agoProtect non-selected face spec components in custimize-face. Fixes bug #40866
Alan Mackenzie [Fri, 1 May 2020 12:23:15 +0000 (12:23 +0000)]
Protect non-selected face spec components in custimize-face.  Fixes bug #40866

* lisp/cus-edit.el (custom-face-save): If the current face widget is only
displaying part of the face spec, temporarily set it to "display" the whole
spec around the call to custom-face-mark-to-save.

4 years agoAdd lisp-data-mode for editing non-code Lisp data
João Távora [Sat, 18 Apr 2020 01:46:04 +0000 (02:46 +0100)]
Add lisp-data-mode for editing non-code Lisp data

Fixes: bug#40573
The new mode can be used stand-alone or inherited from by modes
intended to edit programs. The existing emacs-lisp-mode and lisp-mode
are examples.

Thanks to Juri Linkov and Basil L. Contovounesios for researching some
data files in Emacs that can be automatically set to use the new mode.

* lisp/files.el (auto-mode-alist): Add entry for ".dir-locals" and
".dir-locals-2"

* lisp/emacs-lisp/lisp-mode.el: (lisp-data-mode): New major mode.
(lisp-mode): Inherit from lisp-data-mode.  Set special lisp-mode
stuff here.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from
lisp-data-mode.

* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Use lisp-data-mode.

* lisp/saveplace.el (save-place-alist-to-file): Use
lisp-data-mode.

* lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode.

* lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode.

* lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use
lisp-data-mode.

* etc/NEWS: Mention lisp-data-mode.

* doc/lispref/modes.texi (Example Major Modes): Update example.

4 years agoUse lexical-binding in most remaining tests
Stefan Kangas [Fri, 1 May 2020 11:02:38 +0000 (13:02 +0200)]
Use lexical-binding in most remaining tests

* test/lisp/comint-tests.el:
* test/lisp/custom-resources/custom--test-theme.el:
* test/lisp/dabbrev-tests.el:
* test/lisp/emulation/viper-tests.el:
* test/lisp/erc/erc-track-tests.el:
* test/lisp/gnus/gnus-tests.el:
* test/lisp/imenu-tests.el:
* test/lisp/info-xref-tests.el:
* test/lisp/jit-lock-tests.el:
* test/lisp/json-tests.el:
* test/lisp/man-tests.el:
* test/lisp/replace-tests.el:
* test/lisp/shadowfile-tests.el:
* test/lisp/subr-tests.el:
* test/lisp/thingatpt-tests.el:
* test/lisp/xml-tests.el: Use lexical-binding.

* test/lisp/man-tests.el (man-tests-filter-strings):
* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
(shadow-test01-sites, shadow-test06-literal-groups)
(shadow-test07-regexp-groups, shadow-test09-shadow-copy-files):
Silence byte-compiler.

4 years agoMake `make-local-variable' declare the var locally dynamic
Michael Heerdegen [Thu, 9 Apr 2020 23:21:33 +0000 (01:21 +0200)]
Make `make-local-variable' declare the var locally dynamic

The only effect of this change is to get rid of some unnecessary
"assignment to free variable" warnings.

* lisp/emacs-lisp/bytecomp.el (byte-compile-make-local-variable): New
function.

4 years agoFix calculator division truncation (bug#40892)
Mattias Engdegård [Thu, 30 Apr 2020 13:06:06 +0000 (15:06 +0200)]
Fix calculator division truncation (bug#40892)

* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in f248292ede.
Reported by Aitor Soroa.

4 years agoRecommend to avoid unnecessary abbreviations in doc
Stefan Kangas [Thu, 30 Apr 2020 16:02:28 +0000 (18:02 +0200)]
Recommend to avoid unnecessary abbreviations in doc

* doc/lispref/tips.texi (Documentation Tips): Recommend to avoid
unnecessary abbreviations.  (Bug#40011)

4 years agoRevert "Fix calculator division truncation (bug#40892)"
Eli Zaretskii [Thu, 30 Apr 2020 14:02:57 +0000 (17:02 +0300)]
Revert "Fix calculator division truncation (bug#40892)"

This reverts commit 82140c510c4d27e639b4bca1e9bf158f0f66c375.
(Bug#40892)

4 years agoFix calculator division truncation (bug#40892)
Mattias Engdegård [Thu, 30 Apr 2020 13:06:06 +0000 (15:06 +0200)]
Fix calculator division truncation (bug#40892)

* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in f248292ede.
Reported by Aitor Soroa.

4 years agoUse lexical-binding in most remaining emacs-lisp tests
Stefan Kangas [Thu, 30 Apr 2020 10:06:48 +0000 (12:06 +0200)]
Use lexical-binding in most remaining emacs-lisp tests

* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el:
* test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el:
* test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el:
* test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el:
* test/lisp/emacs-lisp/package-resources/simple-single-1.3.el:
* test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el:
* test/lisp/emacs-lisp/package-tests.el:
* test/lisp/emacs-lisp/shadow-resources/p1/foo.el:
* test/lisp/emacs-lisp/shadow-resources/p2/FOO.el: Use lexical-binding.

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eitest-F, eitest-H, eitest-I, constructor, make-instance)
(initialize-instance, CNM-M):
* test/lisp/emacs-lisp/package-tests.el (with-package-test)
(package-test-update-archives, package-test-signed): Silence byte-compiler.

4 years ago; Silence byte-compiler warning in version.el
Basil L. Contovounesios [Thu, 30 Apr 2020 10:01:13 +0000 (11:01 +0100)]
; Silence byte-compiler warning in version.el

* lisp/version.el (emacs-repository-get-version): Prefix unused
argument with underscore.

4 years ago; Fix last addition to dom-tests.el
Basil L. Contovounesios [Thu, 30 Apr 2020 09:46:54 +0000 (10:46 +0100)]
; Fix last addition to dom-tests.el

* test/lisp/dom-tests.el (dom-tests-remove-attribute): Make test
idempotent by avoiding destructive modification of constant literal.