summaryrefslogtreecommitdiff
path: root/lisp/mwheel.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2023-04-07 16:29:32 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2023-04-07 19:08:33 +0200
commit7c0c2b1bb539424af1bb72bd9caefedd66cfd3da (patch)
treed17e18d4bf8407c818985e29f22c5bb8b3d1717a /lisp/mwheel.el
parent211618293d9fd620f9f8971090e049d98c05f546 (diff)
downloademacs-7c0c2b1bb539424af1bb72bd9caefedd66cfd3da.tar.gz
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.
Diffstat (limited to 'lisp/mwheel.el')
-rw-r--r--lisp/mwheel.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 1be52d24e34..caa74159ecd 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -447,13 +447,12 @@ See also `text-scale-adjust'."
This invokes `global-text-scale-adjust', which see."
(interactive (list last-input-event))
(let ((button (mwheel-event-button event)))
- (unwind-protect
- (cond ((memq button (list mouse-wheel-down-event
- mouse-wheel-down-alternate-event))
- (global-text-scale-adjust 1))
- ((memq button (list mouse-wheel-up-event
- mouse-wheel-up-alternate-event))
- (global-text-scale-adjust -1))))))
+ (cond ((memq button (list mouse-wheel-down-event
+ mouse-wheel-down-alternate-event))
+ (global-text-scale-adjust 1))
+ ((memq button (list mouse-wheel-up-event
+ mouse-wheel-up-alternate-event))
+ (global-text-scale-adjust -1)))))
(defun mouse-wheel--add-binding (key fun)
"Bind mouse wheel button KEY to function FUN.