]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoFix GNUstep build warnings
Alan Third [Thu, 3 Jun 2021 22:15:17 +0000 (23:15 +0100)]
Fix GNUstep build warnings

* src/nsterm.h ([EmacsWindow orderedIndex]):
* src/nsterm.m ([EmacsWindow orderedIndex]): Implement orderedIndex
for use under GNUstep.
* src/nsmenu.m (free_frame_menubar):
(ns_update_menubar):
([EmacsMenu addSubmenuWithTitle:]):
([EmacsMenu addItemWithWidgetValue:attributes:]): Cast return values
to correct types.
([EmacsMenu fillWithWidgetValue:]): Move variable definition inside
relevant #ifdef block.
([EmacsMenu menuWillOpen:]):
([EmacsMenu menuDidClose:]):
([EmacsMenu confinementRectForMenu:onScreen:]):
([EmacsMenu menu:willHighlightItem:]): New functions to silence build
warnings.
* src/nsfont.m (nsfont_open): Remove pointless fabs call.

3 years agoAdapt tests in tramp-archive-tests.el
Michael Albinus [Sun, 20 Jun 2021 15:50:52 +0000 (17:50 +0200)]
Adapt tests in tramp-archive-tests.el

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test05-expand-file-name)
(tramp-archive-test06-directory-file-name): Adapt tests.

3 years ago; Fix typo in NEWS
Robert Pluim [Sun, 20 Jun 2021 15:11:44 +0000 (17:11 +0200)]
; Fix typo in NEWS

3 years agoAdd input methods for Lakota
Grant Shangreaux [Sun, 23 May 2021 16:28:25 +0000 (11:28 -0500)]
Add input methods for Lakota

The White Hat and Suggested Lakota Orthography are represented here
by three different input modes: A prefix and postfix mode for the SLO,
and a postfix mode for the White Hat orthography.
* lisp/leim/quail/latin-post.el (lakota-slo-postfix)
(lakota-white-hat-postfix):
* lisp/leim/quail/latin-pre.el (lakota-slo-prefix): New input methods.
* etc/HELLO: Call out the additions.

3 years ago; * lisp/help-mode.el (help-customize): Doc fix. (Bug#36767)
Eli Zaretskii [Sun, 20 Jun 2021 07:01:25 +0000 (10:01 +0300)]
; * lisp/help-mode.el (help-customize): Doc fix.  (Bug#36767)

3 years agoAdd new convenience command for *Help*
Juri Linkov [Sat, 19 Jun 2021 23:14:29 +0000 (02:14 +0300)]
Add new convenience command for *Help*

* doc/emacs/help.texi (Help Mode): Document it (bug#36767).

* lisp/help-mode.el (help-mode-map): Add 'c'.
(help-mode-menu): Add help-customize.
(help-customize): New command.

3 years agoFix error in tramp-archive.el
Michael Albinus [Sat, 19 Jun 2021 16:11:50 +0000 (18:11 +0200)]
Fix error in tramp-archive.el

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Archive must exist.  (Bug#49030, Bug#49043)

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test06-directory-file-name): Tag it :unstable temporarily.

3 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 19 Jun 2021 15:17:47 +0000 (08:17 -0700)]
Merge from origin/emacs-27

7722b510aa (origin/emacs-27) Another improvement in documentation of ...
8d5c70d73a Improve documentation of profiler
0ffef0b46b Document 'ispell-program-name'
7be610f911 Fix documentation of 'face-extend-p'

# Conflicts:
# doc/lispref/debugging.texi

3 years ago; Merge from origin/emacs-27
Glenn Morris [Sat, 19 Jun 2021 14:50:54 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

b94532f028 * src/xdisp.c (Fwindow_text_pixel_size): Plug memory leak....

3 years agoUse file-truename on files loaded with "emacs -l"
Lars Ingebrigtsen [Sat, 19 Jun 2021 13:58:09 +0000 (15:58 +0200)]
Use file-truename on files loaded with "emacs -l"

* lisp/startup.el (command-line-1): When loading a file, use the
truename so that eval-after-load works more reliably (bug#49009).
Change suggested by ctarbide@tuta.io.

3 years agoImprove bound-and-true-p doc string
Lars Ingebrigtsen [Sat, 19 Jun 2021 13:21:18 +0000 (15:21 +0200)]
Improve bound-and-true-p doc string

* lisp/bindings.el (bound-and-true-p): Improve doc string (bug#49116).

3 years agoDe-obfuscate gnutls_handshake loop
dickmao [Sat, 19 Jun 2021 13:19:04 +0000 (15:19 +0200)]
De-obfuscate gnutls_handshake loop

* src/gnutls.c (gnutls_try_handshake): Rewrite the handshake loop
for greater clarity (bug#49055).

3 years agoNew Gnus Summary buffer sort options for extra headers
Alex Bochannek [Sat, 19 Jun 2021 13:13:12 +0000 (15:13 +0200)]
New Gnus Summary buffer sort options for extra headers

* lisp/gnus/gnus-sum.el (gnus-article-sort-functions)
(gnus-thread-sort-functions, gnus-subthread-sort-functions)
(gnus-summary-mode-map, gnus-summary-make-menu-bar)
(gnus-article-sort-by-newsgroups)
(gnus-summary-sort-by-newsgroups, gnus-summary-sort-by-extra):
Sort by Newsgroups extra header. Prompt for header name for other
extra headers.

* doc/misc/gnus.texi (Summary Sorting): Document new sort functions

* etc/NEWS: New Gnus Summary buffer sort feature (bug#49081).

3 years agoAnother improvement in documentation of "memory" profiler
Eli Zaretskii [Sat, 19 Jun 2021 13:08:50 +0000 (16:08 +0300)]
Another improvement in documentation of "memory" profiler

* lisp/profiler.el (profiler-start): Fix the doc string to better
explain what is "memory" profiler.

3 years agoAllow `message-replace-header' to take a list of AFTERs
Łukasz Stelmach [Sat, 19 Jun 2021 13:07:13 +0000 (15:07 +0200)]
Allow `message-replace-header' to take a list of AFTERs

* lisp/gnus/message.el (message-replace-header): Facilitate
capability of message-position-on-field to accept multiple headers
as AFTERS argument and make possible to mimic behavioir of
message-goto-* functions with message-replace-header in case the
header does not exist (bug#49070).

3 years agoAdd support for displaying total number of groups in subgroups in Gnus
Alex Bochannek [Sat, 19 Jun 2021 13:04:37 +0000 (15:04 +0200)]
Add support for displaying total number of groups in subgroups in Gnus

* lisp/gnus/gnus-topic.el (gnus-topic-line-format)
(gnus-topic-line-format-alist, gnus-topic-prepare-topic)
(gnus-topic-insert-topic-line, )
(gnus-topic-display-missing-topic, )
(gnus-topic-update-topic-line):
Provide number of groups in subtopics for topic line display and
add 'G' element to be used for 'gnus-topic-line-format' variable

* doc/misc/gnus.texi (Topic Variables):
Document 'G' element for 'gnus-topic-line-format' variable (bug#49068).

3 years agoImprove documentation of profiler
Eli Zaretskii [Sat, 19 Jun 2021 12:39:11 +0000 (15:39 +0300)]
Improve documentation of profiler

* doc/lispref/debugging.texi (Profiling): Stop misleading users
about what "memory" profiling really is.

3 years agoImprove to selsel doc strings
Jim Porter [Sat, 19 Jun 2021 12:25:22 +0000 (14:25 +0200)]
Improve to selsel doc strings

* lisp/delsel.el (delete-active-region): Document interactive behavior.
* lisp/delsel.el (delete-selection-repeat-replace-region):
Use "\\[universal-argument]" instead of literal "C-u" in docstring.

3 years agoRevert "Add `file-name-set-extension'"
Michael Albinus [Sat, 19 Jun 2021 12:01:13 +0000 (14:01 +0200)]
Revert "Add `file-name-set-extension'"

This reverts commit 4f1a5e456e35930e8d0713b990bd7b14923cfe97.

3 years agoAdd `file-name-set-extension'
Michael Albinus [Sat, 19 Jun 2021 09:10:46 +0000 (11:10 +0200)]
Add `file-name-set-extension'

* lisp/files.el (file-name-with-extension): New defun.

* test/lisp/files-tests.el (files-tests-file-name-with-extension-good)
(files-tests-file-name-with-extension-bad): New tests.

3 years agoHandle case remote uid is 0 in some Tramp related tests
Michael Albinus [Sat, 19 Jun 2021 08:35:06 +0000 (10:35 +0200)]
Handle case remote uid is 0 in some Tramp related tests

* test/lisp/filenotify-tests.el:
* test/lisp/shadowfile-tests.el:
Set `tramp-allow-unsafe-temporary-files' to t.

3 years ago; * src/comp.c (ADD_IMPORTED): Fix broken macro.
Mattias Engdegård [Fri, 18 Jun 2021 13:02:58 +0000 (15:02 +0200)]
; * src/comp.c (ADD_IMPORTED): Fix broken macro.

3 years agoFix Morse for non-ASCII letters
Mattias Engdegård [Thu, 17 Jun 2021 09:18:46 +0000 (11:18 +0200)]
Fix Morse for non-ASCII letters

* lisp/play/morse.el (morse-code): Downcase letters in the table
because they must match downcased input.

3 years agoImprove and update the 'etags' test suite
Eli Zaretskii [Fri, 18 Jun 2021 11:28:16 +0000 (14:28 +0300)]
Improve and update the 'etags' test suite

* lib-src/etags.c (mercury_pr): Remove redundant comment.

* test/manual/etags/merc-src/accumulator.m: Add more complex
declarations.
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adapt to latest changes in 'etags'
and the test suite.  (Bug#47408)

3 years agoFix Mercury support, notably qualified procedures.
Fabrice Nicol [Thu, 17 Jun 2021 17:59:52 +0000 (19:59 +0200)]
Fix Mercury support, notably qualified procedures.

    Correct the previous fix (did not correctly handle qualified types).
    Also fix the following issues:
    - remove module name (+ dot) from tags, as prefixing module name is
      often inconsistent in code and may cause tags to be too specific.
    - now tag 0-arity predicates and functions (':- func foo_14.')
    - now tag one-word declarations (':- interface.')

    * lib-src/etags.c (mercury_pr): Pass the correct NAME and NAMELEN
    arguments to 'make_tag'.
    (mercury_decl): Return more information about the declaration or
    definition it finds.  This allows mercury_pr to be smarter.
    (Bug#47408)

3 years agoUpdate SCSS test file syntax.
Philipp Stephani [Fri, 18 Jun 2021 06:24:03 +0000 (08:24 +0200)]
Update SCSS test file syntax.

According to
https://sass-lang.com/documentation/breaking-changes/slash-div, the
slash operator should be replaced by 'math.div'.

Fixed using the migration tool mentioned at
https://sass-lang.com/documentation/breaking-changes/slash-div#automatic-migration.

* test/manual/indent/scss-mode.scss: Remove slash operator.

3 years agoUse \footref when referencing a footnote label
Arash Esbati [Thu, 17 Jun 2021 21:12:00 +0000 (23:12 +0200)]
Use \footref when referencing a footnote label

* lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Use
\footref as `reference-format' for \footnote macro.

3 years agoSupport new LaTeX kernel macro \footref
Arash Esbati [Thu, 17 Jun 2021 20:59:32 +0000 (22:59 +0200)]
Support new LaTeX kernel macro \footref

* lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add
entry for \footref macro which is part of LaTeX kernel 2021-06-01.

3 years ago* lisp/help-fns.el (help--symbol-class): Concat chars for all namespaces.
Juri Linkov [Thu, 17 Jun 2021 20:19:30 +0000 (23:19 +0300)]
* lisp/help-fns.el (help--symbol-class): Concat chars for all namespaces.

Since Emacs Lisp is more than Lisp-2, separately output letters
for each namespace: functions, variables, faces, classes.
Use non-letter characters for additional properties
such as advice, obsolete, local.
(help--symbol-completion-table-affixation): Use format "%-4s".
https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00524.html

3 years agoFix display-buffer-override-next-command for no-select case (bug#49057)
Juri Linkov [Thu, 17 Jun 2021 19:53:57 +0000 (22:53 +0300)]
Fix display-buffer-override-next-command for no-select case (bug#49057)

* lisp/window.el (display-buffer-override-next-command):
Separate 'postfun' from 'clearfun', so 'clearfun' resets
'display-buffer-overriding-action', whereas 'postfun' calls
'post-function' that can select the right window in 'post-command-hook'.

* lisp/windmove.el (windmove-display-no-select): Add new choice 'ignore'.
Improve docstring.
(windmove-display-in-direction): Use new value 'ignore' of
'windmove-display-no-select'.  Improve docstring.
(windmove-display-left, windmove-display-up)
(windmove-display-right, windmove-display-down): Mention
'windmove-display-no-select' in docstrings.

3 years ago* lisp/emacs-lisp/cl-generic.el: Fix bug#49053 and bug#47454
Stefan Monnier [Wed, 16 Jun 2021 16:53:59 +0000 (12:53 -0400)]
* lisp/emacs-lisp/cl-generic.el: Fix bug#49053 and bug#47454

(cl-generic-define-method): Shorten the time window where the symbol is
defined to `dummy`.

3 years agoEliminate some GCC warnings
Mattias Engdegård [Wed, 16 Jun 2021 16:05:41 +0000 (18:05 +0200)]
Eliminate some GCC warnings

* src/doprnt.c (exprintf, evxprintf):
* src/lisp.h (exprintf, evxprintf): Don't use a pointer-to-const type
for the `nonheapbuf` argument: although it is never dereferenced, GCC
will warn when passing a pointer to uninitialised memory otherwise.
* src/fns.c (sort_vector_copy, realize_face, realize_gui_face)
(realize_tty_face): Use the same signatures in the prototypes as in
the actual function definitions.

3 years ago* lisp/simple.el (save-interprogram-paste-before-kill): Fix type.
Glenn Morris [Wed, 16 Jun 2021 15:34:32 +0000 (08:34 -0700)]
* lisp/simple.el (save-interprogram-paste-before-kill): Fix type.

; Would not "integer" be better than "number", in type and docs?

3 years ago* src/xdisp.c (gui_draw_bottom_divider): Fix misleading indentation.
Mattias Engdegård [Wed, 16 Jun 2021 09:37:00 +0000 (11:37 +0200)]
* src/xdisp.c (gui_draw_bottom_divider): Fix misleading indentation.

3 years agoRemove outdated advise from manual
Mattias Engdegård [Tue, 15 Jun 2021 17:48:45 +0000 (19:48 +0200)]
Remove outdated advise from manual

* doc/lispref/modes.texi (Search-based Fontification):
Remove paragraph that has been unnecessary and confusing ever since
regexp-opt stopped using capturing brackets more than 21 years ago.

3 years ago; * lisp/progmodes/hideif.el (hif-unicode-prefix-regexp): Stray `\`.
Mattias Engdegård [Tue, 15 Jun 2021 17:57:38 +0000 (19:57 +0200)]
; * lisp/progmodes/hideif.el (hif-unicode-prefix-regexp): Stray `\`.

3 years agoPrepare pdumper dump file in memory, write it in one go (Bug#46881)
Pip Cet [Tue, 2 Mar 2021 20:38:23 +0000 (20:38 +0000)]
Prepare pdumper dump file in memory, write it in one go (Bug#46881)

* src/pdumper.c (struct dump_context): Add buf, buf_size, max_offset fields.
(dump_grow_buffer): New function.
(dump_write): Use memcpy, not an actual emacs_write.
(dump_seek): Keep track of maximum seen offset. Don't actually seek.
(Fdump_emacs_portable): Write out the file contents when done.

3 years agoUser option to choose a function triggered by windmove-create (bug#48917)
pillule [Tue, 15 Jun 2021 23:31:58 +0000 (02:31 +0300)]
User option to choose a function triggered by windmove-create (bug#48917)

* lisp/windmove.el (windmove-create-window): Add a defcustom choice.
(windmove-do-window-select): Trigger custom functions, update the docstring.

3 years agoUser option to select 'no-other-window' with windmove (bug#48916)
pillule [Tue, 15 Jun 2021 23:23:13 +0000 (02:23 +0300)]
User option to select 'no-other-window' with windmove (bug#48916)

* lisp/windmove.el (windmove-wrap-around): Remove superfluous :group tag.
(windmove-create-window): Remove superfluous :group tag.
(windmove-window-distance-delta): Remove superfluous :group tag.
(windmove-allow-all-windows): Add new user option to allow the commands
of windmove to target windows with the 'no-other-window parameter.
(windmove-find-other-window): Use windmove-allow-all-windows.
(windmove-display-no-select): Remove superfluous :group tag.
(windmove-display-in-direction): Use windmove-allow-all-windows.
(windmove-delete-in-direction): Use windmove-allow-all-windows.
(windmove-swap-states-in-direction): Use windmove-allow-all-windows.
(windmove-default-keybindings): Remove superfluous :group tag.
(windmove-display-default-keybindings): Remove superfluous :group tag.
(windmove-delete-default-keybindings): Remove superfluous :group tag.
(windmove-swap-states-default-keybindings): Remove superfluous :group tag.

3 years agoMake help-view-source more robust
Lars Ingebrigtsen [Tue, 15 Jun 2021 18:58:01 +0000 (20:58 +0200)]
Make help-view-source more robust

* lisp/help-mode.el (help-view-source): Check the right thing to
see if we can jump to the source file.

3 years agoAdd new convenience commands for *Help*
Lars Ingebrigtsen [Tue, 15 Jun 2021 18:51:00 +0000 (20:51 +0200)]
Add new convenience commands for *Help*

* doc/emacs/help.texi (Help Mode): Document it (bug#36767).

* lisp/help-fns.el (help-fns-function-description-header)
(describe-variable, describe-face, describe-keymap)
(describe-mode): Add the required data.

* lisp/help-mode.el (help-mode-map): Add 'i' and 's'.
(help-mode--current-data): New variable.
(help-mode): Make it local.
(help-view-source, help-goto-info): New commands.

3 years agoClarify (interactive "K") in the manual
Lars Ingebrigtsen [Tue, 15 Jun 2021 16:36:29 +0000 (18:36 +0200)]
Clarify (interactive "K") in the manual

* doc/lispref/commands.texi (Interactive Codes): Clarify
(interactive "K") (bug#37146).

3 years agoDocument 'ispell-program-name'
Eli Zaretskii [Tue, 15 Jun 2021 15:21:50 +0000 (18:21 +0300)]
Document 'ispell-program-name'

* doc/emacs/fixit.texi (Spelling): Document
'ispell-program-name'.  (Bug#49039)

3 years ago; * etc/NEWS: Fix a typo in the recent change.
Eli Zaretskii [Tue, 15 Jun 2021 15:10:45 +0000 (18:10 +0300)]
; * etc/NEWS: Fix a typo in the recent change.

3 years agoAllow ERT tests to output the failure reasons, too
Julian Scheid [Tue, 15 Jun 2021 15:01:49 +0000 (17:01 +0200)]
Allow ERT tests to output the failure reasons, too

* lisp/emacs-lisp/ert.el (ert-reason-for-test-result): New function.
(ert-run-tests-batch): Output failure or skip reason  (bug#47071).

3 years agoAdd a new function syntax-class-to-char
Lars Ingebrigtsen [Tue, 15 Jun 2021 14:50:51 +0000 (16:50 +0200)]
Add a new function syntax-class-to-char

* doc/lispref/syntax.texi (Syntax Table Internals): Document it.
* src/syntax.c (Fsyntax_class_to_char): New function (bug#37452).

3 years ago; * doc/lispref/text.texi (Clickable Text): Fix word order
Filipp Gunbin [Tue, 15 Jun 2021 14:11:51 +0000 (17:11 +0300)]
; * doc/lispref/text.texi (Clickable Text): Fix word order

3 years agoFix dragging dividers in terminal Emacs when there's margins
Jared Finder [Tue, 15 Jun 2021 13:54:08 +0000 (15:54 +0200)]
Fix dragging dividers in terminal Emacs when there's margins

* lisp/mouse.el (mouse-drag-line): Do the right thing in the
presence of margins (bug#41156).
(mouse-drag-line): Bind left-margin/right-margin in the map, too.

3 years agoDocument `completions-format'
Lars Ingebrigtsen [Tue, 15 Jun 2021 13:46:33 +0000 (15:46 +0200)]
Document `completions-format'

* doc/emacs/mini.texi (Completion Options): Document
`completions-format'.

* lisp/simple.el (completion-list-mode): Mention in (bug#49003).

3 years agoFix false positives in docstring width warning with (fn...) constructs.
Lars Ingebrigtsen [Tue, 15 Jun 2021 13:33:03 +0000 (15:33 +0200)]
Fix false positives in docstring width warning with (fn...) constructs.

* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Don't consider the function signature when determining whether the
doc string is too wide (bug#49007).  (The signature is folded
later when displaying help.)

3 years agomh-junk need not support SpamAssassin 2.20 from 2003
Stephen Gildea [Tue, 15 Jun 2021 06:16:37 +0000 (23:16 -0700)]
mh-junk need not support SpamAssassin 2.20 from 2003

* lisp/mh-e/mh-junk.el (mh-spamassassin-*list): Remove support
for SpamAssassin 2.20.  (SpamAssassin 3.0 was released in 2004.)
This change updates both the flags for sa-learn and the comments
about how the current version works.

This change reverts part of a change made in 2003 that added
support for what was even then an "old version of spamassassin."

3 years agoRemove unused variable from sgml-mode test
Lars Ingebrigtsen [Mon, 14 Jun 2021 13:58:01 +0000 (15:58 +0200)]
Remove unused variable from sgml-mode test

* test/lisp/textmodes/sgml-mode-tests.el (sgml-test-brackets):
Remove unused variable.

3 years agoGet fractional seconds in iso8601 parsing right
Lars Ingebrigtsen [Mon, 14 Jun 2021 13:32:03 +0000 (15:32 +0200)]
Get fractional seconds in iso8601 parsing right

* lisp/calendar/iso8601.el (iso8601-parse-time): Get fractional
times (with leading zeroes in the fraction part) right (bug#49017).
Fix based on a patch by "J.P." <jp@neverwas.me>.

3 years ago* Do not produce .elc temporary file when unnecessary (bug#48978)
Andrea Corallo [Mon, 14 Jun 2021 12:37:14 +0000 (14:37 +0200)]
* Do not produce .elc temporary file when unnecessary (bug#48978)

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Produce .elc
temporary files only when non native compiling or when native
compiling but `byte+native-compile' is non nil.

3 years agoFix problem in HTML with bracketed characters
Stephen Berman [Mon, 14 Jun 2021 12:57:57 +0000 (14:57 +0200)]
Fix problem in HTML with bracketed characters

* lisp/textmodes/sgml-mode.el (sgml-tag-syntax-table): Use bracket
syntax for all Unicode bracket characters (bug#43941).

3 years ago;* lisp/emacs-lisp/bytecomp.el (byte-native-compiling): Typo fix.
Andrea Corallo [Mon, 14 Jun 2021 12:17:33 +0000 (14:17 +0200)]
;* lisp/emacs-lisp/bytecomp.el (byte-native-compiling): Typo fix.

3 years ago* lisp/emacs-lisp/bytecomp.el (byte+native-compile): Update docstring.
Andrea Corallo [Mon, 14 Jun 2021 12:17:04 +0000 (14:17 +0200)]
* lisp/emacs-lisp/bytecomp.el (byte+native-compile): Update docstring.

3 years agoHandle sensitive auto-save or backup remote files (Bug#45245)
Michael Albinus [Mon, 14 Jun 2021 09:25:13 +0000 (11:25 +0200)]
Handle sensitive auto-save or backup remote files (Bug#45245)

* doc/misc/tramp.texi (Auto-save and Backup):
Describe tramp-allow-unsafe-temporary-files.
(Ad-hoc multi-hops): Use proper format.

* etc/NEWS: Mention confirmation for writing sensitive auto-save
or backup remote files to the local temporary directory..

* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Strengthen test.

* lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): New defcustom.
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name): Don't expose sensible
auto-save or backup files on local temporary directory.  (Bug#45245)

* test/lisp/net/tramp-tests.el (tramp--test-always): New defalias.
(tramp-test10-write-region, tramp-test21-file-links)
(tramp--test--deftest-direct-async-process): Use it.
(tramp-test37-make-auto-save-file-name)
(tramp-test38-find-backup-file-name): Extend tests.

3 years agoImprove handling of dedicated flag for side windows (Bug#48493)
pillule [Mon, 14 Jun 2021 07:59:11 +0000 (09:59 +0200)]
Improve handling of dedicated flag for side windows (Bug#48493)

* doc/lispref/windows.texi (Buffers and Windows): Mention the
special handling of side windows and add a reference.
(Buffer Display Action Alists): Say explicitly that
`display-buffer-in-side-window' is dedicating to side by default.
(Dedicated Windows): Add case (4) and explain its meaning, add
a reference.
(Displaying Buffers in Side Windows): Move the paragraph about
`switch-to-(prev|next)-buffer' into a new item to emphasize the
special meaning of dedication for side windows.
* lisp/window.el (set-window-buffer-start-and-point): Restore
side dedication.
(switch-to-prev-buffer, switch-to-next-buffer): Correct return
value that should be nil instead of the same buffer in case of
no change.
(delete-windows-on): Restore side dedication.
(replace-buffer-in-windows): Update the docstring, restore side
dedication.
(quit-restore-window): Rearrange the logic so that strongly
dedicated windows are eventually deleted first.  Restore the
side dedication.  In the final case try to
`switch-to-prev-buffer' before deleting a window (Bug#48367).

3 years agoFix documentation of 'face-extend-p'
Eli Zaretskii [Sun, 13 Jun 2021 14:10:51 +0000 (17:10 +0300)]
Fix documentation of 'face-extend-p'

* doc/lispref/display.texi (Attribute Functions): Fix description
of 'face-extend-p'.  (Bug#48936)

3 years agoFix previous pulse.el fix
Lars Ingebrigtsen [Sun, 13 Jun 2021 13:38:52 +0000 (15:38 +0200)]
Fix previous pulse.el fix

* lisp/cedet/pulse.el (pulse-reset-face): Fix up previous
pulse-reset-face change -- reset back to the start face
(bug#48936).

3 years agoAvoid an infinite loop in mml-expand-html-into-multipart-related
dick [Sun, 13 Jun 2021 13:02:11 +0000 (15:02 +0200)]
Avoid an infinite loop in mml-expand-html-into-multipart-related

* lisp/gnus/mml.el (mml-expand-html-into-multipart-related):
Skip images with empty filename parts (bug#49001).

3 years ago; * src/fileio.c (Fsubstitute_in_file_name): Doc fix.
Eli Zaretskii [Sun, 13 Jun 2021 12:52:17 +0000 (15:52 +0300)]
; * src/fileio.c (Fsubstitute_in_file_name): Doc fix.

3 years agoReset the pulse face more fully in pulse-reset-face
Lars Ingebrigtsen [Sun, 13 Jun 2021 12:49:01 +0000 (14:49 +0200)]
Reset the pulse face more fully in pulse-reset-face

* lisp/cedet/pulse.el (pulse-reset-face): Reset the :extend to nil
if there's no face given (bug#48936).

3 years agoFix wording of recently added documentation
Eli Zaretskii [Sun, 13 Jun 2021 12:47:31 +0000 (15:47 +0300)]
Fix wording of recently added documentation

* etc/NEWS:
* lisp/simple.el (save-interprogram-paste-before-kill): Fix
wording of a recently added documentation.  (Bug#41168)

3 years agoFsubstitute_in_file_name doc string clarification
Lars Ingebrigtsen [Sun, 13 Jun 2021 12:14:32 +0000 (14:14 +0200)]
Fsubstitute_in_file_name doc string clarification

* src/fileio.c (Fsubstitute_in_file_name): Mention that undefined
variables aren't replaced (as opposed to what happens in a shell
substitution) (bug#40949).

3 years agoAllow save-interprogram-paste-before-kill to be a number
Lars Ingebrigtsen [Sun, 13 Jun 2021 12:03:49 +0000 (14:03 +0200)]
Allow save-interprogram-paste-before-kill to be a number

* doc/emacs/killing.texi (Clipboard): Document it.
* lisp/simple.el (save-interprogram-paste-before-kill): Extend
range (bug#41168).
(kill-new): Implement it (bug#41168).

3 years ago* doc/emacs/windows.texi (Change Window): Add pxref to (elisp)Deleting Windows
Juri Linkov [Sat, 12 Jun 2021 22:10:38 +0000 (01:10 +0300)]
* doc/emacs/windows.texi (Change Window): Add pxref to (elisp)Deleting Windows

(Bug#47300)

3 years agoEIEIO: Promote the CLOS behavior over the EIEIO-specific behavior
Stefan Monnier [Sat, 12 Jun 2021 20:22:03 +0000 (16:22 -0400)]
EIEIO: Promote the CLOS behavior over the EIEIO-specific behavior

Change docs to advertize `slot-value` rather than `oref`.
Change the implementation of `:initform` to better match the CLOS semantics,
while preserving the EIEIO semantics, but warn when encountering cases
where the two diverge.
Demote the mostly unused special semantics of `oref-default`
on non-class allocated slots.

* doc/misc/eieio.texi (Quick Start): Use `slot-value`.
(Accessing Slots): Move `slot-value` before `oref`.
Fix paren-typo in example (reported by pillule <pillule@riseup.net>).
(Introspection): Remove mention of `class-slot-initarg`.

* lisp/transient.el (transient--parse-group, transient--parse-suffix):
Don't use `oref-default` to get the default value.
(transient-lisp-variable): Init forms are evaluated.

* lisp/emacs-lisp/eieio.el (defclass): Warn about inapplicable
`:initarg` and about uses of init forms that are ambiguous.
(oref): Don't advertize the deprecated use of initargs as slot names.
(oref-default): Don't advertize the deprecated case where it returns the
initform's value.
(initialize-instance): Use `macroexp-const-p`.
* lisp/emacs-lisp/eieio-core.el (eieio--unbound): Rename from
`eieio-unbound`.
(eieio--unbound-form): New var.
(eieio--slot-override): Use it.
(eieio-defclass-internal): Use it.  Change `init` so it should always
be evaluated.
(eieio--known-class-slot-names): New var.
(eieio--eval-default-p): Rename from `eieio-eval-default-p`.
(eieio--perform-slot-validation-for-default): Use `macroexp-const-p` to
decide whether to skip the test.
(eieio--add-new-slot): Register slot in `eieio--known-class-slot-names`
when applicable.
(eieio-oref-default, eieio-oset-default): Add warning for unknown slots
and slots not known to be allocated to the class.
(eieio-default-eval-maybe): Delete function.  Use just `eval` instead.
(eieio-declare-slots): Allow slots to specify their allocation class.

* lisp/cedet/srecode/insert.el (point): Declare the slot instead of
moving the class definition before the slot's first use.
(srecode-template-inserter-point, srecode-insert-fcn):
Use nil instead of unbound for the `point` slot.

* lisp/cedet/srecode/compile.el (srecode-template-inserter):
Declare the `key` slot that all children should have.

* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar)
(eieio-speedbar-directory-button, eieio-speedbar-file-button):
* lisp/emacs-lisp/eieio-custom.el (eieio-widget-test-class):
* lisp/emacs-lisp/chart.el (chart-bar):
* lisp/cedet/semantic/ede-grammar.el (semantic-ede-proj-target-grammar):
* lisp/cedet/semantic/db.el (semanticdb-project-database):
* lisp/cedet/semantic/db-javascript.el (semanticdb-table-javascript)
(semanticdb-project-database-javascript):
* lisp/cedet/semantic/db-el.el (semanticdb-table-emacs-lisp)
(semanticdb-project-database-emacs-lisp):
* lisp/cedet/semantic/db-ebrowse.el (semanticdb-table-ebrowse)
(semanticdb-project-database-ebrowse):
* lisp/cedet/ede/proj.el (ede-proj-project):
* lisp/cedet/ede/proj-obj.el (ede-proj-target-makefile-objectcode):
* lisp/cedet/ede/generic.el (ede-generic-project):
* lisp/cedet/ede/config.el (ede-project-with-config):
* lisp/cedet/ede/base.el (ede-target, ede-project):
* lisp/auth-source.el (auth-source-backend): Init forms are evaluated,
so quote them accordingly.

3 years agoMake `window-system-for-display' work for ipv6, too
Robert Pluim [Sat, 12 Jun 2021 13:11:56 +0000 (15:11 +0200)]
Make `window-system-for-display' work for ipv6, too

* lisp/term/x-win.el (display-format-alist): Also work for ipv6
(bug#42045).

3 years agoClarify some browse-url doc strings
Lars Ingebrigtsen [Sat, 12 Jun 2021 13:07:03 +0000 (15:07 +0200)]
Clarify some browse-url doc strings

* lisp/net/browse-url.el (browse-url-of-file)
(browse-url-of-buffer, browse-url-of-region, browse-url)
(browse-url-at-point, browse-url-at-mouse): Clarify doc strings
(bug#42432).

3 years agoUse file-in-directory-p instead of obsolete dired-in-this-tree-p
Tassilo Horn [Sat, 12 Jun 2021 12:45:53 +0000 (14:45 +0200)]
Use file-in-directory-p instead of obsolete dired-in-this-tree-p

* lisp/dired-aux.el (dired-rename-subdir,dired-rename-subdir-1)
(dired-insert-subdir,dired-insert-subdir-validate)
(dired-kill-tree,dired-tree-down): Use file-in-directory-p instead of
obsolete dired-in-this-tree-p.

3 years agoFix double (recursive) load of fortran.el
Lars Ingebrigtsen [Sat, 12 Jun 2021 12:44:54 +0000 (14:44 +0200)]
Fix double (recursive) load of fortran.el

* lisp/progmodes/fortran.el (fortran-menu): Move menu creation to
the end to avoid a recursive load (bug#43116).

3 years agoMention nov-is-evil/nnvirtual combination in the Gnus manual
Alex Bochannek [Sat, 12 Jun 2021 12:09:05 +0000 (14:09 +0200)]
Mention nov-is-evil/nnvirtual combination in the Gnus manual

* doc/misc/gnus.texi (To From Newsgroups): Mention using separate
select methods for different values (bug#48801).

3 years agoAdd ability to bring only the selected frame to the front (bug#48865)
Matt Beshara [Sun, 6 Jun 2021 03:06:47 +0000 (13:06 +1000)]
Add ability to bring only the selected frame to the front (bug#48865)

Causes ‘ns-hide-emacs’ to layer the selected frame in front of every other
application’s windows, and give that frame keyboard focus, when called with
'activate-front.

* src/nsfns.m (Fns_hide_emacs): Allow activating only selected frame.

3 years ago* lisp/emacs-lisp/benchmark.el (benchmark-elapse): Tweak
Stefan Monnier [Fri, 11 Jun 2021 18:06:29 +0000 (14:06 -0400)]
* lisp/emacs-lisp/benchmark.el (benchmark-elapse): Tweak

3 years ago; perl-mode.el: Allow newline between quote-likes and delimiter
Harald Jörg [Fri, 11 Jun 2021 11:52:45 +0000 (13:52 +0200)]
; perl-mode.el: Allow newline between quote-likes and delimiter

* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Allow newline between a quote-like operator and its delimiter
(Bug#22355).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-22355):
Test case for the fix.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl:
Test resource for a quote-like with newline before the delimiter.

3 years ago; Improve delete-window-choose-selected documentation
Robert Pluim [Fri, 11 Jun 2021 09:30:13 +0000 (11:30 +0200)]
; Improve delete-window-choose-selected documentation

* doc/lispref/windows.texi (Deleting Windows): Improve
delete-window-choose-selected documentation.

3 years agoRename/rewrite recently added option and function in window.el
Martin Rudalics [Fri, 11 Jun 2021 07:55:02 +0000 (09:55 +0200)]
Rename/rewrite recently added option and function in window.el

* lisp/window.el (window-at-x-y): Rename from `window-at-pos'.
Fix doc-string.
(delete-window-choose-selected): Rename from
`delete-window-set-selected'.  Fix doc-string.
(delete-window): Adjust to above renaming.
* doc/emacs/windows.texi (Change Window): Mention new option
`delete-window-choose-selected'.
* etc/NEWS:
* doc/lispref/windows.texi (Deleting Windows): Follow up on
above renamings.

3 years ago; * etc/NEWS: Rephrase the entry about 'grep-find-template'.
Eli Zaretskii [Fri, 11 Jun 2021 06:29:37 +0000 (09:29 +0300)]
; * etc/NEWS: Rephrase the entry about 'grep-find-template'.

3 years agoSimplify vc-git-log-switches's usage; change default value to nil
Dmitry Gutov [Fri, 11 Jun 2021 01:39:34 +0000 (04:39 +0300)]
Simplify vc-git-log-switches's usage; change default value to nil

* lisp/vc/vc-git.el (vc-git-log-switches):
Do not mention or allow the value 't' anymore
(https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00452.html).
(vc-git-print-log): Use 'vc-git-log-switches' directly.

3 years agoSupport mercury in 'ctags' as well
Eli Zaretskii [Thu, 10 Jun 2021 13:55:04 +0000 (16:55 +0300)]
Support mercury in 'ctags' as well

The previous lack of support was due to incorrect calls to 'make_tag'
in 'mercury_pr', which caused 'pfnote' to refrain from adding Mercury
tags to the list of recorded tags.

* lib-src/etags.c (mercury_pr): Pass the correct NAME and NAMELEN
arguments to 'make_tag'.

* test/manual/etags/CTAGS.good: Adjust to the above change.

3 years agoImprove documentation of 'M-y'
Eli Zaretskii [Thu, 10 Jun 2021 12:06:10 +0000 (15:06 +0300)]
Improve documentation of 'M-y'

* doc/emacs/killing.texi (Yanking): Mention that TTY frames can
also support yanking from the clipboard.
(Earlier Kills): Finalize the documentation of the new behavior
of the lone 'M-y'.  (Bug#48478)

3 years agoProvide new option `delete-window-set-selected' (Bug#47300)
Martin Rudalics [Thu, 10 Jun 2021 07:14:21 +0000 (09:14 +0200)]
Provide new option `delete-window-set-selected' (Bug#47300)

When `delete-window' deletes its frame's selected window, this new
option allows to choose another window as replacement.

* lisp/window.el (get-lru-window, get-mru-window)
(get-largest-window): New optional argument NO-OTHER.
(window-at-pos): New function.
(delete-window-set-selected): New option.
(delete-window): Handle `delete-window-set-selected'.
* src/window.c (Fdelete_window_internal): Set the selected
window of WINDOW's frame to the first window on that frame and
let `delete-window' choose a more suitable window instead.
* doc/lispref/windows.texi (Deleting Windows): Describe new
option `delete-window-set-selected'.
(Cyclic Window Ordering): Describe new NO-OTHER argument for
`get-lru-window', `get-mru-window' and `get-largest-window'.
* etc/NEWS: Mention `delete-window-set-selected' and the NO-OTHER
argument.

3 years ago; perl-mode.el: Detect quote-like operator immediately after =>
Harald Jörg [Wed, 9 Jun 2021 20:58:53 +0000 (22:58 +0200)]
; perl-mode.el: Detect quote-like operator immediately after =>

* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Detect a quotelike operator immediately after a fat comma "=>"
(Bug#25098)

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-25098):
Test case for the bug with code from the bug report.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-25098.pl:
Resource file for the test.

3 years agoRemove pause on fullscreening in NS (bug#48406)
Alan Third [Sat, 5 Jun 2021 13:38:17 +0000 (14:38 +0100)]
Remove pause on fullscreening in NS (bug#48406)

* src/nsterm.m (ns_make_frame_visible):
(ns_set_parent_frame):
([EmacsView windowWillEnterFullScreen:]):
([EmacsView windowDidEnterFullScreen:]):
([EmacsView windowWillExitFullScreen:]):
([EmacsView initFrameFromEmacs:]): Remove references to
in_fullscreen_transition.
([EmacsView toggleFullScreen:]): Remove calls to removed methods.
([EmacsView inFullScreenTransition]):
([EmacsView waitFullScreenTransition]): Remove Methods.
* src/nsterm.h (EmacsView): Remove defintions of removed methods, and
the in_fullscreen_transition variable.

3 years ago* lib/Makefile.in (Makefile): Fix typo.
Glenn Morris [Wed, 9 Jun 2021 16:51:18 +0000 (09:51 -0700)]
* lib/Makefile.in (Makefile): Fix typo.

3 years ago* src/xdisp.c (Fwindow_text_pixel_size): Plug memory leak. (Bug#48884)
Eli Zaretskii [Mon, 7 Jun 2021 12:03:06 +0000 (15:03 +0300)]
* src/xdisp.c (Fwindow_text_pixel_size): Plug memory leak.  (Bug#48884)

(cherry picked from commit 69a65212a233333ab0605374b4985ead23f4a541)

3 years agoFix image filename encoding issues (bug#48902)
Alan Third [Tue, 8 Jun 2021 19:08:34 +0000 (20:08 +0100)]
Fix image filename encoding issues (bug#48902)

* src/image.c (image_find_image_fd): Don't return an encoded filename
string.
* src/nsfns.m: ([NSString stringWithLispString:]): Clarify usage
comment.
* src/nsimage.m ([EmacsImage allocInitFromFile:]): No need to encode
the filename when converting to NSString.

3 years ago* etc/NEWS: New user option 'shell-has-auto-cd'.
Michael Albinus [Wed, 9 Jun 2021 11:01:09 +0000 (13:01 +0200)]
* etc/NEWS: New user option 'shell-has-auto-cd'.

3 years agoHandle auto-cd in shell-mode
Jason Kim [Wed, 9 Jun 2021 09:44:34 +0000 (11:44 +0200)]
Handle auto-cd in shell-mode

* lisp/shell.el (shell-has-auto-cd): New defcustom.
(shell-directory-tracker): Handle implicit "cd".

Copyright-paperwork-exempt: yes

3 years agoNew user option for Git log switches
Utkarsh Singh [Tue, 1 Jun 2021 09:03:01 +0000 (14:33 +0530)]
New user option for Git log switches

* lisp/vc/vc-git.el (vc-git-diff-switches): New defcustom.
(vc-git-print-log): Use it.

* etc/NEWS: Announce the new option.

Copyright-paperwork-exempt: yes

3 years ago; perl-mode.el: Detect regexes immediately after "|&"
Harald Jörg [Tue, 8 Jun 2021 21:23:25 +0000 (23:23 +0200)]
; perl-mode.el: Detect regexes immediately after "|&"

* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Add "|&" to the list of characters after which a slash starts a
regular expression (Bug#23992).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-ppss):
Correct the docstring.
(cperl-test-bug-23992): New test for Bug#23992.
(cperl-test-bug-42168): Adapt inline comments to the current code.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl:
Resource file with example code from the bug report.

3 years ago* lisp/simple.el (yank-from-kill-ring): Add edited string to the kill-ring.
Juri Linkov [Tue, 8 Jun 2021 16:54:17 +0000 (19:54 +0300)]
* lisp/simple.el (yank-from-kill-ring): Add edited string to the kill-ring.

(Bug#48478)

3 years agoSync overlay code in minibuffer-message and set-minibuffer-message (bug#48669)
Juri Linkov [Tue, 8 Jun 2021 16:51:51 +0000 (19:51 +0300)]
Sync overlay code in minibuffer-message and set-minibuffer-message (bug#48669)

* lisp/minibuffer.el (minibuffer-message): Copy more overlay positioning code
from set-minibuffer-message.
(minibuffer--message-overlay-pos): Mention both minibuffer-message and
set-minibuffer-message in the docstring.
(set-minibuffer-message): Use 'cursor t' instead of 1.

3 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 8 Jun 2021 14:50:36 +0000 (07:50 -0700)]
Merge from origin/emacs-27

37f4457994 (origin/emacs-27) ; Fix typo in dynamic module functions d...
f7d4bbceee ; * src/composite.h: Improve comments for LGSTRING and LGL...

3 years ago; Merge from origin/emacs-27
Glenn Morris [Tue, 8 Jun 2021 14:50:36 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

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

3 years agoChange the Gnus default to use `#' to toggle the process mark
Alex Bochannek [Tue, 8 Jun 2021 11:34:24 +0000 (13:34 +0200)]
Change the Gnus default to use `#' to toggle the process mark

* doc/misc/gnus.texi (Marking Groups, Topic Commands):
(Setting Process Marks, Pick and Read): Document the new default.
* lisp/gnus/gnus-group.el (gnus-group-make-menu-bar): Update menu.

* lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Update menu.

* lisp/gnus/gnus-topic.el (gnus-topic-make-menu-bar): Update menu.

* lisp/gnus/gnus.el (gnus-process-mark-toggle): Change default.

3 years agoMH-E: do not look for MH variants in relative directories
Stephen Gildea [Tue, 8 Jun 2021 04:47:24 +0000 (21:47 -0700)]
MH-E: do not look for MH variants in relative directories

* lisp/mh-e/mh-e.el (mh-variants): Do not examine relative directories
in exec-path (e.g., "."); these won't have MH installed.  Also,
file-chase-links is not robust with relative names: you cannot pass it
a relative name that is a symlink.

3 years agoFix an example in ERC docs
Stefan Kangas [Mon, 7 Jun 2021 23:58:18 +0000 (01:58 +0200)]
Fix an example in ERC docs

* doc/misc/erc.texi (Connecting):
* lisp/erc/erc.el (erc, erc-tls): Fix example to use J. Random Hacker
instead of Harry S. Truman.