1. 21 Nov, 2021 8 commits
  2. 20 Nov, 2021 30 commits
    • Michael Albinus's avatar
    • Michael Albinus's avatar
      Revert last change on emba files · 33e99441
      Michael Albinus authored
      33e99441
    • Po Lu's avatar
      Add support for the Haiku operating system and its window system · 85a078e7
      Po Lu authored
      * .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.
      85a078e7
    • Michael Albinus's avatar
      ; Rearrange normal stage in emba files · bfcc5937
      Michael Albinus authored
      bfcc5937
    • Stefan Kangas's avatar
      ; Fix my last commit · 560a6c35
      Stefan Kangas authored
      * lisp/play/animate.el (animate-string): Ensure the delay is always a
      float.
      560a6c35
    • Stefan Kangas's avatar
      Make string-animate smoother · 14cd6ec8
      Stefan Kangas authored
      * lisp/play/animate.el (animate-total-added-delay): New defcustom.
      (animate-n-steps): Double the default value.  Use :type 'natnum'.
      (animate-string): Make the delay depend on the above new defcustom
      divided by the number of steps.
      14cd6ec8
    • Po Lu's avatar
      Prevent crashes when scrolling in an unknown Window on XI2 · 7294a286
      Po Lu authored
      * src/xterm.c (handle_one_xevent): Fix XI2 frame lookup to
      handle foreign windows.
      7294a286
    • Po Lu's avatar
      Fix xwidgets with XInput 2 builds · 3b68662a
      Po Lu authored
      * src/xwidget.c (Fmake_xwidget): Refrain from synthesizing
      a focus event here on XI2 builds.
      (Fxwidget_perform_lispy_event): Try to set embedder on XI2
      builds and do nothing otherwise.
      (synthesize_focus_in_event): Use focus_change.window as opposed
      to any.window.
      (x_draw_xwidget_glyph_string): Synthesize focus event here
      instead on XI2 builds.
      3b68662a
    • Stefan Kangas's avatar
      Make 'eval' use lexical scoping in most tests · a3a3d3dd
      Stefan Kangas authored
      * test/lisp/electric-tests.el (electric-pair-define-test-form)
      (define-electric-pair-test):
      * test/lisp/emacs-lisp/backtrace-tests.el
      (backtrace-tests--uncompiled-functions):
      * test/lisp/emacs-lisp/cl-macs-tests.el
      (cl-macs-test--symbol-macrolet):
      * test/lisp/emacs-lisp/let-alist-tests.el
      (let-alist-list-to-sexp):
      * test/lisp/emacs-lisp/lisp-tests.el
      (elisp-tests-with-temp-buffer, core-elisp-tests-3-backquote):
      * test/lisp/emacs-lisp/testcover-resources/testcases.el
      (testcover-testcase-nth-case):
      * test/lisp/ffap-tests.el (ffap-ido-mode):
      * test/lisp/files-tests.el (file-test--do-local-variables-test):
      * test/lisp/net/tramp-tests.el (tramp--test-utf8):
      * test/lisp/progmodes/elisp-mode-tests.el
      (find-defs-defgeneric-eval, find-defs-defun-eval)
      (find-defs-defvar-eval, find-defs-face-eval)
      (find-defs-feature-eval): Give 'eval' non-nil LEXICAL argument.
      * test/lisp/subr-tests.el
      (subr-tests--dolist--wrong-number-of-args):
      * test/src/eval-tests.el (eval-tests--if-dot-string)
      (eval-tests--mutating-cond)
      (eval-tests-19790-backquote-comma-dot-substitution): Test 'eval'
      using LEXICAL as both nil and non-nil.
      (eval-tests--let-with-circular-defs): Give explicit nil to 'eval'.
      a3a3d3dd
    • Stefan Kangas's avatar
      image-dired: Improve some messages · 244baa55
      Stefan Kangas authored
      * lisp/image-dired.el (image-dired-dir)
      (image-dired-create-thumb-1): Improve messages.
      (image-dired-rotate-original): Signal 'user-error' instead of 'error'.
      244baa55
    • Stefan Kangas's avatar
      Convert snake and tetris keymaps to defvar-keymap · 67e06d69
      Stefan Kangas authored
      * lisp/play/snake.el (snake-mode-map, snake-null-map):
      * lisp/play/tetris.el (tetris-mode-map, tetris-null-map): Convert
      to defvar-keymap.
      67e06d69
    • Michael Albinus's avatar
      ; Rearrange include in emba scripts · 5cb003c3
      Michael Albinus authored
      5cb003c3
    • Eli Zaretskii's avatar
      9ccfdd54
    • Lars Ingebrigtsen's avatar
      Make shr render text with superscripts prettier · 43517224
      Lars Ingebrigtsen authored
      * lisp/net/shr.el (shr-sup): New face.
      (shr-tag-sup, shr-tag-sub): Use it to make the super/subscripts
      slightly smaller so that we don't get uneven line heights with
      text that uses these.
      43517224
    • Po Lu's avatar
      Fix a comment in XInput related code · 6b0424c1
      Po Lu authored
      * src/xterm.c (x_term_init): Fix comment to say "XInput 2.1"
      instead of "XInput 1.1".
      6b0424c1
    • Po Lu's avatar
      Expose pixel-wise wheel events to Lisp · 0c51c1b5
      Po Lu authored
      * doc/lispref/commands.texi (Misc Events): Document changes to
      wheel events.
      
      * src/keyboard.c (make_lispy_event): Handle wheel events with
      pixel delta data.
      * src/termhooks.h (WHEEL_EVENT): Document changes to
      WHEEL_EVENT args.
      * src/xfns.c (syms_of_xfns): Declare new symbols.
      * src/xterm.c (handle_one_xevent): Give wheel events pixel delta
      data.
      (x_coalesce_scroll_events): New user option.
      0c51c1b5
    • Po Lu's avatar
      Add support for event processing via XInput 2 · 487ec3cf
      Po Lu authored
      * 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.
      487ec3cf
    • Po Lu's avatar
      Allow terminating page loading operations in webkit xwidgets · fbf361f5
      Po Lu authored
      * doc/lispref/display.texi (Xwidgets): Document new function.
      * etc/NEWS: Announce `xwidget-webkit-stop-loading'.
      * src/xwidget.c (Fxwidget_webkit_stop_loading): New function.
      (syms_of_xwidget): Define new subr.
      fbf361f5
    • Gregory Heytings's avatar
      Implement the buttonForeground resource · 2ba7d1e8
      Gregory Heytings authored
      * lwlib/xlwmenu.c (draw_shadow_rectangle, draw_shadow_rhombus):
      Use the buttonForeground resource color (bug#51988).
      2ba7d1e8
    • Lars Ingebrigtsen's avatar
      Fix another narrow-to-defun problem in js-mode · bc99604c
      Lars Ingebrigtsen authored
      * lisp/progmodes/js.el (js--function-prologue-beginning): Fix typo
      in looking-back form (bug#51926).
      bc99604c
    • Michael Albinus's avatar
      Continue adaptions of emba files · 9f069777
      Michael Albinus authored
      * test/infra/default-gitlab-ci.yml: New file, derived from
      gitlab-ci.yml.
      
      * test/infra/gitlab-ci.yml (top, test-jobs-pipeline):
      Include default-gitlab-ci.yml.
      (stages): Remove normal.
      
      * test/infra/test-jobs-generator.sh: Generate also stages entry.
      9f069777
    • Po Lu's avatar
      Make xwidget-events special and document xwidget callbacks · 88458f73
      Po Lu authored
      Users have always been supposed to use callbacks for handling
      xwidget events, but for some reason this has not been
      documented until now.
      
      * doc/lispref/commands.texi (Xwidget Events): Document xwidget
      callbacks and the special status of `xwidget-event's.
      
      * doc/lispref/display.texi (Xwidgets): Add xwidget property
      list functions to the concept index.
      
      * lisp/xwidget.el: Make xwidget events special.
      88458f73
    • Po Lu's avatar
      Use `xwidget-live-p' inside `xwidget-at'. · da508cf4
      Po Lu authored
      It should no longer be possible for Lisp code to abuse internal
      xwidget state, or cause crashes with killed xwidgets and such,
      so the pedantic checking done in this function is no longer
      necessary.  (In fact, it is even wrong, as it won't catch
      killed xwidgets.)
      
      * lisp/xwidget.el (xwidget-at): Use `xwidget-live-p'.
      da508cf4
    • Po Lu's avatar
      Remove nonsensical command in xwidget-webkit-mode-map · 8331916c
      Po Lu authored
      * lisp/xwidget.el (xwidget-webkit-mode-map): Remove nonsensical
      command binding.
      8331916c
    • Stefan Kangas's avatar
      Merge from origin/emacs-28 · 991e304c
      Stefan Kangas authored
      c1eea85b * test/lisp/net/tramp-tests.el (tramp-get-remote-gid): Rem...
      991e304c
    • Stefan Kangas's avatar
      ; Merge from origin/emacs-28 · 824f0de8
      Stefan Kangas authored
      The following commit was skipped:
      
      9b08846f Add upward compatibility entry in Tramp (don't merge)
      824f0de8
    • Po Lu's avatar
      Fix option type of `xwidget-webkit-cookie-file' again · 0a3b55ac
      Po Lu authored
      * lisp/xwidget.el (xwidget-webkit-cookie-file): Revert changes
      caused by rebase.
      0a3b55ac
    • Po Lu's avatar
      Clarify doc string in xwidget-webkit · 35de4774
      Po Lu authored
      * lisp/xwidget.el (xwidget-webkit-buffer-name-format): Update
      doc string.
      35de4774
    • Glenn Morris's avatar
      3817ced7
    • Po Lu's avatar
      Make xwidget-webkit default to not storing cookies · 956f21b6
      Po Lu authored
      * etc/NEWS: Update to reflect change.
      * lisp/xwidget.el (xwidget-webkit-cookie-file): Set default
      value to nil.
      956f21b6
  3. 19 Nov, 2021 2 commits