1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-08 15:35:02 +00:00
Commit Graph

142034 Commits

Author SHA1 Message Date
Sungbin Jo
c25321e447 Add utility functions and new xwidget commands
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.
2020-08-12 12:39:50 +02:00
Sungbin Jo
9e1af8251f Add utility functions and new xwidget commands
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.
2020-08-12 12:34:39 +02:00
Glenn Morris
433d818497 Tweak recent solar.el change
* lisp/calendar/solar.el (sunrise-sunset, solar-equinoxes-solstices):
Use +0000 for "numeric" UTC, not +0100.
2020-08-12 11:30:16 +01:00
Glenn Morris
dca8b4ac58 Rename recent calendar user option
* lisp/calendar/calendar.el (calendar-time-zone-style):
Rename from calendar-use-numeric-time-zones.
* lisp/calendar/cal-dst.el (calendar-standard-time-zone-name)
(calendar-daylight-time-zone-name):
* lisp/calendar/solar.el (sunrise-sunset, solar-equinoxes-solstices):
Use new variable name.
* doc/emacs/calendar.texi (Sunrise/Sunset): Update.
; * etc/NEWS: Update.
2020-08-12 11:30:16 +01:00
Sungbin Jo
d089c4fbfc Add xwidget support for macOS
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.
2020-08-12 12:12:34 +02:00
Stefan Kangas
38d70f79a6 Remove comment on Burma / Myanmar (Bug#42788)
* lisp/language/burmese.el: Remove comment on Burma / Myanmar.
2020-08-12 04:56:12 +02:00
Stefan Kangas
f75f7db952 Avoid ambiguity about what st refers to
* lisp/term/st.el: Add link to website.
2020-08-12 04:56:12 +02:00
Paul Eggert
4491a55ac3 Don’t warn about integer conversion in pdumper.c
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’.
2020-08-11 18:36:37 -07:00
Lars Ingebrigtsen
db3a7dfccc Remove compat code from autoload.el
* 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.
2020-08-11 21:21:13 +02:00
Lars Ingebrigtsen
4d00db5538 Remove compat code from comint.el
* lisp/comint.el (make-comint-in-buffer): `start-file-process' is
always defined, so remove test.
2020-08-11 21:04:12 +02:00
Lars Ingebrigtsen
97c4d941da Remove compat code from esh-proc.el
* 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.
2020-08-11 21:04:12 +02:00
Lars Ingebrigtsen
958fa07879 Remove compat code from allout.el
* lisp/allout.el: (allout-process-exposed): Make
allout-region-active-p an obsolete alias, and adjust callers.
2020-08-11 21:04:12 +02:00
Lars Ingebrigtsen
7bbfdcec64 Remove compat code in prolog.el
* lisp/progmodes/prolog.el (use-region-p): Remove compat code.
2020-08-11 21:04:12 +02:00
Lars Ingebrigtsen
72c53fc3e1 Slight allout.el clean-up
* lisp/allout.el (allout-end-of-line, allout-mark-active-p): Make
allout-mark-active-p obsolete, and adjust callers.
2020-08-11 21:04:12 +02:00
Lars Ingebrigtsen
a19e9ab834 Minor idlwave clean up
* lisp/progmodes/idlw-shell.el (idlwave-shell-mouse-examine)
(idlwave-shell-print): Adjust callers.

* lisp/progmodes/idlwave.el (idlwave-region-active-p): Make into
obsolete alias.
2020-08-11 21:04:12 +02:00
Lars Ingebrigtsen
86a326d2d8 Slight gnus-util clean-up
* lisp/gnus/gnus-util.el (gnus-message-with-timestamp-1):
messages-buffer is always defined.
2020-08-11 21:04:12 +02:00
Lars Ingebrigtsen
672bfdb9c9 Slight cleanup in calc-yank
* lisp/calc/calc-yank.el (calc-yank): Remove compat code.
2020-08-11 21:04:12 +02:00
Philipp Stephani
ccb5556b44 Unbreak build with --enable-checking=all
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’.
2020-08-11 20:22:32 +02:00
Paul Eggert
39c16c1170 Use Gnulib inttypes module
Needed for platforms like MinGW that don’t support C99 PRIdPTR.
* admin/merge-gnulib (GNULIB_MODULES): Add inttypes.
* m4/gnulib-comp.m4: Regenerate.
2020-08-11 11:07:28 -07:00
Paul Eggert
124a7951f4 Update from Gnulib
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.
2020-08-11 11:07:28 -07:00
Paul Eggert
669aeafbd1 Prefer make_nil_vector to make-vector with nil
* 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.
2020-08-11 10:30:05 -07:00
Eli Zaretskii
b5b7f6eb88 Fix MinGW build broken by recent pdumper changes.
* 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.
2020-08-11 19:59:17 +03:00
Bastian Beischer
e0fa8fef6f Make mouse-2 respect select-enable-primary etc
* 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
2020-08-11 18:45:01 +02:00
Robert Weiner
4d4d3e42ca Allow count-lines to ignore invisible lines
* doc/lispref/positions.texi (Text Lines): Document it (bug#23675).

* lisp/simple.el (count-lines): Add an optional parameter to
ignore invisible lines (bug#23675).
2020-08-11 16:52:11 +02:00
Michael Albinus
119a9ecfe1 * lisp/net/tramp.el: Make last change backward compatible. 2020-08-11 16:46:41 +02:00
Eli Zaretskii
39c90f8dfa Fix face merging at EOL when inherited face specifies :extend
* src/xfaces.c (merge_face_ref): Handle correctly faces that
inherit from another, and in addition specify :extend.
(Bug#42552)
2020-08-11 17:39:35 +03:00
Robert Weiner
05bffa1f0e Add new commands for environment movement in .texi files
* lisp/textmodes/texinfo.el (texinfo-mode-map): New keystrokes for
environment movement commands (bug#23985).
2020-08-11 16:37:01 +02:00
Puneeth Chaganti
be0fecf819 Allow specifying the callback in new xwidget sessions
* lisp/xwidget.el (xwidget-webkit-new-session): Optional callback
arg (bug#24019).
(xwidget-event-handler): Respect the 'callback parameter.
2020-08-11 16:23:10 +02:00
Noam Postavsky
9b9473ad75 Fix (end-of-defun N) for N >= 2
* 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).
2020-08-11 16:02:11 +02:00
Tino Calancha
2a47ef86e9 Change the Calc text input method to insert at point
* 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).
2020-08-11 15:40:48 +02:00
Alexander Gramiak
e781907401 Only search for a variable when instructed
* 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.
2020-08-11 15:26:24 +02:00
Kaushal Modi
9b01badf7c Allow Dired to dereference symbolic links when copying
* 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.
2020-08-11 15:16:11 +02:00
Lars Ingebrigtsen
dcfd16cc68 Mark further mml-sec-tests as unstable
* 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).
2020-08-11 13:44:33 +02:00
Lars Ingebrigtsen
1687cda47b Further tweaks to the user manual about shell-command-buffer-name
* 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.
2020-08-11 13:16:07 +02:00
Paul Eggert
25b4168888 pdumper avoid listing hash table contents
* src/pdumper.c (hash_table_contents): Create a vector directly,
instead of creating a list and then converting that to a vector.
2020-08-11 02:27:44 -07:00
Paul Eggert
53132c1639 pdumper speed tweeks for hash tables
* 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.
2020-08-11 02:27:44 -07:00
Paul Eggert
9e4e477536 In pdumper, simplify INT_MAX computation
* src/pdumper.c (dump_read_all): Avoid unnecessary cast.
Also, round down to page size, as sysdep.c does.
Also, don’t assume INT_MAX <= UINT_MAX (!).
2020-08-11 02:27:44 -07:00
Paul Eggert
eeaef1aec6 Don’t needlessly convert to ‘unsigned’ in pdumper
* 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.
2020-08-11 02:27:44 -07:00
Paul Eggert
5bd7b3c7f7 * src/pdumper.c (pdumper_load): XSETVECTOR -> make_lisp_ptr. 2020-08-11 02:27:43 -07:00
Paul Eggert
23c1d5dff9 * src/fns.c (hash_table_rehash): Help the compiler a bit. 2020-08-11 02:27:43 -07:00
Pip Cet
16a16645f5 Rehash hash tables eagerly after loading a dump
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.
2020-08-11 02:27:43 -07:00
Stefan Kangas
0d0aad213f ; * lisp/leim/quail/latin-ltx.el: Fix regexp in last commit. 2020-08-11 08:49:47 +02:00
Stefan Kangas
9c702b5ad6 Fix \epsilon and \varepsilon in TeX input method
* lisp/leim/quail/latin-ltx.el: Add correct \epsilon and \varepsilon
characters to TeX input method.  (Bug#26060)
2020-08-11 01:30:06 +02:00
Lars Ingebrigtsen
dcce2b57bb Fix fontification of outdated TeX form
* 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$
2020-08-10 16:26:34 +02:00
Stefan Kangas
170faae31b Add new command apropos-function (Bug#41021)
* lisp/apropos.el (apropos-function): New command.
* etc/NEWS: Announce it.
2020-08-10 15:33:40 +02:00
Stefan Kangas
4fc066a640 ; Add my last change to NEWS. 2020-08-10 15:27:37 +02:00
Charles A. Roelli
4a6dd13fa4 Change 'M-:' to not error out on incomplete expressions
* 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).
2020-08-10 15:18:19 +02:00
Lars Ingebrigtsen
70825a4d31 Fix problem with /- incorrectly starting a comment in SQL mode
* 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>.
2020-08-10 15:18:19 +02:00
Stefan Kangas
c669afcd1c Add term/st.el (Bug#33182)
This is a copy of term/konsole.el with konsole -> st.
* lisp/term/st.el: New file.
2020-08-10 14:29:57 +02:00
Glenn Morris
aaa7ce585e ; Copyright fix
Author has assignment on file
2020-08-10 12:28:27 +01:00