summaryrefslogtreecommitdiff
path: root/lisp/xwidget.el
Commit message (Collapse)AuthorAgeFilesLines
...
* Make xwidget-webkit-enable-plugins a defcustomLars Ingebrigtsen2021-08-231-2/+4
| | | | | * lisp/xwidget.el (xwidget-webkit-enable-plugins): Make into defcustom.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Prefer setq-local in most filesStefan Kangas2020-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/apropos.el (apropos-print): * lisp/buff-menu.el (Buffer-menu-mode): * lisp/calc/calc.el (calc-trail-buffer): * lisp/chistory.el (command-history-mode): * lisp/dabbrev.el: * lisp/dframe.el (dframe-frame-mode): * lisp/doc-view.el (doc-view-presentation-mode): * lisp/ebuff-menu.el (electric-buffer-menu-mode) (electric-buffer-update-highlight): * lisp/edmacro.el (edit-kbd-macro): * lisp/face-remap.el (buffer-face-set, buffer-face-toggle): * lisp/files.el: (find-file-noselect-1, hack-local-variables-confirm) (set-visited-file-name, revert-buffer--default): * lisp/filesets.el (filesets-spawn-external-viewer): * lisp/find-dired.el (find-dired): * lisp/find-lisp.el (find-lisp-find-dired-internal): * lisp/finder.el (finder-mode): * lisp/font-core.el (font-lock-default-function): * lisp/format.el (format-annotate-function): * lisp/help-fns.el (describe-variable): * lisp/help-mode.el (help-mode): * lisp/icomplete.el (icomplete-minibuffer-setup) (icomplete--in-region-setup): * lisp/ido.el (ido-completion-help, ido-tidy): * lisp/international/robin.el (robin-activate): * lisp/leim/quail/hangul.el (hangul-input-method-activate): * lisp/leim/quail/uni-input.el (ucs-input-activate): * lisp/man.el (Man-mode): * lisp/master.el (master-set-slave): * lisp/minibuffer.el (minibuffer-completion-help) (read-file-name-default): * lisp/outline.el (outline-minor-mode): * lisp/pcomplete.el (pcomplete-comint-setup): * lisp/proced.el (proced-mode): * lisp/recentf.el (recentf-edit-list, recentf-open-files-items): * lisp/replace.el (occur-1): * lisp/reveal.el (reveal-mode): * lisp/ruler-mode.el (ruler--save-header-line-format): * lisp/scroll-lock.el (scroll-lock-mode): * lisp/startup.el (normal-top-level, normal-splash-screen): * lisp/strokes.el (strokes-list-strokes): * lisp/thumbs.el (thumbs-insert-image, thumbs-show-thumbs-list): * lisp/tree-widget.el (tree-widget-set-theme): * lisp/window.el (read-buffer-to-switch): * lisp/xwidget.el (xwidget-webkit-begin-edit-textarea): Prefer setq-local.
* ; Fix typosStefan Kangas2020-09-211-2/+2
|
* ; Minor fix for nsxwidget patchMasahiro Nakamura2020-09-161-2/+2
| | | | | | | | * lisp/xwdget.el (xwidget-webkit-download-dir) (xwidget-webkit-save-as-file): Set version to 28.1 because the patch was introduced in Emacs 28.0.50. * src/nsxwidget.m: Fix typo.
* Revert "Use format-prompt in read-file-name calls that have a default"Lars Ingebrigtsen2020-09-131-9/+8
| | | | | | | | This reverts commit de4f347901adffd07bc9bff028dc073fb3c6df33. read-file-name already displays a long path when given a default (like INITIAL in many other prompting functions), so using format-prompt here is superfluous.
* Use format-prompt in read-file-name calls that have a defaultLars Ingebrigtsen2020-09-071-8/+9
| | | | | | | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-save-as-file): * lisp/vc/vc.el (vc-backend-for-registration, vc-delete-file) (vc-rename-file): * lisp/vc/ediff-ptch.el (ediff-prompt-for-patch-file): * lisp/vc/diff-mode.el (diff-tell-file-name): * lisp/progmodes/etags.el (visit-tags-table) (visit-tags-table-buffer): * lisp/misearch.el (multi-isearch-read-files): * lisp/mail/rmailmm.el (rmail-mime-save): * lisp/help-fns.el (doc-file-to-man, doc-file-to-info): * lisp/gnus/gnus-bookmark.el (gnus-bookmark-load): * lisp/files.el (write-file, basic-save-buffer): * lisp/dired.el (dired-read-dir-and-switches): * lisp/bookmark.el (bookmark-save, bookmark-load): * lisp/abbrev.el (write-abbrev-file, abbrev-edit-save-to-file): Use format-prompt in read-file-name calls that have a default.
* Add utility functions and new xwidget commandsSungbin Jo2020-08-121-0/+32
| | | | | | | | | | | | | 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.
* Add utility functions and new xwidget commandsSungbin Jo2020-08-121-69/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add xwidget support for macOSSungbin Jo2020-08-121-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Allow specifying the callback in new xwidget sessionsPuneeth Chaganti2020-08-111-8/+5
| | | | | | * lisp/xwidget.el (xwidget-webkit-new-session): Optional callback arg (bug#24019). (xwidget-event-handler): Respect the 'callback parameter.
* Make xwidget-webkit-browse-url slightly more DWIMLars Ingebrigtsen2020-07-201-0/+3
| | | | | * lisp/xwidget.el (xwidget-webkit-browse-url): Prepend "https" to URLs that don't have a protocol (bug#31369).
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.
* | xwidget: Map "previous-line" and "next-line" to scrollRicardo Wurmus2016-10-251-2/+2
| | | | | | | | | | * lisp/xwidget.el: Map "previous-line" and "next-line" to scrolling procedures.
* | xwidget: Bind "beginning-of-buffer" and "end-of-buffer"Ricardo Wurmus2016-10-251-2/+15
| | | | | | | | | | | | | | | | * lisp/xwidget.el: Rebind "beginning-of-buffer" and "end-of-buffer" to "xwidget-webkit-scroll-top" and "xwidget-webkit-scroll-bottom", respectively. (xwidget-webkit-scroll-top, xwidget-webkit-scroll-bottom): New procedures.
* | Implement zoom for WebKit widget.Ricardo Wurmus2016-10-251-0/+13
| | | | | | | | | | | | | | * src/xwidget.c (xwidget-webkit-zoom): New procedure. * lisp/xwidget.el: Bind "+" and "-" to zoom in and out, respectively. (xwidget-webkit-zoom): Declare procedure. (xwidget-webkit-zoom-in, xwidget-webkit-zoom-out): New procedures.
* | Dynamically resize WebKit widget.Ricardo Wurmus2016-10-251-8/+25
| | | | | | | | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-auto-adjust-size, xwidget-webkit-adjust-size-in-frame): New procedures. (xwidget-webkit-new-session): Remove hint to resize widget with `a'. (xwidget-webkit-adjust-size-dispatch): Resize current webkit widget. (xwidget-webkit-adjust-size-to-window): Make non-interactive, add widget and window as arguments. (xwidget-webkit-callback): Use xwidget-webkit-adjust-size-to-window.
* | Let initial WebKit view fill windowRicardo Wurmus2016-10-251-1/+3
| | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-new-session): Change default size of WebKit widget to window size.
* | xwidget: Remove title hack.Ricardo Wurmus2016-10-251-24/+0
| | | | | | | | | | | | * src/xwidget.c (xwidget-webkit-get-title): Remove procedure. * lisp/xwidget.el (xwidget-webkit-get-title, xwidget-webkit-execute-script-rv): Remove procedures.
* | xwidget: Get URL asynchronously.Ricardo Wurmus2016-10-251-5/+5
| | | | | | | | * lisp/xwidget.el (xwidget-webkit-current-url): Kill URL in callback.
* | xwidget: Get selection with asynchronous JavaScriptRicardo Wurmus2016-10-251-5/+7
| | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-get-selection): Add PROC argument to process selection. (xwidget-webkit-copy-selection-as-kill): Kill selection in callback.
* | xwidget: Add function to find element by CSS selectorRicardo Wurmus2016-10-251-0/+17
| | | | | | | | * lisp/xwidget.el (xwidget-webkit-show-element): New procedure.
* | xwidget: Simplify functions to scroll to elementsRicardo Wurmus2016-10-251-44/+35
| | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-show-named-element, xwidget-webkit-show-id-element, xwidget-webkit-show-id-or-named-element): Simplify functions by scrolling exclusively with JavaScript.
* | xwidget: Get title via asynchronous JavaScript.Ricardo Wurmus2016-10-251-7/+8
| | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-callback): Get document title asynchronously.
* | xwidget: Do not use `xwidget-execute-script-rv' to insert stringRicardo Wurmus2016-10-251-24/+23
| | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-insert-string): Obtain JavaScript return value via callback instead of using `xwidget-webkit-execute-script-rv'.
* | Remove scrolled window container around WebKit widgetRicardo Wurmus2016-10-251-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The WebKit widget can scroll on its own and does not need to wrapped with a scrolled window container. * src/xwidget.h: Remove struct member widgetscrolledwindow_osr. * src/xwidget.c: Remove widgetscrolledwindow_osr. (xwidget-set-adjustment): Remove. (xwidget-resize): Resize Webkit widget last. * lisp/xwidget.el (xwidget-set-adjustment): Remove. (xwidget-webkit-scroll-up, xwidget-webkit-scroll-down, xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward): Implement scrolling via JavaScript.
* | xwidget: Pass JavaScript return value to optional callback procedureRicardo Wurmus2016-10-251-14/+19
| | | | | | | | | | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-execute-script): Accept optional callback argument. (xwidget-webkit-callback): Handle "javascript-callback" event type. * src/xwidget.c (xwidget-webkit-execute-script): Accept optional argument FUN, a Lisp procedure to execute on the JavaScript return value. (store_xwidget_js_callback_event, webkit_javascript_finished_cb, webkit_js_to_lisp): New procedures.
* | xwidget: Use WebKit2 APIRicardo Wurmus2016-10-251-3/+2
|/ | | | | | | * configure.ac: Check for webkit2gtk-4.0. * src/xwidget.c: Adjust to use WebKit2 API. * lisp/xwidget.el (xwidget-webkit-callback): Adjust matches for `xwidget-event-type'.
* Remove buggy non-native image scrollingPaul Eggert2016-05-131-34/+9
| | | | | | | This never worked, and could cause infinite recursion. Problem reported by Glenn Morris (Bug#22465). * lisp/xwidget.el (xwidget-webkit-scroll-behavior): Remove. All uses removed.
* Remove unused arguments from make-xwidgetJoakim Verona2016-04-021-4/+3
| | | | | | | | | The arguments BEG and END were unused, and are now removed. * display.texi (Xwidgets): Document the change * xwidget.el (make-xwidget, xwidget-insert) (xwidget-webkit-new-session): Reflect changed arguments * xwidget.c (Fmake_xwidget, syms_of_xwidget): Reflect changed arguments
* Quoting fixes in doc strings and diagnosticsPaul Eggert2016-02-031-4/+4
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-setq, byte-compile-funcall): * lisp/gnus/mml-smime.el (mml-smime-get-dns-cert) (mml-smime-get-ldap-cert): Follow user style preference when quoting diagnostics.
* * lisp/xwidget.el (xwidget-query-on-exit-flag): Declare.Glenn Morris2016-01-271-0/+1
|
* * lisp/xwidget.el (xwidget-webkit-browse-url): Give explicit errorGlenn Morris2016-01-271-0/+2
| | | | if not compiled with xwidgets.
* * lisp/xwidget.el (xwidget-webkit-scroll-behavior):Glenn Morris2016-01-251-10/+10
| | | | Rename using American spelling. Update all uses.
* Yet more xwidget doc fixes.Glenn Morris2016-01-251-50/+49
| | | | | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-scroll-behaviour) (xwidget-insert, xwidget-webkit-browse-url) (xwidget-webkit-scroll-up, xwidget-webkit-scroll-down) (xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward) (xwidget-webkit-insert-string, xwidget-webkit-show-named-element) (xwidget-webkit-show-id-element) (xwidget-webkit-show-id-or-named-element) (xwidget-webkit-adjust-size, xwidget-webkit-current-url) (xwidget-webkit-execute-script-rv) (xwidget-webkit-copy-selection-as-kill, xwidget-get) (xwidget-put): Doc fixes. (xwidget-webkit-insert-string, xwidget-webkit-show-named-element) (xwidget-webkit-show-id-element) (xwidget-webkit-show-id-or-named-element): Prompt fixes.
* Spelling fixesPaul Eggert2016-01-251-1/+1
|
* * lisp/xwidget.el: NitpicksStefan Monnier2016-01-191-65/+58
| | | | | * lisp/xwidget.el (xwidget-log, xwidget-webkit-callback): Use with-current-buffer rather than save-excursion + set-buffer.
* Don't hard-code 1 as point-min.Glenn Morris2016-01-191-4/+2
| | | | | | * lisp/image-mode.el (image-display-size): * lisp/xwidget.el (xwidget-webkit-last-session) (xwidget-webkit-current-session): Don't hard-code 1 as point-min.
* ; * lisp/xwidget.el: Spelling fixes.Glenn Morris2016-01-191-27/+27
|
* * lisp/xwidget.el: Add declarations to silence non-xwidget compilation.Glenn Morris2016-01-191-5/+20
|
* Avoid advising image-display-size for xwidgets.Glenn Morris2016-01-191-17/+0
| | | | | | | * lisp/xwidget.el (xwidget-image-display-size): Remove. (image-display-size): Remove advice. * lisp/image-mode.el (xwidget-info, xwidget-at): Declare. (image-display-size): Incorporate xwidget code directly.
* Avoid breaking non-xwidget Emacs that happen to load xwidget.el.Glenn Morris2016-01-191-2/+4
| | | | | | * lisp/xwidget.el (window-configuration-change-hook) (kill-buffer-query-functions): Only modify these hooks if compiled with xwidget support.
* * lisp/xwidget.el (xwidget-webkit-scroll-behaviour): Fix custom spec.Glenn Morris2016-01-191-1/+3
|
* * lisp/xwidget.el (report-xwidget-bug): Remove.Glenn Morris2016-01-191-21/+0
| | | | (top-level): No longer require reporter.
* ; Add 2016 to copyright years of new files.Glenn Morris2016-01-191-1/+1
|