From: Juri Linkov Date: Mon, 18 Oct 2021 16:52:29 +0000 (+0300) Subject: Rename tab-bar-drag-maybe to tab-bar--dragging-in-progress X-Git-Tag: emacs-28.0.90~258 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a3242301d9f1517592656b2643c5c1ab8e8af37;p=emacs.git Rename tab-bar-drag-maybe to tab-bar--dragging-in-progress * lisp/tab-bar.el (tab-bar--event-to-item, tab-bar-mouse-down-1) (tab-bar-mouse-move-tab): Rename tab-bar-drag-maybe to tab-bar--dragging-in-progress. * src/xdisp.c (note_mouse_highlight): Rename tab_bar_drag_maybe to tab_bar__dragging_in_progress. --- diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 3dc95c91691..03556919b20 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -239,7 +239,7 @@ For any other value of KEY, the value is t." (string-to-number (string-replace "tab-" "" key-name))))) (t t))) -(defvar tab-bar-drag-maybe) +(defvar tab-bar--dragging-in-progress) (defun tab-bar--event-to-item (posn) "This function extracts extra info from the mouse event at position POSN. @@ -248,7 +248,7 @@ It returns a list of the form (KEY KEY-BINDING CLOSE-P), where: KEY-BINDING is the binding of KEY; CLOSE-P is non-nil if the mouse event was a click on the close button \"x\", nil otherwise." - (setq tab-bar-drag-maybe nil) + (setq tab-bar--dragging-in-progress nil) (if (posn-window posn) (let ((caption (car (posn-string posn)))) (when caption @@ -280,7 +280,7 @@ existing tab." (interactive "e") (let* ((item (tab-bar--event-to-item (event-start event))) (tab-number (tab-bar--key-to-number (nth 0 item)))) - (setq tab-bar-drag-maybe t) + (setq tab-bar--dragging-in-progress t) ;; Don't close the tab when clicked on the close button. Also ;; don't add new tab on down-mouse. Let `tab-bar-mouse-1' do this. (unless (or (eq (car item) 'add-tab) (nth 2 item)) @@ -357,7 +357,7 @@ only when you click on its \"x\" close button." This command should be bound to a drag event. It moves the tab at the mouse-down event to the position at mouse-up event." (interactive "e") - (setq tab-bar-drag-maybe nil) + (setq tab-bar--dragging-in-progress nil) (let ((from (tab-bar--key-to-number (nth 0 (tab-bar--event-to-item (event-start event))))) diff --git a/src/xdisp.c b/src/xdisp.c index dc927253efe..67946a56b47 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -33644,7 +33644,7 @@ note_mouse_highlight (struct frame *f, int x, int y) if (EQ (window, f->tab_bar_window)) { note_tab_bar_highlight (f, x, y); - if (tab_bar_drag_maybe) + if (tab_bar__dragging_in_progress) { cursor = FRAME_OUTPUT_DATA (f)->hand_cursor; goto set_cursor; @@ -35780,9 +35780,9 @@ When nil, mouse-movement events will not be generated as long as the mouse stays within the extent of a single glyph (except for images). */); mouse_fine_grained_tracking = false; - DEFVAR_BOOL ("tab-bar-drag-maybe", tab_bar_drag_maybe, + DEFVAR_BOOL ("tab-bar--dragging-in-progress", tab_bar__dragging_in_progress, doc: /* Non-nil when maybe dragging tab bar item. */); - tab_bar_drag_maybe = false; + tab_bar__dragging_in_progress = false; DEFVAR_BOOL ("redisplay-skip-initial-frame", redisplay_skip_initial_frame, doc: /* Non-nil to skip redisplay in initial frame.