[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1f4f1358e6 4/6: Declare unused function ediff-user-grabbed-mouse
From: |
Stefan Kangas |
Subject: |
master 1f4f1358e6 4/6: Declare unused function ediff-user-grabbed-mouse obsolete |
Date: |
Sun, 7 Aug 2022 08:52:35 -0400 (EDT) |
branch: master
commit 1f4f1358e62e2df2b15e557c0008e13d93b9393a
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Declare unused function ediff-user-grabbed-mouse obsolete
* lisp/vc/ediff-init.el (ediff-user-grabbed-mouse): Declare unused
function obsolete. As far as I can tell, this has been unused
since 1996.
* lisp/vc/ediff-wind.el (ediff-mouse-pixel-position): Make
variable obsolete. It is only used in the above obsolete funct
* lisp/vc/ediff-mult.el (ediff-filegroup-action)
(ediff-registry-action):
* lisp/vc/ediff-util.el (ediff-setup): Don't set above unused
variable.
* lisp/vc/ediff-init.el (ediff-spy-after-mouse): Make obsolete.
* lisp/vc/ediff-util.el (ediff-setup): Don't add above obsolete
function to pre-command-hook.
---
lisp/vc/ediff-init.el | 37 +++++++++++++++++++------------------
lisp/vc/ediff-mult.el | 2 --
lisp/vc/ediff-util.el | 4 ----
lisp/vc/ediff-wind.el | 2 +-
4 files changed, 20 insertions(+), 25 deletions(-)
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 273bad5d35..e83a172cb8 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -1419,26 +1419,27 @@ This default should work without changes."
)))
(defsubst ediff-spy-after-mouse ()
- (setq ediff-mouse-pixel-position (mouse-pixel-position)))
+ (declare (obsolete nil "29.1"))
+ (with-suppressed-warnings ((obsolete ediff-mouse-pixel-position))
+ (setq ediff-mouse-pixel-position (mouse-pixel-position))))
-;; It is not easy to find out when the user grabs the mouse, since emacs and
-;; xemacs behave differently when mouse is not in any frame. Also, this is
-;; sensitive to when the user grabbed mouse. Not used for now.
(defun ediff-user-grabbed-mouse ()
- (if ediff-mouse-pixel-position
- (cond ((not (eq (car ediff-mouse-pixel-position)
- (car (mouse-pixel-position)))))
- ((and (car (cdr ediff-mouse-pixel-position))
- (car (cdr (mouse-pixel-position)))
- (cdr (cdr ediff-mouse-pixel-position))
- (cdr (cdr (mouse-pixel-position))))
- (not (and (< (abs (- (car (cdr ediff-mouse-pixel-position))
- (car (cdr (mouse-pixel-position)))))
- ediff-mouse-pixel-threshold)
- (< (abs (- (cdr (cdr ediff-mouse-pixel-position))
- (cdr (cdr (mouse-pixel-position)))))
- ediff-mouse-pixel-threshold))))
- (t nil))))
+ (declare (obsolete nil "29.1"))
+ (with-suppressed-warnings ((obsolete ediff-mouse-pixel-position))
+ (if ediff-mouse-pixel-position
+ (cond ((not (eq (car ediff-mouse-pixel-position)
+ (car (mouse-pixel-position)))))
+ ((and (car (cdr ediff-mouse-pixel-position))
+ (car (cdr (mouse-pixel-position)))
+ (cdr (cdr ediff-mouse-pixel-position))
+ (cdr (cdr (mouse-pixel-position))))
+ (not (and (< (abs (- (car (cdr ediff-mouse-pixel-position))
+ (car (cdr (mouse-pixel-position)))))
+ ediff-mouse-pixel-threshold)
+ (< (abs (- (cdr (cdr ediff-mouse-pixel-position))
+ (cdr (cdr (mouse-pixel-position)))))
+ ediff-mouse-pixel-threshold))))
+ (t nil)))))
(define-obsolete-function-alias 'ediff-frame-char-height
#'frame-char-height "27.1")
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el
index b7c349fc1c..fc2d899c2e 100644
--- a/lisp/vc/ediff-mult.el
+++ b/lisp/vc/ediff-mult.el
@@ -1861,7 +1861,6 @@ all marked sessions must be active."
;; handle an individual session with a live control buffer
((ediff-buffer-live-p session-buf)
(ediff-with-current-buffer session-buf
- (setq ediff-mouse-pixel-position (mouse-pixel-position))
(ediff-recenter 'no-rehighlight)))
((ediff-problematic-session-p info)
@@ -2005,7 +2004,6 @@ all marked sessions must be active."
(ediff-show-meta-buffer ctl-buf t)
;; it's a session buffer -- invoke go back to session
(ediff-with-current-buffer ctl-buf
- (setq ediff-mouse-pixel-position (mouse-pixel-position))
(ediff-recenter 'no-rehighlight)))
(beep)
(message "You've selected a stale session --- try again")
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index 97dfc02201..dd01feb1a7 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -296,10 +296,6 @@ to invocation.")
(if (string-match "buffer" (symbol-name ediff-job-name))
(setq ediff-keep-variants t))
- (if (ediff-window-display-p)
- (add-hook 'pre-command-hook 'ediff-spy-after-mouse nil 'local))
- (setq ediff-mouse-pixel-position (mouse-pixel-position))
-
;; adjust for merge jobs
(if ediff-merge-job
(let ((buf
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index 6db3667545..0579cee6ec 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -179,6 +179,7 @@ Used internally---not a user option.")
(ediff-defvar-local ediff-mouse-pixel-position nil
"Position of the mouse.
Used to decide whether to warp the mouse into control frame.")
+(make-obsolete-variable 'ediff-mouse-pixel-position "it is unused." "29.1")
;; not used for now
(defvar ediff-mouse-pixel-threshold 30
@@ -901,7 +902,6 @@ Create a new splittable frame if none is found."
fheight fwidth adjusted-parameters)
(with-current-buffer ctl-buffer
- ;;(setq user-grabbed-mouse (ediff-user-grabbed-mouse))
(run-hooks 'ediff-before-setup-control-frame-hook))
(setq old-ctl-frame (with-current-buffer ctl-buffer ediff-control-frame))
- master updated (4252cea163 -> b65a2d1d99), Stefan Kangas, 2022/08/07
- master c6abfb32d7 2/6: Remove workaround for XEmacs bug in ediff-util.el, Stefan Kangas, 2022/08/07
- master e672cad231 5/6: ; Improve obsoletions in ediff-init.el, Stefan Kangas, 2022/08/07
- master cf98a395d0 1/6: * lib-src/etags.c: Remove XEmacs support., Stefan Kangas, 2022/08/07
- master b65a2d1d99 6/6: Make ediff-file-remote-p obsolete in favor of file-remote-p, Stefan Kangas, 2022/08/07
- master 4439a80407 3/6: Make compat function custom-reset-variables obsolete, Stefan Kangas, 2022/08/07
- master 1f4f1358e6 4/6: Declare unused function ediff-user-grabbed-mouse obsolete,
Stefan Kangas <=