Merge from origin/emacs-28
0dd3883def
Update to Org 9.5-72-gc5d6656e3d5337970
Fix mouse handling with several TTY frames on MS-Windows7e437af413
Fix temacs invocation from outside of the 'src' directory0fbfd4253e
; Avoid byte-compilation warnings in edmacro.elc22c988b1f
Fix mouse events on tab bar or tool bar when 'track-mouse'...354c834fba
Fix `browse-url-interactive-arg' for certain kinds of events # Conflicts: # lisp/mouse.el
This commit is contained in:
commit
1de6a86553
10 changed files with 81 additions and 48 deletions
|
@ -601,6 +601,12 @@ This function assumes that the events can be stored in a string."
|
|||
(setf (aref seq i) (logand (aref seq i) 127))))
|
||||
seq)
|
||||
|
||||
;; These are needed in a --without-x build.
|
||||
(defvar mouse-wheel-down-event)
|
||||
(defvar mouse-wheel-up-event)
|
||||
(defvar mouse-wheel-right-event)
|
||||
(defvar mouse-wheel-left-event)
|
||||
|
||||
(defun edmacro-fix-menu-commands (macro &optional noerror)
|
||||
(if (vectorp macro)
|
||||
(let (result)
|
||||
|
|
|
@ -282,6 +282,8 @@ To test this function, evaluate:
|
|||
(setq window-last-row (- (window-height) 2)
|
||||
window-last-col (- (window-width) 2))
|
||||
(track-mouse
|
||||
;; Set 'track-mouse' to something neither nil nor t (Bug#51794).
|
||||
(setq track-mouse 'drag-dragging)
|
||||
(while (progn
|
||||
(setq event (read--potential-mouse-event)
|
||||
end (event-end event)
|
||||
|
|
|
@ -1630,7 +1630,11 @@ The region will be defined with mark and point."
|
|||
(goto-char (nth 1 range)))
|
||||
|
||||
(setf (terminal-parameter nil 'mouse-drag-start) start-event)
|
||||
(setq track-mouse t)
|
||||
;; Set 'track-mouse' to something neither nil nor t, so that mouse
|
||||
;; events are not reported to have happened on the tool bar or the
|
||||
;; tab bar, as that breaks drag events that originate on the window
|
||||
;; body below these bars; see make_lispy_position and bug#51794.
|
||||
(setq track-mouse 'drag-tracking)
|
||||
|
||||
(set-transient-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
|
|
|
@ -737,7 +737,8 @@ position clicked before acting.
|
|||
This function returns a list (URL NEW-WINDOW-FLAG)
|
||||
for use in `interactive'."
|
||||
(let ((event (elt (this-command-keys) 0)))
|
||||
(and (listp event) (mouse-set-point event)))
|
||||
(when (mouse-event-p event)
|
||||
(mouse-set-point event)))
|
||||
(list (read-string prompt (or (and transient-mark-mode mark-active
|
||||
;; rfc2396 Appendix E.
|
||||
(replace-regexp-in-string
|
||||
|
|
|
@ -203,40 +203,39 @@ When nil, you can use these keybindings to navigate the buffer:
|
|||
"Let the user select a location in current buffer.
|
||||
This function uses a recursive edit. It returns the selected
|
||||
position or nil."
|
||||
(org-no-popups
|
||||
(let ((isearch-mode-map org-goto-local-auto-isearch-map)
|
||||
(isearch-hide-immediately nil)
|
||||
(isearch-search-fun-function
|
||||
(lambda () #'org-goto--local-search-headings))
|
||||
(help (or help org-goto-help)))
|
||||
(save-excursion
|
||||
(save-window-excursion
|
||||
(delete-other-windows)
|
||||
(and (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
|
||||
(pop-to-buffer-same-window
|
||||
(condition-case nil
|
||||
(make-indirect-buffer (current-buffer) "*org-goto*" t)
|
||||
(error (make-indirect-buffer (current-buffer) "*org-goto*" t))))
|
||||
(let (temp-buffer-show-function temp-buffer-show-hook)
|
||||
(with-output-to-temp-buffer "*Org Help*"
|
||||
(princ (format help (if org-goto-auto-isearch
|
||||
" Just type for auto-isearch."
|
||||
" n/p/f/b/u to navigate, q to quit.")))))
|
||||
(org-fit-window-to-buffer (get-buffer-window "*Org Help*"))
|
||||
(org-overview)
|
||||
(setq buffer-read-only t)
|
||||
(if (and (boundp 'org-goto-start-pos)
|
||||
(integer-or-marker-p org-goto-start-pos))
|
||||
(progn (goto-char org-goto-start-pos)
|
||||
(when (org-invisible-p)
|
||||
(org-show-set-visibility 'lineage)))
|
||||
(goto-char (point-min)))
|
||||
(let (org-special-ctrl-a/e) (org-beginning-of-line))
|
||||
(message "Select location and press RET")
|
||||
(use-local-map org-goto-map)
|
||||
(recursive-edit)))
|
||||
(kill-buffer "*org-goto*")
|
||||
(cons org-goto-selected-point org-goto-exit-command))))
|
||||
(let ((isearch-mode-map org-goto-local-auto-isearch-map)
|
||||
(isearch-hide-immediately nil)
|
||||
(isearch-search-fun-function
|
||||
(lambda () #'org-goto--local-search-headings))
|
||||
(help (or help org-goto-help)))
|
||||
(save-excursion
|
||||
(save-window-excursion
|
||||
(delete-other-windows)
|
||||
(and (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
|
||||
(pop-to-buffer-same-window
|
||||
(condition-case nil
|
||||
(make-indirect-buffer (current-buffer) "*org-goto*" t)
|
||||
(error (make-indirect-buffer (current-buffer) "*org-goto*" t))))
|
||||
(let (temp-buffer-show-function temp-buffer-show-hook)
|
||||
(with-output-to-temp-buffer "*Org Help*"
|
||||
(princ (format help (if org-goto-auto-isearch
|
||||
" Just type for auto-isearch."
|
||||
" n/p/f/b/u to navigate, q to quit.")))))
|
||||
(org-fit-window-to-buffer (get-buffer-window "*Org Help*"))
|
||||
(org-overview)
|
||||
(setq buffer-read-only t)
|
||||
(if (and (boundp 'org-goto-start-pos)
|
||||
(integer-or-marker-p org-goto-start-pos))
|
||||
(progn (goto-char org-goto-start-pos)
|
||||
(when (org-invisible-p)
|
||||
(org-show-set-visibility 'lineage)))
|
||||
(goto-char (point-min)))
|
||||
(let (org-special-ctrl-a/e) (org-beginning-of-line))
|
||||
(message "Select location and press RET")
|
||||
(use-local-map org-goto-map)
|
||||
(recursive-edit)))
|
||||
(kill-buffer "*org-goto*")
|
||||
(cons org-goto-selected-point org-goto-exit-command)))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-goto (&optional alternative-interface)
|
||||
|
|
|
@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
|
|||
(defun org-git-version ()
|
||||
"The Git version of Org mode.
|
||||
Inserted by installing Org or when a release is made."
|
||||
(let ((org-git-version "release_9.5-68-g77e2ec"))
|
||||
(let ((org-git-version "release_9.5-72-gc5d6656"))
|
||||
org-git-version))
|
||||
|
||||
(provide 'org-version)
|
||||
|
|
|
@ -280,6 +280,7 @@ re-read the iCalendar file.")
|
|||
(footnote-definition . ignore)
|
||||
(footnote-reference . ignore)
|
||||
(headline . org-icalendar-entry)
|
||||
(inner-template . org-icalendar-inner-template)
|
||||
(inlinetask . ignore)
|
||||
(planning . ignore)
|
||||
(section . ignore)
|
||||
|
@ -805,6 +806,11 @@ END:VALARM\n"
|
|||
|
||||
;;;; Template
|
||||
|
||||
(defun org-icalendar-inner-template (contents _)
|
||||
"Return document body string after iCalendar conversion.
|
||||
CONTENTS is the transcoded contents string."
|
||||
contents)
|
||||
|
||||
(defun org-icalendar-template (contents info)
|
||||
"Return complete document string after iCalendar conversion.
|
||||
CONTENTS is the transcoded contents string. INFO is a plist used
|
||||
|
|
11
src/emacs.c
11
src/emacs.c
|
@ -2334,6 +2334,17 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
|
|||
/* Unless next switch is -nl, load "loadup.el" first thing. */
|
||||
if (! no_loadup)
|
||||
Vtop_level = list2 (Qload, build_string ("loadup.el"));
|
||||
|
||||
#ifdef HAVE_NATIVE_COMP
|
||||
/* If we are going to load stuff in a non-initialized Emacs,
|
||||
update the value of native-comp-eln-load-path, so that the
|
||||
*.eln files will be found if they are there. */
|
||||
if (!NILP (Vtop_level) && !temacs)
|
||||
Vnative_comp_eln_load_path =
|
||||
Fcons (Fexpand_file_name (XCAR (Vnative_comp_eln_load_path),
|
||||
Vinvocation_directory),
|
||||
Qnil);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Set up for profiling. This is known to work on FreeBSD,
|
||||
|
|
|
@ -5103,19 +5103,20 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
|
|||
#endif
|
||||
)
|
||||
{
|
||||
/* FIXME: While track_mouse is non-nil, we do not report this
|
||||
/* While 'track-mouse' is neither nil nor t, do not report this
|
||||
event as something that happened on the tool or tab bar since
|
||||
that would break mouse dragging operations that originate from
|
||||
an ordinary window beneath and expect the window to auto-scroll
|
||||
as soon as the mouse cursor appears above or beneath it
|
||||
(Bug#50993). Since this "fix" might break track_mouse based
|
||||
operations originating from the tool or tab bar itself, such
|
||||
operations should set track_mouse to some special value that
|
||||
would be recognized by the following check.
|
||||
that would break mouse drag operations that originate from an
|
||||
ordinary window beneath that bar and expect the window to
|
||||
auto-scroll as soon as the mouse cursor appears above or
|
||||
beneath it (Bug#50993). We do allow reports for t, because
|
||||
applications may have set 'track-mouse' to t and still expect a
|
||||
click on the tool or tab bar to get through (Bug#51794).
|
||||
|
||||
This issue should be properly handled by 'mouse-drag-track' and
|
||||
friends, so the below is only a temporary workaround. */
|
||||
if (NILP (track_mouse))
|
||||
FIXME: This is a preliminary fix for the bugs cited above and
|
||||
awaits a solution that includes a convention for all special
|
||||
values of 'track-mouse' and their documentation in the Elisp
|
||||
manual. */
|
||||
if (NILP (track_mouse) || EQ (track_mouse, Qt))
|
||||
posn = EQ (window_or_frame, f->tab_bar_window) ? Qtab_bar : Qtool_bar;
|
||||
/* Kludge alert: for mouse events on the tab bar and tool bar,
|
||||
keyboard.c wants the frame, not the special-purpose window
|
||||
|
|
|
@ -470,6 +470,9 @@ do_mouse_event (MOUSE_EVENT_RECORD *event,
|
|||
DWORD but_change, mask, flags = event->dwEventFlags;
|
||||
int i;
|
||||
|
||||
/* Mouse didn't move unless MOUSE_MOVED says it did. */
|
||||
SELECTED_FRAME ()->mouse_moved = 0;
|
||||
|
||||
switch (flags)
|
||||
{
|
||||
case MOUSE_MOVED:
|
||||
|
|
Loading…
Add table
Reference in a new issue