Co-authored-by: Jaesup Kwak <veshboo@gmail.com>
* lisp/xwidget.el (xwidget-webkit-callback): Add case for
'response-callback' event.
(xwidget-webkit-download-dir): New variable.
(xwidget-webkit-save-as-file): New function.
* src/nsxwidget.m (XwWebView::decidePolicyForNavigationResponse):
Store download event.
* src/xwidget.c src/xwidget.h (store_xwidget_download_callback_event):
New function.
Co-authored-by: Jaesup Kwak <veshboo@gmail.com>
* etc/NEWS: Announce new functions and options.
* lisp/xwidget.el (xwidget): New defgroup.
(xwidget-webkit-mode-map): Add new keybindings.
(xwidget-webkit-scroll-up, xwidget-webkit-scroll-down)
(xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward):
Add optional argument to specify specific amounts to scroll down.
(xwidget-webkit-scroll-up-line, xwidget-webkit-scroll-down-line): New
functions.
(xwidget-webkit-scroll-bottom): Fix function to scroll to the bottom
of the document.
(xwidget-webkit-callback): Use new function to update buffer title
even when Javascript is disabled.
(xwidget-webkit-bookmark-jump-new-session): New variable.
(xwidget-webkit-bookmark-make-record): Modify to use xwidget-webkit to
open bookmark that is created in xwidget-webkit.
(xwidget-webkit-insert-string): Fix Javascript snippet to not throw
Javsscript exceptions.
(xwidget-webkit-inside-pixel-width)
(xwidget-window-inside-pixel-height): New functions.
(xwidget-webkit-adjust-size-to-window): Use new functions.
(xwidget-webkit-new-session): Insert invisible URL instead of an empty
string to achieve better default behavior.
(xwidget-webkit-back, xwidget-webkit-forward, xwidget-webkit-reload)
(xwidget-webkit-current-url): Use new functions to enable scrolling
even when Javascript is disabled.
(xwidget-webkit-copy-selection-as-kill): Remove unnecessary lambda.
* src/nsxwidget.h src/nsxwidget.m (nsxwidget_webkit_uri)
(nsxwidget_webkit_title, nsxwidget_webkit_goto_history): Add new
functions.
* src/xwidget.c (Fxwidget_webkit_uri, Fxwidget_webkit_title)
(Fxwidget_webkit_goto_history): Add new functions.
(syms_of_xwidget): Define new functions.
Co-authored-by: Jaesup Kwak <veshboo@gmail.com>
* configure.ac: Allow '--with-xwidgets' for "${NS_IMPL_COCOA}".
* etc/NEWS: Mention new feature.
* etc/TODO: Remove done TODO to implement xwidget in NeXTstep port.
* lisp/xwidget.el (xwidget-webkit-clone-and-split-below)
(xwidget-webkit-clone-and-split-right): New procedures.
(xwidget-webkit-callback): Remove call to
'xwidget-webkit-adjust-size-to-window' as adjusting xwidget size is
handled in 'x_draw_xwidget_glyph_string'.
(xwidget-webkit-enable-plugins): New variable.
* nextstep/templates/Info.plist.in: Add 'NSAppTransportSecurity'.
* src/Makefile.in: Add nsxwidget.o for compilation.
* src/emacs.c (main): Move conditional call to 'syms_of_xwidget'.
* src/nsterm.m (ns_draw_glyph_string): Add case for 'XWIDGET_GLYPH'.
(note_mouse_movement mouseMoved): Make it easy to resize window by
dragging mode-line or vertical separator adjacent to large glyph.
* src/nsxwidget.h src/nsxwidget.m: Newly added files, xwidget webkit
backend for macOS Cocoa.
* src/xwidget.c (Fmake_xwidget, xwidget_init_view)
(x_draw_xwidget_glyph_string, xwidget_is_web_view)
(Fxwidget_webkit_goto_uri, Fxwidget_webkit_zoom, Fxwidget_resize)
(Fxwidget_size_request, Fdelete_xwidget_view, xwidget_end_redisplay)
(kill_buffer_xwidgets): Add macOS Cocoa specific functions and code
with 'NS_IMPL_COCOA' and guard GTK specific functions and code with
'USE_GTK'.
(x_draw_xwidget_glyph_string): Handle adjusting xwidget size.
* src/xwidget.h (xwidget, xwidget_view): Add macOS Cocoa specific
fields with 'NS_IMPL_COCOA' and guard GTK specific fields with
USE_GTK.
Problem reported by Juanma Barranquero in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00279.html
and a similar glitch was reported by Eli Zaretskii (Bug#36597#67).
* src/pdumper.c: Remove -Wconversion pragma.
(ALLOW_IMPLICIT_CONVERSION, DISALLOW_IMPLICIT_CONVERSION):
Remove. All uses removed. Although -Wconversion may have
been helpful when writing pdumper.c it is now causing more
trouble than it’s worth here (just as in the rest of Emacs).
(dump_read_all): Avoid no-longer-necessary use of ‘size_t’
rather than ‘int’.
* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload):
register-definition-prefixes is in subr.el, so it shouldn't be
necessary to check whether it's defined.
* lisp/eshell/esh-proc.el (eshell-gather-process-output):
`start-file-process' is always defined, so remove the code that
deals with Emacs versions that doesn't have it.
Commit 16a16645f5 has only changed a
comment in ‘struct Lisp_Hash_Table’, so the portable dumper doesn’t
need to be adapted.
* src/pdumper.c (dump_hash_table): Update hash code for ‘struct
Lisp_Hash_Table’.
This incorporates:
2020-08-11 Use expression statements also on clang
2020-08-10 Use many __attribute__s with clang
2020-08-09 Use attribute __aligned__ with clang
2020-08-09 Use __alignof__ with clang
2020-08-09 ignore-value: Simplify on clang
2020-08-09 Use __typeof__ with clang
2020-08-09 intprops: Fix typo in comment
2020-08-09 Silence warnings from clang 10 with -Wimplicit-fallthrough
2020-08-09 count-one-bits: Use __builtin_popcount{,l,ll} on clang
2020-08-09 string: Fix build error in C++ mode with clang
2020-08-09 Add ability to emit user-defined diagnostics with clang
2020-08-07 alloca: No need to compile alloca.c with clang
2020-08-06 Use __builtin_assume with clang
* lib/alloca.in.h, lib/arg-nonnull.h, lib/c++defs.h, lib/cdefs.h:
* lib/count-one-bits.h, lib/dirent.in.h, lib/ignore-value.h:
* lib/intprops.h, lib/malloca.h, lib/regex_internal.h:
* lib/stdalign.in.h, lib/stddef.in.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/string.in.h, lib/verify.h, lib/warn-on-use.h:
* m4/gnulib-common.m4, m4/stddef_h.m4, m4/stdint.m4:
Copy from Gnulib.
* src/pdumper.c (hash_table_thaw): Pacify -Wconversion so
we can use make_nil_vector again.
* src/timefns.c (syms_of_timefns): Prefer make_nil_vector
to make_vector with Qnil.
* src/pdumper.c (hash_table_thaw): Use Fmake_vector. Suggested by
Pip Cet <pipcet@gmail.com>.
(dump_trace): Declare ATTRIBUTE_FORMAT_PRINTF, not
ATTRIBUTE_FORMAT((__printf__), so that we pick the right attribute
for MinGW.
* lisp/calc/calc-yank.el (calc-yank-internal): Factor out into its
own function (bug#23629).
(calc-yank): Factored out from here.
(calc-yank-mouse-primary): New command to
Copyright-paperwork-exempt: yes
* lisp/emacs-lisp/lisp.el (end-of-defun): Only skip to next line when
after end of defun when ARG is 1 or less.
* test/lisp/emacs-lisp/lisp-tests.el (end-of-defun-twice): New
test (bug#24427).
* lisp/calc/calc.el (calcDigit-delchar): New command to delete chars
forward in the calc minibuffer.
(calc-digit-map): Bind calcDigit-delchar to '\C-d'.
(calcDigit-key): Do not go to (point-max) in calc minibuffer
before insert a digit (Bug#24612).
* lisp/help-fns.el (find-lisp-object-file-name): Check for 'defvar
argument before searching for an internal variable (Bug#24697).
* test/lisp/help-fns-tests.el: New tests.
* doc/emacs/dired.texi (Operating on Files): Mention the new
defcustom (bug#25075).
* lisp/dired-aux.el (dired-do-copy): Invert the value of
`dired-copy-dereference' in lexical scope when prefix argument is
'(4). Update function documentation for the new defcustom.
* lisp/dired-aux.el (dired-copy-file): Use `dired-copy-dereference' as
the `dereference' argument to `dired-copy-file-recursive'.
* lisp/dired-aux.el (dired-copy-file-recursive): Add new optional
argument `dereference'.
* lisp/dired.el (dired-copy-dereference): New defcustom, defaults to
nil.
* test/lisp/gnus/mml-sec-tests.el (mml-secure-en-decrypt-sign-3):
(mml-secure-en-decrypt-sign-1-3-double): These tests are unstable
on Ubuntu (bug#42803).
* doc/emacs/misc.texi (Single Shell): Reintroduce the actual
buffer names in the user manual (bug#39138), but keep the
references to the variables. It's easier for people reading the
user manual to deal with actual names.
* src/pdumper.c (dump_queue_empty_p): Avoid unnecessary call
to Fhash_table_count on a known hash table.
(dump_hash_table_list): !NILP, not CONSP.
(hash_table_freeze, hash_table_thaw): ASIZE, not Flength, on vectors.
Initialize in same order as struct.
(hash_table_thaw): make_nil_vector, not Fmake_vector with nil.
* src/pdumper.c (PRIdDUMP_OFF): New macro.
(EMACS_INT_XDIGITS): New constant.
(struct dump_context): Use dump_off for relocation counts.
All uses changed.
(dump_queue_enqueue, dump_queue_dequeue, Fdump_emacs_portable):
Don’t assume counts fit in ‘unsigned’ or ‘unsigned long’.
Use EMACS_INT_XDIGITS instead of assuming it’s 16.
This simplifies code, and helps performance in some cases (Bug#36597).
* src/lisp.h (hash_rehash_needed_p): Remove. All uses removed.
(hash_rehash_if_needed): Remove. All uses removed.
(struct Lisp_Hash_Table): Remove comment about rehashing hash tables.
* src/pdumper.c (thaw_hash_tables): New function.
(hash_table_thaw): New function.
(hash_table_freeze): New function.
(dump_hash_table): Simplify.
(dump_hash_table_list): New function.
(hash_table_contents): New function.
(Fdump_emacs_portable): Handle hash tables by eager rehashing.
(pdumper_load): Restore hash tables.
(init_pdumper_once): New function.
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): End the
expression before the terminating $ in constructions like $\it
identifiername$
(bug#28277). This avoids italicising the final $ character.
This fixes the final $ of the final test case here:
$foo$
\textit{foo}
{\it foo}
$\mathit{identifiername}$
$\textit{identifiername}$
${\it identifiername}$
$\it identifiername$
* lisp/simple.el (read--expression-try-read): New function to read
a Lisp expression from the minibuffer (bug#30697). This will not
(as before) signal an error on incomplete expressions, but allow
users to continue editing it.
(read--expression): Use it (and add a doc string).
* lisp/progmodes/sql.el (sql-mode): Move all the syntax setup
stuff here (bug#35646). Add handling of -* and /- from Kristian
Hole <kristian@hole.priv.no>.