Peter Oliver [Wed, 30 Jun 2021 13:11:21 +0000 (15:11 +0200)]
From .desktop files, reuse a frame or start a new Emacs as required
* doc/emacs/misc.texi: (Using Emacs as a Server) Explain
emacsclient.desktop.
* etc/NEWS: (Emacs Server): Explain emacsclient.desktop.
* emacs-mail.desktop, etc/emacsclient.desktop: Automatically try to
reuse an existing frame, open a new frame, or start a new Emacs
daemon. Add actions for specific behaviours (bug#49195).
Peter Oliver [Wed, 30 Jun 2021 13:01:46 +0000 (15:01 +0200)]
Revert more of a partially reverted emacsclient.desktop patch
* etc/emacsclient.desktop: Undo setting of StartupWMClass=Emacsd, since
this relies on a change to etc/emacs.service which was also undone. See
bug#37847 for more explanation (bug#49259).
Fix problem when creating an .authinfo entry with an existing machine name
* lisp/auth-source.el (auth-source-netrc-create): Don't return the
incorrect data if there's a matching host entry but the wrong user
name (bug#49289).
Reuben Thomas [Sun, 27 Jun 2021 21:08:40 +0000 (22:08 +0100)]
* lisp/textmodes/ispell.el: Fix finding dictionaries for Enchant.
(ispell-find-enchant-dictionaries):
I originally copied this code from the equivalent code for
Aspell. Unfortunately it was wrong for the case of Enchant: it should
find only dictionaries that Enchant knows about, and not merge in
`ispell-dictionary-base-alist' or add a default element, as these
are dealt with in `ispell-set-spellchecker-params'.
This caused a bug where the correct `-d' argument would not be added
to the invocation of enchant, leading to the process not being
correctly started.
Stefan Monnier [Sun, 27 Jun 2021 19:06:25 +0000 (15:06 -0400)]
* lisp/textmodes/flyspell.el: Fix bug#49104
(flyspell--prev-meta-tab-binding): Delete var.
(flyspell-prog-mode): Don't set it.
(flyspell-auto-correct-word): Lookup the "next" command dynamically.
Alan Mackenzie [Sun, 27 Jun 2021 12:59:18 +0000 (12:59 +0000)]
C++ Mode: Handle new keywords static_cast, etc., wrt angle brackets
* lisp/progmodes/cc-langs.el (c-<>-arglist-kwds): Add const_cast,
dynamic_cast, reinterpret_cast and static_cast into this lang const.
* lisp/progmodes/cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props)
(c-clear-<-pair-props-if-match-after, c-clear->-pair-props-if-match-before)
(c-forward-<>-arglist-recur):
Invalidate caches with c-trunctate-lit-pos-cache.
(c-forward-<>-arglist-recur): If in a matching <...> expression, the < has a
syntax-table property, but the > not, remove that property.
Remove redundant args `collection` and `predicate` which were always
equal to `minibuffer-completion-table` and
`minibuffer-completion-predicate` anyway.
Michael Albinus [Sat, 26 Jun 2021 14:26:02 +0000 (16:26 +0200)]
Fix Tramp bug#49229
* lisp/net/tramp.el (tramp-file-name-handler): Drop possible
volume letter when `expand-file-name' is called with a local
absolute file name as first argument. (Bug#49229)
Stefan Monnier [Sat, 26 Jun 2021 13:38:21 +0000 (09:38 -0400)]
* lisp/minibuffer.el (completion--prompt-end): New function (bug#30668)
(minibuffer-complete, minibuffer-force-complete-and-exit)
(minibuffer-force-complete, minibuffer-complete-and-exit)
(minibuffer-complete-word, minibuffer-completion-help): Use it.
Alan Third [Wed, 16 Jun 2021 20:28:10 +0000 (21:28 +0100)]
Fix NS native compilation builds
* Makefile.in (ns_applibexecdir):
(ns_applibdir):
(ns_appdir): New variables.
(.PHONY): Include new rule.
(epaths-force-ns-self-contained): Remove the app bundle directory from
all paths.
* configure.ac (NS_SELF_CONTAINED): Set the default site-lisp
directory instead of hard-coding it in the ObjC code, and use the new
epaths generating make rule.
* src/callproc.c (init_callproc_1):
(init_callproc): Remove all the NS specific code as the special cases
are now handled by decode_env_path.
* src/emacs.c (load_pdump):
(decode_env_path): Use ns_relocate to find the correct directory after
relocation.
* src/lread.c (load_path_default): Remove all the NS specific code as
the special cases are now handled by decode_env_path.
* src/nsterm.h: Update function definitions.
* src/nsterm.m (ns_etc_directory):
(ns_exec_path):
(ns_load_path): Remove functions that are no longer needed.
(ns_relocate): New function to calculate paths within the NS app
bundle.
* nextstep/Makefile.in (ns_applibexecdir): New variable, and update
anything relying on the libexec location.
Eric Abrahamsen [Sat, 26 Jun 2021 03:42:16 +0000 (20:42 -0700)]
Small improvements to handling of IMAP mark search
* lisp/gnus/gnus-search.el (gnus-search-imap-handle-flag): Use a
KEYWORD search for any mark starting with a "$", so
"mark:$hasattachment" goes through as "KEYWORD $hasattachment".
Make (find-face-definition 'default) work more reliably
* lisp/emacs-lisp/find-func.el (find-function--defface): New
function (bug#30230).
(find-function-regexp-alist): Use it to skip past definitions
inside comments and strings.
Eli Zaretskii [Fri, 25 Jun 2021 13:52:48 +0000 (16:52 +0300)]
Fix race conditions between Lisp threads in GTK builds
* src/xgselect.c (release_select_lock, acquire_select_lock)
[GCC >= 4.7.0]: Use '__atomic' builtins to prevent races between
threads in accessing 'threads_holding_glib_lock'. Reported by
<dick.r.chiang@gmail.com>. (Bug#36609)
Eli Zaretskii [Fri, 25 Jun 2021 05:36:27 +0000 (08:36 +0300)]
Fix syntax-category of some punctuation characters
* lisp/textmodes/text-mode.el (text-mode-syntax-table): Don't
modify the global syntax-table just because we load text-mode.el.
This happens at loadup time, and then affects the default syntax
in all modes, not just in text-mode and its derivatives.
(Bug#49214)
Stefan Monnier [Thu, 24 Jun 2021 21:32:20 +0000 (17:32 -0400)]
* lisp/emacs-lisp/cl-preloaded.el: Fix the format of props in slot-descs
(cl--plist-remove): Remove.
(cl--plist-to-alist): New function.
(cl-struct-define): Use it to convert slots's properties to the
format expected by `cl-slot-descriptor`.
* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slots): Revert last
changes, not needed any more.
* lisp/emacs-lisp/ert.el (ert--expand-should-1): If the predicate form
signals an error, don't call an explainer because the arguments passed
(the error and error argument, respectively) do not make any sense to
the explainer at all.
Alex McGrath [Thu, 24 Jun 2021 16:45:08 +0000 (18:45 +0200)]
Add SASL authentication to rcirc
* lisp/net/rcirc.el (rcirc-handler-AUTHENTICATE): New function
(bug#48601).
(rcirc-authenticate):
(rcirc-connect): Support sasl.
(rcirc-get-server-password, rcirc-get-server-method): New functions.
(rcirc-authinfo): Document it.
Saroj Thirumalai [Wed, 23 Jun 2021 20:17:03 +0000 (23:17 +0300)]
* lisp/printing.el (pr-global-menubar): Fix duplicate menu problem.
In Emacs 27.1 Print menu items were moved to a submenu of the File menu.
The Printing package (lisp/printing.el) replaces the Print menu (via the
function: pr-global-menubar). The latter needs to be updated to reflect the
changes; otherwise, a second Print (sub)menu is created at the end of the
File menu.
* lisp/language/ethio-util.el (ethiopic): New group.
(ethio-primary-language, ethio-secondary-language)
(ethio-use-colon-for-colon, ethio-use-three-dot-question)
(ethio-quote-vowel-always, ethio-W-sixth-always)
(ethio-numeric-reduction, ethio-java-save-lowercase): Make into
user options (bug#33024).
Make minor mode docstrings say what the mode "variable" is
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Add
the mode variable (bug#36500).
(easy-mmode--mode-docstring):
(define-minor-mode): Pass in the getter.
* etc/NEWS: Document new face.
* lisp/apropos.el (apropos-button): Define new face.
(apropos-face): Specify face instead of hardcoding
attributes (bug#49162).
* lisp/emacs-lisp/shortdoc.el (shortdoc-add-function): Use nconc to
actually append a new section to the list of groups while avoiding a
previous OBOE. Push a new group to the front of shortdoc--groups
without copying it, just like define-short-documentation-group does.
(buffer): Fix copypasta in unlock-buffer example.
* test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-examples): Also
check that :no-value forms demonstrate the right function.
* doc/lispref/help.texi (Documentation Groups): Clarify that @dots
in the define-short-documentation-group arglist refer to whole
key-value pairs. Fix typo in :eg-result-string description.
Alex Bochannek [Mon, 21 Jun 2021 12:35:48 +0000 (14:35 +0200)]
Refactor gnus-article-sort-by-*
* lisp/gnus/gnus-sum.el (gnus-article-sort-extract-extra): New
function (bug#49081).
(gnus-article-sort-by-recipient): Use it.
(gnus-article-sort-by-newsgroups): Ditto.
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.
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'
* 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.
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).
Ł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).
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).
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)