Eli Zaretskii [Wed, 17 Oct 2018 15:19:47 +0000 (18:19 +0300)]
Avoid assertion violation when comparing with main-thread
* src/thread.c (unmark_main_thread): New function.
* src/lisp.h (unmark_main_thread): Prototype it.
* src/alloc.c (garbage_collect_1): Call it after sweeping.
(Bug#33073)
* test/src/thread-tests.el (threads-test-bug33073): New test.
Eli Zaretskii [Sat, 8 Jun 2019 15:48:33 +0000 (18:48 +0300)]
Minor copyedits in efaq-w32
* doc/misc/efaq-w32.texi (Grep, Recursive grep): More accurate
description of using 'findstr' as a poor-man's replacement for
'grep'. Reported by 范凯 <m_pupil@163.com>
Martin Rudalics [Mon, 3 Jun 2019 08:36:00 +0000 (10:36 +0200)]
Try to improve text on atomic windows in Elisp manual
* doc/lispref/windows.texi (Deleting Windows): Mention how
'delete-window' and 'delete-other-windows' handle atomic
windows. Minor rewrite.
(Quitting Windows): Mention how 'quit-restore-window' handles
atomic windows and that it tries to avoid raising an error.
(Atomic Windows): Tell how to dissolve atomic windows.
Noam Postavsky [Sat, 1 Jun 2019 16:40:11 +0000 (12:40 -0400)]
Don't recommend insert-before-markers in process filters
See <https://lists.gnu.org/r/emacs-devel/2019-05/msg00062.html> and
Bug#35334.
* doc/lispref/processes.texi (Filter Functions): Go back to using
plain insert in the example filter. Add note about updating window
point.
Noam Postavsky [Fri, 31 May 2019 12:24:56 +0000 (08:24 -0400)]
Allow macros autoloaded as functions during bytecomp (Bug#36022)
* lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't pass
symbols which don't have a known definition to
byte-compile--function-signature, it fails to compile code which
previously compiled successfully (for example, gnus.el until
2019-06-01 "* lisp/gnus/gnus.el: Mark autoloaded macros as such" which
autoloads some macros as if they were functions).
`url-insert-file-contents` saves in buffer-file-coding-system
the coding-system used to decode the contents. Preserve this
as the contents is moved from buffer to string to buffer, and use
it when saving the contents to file, so as to try and better preserve
the original byte sequence.
(package--buffer-string, package--cs): New functions.
(package--check-signature): Encode `string` if a coding-system
was specified in buffer-file-coding-system.
(package--download-one-archive, package-install-from-archive):
Obey and preserve the buffer-file-coding-system if specified.
Noam Postavsky [Mon, 27 May 2019 23:05:56 +0000 (19:05 -0400)]
Use plain symbols for eieio type descriptors (Bug#29220)
Since Emacs 26, eieio objects use a class record (with circular
references) as the type descriptor of the object record. This causes
problems when reading back an object from a string, because the class
record is not `eq' to the canonical one (which means that read objects
don't satisfy the foo-p predicate).
* lisp/emacs-lisp/eieio.el (make-instance): As a (partial) fix, set
the record's type descriptor to a plain symbol for the type descriptor
when eieio-backward-compatibility is non-nil (the default).
* lisp/emacs-lisp/eieio-core.el (eieio--object-class): Call
eieio--class-object on the type tag when eieio-backward-compatibility
is non-nil.
(eieio-object-p): Use eieio--object-class instead of
eieio--object-class-tag.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
(eieio-test-persist-hash-and-vector)
(eieio-test-persist-interior-lists): Make into functions.
(eieio-persist-hash-and-vector-backward-compatibility)
(eieio-persist-hash-and-vector-no-backward-compatibility)
(eieio-test-persist-interior-lists-backward-compatibility)
(eieio-test-persist-interior-lists-no-backward-compatibility): New
tests which call them, eieio-backward-compatibility let-bound.
Paul Eggert [Thu, 30 May 2019 22:06:39 +0000 (15:06 -0700)]
Pacify GCC 9 -Wredundant-decls
* src/gmalloc.c (_fraghead) [!HYBRID_MALLOC]:
Make it static in this case, too. This avoids having both
‘extern struct list _fraghead[];’ and
‘static struct list _fraghead[BLOCKLOG];’, which
GCC 9 complains about.
Paul Eggert [Thu, 30 May 2019 22:06:39 +0000 (15:06 -0700)]
Suppress GCC 9 “no longer supported” messages
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wchkp.
This suppresses a boatload of warnings of the form
“gcc: warning: switch ‘-Wchkp’ is no longer supported”.
when using GCC 9. Do not merge to master.
Noam Postavsky [Wed, 22 May 2019 00:33:09 +0000 (20:33 -0400)]
Avoid infloop in read-multiple-choice (Bug#32257)
* lisp/emacs-lisp/rmc.el (read-multiple-choice): When `read-char'
signals an error "Non-character input-event", call `read-event' to
take the non-character event out of the queue. Don't merge to master,
we just use `read-event' directly there, rather than this solution
which relies a particular error message.
Mauro Aranda [Sat, 18 May 2019 20:35:04 +0000 (17:35 -0300)]
Remove redundants "See" before @xref or @pxref (Bug#35793)
* doc/lispref/control.texi (Control Structures):
* doc/lispref/modes.texi (Search-based Fontification):
* doc/misc/cc-mode.texi (Filling and Line Breaking Commands)
(Auto-newline Insertion, Other Special Indentations):
* doc/misc/dbus.texi (Errors and Events):
* doc/misc/dired-x.texi (Find File At Point):
* doc/misc/eudc.texi (Display of Query Results, Inline Query Expansion):
* doc/misc/gnus-faq.texi (FAQ 3-11):
* doc/misc/gnus.texi (Group Parameters, Posting Styles)
(Spam Package Introduction):
* doc/misc/org.texi (LaTeX fragments, Previewing LaTeX fragments):
* doc/misc/reftex.texi (Commands):
Remove redundant "See" before cross references.
* doc/lispref/functions.texi (Function Safety): Redundant "see" is in
ignored text, but remove it anyway.
* doc/lispref/positions.texi (Skipping Characters): Remove redundant
"See" before cross references. Change @xref to @pxref, which is
more suitable when at the end of a sentence.
Most of the redundants "See" found by Noam Postavsky.
Change the customization type of recentf-max-saved-items to include
nil, as it is an allowed value (Bug#35771).
* lisp/recentf.el (recentf-max-saved-items): Change the customization
type in the defcustom.
Noam Postavsky [Thu, 16 May 2019 00:29:38 +0000 (20:29 -0400)]
Add option to disable help completion autoloading (Bug#28607)
* lisp/help-fns.el (help-enable-completion-auto-load): New option.
(help--symbol-completion-table): Consult it.
* doc/emacs/building.texi (Lisp Libraries): Document it.
* etc/NEWS: Announce it.
* doc/lispref/loading.texi (Autoload by Prefix): New section.
(Autoload): Reference it.
Do potentially destructive operations in prepare-commit-msg
* build-aux/git-hooks/prepare-commit-msg: If someone occasionally puts
Signed-off line, it will likely get there through -s option of git.
Exploit this fact to abort before a user got a chance to type commit
message. (Bug#35368)
Paul Eggert [Mon, 13 May 2019 19:43:13 +0000 (12:43 -0700)]
Backport: fix broken build on m68k
The GCC + valgrind fix caused the m68k build to fail (Bug#35711).
Simplify string allocation a bit to make similar problems less
likely in the future.
* src/alloc.c (sdata, SDATA_NBYTES, SDATA_DATA) [GC_CHECK_STRING_BYTES]:
Use the same implementation as with !GC_CHECK_STRING_BYTES,
as the special case is no longer needed.
(SDATA_ALIGN): New constant.
(SDATA_SIZE): Remove this macro, replacing with ...
(sdata_size): ... this new function. All uses changed.
Properly account for sizes and alignments even in the m68k case,
and even if GC_CHECK_STRING_BYTES is not defined.
Noam Postavsky [Mon, 6 May 2019 23:55:17 +0000 (19:55 -0400)]
Handle GNUTLS_E_AGAIN in emacs_gnutls_read (Bug#34341)
Don't merge to master, this has already been fixed there by 2019-01-15
"Fix unlikely races with GnuTLS, datagrams".
* src/gnutls.c (emacs_gnutls_read): Similar to emacs_gnutls_write,
when gnutls_record_recv returns GNUTLS_E_AGAIN set errno to EGAIN.
Neil Roberts [Fri, 10 May 2019 10:57:28 +0000 (12:57 +0200)]
Let dir locals for more specific modes override those from less
The list of dir local variables to apply is now sorted by the number
of parent modes of the mode used as the key in the association list.
That way when the variables are applied in order the variables from
more specific modes will override those from less specific modes.
If there are directory entries in the list then they are sorted in
order of name length. The list of modes for that dir is then
recursively sorted with the same mechanism. That way variables tied
to a particular subdirectory override those in in a parent directory.
Previously the behaviour didn’t seem to be well defined anyway and was
dependent on the order they appeared in the file. However this order
was changed in version 26.1 and it probably also depended on the
number of dir-local files that are merged.
Bug#33400
* lisp/files.el (dir-locals-get-sort-score, dir-locals-sort-variables)
(dir-locals-read-from-dir): Sort the dir locals so that more precise
modes and directory-specific entries have override lesser ones.
* doc/emacs/custom.texi (Directory Variables): Document the priority.
Recognize single quote attribute values in nxml and sgml (Bug#35381)
* lisp/textmodes/sgml-mode.el (sgml-specials): Add single quote.
(sgml-syntax-propertize-rules): Handle single quote.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New
test.
* test/lisp/textmodes/sgml-mode-tests.el
(sgml-delete-tag-bug-8203-should-not-delete-apostrophe): Now passes.
The change from 2016-01-16 "lisp/nxml: Use syntax-tables for comments"
made nxml-get-inside return non-nil for any string or comment,
including attribute strings. This caused incorrect and therefore
indentation.
* lisp/nxml/nxml-rap.el: Update commentary to reflect changes to
nxml-mode parsing.
(nxml-get-inside): Only return non-nil when inside comments and
generic strings, not normal quote-delimited strings.
* test/lisp/nxml/nxml-mode-tests.el: New tests.
Eli Zaretskii [Wed, 8 May 2019 17:34:09 +0000 (20:34 +0300)]
Fix positioning client buffer as instructed by emacsclient
* lisp/server.el (server-switch-buffer): Let-bind
switch-to-buffer-preserve-window-point to nil when switching
to the client buffer, when the client requested a specific
position. (Bug#35602)
Vitalie Spinu [Wed, 8 May 2019 09:12:29 +0000 (11:12 +0200)]
Fix incorrect cloning of eieio-instance-inheritor objects (Bug#34840)
* lisp/emacs-lisp/eieio-base.el (clone): Unbound slots of
eieio-instance-inheritor objects as documented in the docs string
and implemented in the original eieio implementation.
Eli Zaretskii [Sat, 4 May 2019 09:22:49 +0000 (12:22 +0300)]
Improve documentation of the daemon and emacsclient
* doc/emacs/misc.texi (emacsclient Options):
* doc/emacs/cmdargs.texi (Initial Options): Document that
using --daemon=NAME will need to specify the same NAME when
invoking 'emacscilent'. (Bug#35547)
* doc/lispref/processes.texi (Filter Functions): Use
insert-before-markers in the "ordinary" filter example, like
internal-default-process-filter does.
Be more careful about indent-sexp going over eol (Bug#35286)
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only go over multiple
sexps if the end of line is within a sexp.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(indent-sexp-stop-before-eol-comment)
(indent-sexp-stop-before-eol-non-lisp): New tests.
For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00316.html
* doc/lispref/customize.texi (Composite Types): Do not overspecify
:match-alternatives predicates.
* doc/lispref/eval.texi (Intro Eval): Anchor definition of "side
effect" for cross-referencing...
* doc/lispref/functions.texi (What Is a Function): ...from here.
Define what a pure function is.
* doc/lispref/internals.texi (Writing Emacs Primitives): Describe
currently preferred approach to marking primitives as pure and
side-effect-free.
* doc/lispref/symbols.texi (Standard Properties): Expand description
of pure and side-effect-free properties.
Backport: Avoid using obsolete indent-relative-maybe
* lisp/electric.el (electric-indent-functions-without-reindent):
* lisp/indent.el (indent-according-to-mode): Check for
indent-relative-first-indent-point in addition to its obsolete alias
indent-relative-maybe.
* lisp/obsolete/vi.el (vi-com-map): Use
indent-relative-first-indent-point in place of its obsolete alias
indent-relative-maybe.
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.
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.
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.
* 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.
Eli Zaretskii [Tue, 16 Apr 2019 15:32:18 +0000 (18:32 +0300)]
Mention the assignment form in "Copyright Assignment"
* doc/emacs/trouble.texi (Copyright Assignment): Mention the
copyright assignment form explicitly. Suggested by Konstantin
Kharlamov <hi-angel@yandex.ru>.