1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

143 Commits

Author SHA1 Message Date
Stefan Kangas
6d3adedcf1 ; Fix warning in mwheel.el
* lisp/mwheel.el (global-text-scale-adjust): Declare function.
2022-07-04 17:01:53 +02:00
Eli Zaretskii
e3f8dd9023 ; * lisp/mwheel.el (mouse-wheel-scroll-amount): Doc fix. 2022-07-03 20:57:22 +03:00
Juri Linkov
1c3c8b6d58 * lisp/mwheel.el: More fixes for global-text-scale (bug#48307)
(mouse-wheel-global-text-scale): Move down closer to mouse-wheel-text-scale.
(mouse-wheel-scroll-amount): Add :value global-text-scale and mention it
in the docstring.
(mouse-wheel-global-text-scale, mouse-wheel--setup-bindings):
Add mouse-wheel-down-alternate-event and mouse-wheel-up-alternate-event.
Allow a list of modifiers for 'text-scale'.
2022-07-03 20:00:11 +03:00
Eli Zaretskii
d06bc48716 ; Minor fixes for 'global-text-scale-adjust'
* doc/emacs/display.texi (Text Scale): Improve indexing.

* lisp/mwheel.el (mouse-wheel-global-text-scale): Doc fix.
* lisp/face-remap.el (global-text-scale-adjust-resizes-frames):
Fix a typo.
(global-text-scale-adjust-limits): Doc fix.
(Bug#48307)
2022-07-02 17:52:23 +03:00
Gregory Heytings
e0488f89d1 Command for global adjustments to the default face
* lisp/face-remap.el (global-text-scale-adjust): New command.
(text-scale-adjust): Refer to the new related command.
(global-text-scale-adjust-resizes-frames): New user option.

* lisp/mwheel.el (mouse-wheel-scroll-amount): Add the new command
to the mouse wheel scrolling events.
(mouse-wheel-global-text-scale): New function.
(mouse-wheel-mode): Use the new function with mouse-wheel-mode.

* doc/emacs/display.texi (Text Scale): Document the new command and
the new user option.

* etc/NEWS: Mention the new command and its bindings, and the new
user option.
2022-07-02 15:40:45 +02:00
Stefan Kangas
38ae6cf3ce Prefer Emacs mouse button event names to XEmacs names
* lisp/mwheel.el:
* lisp/vc/ediff-mult.el (ediff-meta-buffer-verbose-message)
(ediff-draw-dir-diffs, ediff-redraw-registry-buffer): Prefer Emacs
mouse button event names to XEmacs names.
2022-06-22 13:28:25 +02:00
Stefan Kangas
9bf520593c Update font scaling documentation to not talk about "face height"
* lisp/play/gamegrid.el (gamegrid-init-buffer):
* lisp/mwheel.el (mouse-wheel-scroll-amount):
(mouse-wheel-text-scale):
* lisp/faces.el (set-face-attribute):
* lisp/face-remap.el (text-scale-mode-step):
(text-scale-increase):
(text-scale-adjust):
* lisp/cus-face.el (custom-face-attributes):
* doc/emacs/frames.texi (Mouse Commands):
* doc/emacs/display.texi (Text Scale): Talk about font sized instead
of "face height" (bug#46853).
2022-06-20 01:26:05 +02:00
Lars Ingebrigtsen
b2bce107b1 Further audits of single quotes in Lisp doc strings
* test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
(tags-apropos-additional-actions):
* lisp/window.el (delete-window-choose-selected):
* lisp/vc/ediff-merg.el (ediff-combination-pattern):
* lisp/vc/diff.el (diff-no-select):
* lisp/tab-bar.el (tab-bar-new-tab-choice):
* lisp/simple.el (next-error-message-highlight):
(backward-delete-char-untabify):
* lisp/ses.el (ses-jump-cell-name-function):
* lisp/org/org.el (org-latex-to-html-convert-command):
* lisp/org/org-agenda.el (org-agenda-sorting-strategy):
* lisp/net/tramp.el (tramp-default-file-modes):
* lisp/net/newst-treeview.el
(newsticker-treeview-use-feed-name-from-url-list-in-treeview):
* lisp/net/eww.el (eww-auto-rename-buffer):
* lisp/mwheel.el (mouse-wheel-scroll-amount):
* lisp/mail/rmail.el (rmail-re-abbrevs):
* lisp/info.el (Info-history-forward-menu):
* lisp/gnus/nnselect.el (nnselect-retrieve-headers-override-function):
* lisp/gnus/gnus-start.el (gnus-subscribe-hierarchical-interactive):
* lisp/fringe.el (fboundp):
* lisp/eshell/esh-var.el (eshell-variable-aliases-list):
* lisp/emacs-lisp/checkdoc.el (checkdoc-column-zero-backslash-before-paren):
* lisp/dired-aux.el (dired-confirm-shell-command):
* lisp/calendar/calendar.el (calendar-time-zone-style):
* lisp/ansi-color.el (ansi-color-faces-vector):
(ansi-color-names-vector): Audit use of various single quotes in
Lisp doc strings.
2022-05-24 13:17:53 +02:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Yuuki Harano
e5f74cecf1 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-12-06 00:37:01 +09:00
Po Lu
133f9a7e94 Fix tty mouse wheel on window systems other than X
* lisp/mwheel.el (mouse-wheel-down-alternate-event)
(mouse-wheel-up-alternate-event)
(mouse-wheel-left-alternate-event)
(mouse-wheel-right-alternate-event): Set appropriately for
non-X systems.
2021-12-05 10:01:26 +08:00
Po Lu
66b5f5a872 Fix build after merge
* lisp/mwheel.el (mouse-wheel-up-event):
* src/gtkutil.c (xg_event_is_for_scrollbar):
* src/termhooks.h (enum output_method): Fix trivial typos.
2021-11-30 08:33:24 +08:00
Po Lu
8f5d2a3181 Merge remote-tracking branch 'origin/master' into feature/pgtk 2021-11-30 08:16:50 +08:00
Po Lu
c484b749f2 Fix mouse-wheel-text-scale
* lisp/mwheel.el (mouse-wheel-text-scale): Test for alternative
events correctly.
2021-11-24 09:49:39 +08:00
Robert Pluim
85f193b613 Add :version tags to new mwheel defcustoms
* lisp/mwheel.el (mouse-wheel-down-alternate-event):
(mouse-wheel-up-alternate-event): Add :version tag.
2021-11-21 16:20:20 +01:00
Po Lu
85a078e785 Add support for the Haiku operating system and its window system
* .gitignore: Add binaries specific to Haiku.

* Makefie.in (HAVE_BE_APP): New variable.
(install-arch-dep): Install Emacs and Emacs.pdmp when
using Haiku.

* configure.ac: Detect and configure for Haiku and
various related configurations.
(be-app, be-freetype, be-cairo): New options.
(HAVE_BE_APP, HAIKU_OBJ, HAIKU_CXX_OBJ)
(HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(HAIKU, HAVE_TINY_SPEED_T): New define.
(emacs_config_features): Add BE_APP.

* doc/emacs/Makefile.in (EMACSSOURCES): Add Haiku
appendix.

* doc/emacs/emacs.texi: Add Haiku appendix to menus and
include it.

* doc/emacs/haiku.texi: New Haiku appendix.

* doc/lispref/display.texi (Defining Faces, Window Systems):
Explain meaning of `haiku' as a window system identifier.
(haiku-use-system-tooltips): Explain meaning of system
tooltips on
Haiku.

* doc/lispref/frames.texi (Multiple Terminals): Explain
meaning of haiku as a display type.
(Frame Layout): Clarify section for Haiku frames.
(Size Parameters): Explain limitations of fullwidth and
fullheight on Haiku.
(Management Parameters): Explain limitations of
inhibiting double buffering on builds with Cairo,
and the inability of frames with no-accept-focus to
receive keyboard input on Haiku.
(Font and Color Parameters): Explain the different font
backends available on Haiku.
(Raising and Lowering): Explain that lowering and
restacking frames doesn't work on Haiku.
(Child Frames): Explain oddities of child frame
visibility on Haiku.

* doc/lispref/os.texi (System Environment): Explain
meaning of haiku.
* etc/MACHINES: Add appropriate notices for Haiku.
* etc/NEWS: Document changes.
* etc/PROBLEMS: Document font spacing bug on Haiku.

* lib-src/Makefile.in: Build be-resources binary on
Haiku.
(CXX, CXXFLAGS, NON_CXX_FLAGS, ALL_CXXFLAGS)
(HAVE_BE_APP, HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(DONT_INSTALL): Add be-resources binary if on Haiku.
(be-resources): New target.

* lib-src/be_resources: Add helper binary for setting
resources on the Emacs application.

* lib-src/emacsclient.c (decode_options): Set
alt_display to "be" on Haiku.

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-unraised, custom-button-pressed): Update
face definitions for Haiku.

* lisp/cus-start.el: Add haiku-debug-on-fatal-error and
haiku-use-system-tooltips.

* lisp/faces.el (face-valid-attribute-values): Clarify
attribute comment for Haiku.
(tool-bar): Add appropriate toolbar color for Haiku.

* lisp/frame.el (haiku-frame-geometry)
(haiku-mouse-absolute-pixel-position)
(haiku-set-mouse-absolute-pixel-position)
(haiku-frame-edges)
(haiku-frame-list-z-order): New function declarations.

(frame-geometry, frame-edges)
(mouse-absolute-pixel-position)
(set-mouse-absolute-pixel-position)
(frame-list-z-order): Call appropriate window system
functions on Haiku.

(display-mouse-p, display-graphic-p)
(display-images-p, display-pixel-height)
(display-pixel-width, display-mm-height)
(display-mm-width, display-backing-store)
(display-save-under, display-planes)
(display-color-cells, display-visual-class): Update type
tests for Haiku.

* lisp/international/mule-cmds.el
(set-coding-system-map): Also
prevent set-terminal-coding-system from appearing in the menu
bar on Haiku.

* lisp/loadup.el: Load Haiku-specific files when built
with Haiku, and don't rename newly built Emacs on Haiku as BFS
doesn't support hard links.

* lisp/menu-bar.el (menu-bar-open): Add for Haiku.

* lisp/mwheel.el (mouse-wheel-down-event): Expect
wheel-up on Haiku.
(mouse-wheel-up-event): Expect wheel-down on Haiku.
(mouse-wheel-left-event): Expect wheel-left on Haiku.
(mouse-wheel-right-event): Expect wheel-right on Haiku.

* lisp/net/browse-url.el
(browse-url--browser-defcustom-type):
Add option for WebPositive.
(browse-url-webpositive-program): New variable.
(browse-url-default-program): Search for WebPositive.
(browse-url-webpositive): New function.

* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select): Define faces
appropriately for Haiku.

* lisp/term/haiku-win.el: New file.

* lisp/tooltip.el (menu-or-popup-active-p): New function
declaration.
(tooltip-show-help): Don't use tooltips on Haiku when a
menu is active.

* lisp/version.el (haiku-get-version-string): New
function declaration.
(emacs-version): Add Haiku version string if
appropriate.

* src/Makefile.in: Also produce binary named "Emacs"
with Haiku resources set.

(CXX, HAIKU_OBJ, HAIKU_CXX_OBJ, HAIKU_LIBS)
(HAIKU_CFLAGS, HAVE_BE_APP, NON_CXX_FLAGS)
(ALL_CXX_FLAGS): New variables.

(.SUFFIXES): Add .cc.
(.cc.o): New target.
(base_obj): Add Haiku C objects.
(doc_obj, obj): Split objects that should scanned for
documentation into doc_obj.
(SOME_MACHINE_OBJECTS): Add appropriate Haiku C objects.
(all): Depend on Emacs and Emacs.pdmp on Haiku.
(LIBES): Add Haiku libraries.
(gl-stamp)
($(etc)/DOC): Scan doc_obj instead of obj
(temacs$(EXEEXT): Use C++ linker on Haiku.
(ctagsfiles3): New variable.
(TAGS): Scan C++ files.

* src/alloc.c (garbage_collect): Mark Haiku display.

* src/dispextern.h (HAVE_NATIVE_TRANSFORMS): Also enable
on Haiku.
(struct image): Add fields for Haiku transforms.
(RGB_PIXEL_COLOR): Define to unsigned long on Haiku as
well.
(sit_for): Also check USABLE_SIGPOLL.
(init_display_interactive): Set initial window system to
Haiku on Haiku builds.

* src/emacs.c (main): Define Haiku syms and init haiku
clipboard.
(shut_down_emacs): Quit BApplication on Haiku and
trigger debug
on aborts if haiku_debug_on_fatal_error.
(Vsystem_type): Update docstring.

* src/fileio.c (next-read-file-uses-dialog-p): Enable on
Haiku.

* src/filelock.c (WTMP_FILE): Only define if BOOT_TIME
is also defined.

* src/floatfns.c (double_integer_scale): Work around
Haiku libroot brain damage.

* src/font.c (syms_of_font): Define appropriate font
driver symbols for Haiku builds with various options.

* src/font.h: Also enable ftcrfont on Haiku builds with
Cairo.
(font_data_structures_may_be_ill_formed): Also enable on
Haiku builds that have Cairo.

* src/frame.c (Fframep): Update doc-string for Haiku
builds and return haiku if appropriate.
(syms_of_frame): New symbol `haiku'.

* src/frame.h (struct frame): Add output data for Haiku.
(FRAME_HAIKU_P): New macro.
(FRAME_WINDOW_P): Test for Haiku frames as well.

* src/ftcrfont.c (RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG): New macros.
(ftcrfont_draw): Add haiku specific code for Haiku
builds with Cairo.

* src/ftfont.c (ftfont_open): Set face.
(ftfont_has_char, ftfont_text_extents): Work around
crash.
(syms_of_ftfont): New symbol `mono'.

* src/ftfont.h (struct font_info): Enable Cairo-specific
fields for Cairo builds on Haiku.

* src/haiku_draw_support.cc:
* src/haiku_font_support.cc:
* src/haiku_io.c:
* src/haiku_select.cc:
* src/haiku_support.cc:
* src/haiku_support.h:
* src/haikufns.c:
* src/haikufont.c:
* src/haikugui.h:
* src/haikuimage.c:
* src/haikumenu.c:
* src/haikuselect.c:
* src/haikuselect.h:
* src/haikuterm.c:
* src/haikuterm.h: Add new files for Haiku windowing
support.

* src/haiku.c: Add new files for Haiku operating system
support.

* src/image.c: Implement image transforms and native XPM
support
on Haiku.

(GET_PIXEL, PUT_PIXEL, NO_PIXMAP)
(PIX_MASK_RETAIN, PIX_MASK_DRAW)
(RGB_TO_ULONG, RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG, RED16_FROM_ULONG, GREEN16_FROM_ULONG)
(BLUE16_FROM_ULONG): Define to appropriate values on
Haiku.

(image_create_bitmap_from_data): Add Haiku support.
(image_create_bitmap_from_file): Add TODO on Haiku.
(free_bitmap_record): Free bitmap on Haiku.
(image_size_in_bytes): Implement for Haiku bitmaps.
(image_set_transform): Implement on Haiku.
(image_create_x_image_and_pixmap_1): Implement on Haiku,
24-bit or 1-bit only.
(image_destroy_x_image, image_get_x_image): Use correct
img and pixmap values on Haiku.
(lookup_rgb_color): Use correct macro on Haiku.
(image_to_emacs_colors): Implement on Haiku.
(image_disable_image): Disable on Haiku.
(image_can_use_native_api): Test for translator presence
on Haiku.
(native_image_load): Use translator on Haiku.
(imagemagick_load_image): Add Haiku-specific quirks.
(Fimage_transforms_p): Allow rotate90 on Haiku.
(image_types): Enable native XPM support on Haiku.
(syms_of_image): Enable XPM images on Haiku.

* src/keyboard.c (kbd_buffer_get_event)
(handle_async_input, handle_input_available_signal)
(handle_user_signal, Fset_input_interrupt_mode)
(init_keyboard): Check for USABLE_SIGPOLL along with
USABLE_SIGIO.

* src/lisp.h (pD): Work around broken Haiku headers.
(HAVE_EXT_MENU_BAR): Define on Haiku.
(handle_input_available_signal): Enable if we just have
SIGPOLL as well.

* src/menu.c (have_boxes): Return true on Haiku.
(single_menu_item): Enable toolkit menus on Haiku.
(find_and_call_menu_selection): Also enable on Haiku.

* src/process.c (keyboard_bit_set): Enable with only
usable SIGPOLL.
(wait_reading_process_output): Test for SIGPOLL as well
as SIGIO availability.

* src/sound.c (sound_perror, vox_open)
(vox_configure, vox_close): Enable for usable SIGPOLL as
well.

* src/sysdep.c (sys_subshell): Enable for usable SIGPOLL.
(reset_sigio): Make conditional on F_SETOWN.
(request_sigio, unrequest_sigio)
(emacs_sigaction_init): Also handle SIGPOLLs.
(init_sys_modes): Disable TCXONC usage on Haiku, as it
doesn't have any ttys other than pseudo ttys, which don't
support C-s/C-q flow control, and causes compiler warnings.
(speeds): Disable high speeds if HAVE_TINY_SPEED_T.

* src/termhooks.h (enum output_method): Add output_haiku.
(struct terminal): Add Haiku display info.
(TERMINAL_FONT_CACHE): Enable for Haiku.

* src/terminal.c (Fterminal_live_p): Return `haiku' if
appropriate.
* src/verbose.mk.in (AM_V_CXX, AM_V_CXXLD): New logging
variables.

* src/xdisp.c (redisplay_internal)
(note_mouse_highlight): Return on Haiku if a popup is activated.
(display_menu_bar): Return on Haiku if frame is a Haiku
frame.

* src/xfaces.c (GCGraphicsExposures): Enable correctly on Haiku.
(x_create_gc): Enable dummy GC code on Haiku.

* src/xfns.c (x-server-version, x-file-dialog): Add
Haiku specifics to doc strings.

* src/xterm.c (syms_of_xterm): Add Haiku information to
doc string.
2021-11-20 21:46:07 +08:00
Po Lu
487ec3cf2a Add support for event processing via XInput 2
* configure.ac: Add an option to use XInput 2 if available.
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables.
(EMACS_CFLAGS): Add Xinput CFLAGS.
(LIBES): Add XInput libs.
* src/xmenu.c (popup_activated_flag): Expose flag if
XInput 2 is available.
* src/xfns.c (x_window): Set XInput 2 event mask.
(setup_xi_event_mask): New function.
(syms_of_xfns): Provide XInput 2 feature.
* src/xterm.c (x_detect_focus_change): Handle XInput 2
GenericEvents.
(handle_one_xevent): Handle XInput 2 events.
(x_term_init): Ask the server for XInput 2 support and set
xkb_desc if available.
(x_delete_terminal): Free XKB kb desc if it exists, and free
XI2 devices if they exist.
(xi_grab_or_ungrab_device)
(xi_reset_scroll_valuators_for_device_id)
(x_free_xi_devices, x_init_master_valuators): New functions.
(x_get_scroll_valuator_delta): New function.
(init_xterm): Don't tell GTK to only use Core Input when built
with XInput 2 support.
* src/xterm.h (struct x_display_info): Add fields for XKB
and XI2 support.
* src/gtkutil.c (xg_event_is_for_menubar): Handle
XIDeviceEvents.
(xg_is_menu_window): New function.
(xg_event_is_for_scrollbar): Handle XIDeviceEvents.
* etc/NEWS: Document changes.

* lisp/mwheel.el (mouse-wheel-down-alternate-event)
(mouse-wheel-up-alternate-event)
(mouse-wheel-left-alternate-event)
(mouse-wheel-right-alternate-event): New user options.

(mouse-wheel-text-scale)
(mwheel-scroll): Test for alternate events.
(mouse-wheel--setup-bindings): Set up bindings for alternate
buttons.
2021-11-20 18:25:09 +08:00
Yuuki Harano
b22323c3b6 Support xterm-mouse-mode mouse-4/5
When I opened both pgtk frame and terminal frame using daemon
mode, I get mouse-4 on terminal frame and wheel-up on pgtk frame.
I support both events as mwheel events at the same time. (Bug#50321)

* lisp/mwheel.el (mouse-wheel-down-event): It is both mouse-4 and wheel-up.
(mouse-wheel-up-event): mouse-5 and wheel-down.
(mouse-wheel-left-event): mouse-6 and wheel-left.
(mouse-wheel-right-event): mouse-7 and wheel-right.
(mouse-wheel--button-eq): New function to test a button is included in
a list.
(mouse-wheel--button-flatten): New function to make flatten list of
events.
(mwheel-scroll): Use mouse-wheel--button-eq instead of eq.
(mouse-wheel-text-scale): Use mouse-wheel--button-eq instead of eq.
(mouse-wheel--setup-bindings): Make it flatten.
2021-11-17 00:49:20 +09:00
Yuuki Harano
4dd1f56f29 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk 2021-11-11 00:39:53 +09:00
Jan Synacek
502788bc3d Add missing single quotes in the Emacs manual
* lisp/mwheel.el (mouse-wheel-scroll-amount): Add missing single
quotes.  (Bug#51223)

Copyright-paperwork-exempt: yes.
2021-10-15 10:29:21 +03:00
Stefan Monnier
e68bc86bcf * lisp/mwheel.el: Don't use custom-initialize-delay.
Set up the keybindings when loading the file.

(mouse-wheel--installed-bindings-alist): Move to beginning.
(mouse-wheel-change-button): Don't update bindings when they're not installed.
(mouse-wheel--setup-bindings): New function extracted from `mouse-wheel-mode`.
(<topleve>): Call it when loading the file.
(mouse-wheel-mode): Use the default :initializer.
2021-08-01 18:13:41 -04:00
Yuuki Harano
e48372f8e5 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-05-19 22:02:06 +09:00
Lars Ingebrigtsen
c14e0da361 mouse-wheel-progressive-speed doc string clarification
* lisp/mwheel.el (mouse-wheel-progressive-speed): Doc string
improvement (bug#45322).
2021-05-16 17:59:54 +02:00
Yuuki Harano
5d2f319eec Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-03-21 15:54:46 +09:00
Lars Ingebrigtsen
0aad4d134f Autoload 'mouse-wheel-mode'
* lisp/mwheel.el (mouse-wheel-mode): Autoload, since the mode can
be used (but isn't preloaded) when there isn't any window system
(bug#47162).
2021-03-18 06:21:44 +01:00
Yuuki Harano
44f7f57c68 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-01-03 16:33:29 +09:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Yuuki Harano
da92d5700e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2020-12-05 20:30:42 +09:00
Stefan Kangas
4594d6f59a Remove redundant requires of 'custom'
* lisp/emacs-lisp/eieio-custom.el:
* lisp/htmlfontify.el:
* lisp/mwheel.el:
* lisp/net/eudc-vars.el:
* lisp/net/ldap.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-gvfs.el:
* lisp/progmodes/cwarn.el:
* lisp/progmodes/sql.el:
* lisp/savehist.el:
* lisp/textmodes/reftex.el:
* lisp/wid-browse.el: Don't require 'custom'; it is preloaded since
version 20.1.
2020-12-03 09:50:58 +01:00
Yuuki Harano
f6d8c5939b Introduce Pure GTK3 port
* src/xsettings.h:

* src/xsettings.c:
(dpyinfo_valid, store_tool_bar_style_changed)
(XSETTINGS_FONT_NAME, get_prop_window, read_settings)
(apply_xft_settings, read_and_apply_settings)
(xft_settings_event, init_xsettings, xsettings_initialize):

* src/xfaces.c:
(x_create_gc, x_free_gc):

* src/xdisp.c (redisplay_tool_bar, redisplay_internal)
(draw_glyphs_debug, draw_glyphs, mouse_face_from_buffer_pos)
(note_mouse_highlight):

* src/terminal.c (Fterminal_live_p):

* src/termhooks.h (enum output_method, GCALIGNED_STRUCT)
(TERMINAL_FONT_CACHE):

* src/process.c (wait_reading_process_output):

* src/pgtkterm.h:

* src/pgtkterm.c:

* src/pgtkselect.h:

* src/pgtkselect.c:

* src/pgtkgui.h:

* src/pgtkfns.c:

* src/image.c:
(XGetPixel, XPutPixel, image_create_bitmap_from_data)
(image_create_bitmap_from_file, free_bitmap_record)
(image_destroy_x_image, gui_put_x_image, image_get_x_image)
(Create_Pixmap_From_Bitmap_Data, xbm_load_image, )
(xpm_load_image, lookup_rgb_color, image_disable_image)
(image_build_heuristic_mask, imagemagick_load_image):

* src/gtkutil.h:

* src/gtkutil.c (PGTK_TRACE, xg_set_screen, xg_display_open)
(xg_display_close, xg_create_default_cursor)
(xg_get_pixbuf_from_pix_and_mask, xg_check_special_colors)
(qttip_cb, hierarchy_ch_cb, xg_prepare_tooltip, )
(xg_show_tooltip, xg_hide_tooltip, xg_frame_resized)
(xg_frame_set_char_size, xg_height_or_width_changed)
(xg_set_widget_bg, style_changed_cb, xg_create_frame_widgets)
(xg_free_frame_widgets, x_wm_set_size_hint, xg_frame_restack)
(xg_mark_data, xg_update_frame_menubar, free_frame_menubar)
(xg_update_submenu, xg_finish_scroll_bar_creation)
(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb, xg_event_is_for_scrollbar)
(draw_page, xg_pack_tool_bar, xg_create_tool_bar)
(xg_update_tool_bar_sizes, update_frame_tool_bar)
(free_frame_tool_bar, xg_change_toolbar_position):

* src/ftcrfont.c:
(ftcrfont_draw):

* src/fringe.c:
(init_fringe_bitmap):

* src/frame.h (GCALIGNED_STRUCT, FRAME_WINDOW_P):

* src/frame.c (Fframep):

* src/font.h:

* src/font.c (syms_of_font):

* src/emacsgtkfixed.c:
(emacs_fixed_get_preferred_width)
(emacs_fixed_get_preferred_height, XSetWMSizeHints):

* src/emacs.c (main):

* src/dispnew.c (init_display_interactive):

* src/dispextern.h:

* src/alloc.c:
(garbage_collect):

* src/Makefile.in (PGTK_OBJ, PGTK_LIBS, base_obj, LIBES):

* src/.gdbinit:

* lisp/url/url-privacy.el (url-setup-privacy-info):

* lisp/term/pgtk-win.el (featurep):

* lisp/startup.el (command-line, fancy-splash-frame):

* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select):

* lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event):

* lisp/loadup.el (featurep):

* lisp/international/mule-cmds.el (set-coding-system-map):

* lisp/frame.el (pgtk-frame-geometry, frame-geometry)
(w32-frame-edges, frame-edges)
(pgtk-mouse-absolute-pixel-position)
(mouse-absolute-pixel-position)
(pgtk-set-mouse-absolute-pixel-position)
(pgtk-frame-list-z-order, frame-list-z-order)
(pgtk-frame-restack, frame-restack, display-mouse-p)
(display-graphic-p, display-symbol-keys-p, )
(display-pixel-height, display-mm-height, display-mm-width)
(display-backing-store, display-save-under, display-color-cells)
(display-planes, display-visual-class)
(pgtk-display-monitor-attributes-list)
(display-monitor-attributes-list):

* lisp/faces.el (face-spec-set-match-display, tool-bar):

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-pressed, custom-display):

* configure.ac (AUTO_DEPEND, XARGS_LIMIT, XWIDGETS_OBJ):
2020-11-22 14:46:55 +11:00
Eli Zaretskii
bec4a6daca Fix last change
* lisp/mwheel.el (mwheel-scroll): Don't use passive tense in doc
string.
2020-11-03 21:48:23 +02:00
Juri Linkov
a6240cb263 Horizontal mouse wheel scrolling amount (bug#43568)
* lisp/mwheel.el (mouse-wheel-scroll-amount-horizontal): New defcustom.
(mwheel-scroll): Use it.

* doc/emacs/frames.texi (Mouse Commands): Update doc about horizontal
scrolling step.
2020-11-03 21:06:11 +02:00
Juri Linkov
1e7f636576 Horizontal scrolling for mouse wheel with Shift modifier (bug#43568)
* lisp/mwheel.el (mouse-wheel-scroll-amount): Change 'shift' default value
from 5 to 'hscroll'.  Add new option "Scroll horizontally" for 'hscroll'.
(mwheel-scroll): Handle value 'hscroll' and call mwheel-scroll-left-function
or mwheel-scroll-right-function.

* doc/emacs/frames.texi (Mouse Commands): Update for horizontal scrolling
with Shift modifier.
2020-09-24 22:25:03 +03:00
Theodor Thornhill
89dd8cd215 Set mwheel default scroll value to 1 (bug#43380)
* lisp/mwheel.el (mouse-wheel-scroll-amount): Change default value 5 to 1
and shift default value from 1 to 5.
Default value is changed as discussed in etc/TODO.
2020-09-24 21:59:30 +03:00
Andreas Schwab
c6291d6efe Remove pointless use of intern
* lisp/mwheel.el (mouse-wheel-left-event)
(mouse-wheel-right-event): Replace use of intern with quoted
symbol.
* lisp/profiler.el (profiler-calltree-build-unified): Likewise.
* lisp/vc/ediff-util.el (ediff-debug-info): Likewise.
2020-09-17 11:13:54 +02:00
Stefan Kangas
18ae12e053 Use lexical-binding in mwheel.el 2020-09-02 23:18:02 +02:00
Stefan Kangas
76e8d935a7 Simplify mwheel-mode by using alist instead of two variables
* lisp/mwheel.el (mouse-wheel--remove-bindings): Update call
signature to take no arguments.  Doc fix.
(mouse-wheel--add-binding): Break out from...
(mouse-wheel-mode): ...here.  Simplify by using above functions.
(mouse-wheel--installed-bindings-alist): New variable.
(mwheel-installed-bindings): Make obsolete.
(mwheel-installed-text-scale-bindings): Make obsolete.
* test/lisp/mwheel-tests.el (mwheel-test-enable/disable):
New test.
2020-09-02 23:18:02 +02:00
Stefan Kangas
77a5b696bb Fix binding mouse wheel with modifiers in buffer area
* test/lisp/mwheel-tests.el (mwheel-test--create-scroll-keys): Fix
binding mouse wheel with modifiers in buffer area, while ignoring them
for fringes, margins, etc.  My previous change mistakenly ignored all
modifiers in `mouse-wheel-scroll-amount'.
* lisp/mwheel.el (mouse-wheel--create-scroll-keys): Fix test to
reflect the above.
2020-09-02 22:57:24 +02:00
Stefan Kangas
d77dc2609f * lisp/mwheel.el: Improve package description. 2020-08-28 16:15:21 +02:00
Stefan Kangas
61fc4bf286 Bind mwheel-scroll on more parts of frame's display
* lisp/mwheel.el (mouse-wheel-mode): Bind unmodified 'mwheel-scroll'
on scroll bars, fringes, margins, header and mode line.  (Bug#5557)
(mouse-wheel--create-scroll-keys): New helper function for
'mouse-wheel-mode'.
* test/lisp/mwheel-tests.el: New file.
2020-08-22 13:25:15 +02:00
Stefan Kangas
8b36ebc950 Remove XEmacs compat code from mwheel.el
* lisp/mwheel.el (mwheel-event-button, mwheel-event-window):
Remove XEmacs compat code.
2020-08-14 19:40:28 +02:00
Eli Zaretskii
b468b3d1ff Fix a recent documentation change
* doc/emacs/frames.texi (Mouse Commands): More detailed
description of how tilting the mouse-wheel works.

* lisp/mwheel.el (mouse-wheel-tilt-scroll)
(mouse-wheel-flip-direction): Fix the wording of doc strings.
(Bug#39979)
2020-03-13 12:24:25 +02:00
İ. Göktuğ Kayaalp
ef5744a988 Improve docs for horizontal scrolling with mouse and touchpad (Bug#39979)
* lisp/mwheel.el (mouse-wheel-tilt-scroll,
mouse-wheel-flip-direction): Improve docstrings.
* doc/emacs/frames.texi (Mouse Commands): Mention touchpads.
2020-03-11 19:48:47 -04:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Paul Eggert
6b4a97c1c7 Fix some quoting glitches in doc strings 2019-11-11 10:32:53 -08:00
Stefan Kangas
ffb7100750 Change font size in correct window using mouse wheel
* lisp/mwheel.el (mouse-wheel-follow-mouse): Doc fix.
(mouse-wheel--get-scroll-window): New function extracted from...
(mwheel-scroll): ...here.
(mouse-wheel-text-scale): New function to change face height in
the correct window, depending on the value of
'mouse-wheel-follows-mouse'.  (Bug#28182)
(mouse-wheel-mode): Bind 'mouse-wheel-text-scale' instead of
'text-scale-increase' and 'text-scale-decrease'.
2019-10-11 02:16:11 +02:00
Stefan Kangas
dc8108e109 Support changing font size using mouse wheel
* lisp/mwheel.el (mouse-wheel-mode): Support changing font size (text
scaling) using mouse wheel.  (Bug#28182)
(mouse-wheel-scroll-amount): Bind the Ctrl modifier to text scaling.
(mwheel-installed-text-scale-bindings): New variable.
(mouse-wheel--remove-bindings): New helper function for
'mouse-wheel-mode'.

* doc/emacs/frames.texi (Mouse Commands): Document this feature.
* etc/NEWS: Announce it.
2019-10-06 21:57:58 +02:00
Stefan Kangas
be27f02bcf Make mouse scroll show a message instead of dinging at buffer limits
* lisp/mwheel.el (mwheel-scroll): Show a message instead of dinging at
end of buffer and beginning of buffer.  This should be less intrusive,
especially when using a trackpad.  (Bug#16196)
2019-10-04 18:07:49 +02:00
Stefan Kangas
bba80faf87 Declare mwheel-install obsolete (Bug#36553)
* lisp/mwheel.el: Update `Commentary' section.
(mwheel-install): Declare obsolete in favor of mouse-wheel-mode.
* etc/NEWS: Announce it.
2019-07-18 20:06:27 -04:00