Eric Abrahamsen [Mon, 17 Jun 2019 18:03:31 +0000 (11:03 -0700)]
Remove Gnus group name decoding in Gnus agent
No longer necessary, as group names are already decoded.
* lisp/gnus/gnus-agent.el: Remove variable
gnus-agent-decoded-group-names and function
gnus-agent-decoded-group-name.
(gnus-agent-read-group):
(gnus-agent-group-path):
(gnus-agent-group-pathname):
(gnus-agent-fetch-articles):
(gnus-agent-fetch-headers):
(gnus-agent-expire-group-1):
(gnus-agent-regenerate-group): Remove calls in these functions.
Eric Abrahamsen [Mon, 17 Jun 2019 01:58:22 +0000 (18:58 -0700)]
Ensure that group names are encoded in the Gnus registry file
* lisp/gnus/gnus-registry.el (gnus-registry--munge-group-names): New
function for either encoding names (while saving) or decoding
them (while reading).
(gnus-registry-fixup-registry, gnus-registry-read): Use in these two
locations.
Eric Abrahamsen [Mon, 10 Jun 2019 03:57:56 +0000 (20:57 -0700)]
Fix/extension to previous commit
* lisp/gnus/gnus-start.el (gnus-read-newsrc-el-file): The same
decoding needs to be done for group names in gnus-topic-alist.
(gnus-gnus-to-quick-newsrc-format): Fix bogus temporary setting of
variables; a simply let binding is sufficient.
Eric Abrahamsen [Fri, 7 Jun 2019 03:43:27 +0000 (20:43 -0700)]
Preserve group name encoding in newsrc.eld files
* lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): Preserve
Gnus' earlier odd encoding of group names. Don't change any file
formats until it's time to release a new Gnus version.
Eric Abrahamsen [Wed, 24 Apr 2019 17:05:23 +0000 (10:05 -0700)]
Don't change the default of nnmail-file-coding-system
* lisp/gnus/nnmail.el (nnmail-file-coding-system): This governs how
articles are decoded and saved, nothing to do with group names,
shouldn't have touched this.
Eric Abrahamsen [Mon, 22 Apr 2019 18:17:27 +0000 (11:17 -0700)]
Obsolete and remove nmail-group-names-not-encoded-p
* lisp/gnus/nnmail.el (nnmail-group-names-not-encoded-p): Use
make-obsolete-variable.
(nnmail-split-incoming): Do not bind.
* lisp/gnus/nnml.el (nnml-save-mail, nnml-active-number): Remove
check.
(nnml-request-group, nnml-request-expire-articles): Group name is
already decoded, don't decode again.
Paul Eggert [Sun, 21 Apr 2019 16:59:13 +0000 (09:59 -0700)]
Fix double-free in pdumper
Revert the double-free bug that I introduced in
2019-03-11T15:20:54Z!eggert@cs.ucla.edu.
* src/pdumper.c (dump_mmap_reset): Do not free the private member;
that’s the release function’s job.
(dump_mm_heap_cb_release): Free cb if its refcount goes to zero.
(dump_mmap_contiguous_heap): Mention memory leak in comment.
9d7e08d (origin/emacs-26) Avoid false positives and false negatives o... 75b589c Fix markup related to quoting in Info fd6ff29 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... cd2204f Add a package: line to c-submit-bug-report. a992dca ; Remove empty NEWS sections ea67270 ; Add NEWS sections for 26.3 45b0946 ; Bump Emacs version to 26.2.50 aae8cc3 * admin/admin.el (set-version): Add NEWS headers for a .50 ve...
Avoid false positives and false negatives of Info-quoted face
* lisp/info.el (Info-mode-font-lock-keywords): Modify the regexp, for
matching single quotes of opening single quote and closing single
quote, and avoid matching text followed by a curly quote when it is
not quoting. (Bug#35202)
Noam Postavsky [Mon, 5 Feb 2018 01:43:26 +0000 (20:43 -0500)]
Use pkg-config to find lcms2 CFLAGS and LIBS (Bug#30346)
* configure.ac: Use EMACS_CHECK_MODULES fors LCMS2 rather than
AC_SEARCH_LIBS.
* src/Makefile.in: Get LCMS2_LIBS and LCMS2_CFLAGS from configure,
instead of just LIBLCMS2.
* lisp/vc/log-edit.el (log-edit--toggle-amend): Extract from
vc-git-log-edit-toggle-amend (bug#34944).
* lisp/vc/vc-hg.el (vc-hg-log-edit-toggle-amend): New function.
Use the aforementioned.
(vc-hg-log-edit-mode-map): New variable.
(vc-hg-log-edit-mode): New major mode.
Paul Eggert [Sat, 20 Apr 2019 16:31:47 +0000 (09:31 -0700)]
Improve XDG_RUNTIME_DIR diagnostic
* lib-src/emacsclient.c (set_local_socket):
If there appears to be an XDG runtime directory for the user
but XDG_RUNTIME_DIR is unset, suggest setting it while warning
about potential security issues (Bug#35300).
Alan Mackenzie [Sat, 20 Apr 2019 11:30:55 +0000 (11:30 +0000)]
Fix Pike Mode's autodoc doc comments style's continued lines.
* lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Recognize
matches of c-doc-line-join-re as syntactic whitespace.
(c-find-decl-prefix-search): Recognize and move over matches of
c-doc-line-join-re as whitespace.
(c-find-decl-spots): Before moving backward a char, check (bobp). Before
moving forward over a comment, check it isn't possibly a "bright" comment.
* lisp/progmodes/cc-fonts.el (c-get-doc-comment-style): New function,
extracted from c-compose-keywords-list.
(c-compose-keywords-list): Call the above new function.
(pike-font-lock-keywords, pike-font-lock-keywords-2)
(pike-font-lock-keywords-3): Call c-set-doc-comment-res.
(c-doc-line-join-re, c-doc-bright-comment-start-re, c-doc-line-join-end-ch):
New variables.
(c-set-doc-comment-re-element, c-set-doc-comment-char-list): New macros.
(c-set-doc-comment-res): New function.
(c-font-lock-doc-comments): For consistency and repeatability, in a sequence
of C++ style doc comments, don't fontify the region between BOL and the
comment marker.
(autodoc-line-join-re, autodoc-bright-comment-start-re)
(autodoc-line-join-end-ch): New variables.
* lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end): New
functions.
(c-change-expand-fl-region, c-context-expand-fl-region): Call the above two
new functions for extra possibilities for the start and end of a construct.
* doc/misc/cc-mode.texi (Doc Comments): Add a sentence drawing attention to
the possibility of fontifying constructs within a doc comment.
Eli Zaretskii [Sat, 20 Apr 2019 07:21:02 +0000 (10:21 +0300)]
Backport doc improvement in ELisp manual
* doc/lispref/processes.texi (Accepting Output): Backport:
document how do avoid race conditions while waiting for all of
the process's output to arrive.
Philipp Stephani [Fri, 19 Apr 2019 21:07:58 +0000 (23:07 +0200)]
Remove some #ifdefs for user pointers.
Even if Emacs is compiled without module support, we don't have to
comment out every bit of user pointer support. Defining the basic
structures and functions and detecting user pointers in switch
statements is harmless, and we're already doing the same for module
functions. Removing these #ifdefs makes the code a bit easier to
read.
* src/alloc.c (mark_maybe_pointer): Remove special-casing of tagged
pointers. After commit 09d746dad36e4780d379f975a84b1b076da78c50,
modules no longer rely on tagged pointers.
Paul Eggert [Fri, 19 Apr 2019 19:52:57 +0000 (12:52 -0700)]
Fix comment and tweak eval_sub
* src/eval.c (eval_sub): Check whether Fassq returns Qnil,
not whether it returns a cons, as NILP is faster than CONSP
nowadays. Remove incorrect comment “only original_fun and
original_args have values that will be used below”; instead,
move declarations around so that the set of variables with
useful values is obvious.
Braun Gábor [Fri, 22 Mar 2019 15:11:44 +0000 (16:11 +0100)]
Autoload cua-toggle-rectangle-mark (Bug#34947)
* lisp/emulation/cua-base.el (cua-toggle-rectangle-mark): Autoload it.
Library cua-base.el binds cua-toggle-rectangle-mark to a key in the
:set function in (defcustom cua-rectangle-mark-key ...), so it should
ensure that the command is defined.
Tell xclip not to expect job-control under eshell (Bug#35257)
* lisp/eshell/esh-proc.el (eshell-needs-pipe): Add "xclip" and other
programs that xclip.el (in GNU ELPA) calls with
`process-connection-type' bound to nil.
Eric Abrahamsen [Fri, 19 Apr 2019 17:23:19 +0000 (10:23 -0700)]
Clear gnus-group-list when the newsrc-hashtb is recreated
* lisp/gnus/gnus-start.el (gnus-make-hashtable-from-newsrc-alist):
This routine also happens when re-sorting groups; make sure we're
clearing the group list.
Philipp Stephani [Fri, 19 Apr 2019 16:38:19 +0000 (18:38 +0200)]
Refactoring: simplify definition of some internal variables.
In some cases, we never specbind internal objects, so they don't have
to be symbols. Rather than using DEFSYM/DEFVAR and then uninterning
the symbols, use plain static variables. Call staticpro for all of
them, to protect them from the garbage collector.
* src/eval.c (syms_of_eval): Use a static variable for
Qcatch_all_memory_full.
* src/emacs-module.c (syms_of_module): Use static variables for
Vmodule_refs_hash, Vmodule_runtimes, and Vmodule_environments.
Paul Eggert [Fri, 19 Apr 2019 15:23:15 +0000 (08:23 -0700)]
Fix mail-extr regexp typo with ".".
Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-04/msg00543.html
* lisp/mail/mail-extr.el (mail-extr-telephone-extension-pattern):
Escape the trailing optional period after an abbreviation.
Eli Zaretskii [Fri, 19 Apr 2019 12:59:49 +0000 (15:59 +0300)]
; Minor improvement in documentation from recent commit
* doc/lispref/processes.texi (Asynchronous Processes): Say
explicitly that it's an error to pass non-nil value for
:stopped when starting a process. (Bug#30460)
Philipp Stephani [Thu, 18 Apr 2019 23:04:55 +0000 (01:04 +0200)]
Refactoring: have CATCHER_ALL also catch signals.
In all cases where we use a CATCHER_ALL handler we also want to catch
signals. Therefore have 'signal' respect CATCHER_ALL. Adapt internal
interfaces so that handlers can distinguish among the two types of
nonlocal exits in CATCHER_ALL handlers.
* src/lisp.h (enum nonlocal_exit): New enum.
(struct handler): Add member 'nonlocal_exit' to hold the type of
nonlocal exit during stack unwinding.
* src/eval.c (signal_or_quit): Also respect CATCHER_ALL handlers.
(unwind_to_catch): Store nonlocal exit type in catch structure.
(Fthrow, signal_or_quit): Adapt callers.
(internal_catch_all): Install only one handler. Give handler a
nonlocal exit type argument.
(internal_catch_all_1): Remove, no longer needed.
* src/emacs-module.c (MODULE_SETJMP): Install only one handler.
(module_handle_nonlocal_exit): New function to handle all nonlocal
exits.
(MODULE_SETJMP_1): Pass nonlocal exit type to handler function.
(module_handle_signal, module_handle_throw): Remove, no longer needed.
* src/json.c (json_handle_nonlocal_exit): New helper function.
(json_insert_callback): Adapt to change in 'internal_catch_all'.
Paul Eggert [Thu, 18 Apr 2019 19:56:23 +0000 (12:56 -0700)]
Fix make-fingerprint off-by-one bug
Problem reported by Alex Gramiak in:
https://lists.gnu.org/r/emacs-devel/2019-04/msg00784.html
* lib-src/make-fingerprint.c (main): Fix recently-introduced
off-by-one bug when accessing args after -r.
* lisp/image.el (image--set-property): Ensure new value is set even
in the unlikely case that the plist is empty. Fix off-by-one-link
error when deleting a property. (bug#35285)
* test/lisp/image-tests.el: New file.
(image--set-property): New test.