* 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.
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.
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...
Use cairo_scaled_font_t object for text drawing and metrics calculation
* src/ftfont.h (struct font_info): Replace member cr_font_face of type
cairo_font_face_t * with cr_scaled_font of type cairo_scaled_font_t *.
* src/ftcrfont.c: Include math.h for floor, ceiling, and lround.
(ftcrfont_glyph_extents): Use cairo_scaled_font_glyph_extents.
(ftcrfont_open): Create cairo_scaled_font_t object and set it to
cr_scaled_font member of struct font_info.
(ftcrfont_close): Use cairo_scaled_font_destroy.
(ftcrfont_draw): Use cairo_set_scaled_font.
Make python-shell-prompt-block-regexp match IPython prompt
* lisp/progmodes/python.el (python-shell-prompt-block-regexp): Match
also IPython's multiline prompt. It allows to correctly disable
non-native completions during multiline statement in
inferior-python-mode that runs IPython interpreter (Bug#34582).
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>.
Eli Zaretskii [Mon, 15 Apr 2019 15:05:52 +0000 (18:05 +0300)]
Fix the MSDOS build when running under CWSDPMI
* src/msdos.c (the_only_tty_output): Define.
* src/msdos.h (the_only_tty_output): Declare.
* src/frame.c (make_terminal_frame) [MSDOS]:
* src/dispnew.c (init_display) [MSDOS]: Set up
f->output_data.tty pointer using the_only_tty_output, before
dereferencing the pointer. This prevents crashes with DPMI
servers that provide NULL pointer protection.
Eli Zaretskii [Mon, 15 Apr 2019 14:17:01 +0000 (17:17 +0300)]
Fix MS-Windows build broken by make-fingerprint changes
* lib-src/make-fingerprint.c (fseeko) [WNDOWSNT]: Define to
fseeko64 for non-MinGW64 MinGW.
* lib-src/ntlib.c (stat): Fix calculation of file size.
(fstat): New function, a subset of src/w32.c:fstat. This is
needed because make-fingerprint.c now calls 'fstat', and the
MS version will fail to produce reliable results because
nt/inc/sys/stat.h redefines 'struct stat'.
Don't remove notify descriptor that is already gone
* lisp/autorevert.el (auto-revert-use-notify, auto-revert-mode,
global-auto-revert-mode, auto-revert-notify-rm-watch,
auto-revert-notify-add-watch, auto-revert-notify-handler,
auto-revert-notify-rm-watch-callback):
Don't remove a notify descriptor after receiving a `stopped' notification
event, because the descriptor is then already gone and any attempt to
remove it causes a recursive call to `auto-revert-notify-handler'.
Let debugger handle process spawn errors on w32 (Bug#33016)
Since child_setup() is called between block_input()...unblock_input(),
when an error is signaled the Lisp debugger is prevented from
starting. Therefore, let the callers signal the error instead (which
they already do for non-w32 platforms, just the error message needs an
update).
* src/callproc.c (child_setup) [WINDOWSNT]: Don't call
report_file_error here.
(call_process) [WINDOWNT]:
* src/process.c (create_process) [WINDOWSNT]: Call report_file_errno
here instead, after the unblock_input() call, same as for !WINDOWSNT.
* src/lisp.h (CHILD_SETUP_ERROR_DESC): New preprocessor define. Flip
the containing ifndef DOS_NT branches so that it's ifdef DOS_NT.
* src/eval.c (when_entered_debugger): Remove.
(syms_of_eval) <internal-when-entered-debugger>: Define it as a Lisp
integer variable instead.
(maybe_call_debugger): Update comment.
* test/src/process-tests.el (make-process-w32-debug-spawn-error):
* test/src/callproc-tests.el (call-process-w32-debug-spawn-error): New
tests.
* configure.ac: Bump required GTK 2 and GTK 3 versions and the
associated GLib versions. Remove obsolete AC_CHECK_FUNCS calls. These
check for functions available in later GTK 2 versions. These checks
and can safely be removed with the exception of
gtk_window_set_has_resize_grip, which according to a comment in
gtkutil.c causes an issue in Ubuntu's GTK 2.
* src/gtkutil.c:
* src/xfns.c:
* src/xterm.c:
* src/xterm.h: Remove now unused conditional blocks. Use HAVE_GTK3
instead of GTK_CHECK_VERSION where now applicable. Remove checks of
now always true USE_GTK_TOOLTIP.
Paul Eggert [Sun, 14 Apr 2019 23:31:24 +0000 (16:31 -0700)]
Replace executable’s fingerprint in place
* admin/merge-gnulib (GNULIB_MODULES): Add memmem-simple.
(AVOIDED_MODULES): Add memchr.
* configure.ac (HAVE_PDUMPER): AC_SUBST it, too, for use in makefiles.
* lib/Makefile.in (libgnu_a_OBJECTS): Add fingerprint.o.
* lib/fingerprint.c: New file.
* lib/memmem.c, lib/str-two-way.h, m4/memmem.m4: New files,
copied from Gnulib.
* lib/fingerprint.h: Rename from src/fingerprint.h.
* lib-src/make-fingerprint.c: Include limits.h, sys/stat.h,
fingerprint.h, intprops.h, min-max.h.
(SSIZE_MAX): New macro, if not already defined.
(main): Without -r, Replace the fingerprint in the input file
instead of generating a fingerprint.c.
* lib/Makefile.in (libgnu_a_OBJECTS): Add fingerprint.o.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in (HAVE_PDUMPER, MAKE_PDUMPER_FINGERPRINT):
New macros.
(temacs$(EXEEXT)): Use them to replace the fingerprint instead
of precalculating it.
(mostlyclean, ctagsfiles1): Do not worry about fingerprint.c.
Paul Eggert [Sun, 14 Apr 2019 04:13:16 +0000 (21:13 -0700)]
Update from Gnulib
This incorporates:
2019-04-07 Add copyright notices in several files
* build-aux/config.sub, doc/misc/texinfo.tex, lib/_Noreturn.h:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
This fixes oversights from
2018-04-26T16:26:27-07:00!eric@ericabrahamsen.net and
2016-02-13T18:45:11+11:00!larsi@gnus.org.
* lisp/gnus/gnus-group.el (gnus-group-describe-all-groups): Insert
group name and description instead of group name twice. Do not pass
a hash-table to intern. Call sort with correct number of arguments.
Alan Mackenzie [Sat, 13 Apr 2019 13:29:58 +0000 (13:29 +0000)]
Implement "final" before C++ class inheritance lists.
* lisp/progmodes/cc-langs.el (c-class-id-suffix-ws-ids-kwds)
(c-class-id-suffix-ws-ids-key): New lang const/var.
* lisp/progmodes/cc-engine.el (c-guess-basic-syntax CASE 5D.4): Check for and
skip over any matches for c-class-id-suffix-ws-ids-key (i.e. "final") before
":".
Eli Zaretskii [Sat, 13 Apr 2019 08:01:39 +0000 (11:01 +0300)]
Minor cleanup in 'x_set_frame_alpha'
* src/xterm.c (x_set_frame_alpha): Remove redundant parts of
testing of value of 'alpha'. Suggested by Konstantin
Kharlamov <Hi-Angel@yandex.ru>. (Bug#35062)
Eli Zaretskii [Sat, 13 Apr 2019 07:07:15 +0000 (10:07 +0300)]
Improve documentation changes of a recent commit
* doc/lispref/text.texi (Parsing JSON): Improve wording of the
documentation of 'json-parse-string' and 'json-parse-buffer'.
* src/json.c (Fjson_parse_string, Fjson_parse_buffer): Doc fix.
(Bug#34763)