]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoImprove pure and side-effect-free docs
Basil L. Contovounesios [Wed, 17 Apr 2019 15:34:47 +0000 (16:34 +0100)]
Improve pure and side-effect-free docs

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.

5 years agoRefactoring: Inline a few macros.
Philipp Stephani [Mon, 22 Apr 2019 09:36:59 +0000 (11:36 +0200)]
Refactoring: Inline a few macros.

Now that CATCHER_ALL catches signals as well, we can simplify
MODULE_HANDLE_NONLOCAL_EXIT a bit.

* src/emacs-module.c (MODULE_SETJMP, MODULE_SETJMP_1): Remove.
(MODULE_HANDLE_NONLOCAL_EXIT): Inline MODULE_SETJMP and
MODULE_SETJMP_1.

5 years ago; * etc/NEWS: Improve wording of a recent addition.
Eli Zaretskii [Mon, 22 Apr 2019 08:12:45 +0000 (11:12 +0300)]
; * etc/NEWS: Improve wording of a recent addition.

5 years agoSome changes in tramp-tests
Michael Albinus [Mon, 22 Apr 2019 07:58:37 +0000 (09:58 +0200)]
Some changes in tramp-tests

* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Check for backward compatibility.
(tramp-test33-environment-variables): Apply a better check for
unset variable.

5 years agoMention AddressSanitizer etc. in etc/DEBUG
Paul Eggert [Mon, 22 Apr 2019 06:15:42 +0000 (23:15 -0700)]
Mention AddressSanitizer etc. in etc/DEBUG

* etc/DEBUG: Modernize for AddressSanitizer etc.
* etc/NEWS: Defer to etc/DEBUG for this.

5 years agoRemove --enable-checking=xmallocoverrun
Paul Eggert [Mon, 22 Apr 2019 04:47:10 +0000 (21:47 -0700)]
Remove --enable-checking=xmallocoverrun

It doesn’t work anymore, and these days ‘gcc -fsanitize=address’
does a better job anyway.
* configure.ac: Remove the option.
* configure.ac (ac_xmalloc_overrun, XMALLOC_OVERRUN_CHECK):
* src/alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD)
(XMALLOC_OVERRUN_CHECK_SIZE, XMALLOC_OVERRUN_SIZE_SIZE)
(xmalloc_overrun_check_header, xmalloc_overrun_check_trailer)
(xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
(overrun_check_realloc, overrun_check_free):
Remove.  All uses removed.
* etc/NEWS: Mention this.

5 years agoRemove --enablechecking=conslist configure option
Paul Eggert [Mon, 22 Apr 2019 04:47:10 +0000 (21:47 -0700)]
Remove --enablechecking=conslist configure option

* configure.ac: Remove the option.
* configure.ac (ac_gc_check_cons_list, GC_CHECK_CONS_LIST):
* src/alloc.c (check_cons_list) [GC_CHECK_CONS_LIST]:
* src/lisp.h (lisp_h_check_cons_list, check_cons_list):
Remove.  All uses removed.
* etc/NEWS: Mention this.

5 years agoSimplify XPNTR
Paul Eggert [Mon, 22 Apr 2019 04:45:04 +0000 (21:45 -0700)]
Simplify XPNTR

Because XPNTR now uses ATTRIBUTE_NO_SANITIZE_UNDEFINED,
it can be simplified.
* src/alloc.c (macro_PNTR_ADD, PNTR_ADD, macro_XPNTR): Remove.
(XPNTR): Open-code rather than using the removed macros and
functions.  Also, simplify by using LISP_WORD_TAG.

5 years agoFix drain_reloc_list alignment bug
Paul Eggert [Mon, 22 Apr 2019 04:16:03 +0000 (21:16 -0700)]
Fix drain_reloc_list alignment bug

* src/pdumper.c (dump_charset): Use alignof (struct charset),
not alignof (int), since struct charset might be more strictly
aligned than int.  I think this is just a minor performance
issue, but we might as well use the correct alignment.
(drain_reloc_list): Use an alignment instead of a size for the
output alignment.  This prevents undefined behavior when
alignof (struct emacs_reloc) == 8 and sizeof (dump_off) == 4
when building on x86-64 with gcc -fsanitize=undefined.

5 years agoPort dump_bitset_clear to -fsanitize=undefined
Paul Eggert [Mon, 22 Apr 2019 03:36:56 +0000 (20:36 -0700)]
Port dump_bitset_clear to -fsanitize=undefined

* src/pdumper.c (dump_bitset_clear):
Pacify -fsanitize=undefined by avoiding memset (NULL, x, 0),
which strictly speaking has undefined behavior although it
works on all production platforms I know.

5 years agoPort to recent gcc -fsanitize=undefined
Paul Eggert [Mon, 22 Apr 2019 03:34:03 +0000 (20:34 -0700)]
Port to recent gcc -fsanitize=undefined

* src/alloc.c (XPNTR): Add ATTRIBUTE_NO_SANITIZE_UNDEFINED and
remove ATTRIBUTE_UNUSED.  Do not define as a macro, so that
ATTRIBUTE_NO_SANITIZE_UNDEFINED works.
* src/lisp.h (lisp_h_XSYMBOL): Remove.  All uses removed.
With recent GCC the macro does not work with -fsanitize=undefined,
and the macro can be omitted as its only function is to optimize -O0.

5 years agoMove side-effect-free from unsafep.el to subr.el
Basil L. Contovounesios [Wed, 17 Apr 2019 16:35:12 +0000 (17:35 +0100)]
Move side-effect-free from unsafep.el to subr.el

* lisp/emacs-lisp/unsafep.el: Move side-effect-free property setting
from here...
* lisp/subr.el: ...to here, as function declarations for modularity.

5 years agoFix double-free in pdumper
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.

5 years agoMerge from origin/emacs-26
Glenn Morris [Sun, 21 Apr 2019 14:51:38 +0000 (07:51 -0700)]
Merge from origin/emacs-26

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...

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sun, 21 Apr 2019 14:51:38 +0000 (07:51 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

bacdaa5 Use pkg-config to find lcms2 CFLAGS and LIBS (Bug#30346)

5 years agoMerge from origin/emacs-26
Glenn Morris [Sun, 21 Apr 2019 14:51:38 +0000 (07:51 -0700)]
Merge from origin/emacs-26

cd2204f Add a package: line to c-submit-bug-report.
a992dca ; Remove empty NEWS sections
ea67270 ; Add NEWS sections for 26.3

Conflicts:
etc/NEWS

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sun, 21 Apr 2019 14:51:37 +0000 (07:51 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

45b0946 ; Bump Emacs version to 26.2.50

5 years agoMerge from origin/emacs-26
Glenn Morris [Sun, 21 Apr 2019 14:51:37 +0000 (07:51 -0700)]
Merge from origin/emacs-26

aae8cc3 * admin/admin.el (set-version): Add NEWS headers for a .50 ve...

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sun, 21 Apr 2019 14:51:37 +0000 (07:51 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

f90a336 Backport doc improvement in ELisp manual

5 years agoMerge from origin/emacs-26
Glenn Morris [Sun, 21 Apr 2019 14:51:36 +0000 (07:51 -0700)]
Merge from origin/emacs-26

037970f Document insert-image-file's return value (Bug#32978)
598b45a Autoload cua-toggle-rectangle-mark (Bug#34947)
95bd56d Tell xclip not to expect job-control under eshell (Bug#35257)
9997bbb ; * src/emacs.c: Fix typo in comment (Bug#35320).
a4ad7be Fix off-by-one-link error in image--set-property

5 years agoAvoid false positives and false negatives of Info-quoted face
Mauro Aranda [Mon, 8 Apr 2019 23:24:32 +0000 (20:24 -0300)]
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)

5 years agoFix markup related to quoting in Info
Eli Zaretskii [Sun, 21 Apr 2019 11:56:04 +0000 (14:56 +0300)]
Fix markup related to quoting in Info

* doc/misc/sc.texi (Citations): Fix markup of '>'.
* doc/misc/mh-e.texi (Speedbar): Fix markup in a @table.
* doc/misc/calc.texi (Yacas Language Mode): Fix a typo.
* doc/emacs/mark.texi (Setting Mark): Remove duplicate
quoting.  (Bug#35202)

5 years agoMerge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26
Eli Zaretskii [Sun, 21 Apr 2019 11:21:52 +0000 (14:21 +0300)]
Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26

5 years agoUse pkg-config to find lcms2 CFLAGS and LIBS (Bug#30346)
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.

(cherry picked from commit cb3863370cbe574810f796726faa39ba0de0a429)

5 years agoPort make-fingerprint to LeakSanitizer
Paul Eggert [Sun, 21 Apr 2019 06:10:37 +0000 (23:10 -0700)]
Port make-fingerprint to LeakSanitizer

* lib-src/make-fingerprint.c (buf): Now static,
to pacify LeakSanitizer.

5 years ago* lisp/progmodes/sql.el Bug#35307
Michael R. Mauger [Sun, 21 Apr 2019 04:40:00 +0000 (00:40 -0400)]
* lisp/progmodes/sql.el  Bug#35307
(sql-product-alist): Added :prompt-cont-regexp for ms.

Looking for experience with Microsofts SQLCMD interpreter and
adjustments needed for Emacs to support it.

5 years ago* lisp/progmodes/sql.el Bug#24483
Michael R. Mauger [Sun, 21 Apr 2019 04:19:56 +0000 (00:19 -0400)]
* lisp/progmodes/sql.el  Bug#24483
(sql-interactive-remove-continuation-prompt): Properly protect `sql-prompt-cont-regexp'.
(sql-interactive-mode): Same.

5 years ago * lisp/progmodes.sql.el
Michael R. Mauger [Sun, 21 Apr 2019 00:13:56 +0000 (20:13 -0400)]
 * lisp/progmodes.sql.el
(sql-product-alist): Corrected :terminator defns.
(sql-debug-send): New variable.
(sql-send-string): Use it and correct buffer context.
(sql-send-magic-terminator): Use `sql-input-sender'.
(sql-placeholders-filter): Bug#11481 Don't recursively replace placeholders
* test/lisp/progmodes/sql-tests.el
(sql-test-placeholder-filter): Test placeholder functionality.

5 years agoFix text metrics calculation in Xft support for lwlib
YAMAMOTO Mitsuharu [Sun, 21 Apr 2019 02:39:06 +0000 (11:39 +0900)]
Fix text metrics calculation in Xft support for lwlib

* lwlib/lwlib-Xaw.c (get_text_width_and_height) [HAVE_XFT]:
* lwlib/xlwmenu.c (string_width) [HAVE_XFT]: Use xOff member instead of width.

5 years ago* src/configure.ac: Check for GTK 2 features only on GTK 2
Alexander Gramiak [Sun, 21 Apr 2019 02:16:20 +0000 (20:16 -0600)]
* src/configure.ac: Check for GTK 2 features only on GTK 2

5 years ago* lwlib/lwlib-Xaw.c (draw_text) [HAVE_XFT]: Fix memory leak.
YAMAMOTO Mitsuharu [Sun, 21 Apr 2019 00:53:39 +0000 (09:53 +0900)]
* lwlib/lwlib-Xaw.c (draw_text) [HAVE_XFT]: Fix memory leak.

5 years agoSupport amending the last commit using VC-Hg
Dmitry Gutov [Sat, 20 Apr 2019 21:39:36 +0000 (00:39 +0300)]
Support amending the last commit using VC-Hg

* 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.

5 years agoMark different-diagnostic-types as failed on emba.
Michael Albinus [Sat, 20 Apr 2019 19:16:05 +0000 (21:16 +0200)]
Mark different-diagnostic-types as failed on emba.

* test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
Expect also failure on emba.gnu.org.

5 years agoAdd a package: line to c-submit-bug-report.
Glenn Morris [Sat, 20 Apr 2019 18:38:47 +0000 (11:38 -0700)]
Add a package: line to c-submit-bug-report.

* lisp/progmodes/cc-mode.el (c-submit-bug-report):
Add a Package: line for mail clients that do not support X- headers.

5 years ago; Remove empty NEWS sections
Glenn Morris [Sat, 20 Apr 2019 17:06:26 +0000 (10:06 -0700)]
; Remove empty NEWS sections

5 years ago; Add NEWS sections for 26.3
Glenn Morris [Sat, 20 Apr 2019 17:04:18 +0000 (10:04 -0700)]
; Add NEWS sections for 26.3

5 years ago; Bump Emacs version to 26.2.50
Glenn Morris [Sat, 20 Apr 2019 17:03:40 +0000 (10:03 -0700)]
; Bump Emacs version to 26.2.50

5 years ago* admin/admin.el (set-version): Add NEWS headers for a .50 version.
Glenn Morris [Sat, 20 Apr 2019 17:02:58 +0000 (10:02 -0700)]
* admin/admin.el (set-version): Add NEWS headers for a .50 version.

5 years agoImprove XDG_RUNTIME_DIR diagnostic
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).

5 years agoFix Pike Mode's autodoc doc comments style's continued lines.
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.

5 years agoBackport doc improvement in ELisp manual
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.

5 years ago* lisp/emacs-lisp/smie.el (smie-indent-comment-continue): Single-char case.
Stefan Monnier [Sat, 20 Apr 2019 03:50:58 +0000 (23:50 -0400)]
* lisp/emacs-lisp/smie.el (smie-indent-comment-continue): Single-char case.

Make it so the comment-continue is aligned with the comment-start when
comment-start is a single-char.

5 years ago* src/ftcrfont.c (ftcrfont_shape): Fix last change.
YAMAMOTO Mitsuharu [Sat, 20 Apr 2019 03:50:32 +0000 (12:50 +0900)]
* src/ftcrfont.c (ftcrfont_shape): Fix last change.

5 years agoUse bitmap strikes as fallbacks for ftcr font backend
YAMAMOTO Mitsuharu [Sat, 20 Apr 2019 03:43:45 +0000 (12:43 +0900)]
Use bitmap strikes as fallbacks for ftcr font backend

* src/ftfont.h (struct font_info): New member bitmap_strike_index.
* src/ftfont.c (ftfont_open2): Try bitmap strikes as fallbacks.
(ftfont_open): Discard bitmap strikes.
* src/ftcrfont.c (ftcrfont_open): Recalculate metrics for bitmap strikes.
(ftcrfont_get_bitmap, ftcrfont_anchor_point, ftcrfont_shape): New functions.
(struct font_driver): Use them.

5 years ago* lisp/emacs-lisp/radix-tree.el (pcase-defmacro): Improve docstring
Stefan Monnier [Sat, 20 Apr 2019 03:31:59 +0000 (23:31 -0400)]
* lisp/emacs-lisp/radix-tree.el (pcase-defmacro): Improve docstring

5 years ago* lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias): Tweak doc
Stefan Monnier [Sat, 20 Apr 2019 03:29:33 +0000 (23:29 -0400)]
* lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias): Tweak doc

5 years ago* lisp/calendar/time-date.el (date-to-time): 'signal' only takes 2 args
Stefan Monnier [Sat, 20 Apr 2019 03:28:07 +0000 (23:28 -0400)]
* lisp/calendar/time-date.el (date-to-time): 'signal' only takes 2 args

5 years ago* lisp/calendar/parse-time.el (parse-time-string): Use functionp and setf
Stefan Monnier [Sat, 20 Apr 2019 03:25:04 +0000 (23:25 -0400)]
* lisp/calendar/parse-time.el (parse-time-string): Use functionp and setf

5 years agoFix GC_CHECK_STRING_BYTES false alarm with pdumper
Paul Eggert [Sat, 20 Apr 2019 00:35:39 +0000 (17:35 -0700)]
Fix GC_CHECK_STRING_BYTES false alarm with pdumper

* src/alloc.c (string_bytes): Don’t abort on strings
taken from the dumped file.

5 years agoFix another hash false alarm
Paul Eggert [Sat, 20 Apr 2019 00:35:39 +0000 (17:35 -0700)]
Fix another hash false alarm

* src/pdumper.c (dump_vectorlike): Fix hash.

5 years ago; * src/alloc.c (xrealloc): Fix typo.
Philipp Stephani [Fri, 19 Apr 2019 23:49:41 +0000 (01:49 +0200)]
; * src/alloc.c (xrealloc): Fix typo.

5 years ago* src/emacs-module.c (value_storage_contains_p): Fix typo.
Paul Eggert [Fri, 19 Apr 2019 21:41:37 +0000 (14:41 -0700)]
* src/emacs-module.c (value_storage_contains_p): Fix typo.

5 years agoRemove some ineffective #ifdefs.
Philipp Stephani [Fri, 19 Apr 2019 21:17:19 +0000 (23:17 +0200)]
Remove some ineffective #ifdefs.

Since DEFSYM doesn't by itself do anything and make-docfile ignores
preprocessor statements, conditional compilation of DEFSYMs is
ineffective.

* src/data.c (syms_of_data): Remove ineffective #ifdefs.

5 years ago; * src/alloc.c (HAVE_MODULES): remove unused constant
Philipp Stephani [Fri, 19 Apr 2019 21:11:14 +0000 (23:11 +0200)]
; * src/alloc.c (HAVE_MODULES): remove unused constant

5 years agoRemove some #ifdefs for user pointers.
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/lisp.h (PVEC_USER_PTR, struct Lisp_User_Ptr, USER_PTRP)
(XUSER_PTR): Define unconditionally.

* src/data.c (Ftype_of):
* src/alloc.c (cleanup_vector):
* src/print.c (print_vectorlike):
* src/pdumper.c (dump_vectorlike): Remove #ifdef for user pointers.

5 years agoRemove special-casing of tagged pointers.
Philipp Stephani [Fri, 19 Apr 2019 20:51:16 +0000 (22:51 +0200)]
Remove special-casing of tagged pointers.

This partially reverts commit
09b2b8a5ce5b542856f93b645db51eb11cf9855a.

* src/alloc.c (mark_maybe_pointer): Remove special-casing of tagged
pointers.  After commit 09d746dad36e4780d379f975a84b1b076da78c50,
modules no longer rely on tagged pointers.

5 years agoRefactoring: Reduce code duplication
Philipp Stephani [Sat, 19 Jan 2019 22:40:35 +0000 (23:40 +0100)]
Refactoring: Reduce code duplication

* src/emacs-module.c (value_storage_contains_p): New function.
(module_free_global_ref, value_to_lisp): Use it.

5 years agoRemove subsumed regexp branches
Mattias Engdegård [Fri, 19 Apr 2019 20:24:35 +0000 (22:24 +0200)]
Remove subsumed regexp branches

* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings): Remove `\r' subsumed by `.'.

5 years agoFix Fload dangling pointer
Paul Eggert [Fri, 19 Apr 2019 19:55:18 +0000 (12:55 -0700)]
Fix Fload dangling pointer

* src/lread.c (Fload): Expand decl’s lifetime to match its use.
Bug found by gcc -fsanitize=address.

5 years agoFix comment and tweak eval_sub
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.

5 years agoFix dump_map_file on unusual platforms
Paul Eggert [Fri, 19 Apr 2019 19:38:45 +0000 (12:38 -0700)]
Fix dump_map_file on unusual platforms

* src/pdumper.c (dump_map_file): Fix recently-introduced typo
on platforms that support neither POSIX nor MS-Windows VM.

5 years agoDocument insert-image-file's return value (Bug#32978)
Noam Postavsky [Thu, 18 Apr 2019 00:22:09 +0000 (20:22 -0400)]
Document insert-image-file's return value (Bug#32978)

* lisp/image-file.el (insert-image-file): Document return value.

5 years agoAutoload cua-toggle-rectangle-mark (Bug#34947)
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.

Copyright-paperwork-exempt: yes

5 years agoTell xclip not to expect job-control under eshell (Bug#35257)
Noam Postavsky [Tue, 16 Apr 2019 00:38:15 +0000 (20:38 -0400)]
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.

5 years agoMinor lread.c tweaks
Paul Eggert [Fri, 19 Apr 2019 19:08:40 +0000 (12:08 -0700)]
Minor lread.c tweaks

* src/lread.c (load_warn_unescaped_character_literals):
Use AUTO_STRING to help the GC.
(Fload): Use bool for boolean.

5 years agoClear gnus-group-list when the newsrc-hashtb is recreated
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.

5 years ago; * src/emacs.c: Fix typo in comment (Bug#35320).
Noam Postavsky [Fri, 19 Apr 2019 18:06:08 +0000 (14:06 -0400)]
; * src/emacs.c: Fix typo in comment (Bug#35320).

5 years agoMake warning about unescaped character literals more helpful.
Philipp Stephani [Sat, 2 Jun 2018 09:59:02 +0000 (11:59 +0200)]
Make warning about unescaped character literals more helpful.

See Bug#31676.

* lisp/emacs-lisp/byte-run.el
(byte-run--unescaped-character-literals-warning): New defun.

* src/lread.c (load_warn_unescaped_character_literals): Use new defun.
(syms_of_lread): Define symbol for new defun.

* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new
defun.

* test/src/lread-tests.el (lread-tests--unescaped-char-literals):
test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals): Adapt unit tests.

5 years agoRefactoring: simplify definition of some internal variables.
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.

5 years agoDon't check for group existence in gnus-group-goto-group
Eric Abrahamsen [Fri, 19 Apr 2019 16:07:59 +0000 (09:07 -0700)]
Don't check for group existence in gnus-group-goto-group

* lisp/gnus/gnus-group.el (gnus-group-goto-group): Just look for the
  string.

5 years agoFix regexp branches that subsume other branches
Paul Eggert [Fri, 19 Apr 2019 16:00:04 +0000 (09:00 -0700)]
Fix regexp branches that subsume other branches

Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-04/msg00803.html
* lisp/arc-mode.el (archive-rar-summarize):
* lisp/eshell/em-hist.el (eshell-hist-word-designator):
* lisp/info.el (Info-dir-remove-duplicates):
* lisp/international/ja-dic-cnv.el (skkdic-convert-postfix)
(skkdic-convert-prefix, skkdic-collect-okuri-nasi):
* lisp/progmodes/cc-awk.el (c-awk-esc-pair-re):
* lisp/xml.el (xml-att-type-re):
Omit regexp branches that subsume other branches.
* lisp/progmodes/cperl-mode.el (cperl-beautify-regexp-piece):
$ and ^ aren’t simple-codes.

5 years agoFix mail-extr regexp typo with ".".
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.

5 years ago* lisp/net/tramp-adb.el (tramp-adb-prompt): Remove repetition of expression
Michael Albinus [Fri, 19 Apr 2019 14:29:44 +0000 (16:29 +0200)]
* lisp/net/tramp-adb.el (tramp-adb-prompt): Remove repetition of expression

matching an empty string.

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Fri, 19 Apr 2019 14:29:11 +0000 (16:29 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

5 years ago; Minor improvement in documentation from recent commit
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)

5 years agoDo not handle :stop in tramp-*-handle-make-process
Michael Albinus [Fri, 19 Apr 2019 12:28:20 +0000 (14:28 +0200)]
Do not handle :stop in tramp-*-handle-make-process

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Do not
handle :stop anymore.

5 years ago; Remove instrumentation in tramp-tests
Michael Albinus [Fri, 19 Apr 2019 12:18:59 +0000 (14:18 +0200)]
; Remove instrumentation in tramp-tests

5 years agoRemove :stop key from make-process.
Philipp Stephani [Fri, 19 Apr 2019 11:03:40 +0000 (13:03 +0200)]
Remove :stop key from make-process.

This has never worked and caused issues such as Bug#30460.

* src/process.c (Fmake_process): Don't accept :stop key any more.
(syms_of_process): Define needed symbol 'null'.

* test/src/process-tests.el (make-process/stop): New unit test.

* doc/lispref/processes.texi (Asynchronous Processes): Remove :stop
key from manual.

5 years agoAdapt tramp-test32-shell-command
Michael Albinus [Fri, 19 Apr 2019 09:30:22 +0000 (11:30 +0200)]
Adapt tramp-test32-shell-command

* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Check "tput" before running `shell-command-width' test.

5 years agoAdd a new user option 'ido-big-directories'.
Philipp Stephani [Fri, 12 Apr 2019 12:23:01 +0000 (14:23 +0200)]
Add a new user option 'ido-big-directories'.

This provides an alternative to 'ido-max-directory-size', for
directories that are statically known to be too big for Ido
completion.

* lisp/ido.el (ido-big-directories): New user option.
(ido-directory-too-big-p): Use it.

* test/lisp/ido-tests.el (ido-directory-too-big-p): New unit test.

5 years agoUse eassume (false) for branch that's never taken.
Philipp Stephani [Fri, 19 Apr 2019 08:26:32 +0000 (10:26 +0200)]
Use eassume (false) for branch that's never taken.

* src/json.c (json_handle_nonlocal_exit): Use eassume (false) since
this branch is never taken.

5 years agoFix compilation warning due to a recent change
Eli Zaretskii [Fri, 19 Apr 2019 08:04:17 +0000 (11:04 +0300)]
Fix compilation warning due to a recent change

* src/json.c (json_handle_nonlocal_exit): Always return a
value.

5 years ago* src/ftcrfont.c (ftcrfont_glyph_extents): Activate ft_size_draw.
YAMAMOTO Mitsuharu [Fri, 19 Apr 2019 00:55:53 +0000 (09:55 +0900)]
* src/ftcrfont.c (ftcrfont_glyph_extents): Activate ft_size_draw.

5 years ago* src/ftcrfont.c (ftcrfont_open): Avoid returning while blocking input.
YAMAMOTO Mitsuharu [Fri, 19 Apr 2019 00:54:59 +0000 (09:54 +0900)]
* src/ftcrfont.c (ftcrfont_open): Avoid returning while blocking input.

5 years agoRefactoring: have CATCHER_ALL also catch signals.
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'.

5 years agoUpdate module documentation for bignum support.
Philipp Stephani [Thu, 18 Apr 2019 21:31:00 +0000 (23:31 +0200)]
Update module documentation for bignum support.

* doc/lispref/internals.texi (Module Values): Update documentation for
'make_integer' and 'extract_integer' for bignum support.

5 years ago; * src/lisp.h (integer_to_intmax): Fix typo.
Philipp Stephani [Thu, 18 Apr 2019 21:29:20 +0000 (23:29 +0200)]
; * src/lisp.h (integer_to_intmax): Fix typo.

5 years ago* lib-src/make-fingerprint.c (main): Properly initialize 'prog'
Philipp Stephani [Thu, 18 Apr 2019 21:19:05 +0000 (23:19 +0200)]
* lib-src/make-fingerprint.c (main): Properly initialize 'prog'

5 years ago* src/emacs-module.c: Add instructions how to change the module API
Philipp Stephani [Thu, 18 Apr 2019 21:18:06 +0000 (23:18 +0200)]
* src/emacs-module.c: Add instructions how to change the module API

5 years agoFix make-fingerprint off-by-one bug
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.

5 years ago; Instrument `tramp--test-shell-command-to-string-asynchronously'
Michael Albinus [Thu, 18 Apr 2019 19:47:21 +0000 (21:47 +0200)]
; Instrument `tramp--test-shell-command-to-string-asynchronously'

5 years agoOnly encode Gnus group names if they come from symbol-name
Eric Abrahamsen [Thu, 18 Apr 2019 16:06:09 +0000 (09:06 -0700)]
Only encode Gnus group names if they come from symbol-name

* lisp/gnus/gnus-start.el (gnus-active-to-gnus-format): Names that
  were strings to begin with should already be properly encoded.

5 years agoFix off-by-one-link error in image--set-property
Basil L. Contovounesios [Wed, 17 Apr 2019 13:24:31 +0000 (14:24 +0100)]
Fix off-by-one-link error in image--set-property

* 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.

5 years agoMark _Noreturn error functions as cold
Paul Eggert [Thu, 18 Apr 2019 07:30:24 +0000 (00:30 -0700)]
Mark _Noreturn error functions as cold

On my platform this made ‘make compile-always’ 1.3% faster.
Suggested by Alex Gramiak in:
https://lists.gnu.org/r/emacs-devel/2019-04/msg00684.html
* configure.ac (nw): Don’t use -Wsuggest-attribute=cold.
* lib-src/make-docfile.c (write_globals):
Mark noreturn functions as cold.
* src/callproc.c (exec_failed):
* src/data.c (wrong_length_argument, wrong_type_argument):
* src/emacs-module.c (module_abort):
* src/emacs.c (terminate_due_to_signal):
* src/eval.c (unwind_to_catch):
* src/image.c (my_png_error, my_error_exit):
* src/json.c (json_out_of_memory, json_parse_error):
* src/keyboard.c (quit_throw_to_read_char, user_error):
* src/lisp.h (die, wrong_type_argument, wrong_choice)
(args_out_of_range, args_out_of_range_3, circular_list)
(buffer_overflow, memory_full, buffer_memory_full)
(string_overflow, xsignal, xsignal0, xsignal1, xsignal2)
(xsignal3, signal_error, overflow_error, error, verror)
(nsberror, report_file_errno, report_file_error)
(report_file_notify_error, terminate_due_to_signal)
(emacs_abort, fatal):
* src/lread.c (load_error_old_style_backquotes)
(end_of_file_error, invalid_syntax):
* src/pdumper.c (error_unsupported_dump_object):
* src/puresize.h (pure_write_error):
* src/search.c (matcher_overflow):
* src/sound.c (sound_perror, alsa_sound_perror):
* src/sysdep.c (handle_arith_signal):
* src/systime.h (time_overflow):
* src/term.c (maybe_fatal, vfatal):
* src/textprop.c (text_read_only):
* src/timefns.c (invalid_time_zone_specification)
(time_error, invalid_hz):
* src/xterm.c (x_connection_closed):
Use AVOID instead of _Noreturn void, so that it’s marked cold.
* src/conf_post.h (__has_attribute_cold) [!__has_attribute]:
New macro.
(ATTRIBUTE_COLD): New macro.
* src/frame.h (WINDOW_SYSTEM_RETURN): Add ATTRIBUTE_COLD.
* src/lisp.h (AVOID): New macro.
* src/xterm.c: Omit unnecessary static decls, so that we needn’t
worry about which functions should be marked cold.
(x_io_error_quitter): Mark as cold.

5 years ago* src/ftcrfont.c (ftcrfont_glyph_extents): Fix last change.
YAMAMOTO Mitsuharu [Thu, 18 Apr 2019 02:30:17 +0000 (11:30 +0900)]
* src/ftcrfont.c (ftcrfont_glyph_extents): Fix last change.

5 years agoAdd ERT explainer for 'tramp--test-file-attributes-equal-p'
Philipp Stephani [Wed, 17 Apr 2019 19:27:15 +0000 (21:27 +0200)]
Add ERT explainer for 'tramp--test-file-attributes-equal-p'

* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Use ERT explainer for 'equal' to improve failure messages.

5 years agoFix tramp-test32-shell-command
Michael Albinus [Wed, 17 Apr 2019 19:23:41 +0000 (21:23 +0200)]
Fix tramp-test32-shell-command

* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Run only if "tput" exist.

5 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 17 Apr 2019 16:32:40 +0000 (09:32 -0700)]
Merge from origin/emacs-26

a1c53d4 (origin/emacs-26) * admin/admin.el (make-manuals-dist--1): Up...
d0f745f Document some compilation-mode faces
23ccba0 Mention the assignment form in "Copyright Assignment"
0f5568e Fix confusing wording in the user manual
70ec392 Fix the MSDOS build when running under CWSDPMI
7a608fc * lisp/progmodes/python.el: Be more careful about temp file r...

5 years ago; Merge from origin/emacs-26
Glenn Morris [Wed, 17 Apr 2019 16:32:40 +0000 (09:32 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

b3cab41 Backport: Plug memory leak in GTK x-display-monitor-attribute...
e40f39b Backport: * lisp/frame.el (frame--size-history): Fix infloop....

5 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 17 Apr 2019 16:32:39 +0000 (09:32 -0700)]
Merge from origin/emacs-26

266c622 Downcase charset
92f3459 Update for Emacs-26
beb4eac * doc/lispref/display.texi (Showing Images): Fix a typo.  (Bu...