1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00
Commit Graph

159 Commits

Author SHA1 Message Date
Stefan Monnier
e720ba6219 (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events
Change the handling of the old X11 convention that uses mouse-4/5/6/7
events to represent wheel events: instead of asking downstream
packages to use the `mouse-wheel-*-event` variables to know which events
represent wheel events, use new var `mouse-wheel-buttons` to directly
convert those events into the standard `wheel-up/down/left/right` events
used everywhere else.

This will simplify the work of packages which can thus just bind their
commands to `wheel-up/down/left/right`.

* lisp/mouse.el (mouse-wheel-buttons): New custom variable.

* src/keyboard.c (make_lispy_event): Adjust for "wheel-clicks" on the tab-bar.
* src/xterm.c (x_construct_mouse_click): Add `xi2` argument and
obey `mouse-wheel-buttons` variable.
(handle_one_xevent): Adjust calls accordingly.
(syms_of_xterm): Define the `mouse-wheel-buttons` and the
`wheel-up/down/left/right`symbols.

* lisp/xt-mouse.el: Don't require `mwheel` any more.
(xterm-mouse--same-button-p): Delete function.
(xterm-mouse--read-event-sequence): Use `mouse-wheel-buttons`.

* lisp/mwheel.el (mouse-wheel-up-event, mouse-wheel-down-event)
(mouse-wheel-left-event, mouse-wheel-right-event): Make obsolete.
(mouse-wheel-obey-old-style-wheel-buttons): Delete variable.

* lisp/completion-preview.el (completion-preview--mouse-map):
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
* lisp/edmacro.el (edmacro-fix-menu-commands): Silence warnings.
2024-04-09 10:26:07 -04:00
Stefan Monnier
e734f8e502 xt-mouse.el: Obey mouse-wheel-*-event variables (bug#68698)
* lisp/xt-mouse.el (xterm-mouse--same-button-p): New function.
(xterm-mouse--read-event-sequence): Use it to obey
`mouse-wheel-*-event` variables.
* lisp/mwheel.el (mouse-wheel-obey-old-style-wheel-buttons):
Update docstring.
2024-01-28 18:51:11 -05:00
Stefan Monnier
1f3371b46e Take stock of the wheel-up/down confusion
While we're hopefully all aware of the usual confusion between
the scroll operation moving the document or moving the viewport, Emacs
has its very own instance of that confusion where the
`mouse-wheel-down-event` variable is the one that (used to) hold
the value `wheel-up` and vice versa.

Thanks for Po Lu's commit 957b4f826a which not only fixed my change
but brought that confusion to my attention.
This patch doesn't fix the problem, but tries to fix the other places
in the code where we did not take it into account.

* doc/lispref/commands.texi (Misc Events): Mention the
wheel-up/down confusion.

* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
* lisp/completion-preview.el (completion-preview--mouse-map):
Fix wheel-up/down confusion.

* lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event):
Fix docstrings.
2024-01-24 12:57:33 -05:00
Po Lu
957b4f826a Don't invert wheel event directions
* lisp/mwheel.el (mwheel--is-dir-p): In Emacs, up means down and
down means up...
2024-01-21 12:50:45 +08:00
Stefan Monnier
eca7368039 * lisp/mwheel.el (mouse-wheel-obey-old-style-wheel-buttons): Simplify 2024-01-20 23:12:36 -05:00
Stefan Monnier
998667f902 mwheel.el: Code clean to reduce duplication
* lisp/mwheel.el (mouse-wheel-obey-old-style-wheel-buttons): New var,
extracted from `mouse-wheel-*-event` definitions.
(mouse-wheel-down-event, mouse-wheel-up-event)
(mouse-wheel-left-event, mouse-wheel-right-event): Use it.
2024-01-20 15:03:26 -05:00
Stefan Monnier
18294854c7 mwheel.el: Remove mouse-wheel-*-alternate-event vars
Now that `wheel-DIR` events are hardcoded, we never need more than
one variable (which we actually never needed anyway, we could have
let `mouse-wheel-*-event` vars hold lists of events instead), so
remove the `mouse-wheel-*-alternate-event` vars by merging their
default value into that of the corresponding `mouse-wheel-*-event`.

* lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event)
(mouse-wheel-left-event, mouse-wheel-right-event): Don't bother holding
`wheel-DIR` events since these are already handled anyway.
Hold the event that would have been held in
`mouse-wheel-DIR-alternate-event` instead.
(mouse-wheel-down-alternate-event, mouse-wheel-up-alternate-event)
(mouse-wheel-left-alternate-event, mouse-wheel-right-alternate-event):
Delete vars.
(mwheel--is-dir-p, mouse-wheel--setup-bindings):
* lisp/edmacro.el (edmacro-fix-menu-commands):
* lisp/completion-preview.el (completion-preview--mouse-map):
Don't use `mouse-wheel-up/down-alternate-event` any more.
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
Do nothing, because it already ignored those vars.
2024-01-20 15:03:26 -05:00
Stefan Monnier
db8890b3c9 mwheel.el: Unconditionally use the wheel-up/down/... events
The `mouse-wheel-DIR-event` vars were introduced because under X11
we get different `mouse-N` events depending on the users' mouse and
those same events can be used for other things for other rodents, so we
can't unconditionally treat those events as mouse-wheel events.

But this does not apply to the `wheel-up/down/...` events.
So hard code them.

* lisp/mwheel.el (mwheel--is-dir-p): Always consider the `wheel-DIR` events.
(mouse-wheel--setup-bindings): Always bind the `wheel-DIR` events.

* lisp/completion-preview.el (completion-preview--mouse-map):
Unconditionally bind the `wheel-DIR` events.
* lisp/edmacro.el (edmacro-fix-menu-commands): Hard code the
`wheel-DIR` events as mouse events regardless of `mouse-wheel-*-event`s.
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
Do nothing, because it's already been done in commit e5be6c7ae3.

* doc/lispref/commands.texi (Misc Events): Document the need to use
`wheel-up/down/left/right` unconditionally.
2024-01-20 15:03:26 -05:00
Stefan Monnier
a764b503e1 (mwheel--is-dir-p): New macro to reduce code duplication
It also slightly reduces memory allocation.

* lisp/mwheel.el (mwheel--is-dir-p): New macro.
(mwheel-scroll, mouse-wheel-text-scale)
(mouse-wheel-global-text-scale): Use it.
2024-01-12 17:52:00 -05:00
Stefan Monnier
ee2a8fd4cf (mouse-wheel-*-event): Minor cleanups
* lisp/mwheel.el (mwheel-event-button): Mark as obsolete alias.
Change all callers.

* lisp/edmacro.el (mouse-wheel-*-event): Move declarations to ...
(edmacro-fix-menu-commands): ... where we do know that they should
be defined.  Obey `mouse-wheel-*-alternate-event`s as well.
2024-01-09 11:34:05 -05:00
Po Lu
ecf08f0621 Merge from savannah/emacs-29
dc4e6b1329 ; Update copyright years in more files
64b3777631 ; Run set-copyright from admin.el
8e1c56ae46 ; Add 2024 to copyright years

# Conflicts:
#	doc/misc/modus-themes.org
#	doc/misc/texinfo.tex
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	etc/themes/modus-operandi-theme.el
#	etc/themes/modus-themes.el
#	etc/themes/modus-vivendi-theme.el
#	lib/alloca.in.h
#	lib/binary-io.h
#	lib/c-ctype.h
#	lib/c-strcasecmp.c
#	lib/c-strncasecmp.c
#	lib/careadlinkat.c
#	lib/cloexec.c
#	lib/close-stream.c
#	lib/diffseq.h
#	lib/dup2.c
#	lib/filemode.h
#	lib/fpending.c
#	lib/fpending.h
#	lib/fsusage.c
#	lib/getgroups.c
#	lib/getloadavg.c
#	lib/gettext.h
#	lib/gettime.c
#	lib/gettimeofday.c
#	lib/group-member.c
#	lib/malloc.c
#	lib/md5-stream.c
#	lib/md5.c
#	lib/md5.h
#	lib/memmem.c
#	lib/memrchr.c
#	lib/nanosleep.c
#	lib/save-cwd.h
#	lib/sha1.c
#	lib/sig2str.c
#	lib/stdlib.in.h
#	lib/strtoimax.c
#	lib/strtol.c
#	lib/strtoll.c
#	lib/time_r.c
#	lib/xalloc-oversized.h
#	lisp/auth-source-pass.el
#	lisp/emacs-lisp/lisp-mnt.el
#	lisp/emacs-lisp/timer.el
#	lisp/info-look.el
#	lisp/jit-lock.el
#	lisp/loadhist.el
#	lisp/mail/rmail.el
#	lisp/net/ntlm.el
#	lisp/net/webjump.el
#	lisp/progmodes/asm-mode.el
#	lisp/progmodes/project.el
#	lisp/progmodes/sh-script.el
#	lisp/textmodes/flyspell.el
#	lisp/textmodes/reftex-toc.el
#	lisp/textmodes/reftex.el
#	lisp/textmodes/tex-mode.el
#	lisp/url/url-gw.el
#	m4/alloca.m4
#	m4/clock_time.m4
#	m4/d-type.m4
#	m4/dirent_h.m4
#	m4/dup2.m4
#	m4/euidaccess.m4
#	m4/fchmodat.m4
#	m4/filemode.m4
#	m4/fsusage.m4
#	m4/getgroups.m4
#	m4/getloadavg.m4
#	m4/getrandom.m4
#	m4/gettime.m4
#	m4/gettimeofday.m4
#	m4/gnulib-common.m4
#	m4/group-member.m4
#	m4/inttypes.m4
#	m4/malloc.m4
#	m4/manywarnings.m4
#	m4/mempcpy.m4
#	m4/memrchr.m4
#	m4/mkostemp.m4
#	m4/mktime.m4
#	m4/nproc.m4
#	m4/nstrftime.m4
#	m4/pathmax.m4
#	m4/pipe2.m4
#	m4/pselect.m4
#	m4/pthread_sigmask.m4
#	m4/readlink.m4
#	m4/realloc.m4
#	m4/sig2str.m4
#	m4/ssize_t.m4
#	m4/stat-time.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/stdio_h.m4
#	m4/stdlib_h.m4
#	m4/stpcpy.m4
#	m4/strnlen.m4
#	m4/strtoimax.m4
#	m4/strtoll.m4
#	m4/time_h.m4
#	m4/timegm.m4
#	m4/timer_time.m4
#	m4/timespec.m4
#	m4/unistd_h.m4
#	m4/warnings.m4
#	nt/configure.bat
#	nt/preprep.c
#	test/lisp/register-tests.el
2024-01-02 10:28:14 +08:00
Po Lu
8e1c56ae46 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
Po Lu
e1261fff85 Merge remote-tracking branch 'origin/master' into feature/android 2023-04-08 09:35:59 +08:00
Mattias Engdegård
7c0c2b1bb5 Remove useless unwind-protect forms, or make them useful as intended
* lisp/imenu.el (imenu--generic-function):
* lisp/mail/yenc.el (yenc-decode-region):
* lisp/textmodes/table.el (table-recognize-region):
* test/lisp/dired-tests.el (dired-test-directory-files):
* test/lisp/hl-line-tests.el (hl-line-tests-sticky):
Fix unwind-protect bracketing mistakes that caused the unwind code to
be misplaced.
* lisp/strokes.el (strokes-read-stroke): Fix a bracketing mistake that
misplaced the unwind code, and another one that misplaced the
else-clause of an `if` form.
* test/lisp/gnus/mml-sec-tests.el (mml-secure-test-fixture): Fix a
bracketing mistake that misplaced the unwind code, and remove
superfluous condition-case.

* lisp/mwheel.el (mouse-wheel-global-text-scale):
* lisp/speedbar.el (speedbar-stealthy-updates)
(speedbar-fetch-dynamic-etags):
* lisp/emacs-lisp/edebug.el (edebug--recursive-edit):
* lisp/emacs-lisp/package.el (package--read-pkg-desc):
* lisp/cedet/semantic.el (semantic-refresh-tags-safe):
* lisp/emulation/viper-cmd.el (viper-escape-to-state):
* lisp/emulation/viper-cmd.el (viper-file-add-suffix):
* lisp/gnus/mail-source.el (mail-source-movemail):
* lisp/mail/feedmail.el (feedmail-send-it-immediately)
(feedmail-deduce-address-list):
* lisp/mail/mailclient.el (mailclient-send-it):
* lisp/mail/smtpmail.el (smtpmail-deduce-address-list):
* lisp/mh-e/mh-print.el (mh-ps-print-range):
* lisp/textmodes/reftex-index.el (reftex-index-this-phrase):
* test/lisp/emacs-lisp/ert-tests.el (ert-test-run-tests-batch):
(ert-test-run-tests-batch-expensive):
Remove unwind-protect forms that are apparently useless, some since a
prior edit that removed their purpose, some since their first
appearance.

* test/lisp/subr-tests.el (subr-test--frames-2):
Insert dummy unwind form in backtrace test code.
2023-04-07 19:08:33 +02:00
Po Lu
f9732131cf Update Android port
* configure.ac (ANDROID_MIN_SDK): New variable.
(DX): Remove and replace with D8.
(XCONFIGURE): Check for the minimum version of Android the cross
compiler compiles for.  Generate java/AndroidManifest.xml from
java/AndroidManifest.xml.in.  Allow using Zlib on Android.

* java/AndroidManifest.xml.in: New file.  Use the minimum SDK
detected by configure.

* java/Makefile.in (top_srcdir, version): New variables.
(DX, D8): Replace with D8.
(ANDROID_MIN_SDK, APK_NAME): New variables.
(.PHONY):
(.PRECIOUS):
(classes.dex):
(emacs.apk): Generate $(APK_NAME) instead of `emacs.apk'.

* java/debug.sh: New option --attach-existing.  Attach to an
existing Emacs instance when specified.

* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): New
field `isPaused'.
(invalidateFocus1): Fix infinite recursion.
(detachWindow): Deiconify window.
(attachWindow): Iconify the window if the activity is paused.
(onCreate): Use the ``no title bar'' theme.
(onPause, onResume): New functions.
* java/org/gnu/emacs/EmacsNative.java (sendTouchUp, sendTouchDown)
(sendTouchMove, sendWheel, sendIconified, sendDeiconified): New
functions.
* java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7Typeface):
(list): Remove logging for code that is mostly going to be unused.
* java/org/gnu/emacs/EmacsService.java (ringBell, queryTree)
(getScreenWidth, getScreenHeight, detectMouse): New functions.
* java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView)
(surfaceChanged, surfaceCreated, surfaceDestroyed): Add extra
debug logging.  Avoid deadlock in surfaceCreated.

* java/org/gnu/emacs/EmacsView.java (EmacsView): Try very hard
to make the SurfaceView respect Z order.  It didn't work.
(handleDirtyBitmap): Copy over the contents from the old bitmap.
(explicitlyDirtyBitmap): New function.
(onLayout): Don't dirty bitmap if unnecessary.
(damageRect, swapBuffers): Don't synchronize so hard.
(onTouchEvent): Call window.onTouchEvent instead.
(moveChildToBack, raise, lower): New functions.

* java/org/gnu/emacs/EmacsWindow.java (Coordinate): New
subclass.
(pointerMap, isMapped, isIconified, dontFocusOnMap)
(dontAcceptFocus): New fields.
(EmacsWindow): Don't immediately register unmapped window.
(viewLayout): Send configure event outside the lock.
(requestViewLayout): Explicitly dirty the bitmap.
(mapWindow): Register the window now.  Respect dontFocusOnMap.
(unmapWindow): Unregister the window now.
(figureChange, onTouchEvent): New functions.
(onSomeKindOfMotionEvent): Handle scroll wheel events.
(reparentTo, makeInputFocus, raise, lower, getWindowGeometry)
(noticeIconified, noticeDeiconified, setDontAcceptFocus)
(setDontFocusOnMap, getDontFocusOnMap): New functions.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(registerWindow, detachWindow): Synchronize.
(noticeIconified, noticeDeiconified): New functions.
(copyWindows): New function.

* lisp/frame.el (frame-geometry, frame-edges)
(mouse-absolute-pixel-position, set-mouse-absolute-pixel-position)
(frame-list-z-order, frame-restack, display-mouse-p)
(display-monitor-attributes-list): Implement on Android.

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

* src/android.c (struct android_emacs_service): New methods
`ringBell', `queryTree', `getScreenWidth', `getScreenHeight',
and `detectMouse'.
(struct android_event_queue, android_init_events)
(android_next_event, android_write_event): Remove write limit.
(android_file_access_p): Handle directories correcty.
(android_close): Fix coding style.
(android_fclose): New function.
(android_init_emacs_service): Initialize new methods.
(android_reparent_window): Implement function.
(android_bell, android_set_input_focus, android_raise_window)
(android_lower_window, android_query_tree, android_get_geometry)
(android_get_screen_width, android_get_screen_height)
(android_get_mm_width, android_get_mm_height, android_detect_mouse)
(android_set_dont_focus_on_map, android_set_dont_accept_focus):
New functions.
(struct android_dir): New structure.
(android_opendir, android_readdir, android_closedir): New
functions.
(emacs_abort): Implement here on Android and poke debuggerd into
generating a tombstone.

* src/android.h: Update prototypes.

* src/androidfns.c (android_set_parent_frame): New function.
(android_default_font_parameter): Use sane font size by default.
(Fx_display_pixel_width, Fx_display_pixel_height)
(Fx_display_mm_width, Fx_display_mm_height)
(Fx_display_monitor_attributes_list): Rename to start with
`android-'.  Implement.  Fiddle with documentation to introduce
Android specific nuances.
(Fandroid_display_monitor_attributes_list): New function.
(Fx_frame_geometry, frame_geometry): New function.
(Fandroid_frame_geometry): Implement correctly.
(Fx_frame_list_z_order): Rename to start with `android-'.
(android_frame_list_z_order, Fandroid_frame_list_z_order):
Implement.
(Fx_frame_restack): Rename to start with `android-'.
(Fandroid_frame_restack): ``Implement''.
(Fx_mouse_absolute_pixel_position): Rename to start with
`android-'.
(Fandroid_mouse_absolute_pixel_position): ``Implement''.
(Fx_set_mouse_absolute_pixel_position): Rename to start with
`android-'.
(Fandroid_set_mouse_absolute_pixel_position): ``Implement''.
(Fandroid_detect_mouse): New function.
(android_set_menu_bar_lines): Use FRAME_ANDROID_DRAWABLE when
clearing area.
(android_set_no_focus_on_map, android_set_no_accept_focus): New
functions.
(android_frame_parm_handlers): Register new frame parameter
handlers.
(syms_of_androidfns): Update appropriately.

* src/androidfont.c (androidfont_draw): Use
FRAME_ANDROID_DRAWABLE instead of FRAME_ANDROID_WINDOW.

* src/androidgui.h (enum android_event_type): New events.
(struct android_touch_event, struct android_wheel_event)
(struct android_iconify_event): New structures.
(union android_event): Add new events.

* src/androidterm.c (android_clear_frame): Use
FRAME_ANDROID_DRAWABLE instead of FRAME_ANDROID_WINDOW.
(android_flash, android_ring_bell): Implement bell ringing.
(android_toggle_invisible_pointer): Don't TODO function that
can't be implemented.
(show_back_buffer, android_flush_dirty_back_buffer_on): Check if
a buffer flip is required before doing the flip.
(android_lower_frame, android_raise_frame): Implement functions.
(android_update_tools, android_find_tool): New functions.
(handle_one_android_event): Handle new iconification, wheel and
touch events.
(android_read_socket): Implement pending-autoraise-frames.
(android_frame_up_to_date): Implement bell ringing.
(android_buffer_flipping_unblocked_hook): Check if a buffer flip
is required before doing the flip.
(android_focus_frame, android_frame_highlight)
(android_frame_unhighlight): New function.
(android_frame_rehighlight): Implement functions.
(android_iconify_frame): Always display error.
(android_set_alpha): Update commentary.
(android_free_frame_resources): Free frame touch points.
(android_scroll_run, android_flip_and_flush)
(android_clear_rectangle, android_draw_fringe_bitmap)
(android_draw_glyph_string_background, android_fill_triangle)
(android_clear_point, android_draw_relief_rect)
(android_draw_box_rect, android_draw_glyph_string_bg_rect)
(android_draw_image_foreground, android_draw_stretch_glyph_string)
(android_draw_underwave, android_draw_glyph_string_foreground)
(android_draw_composite_glyph_string_foreground)
(android_draw_glyphless_glyph_string_foreground)
(android_draw_glyph_string, android_clear_frame_area)
(android_clear_under_internal_border, android_draw_hollow_cursor)
(android_draw_bar_cursor, android_draw_vertical_window_border)
(android_draw_window_divider): Use FRAME_ANDROID_DRAWABLE
instead of FRAME_ANDROID_WINDOW for drawing operations.

* src/androidterm.h (struct android_touch_point): New structure.
(struct android_output): New fields.
(FRAME_ANDROID_NEED_BUFFER_FLIP): New macro.

* src/dired.c (emacs_readdir, open_directory)
(directory_files_internal_unwind, read_dirent)
(directory_files_internal, file_name_completion): Add
indirection over readdir and opendir.  Use android variants on
Android.

* src/dispnew.c (Fopen_termscript):
* src/fileio.c (fclose_unwind): Use emacs_fclose.
(Faccess_file): Call android_file_access_p.
(file_accessible_directory_p): Append right suffix to Android
assets directory.
(do_auto_save_unwind): Use emacs_fclose.
* src/keyboard.c (lispy_function_keys): Use right function key
for page up and page down.
(Fopen_dribble_file): Use emacs_fclose.

* src/lisp.h: New prototype emacs_fclose.

* src/lread.c (close_infile_unwind): Use emacs_fclose.

* src/sfnt.c (sfnt_curve_is_flat): Fix area-squared computation.
(sfnt_prepare_raster): Compute raster width and height
consistently with outline building.
(sfnt_build_outline_edges): Use the same offsets used to set
offy and offx.
(main): Adjust debug code.

* src/sfntfont-android.c (sfntfont_android_saturate32): Delete
function.
(sfntfont_android_blend, sfntfont_android_blendrgb): Remove
unnecessary debug code.
(sfntfont_android_composite_bitmap): Prevent out of bounds
write.
(sfntfont_android_put_glyphs): Use FRAME_ANDROID_DRAWABLE.
(init_sfntfont_android): Initialize Monospace Serif font to
something sensible.
* src/sfntfont.c (sfntfont_text_extents): Clear glyph metrics
before summing up pcm.
(sfntfont_draw): Use s->font instead of s->face->font.

* src/sysdep.c (emacs_fclose): Wrap around android_fclose on
android.

* src/term.c (Fsuspend_tty):
(delete_tty): Use emacs_fclose.
* src/verbose.mk.in (AM_V_DX): Replace with D8 version.
2023-01-13 15:53:08 +08:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
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