[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/visual-fill-column 34ce0d22da 072/137: Guard against non-e
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/visual-fill-column 34ce0d22da 072/137: Guard against non-existing mouse events |
Date: |
Sun, 2 Jan 2022 22:59:13 -0500 (EST) |
branch: elpa/visual-fill-column
commit 34ce0d22da98587b8f77212b74ab2ab0d80ac5ff
Author: Peter W. V. Tran-Jørgensen <pvj@eng.au.dk>
Commit: GitHub <noreply@github.com>
Guard against non-existing mouse events
If mouse-wheel-mode is not enabled the mouse wheel events will be void
---
visual-fill-column.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/visual-fill-column.el b/visual-fill-column.el
index ea5b030ff8..5ee143ef31 100644
--- a/visual-fill-column.el
+++ b/visual-fill-column.el
@@ -71,11 +71,13 @@ this option is set to a value, it is used instead."
:init-value nil :lighter nil :global nil
:keymap
(let ((map (make-sparse-keymap)))
- (define-key map (vector 'left-margin mouse-wheel-down-event)
'mwheel-scroll)
- (define-key map (vector 'left-margin mouse-wheel-up-event) 'mwheel-scroll)
- (define-key map (vector 'right-margin mouse-wheel-down-event)
'mwheel-scroll)
- (define-key map (vector 'right-margin mouse-wheel-up-event) 'mwheel-scroll)
- map)
+ (when (bound-and-true-p mouse-wheel-mode)
+ (progn
+ (define-key map (vector 'left-margin mouse-wheel-down-event)
'mwheel-scroll)
+ (define-key map (vector 'left-margin mouse-wheel-up-event)
'mwheel-scroll)
+ (define-key map (vector 'right-margin mouse-wheel-down-event)
'mwheel-scroll)
+ (define-key map (vector 'right-margin mouse-wheel-up-event)
'mwheel-scroll))
+ map))
(if visual-fill-column-mode
(visual-fill-column-mode--enable)
(visual-fill-column-mode--disable)))
- [nongnu] elpa/visual-fill-column 06bb6157d1 124/137: Use `cond` instead of a series of `when`s., (continued)
- [nongnu] elpa/visual-fill-column 06bb6157d1 124/137: Use `cond` instead of a series of `when`s., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column c1f6accd9e 121/137: Update version number to 2.3, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column ceb2c74827 133/137: Update the README., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 84638e9ff4 130/137: Add a note about writeroom-mode to the README., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column bd78372bd3 131/137: Fix link to writeroom-mode., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column a2657f20f6 128/137: Add note about centring text., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column a44fe8d78c 135/137: Point URL header to Codeberg., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 2df643827a 134/137: Add adaptive-wrap screen shots., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column dde0aa6535 061/137: Update README, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 5f5928fd7f 045/137: Merge pull request #19 from cpitclaudel/master, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 34ce0d22da 072/137: Guard against non-existing mouse events,
ELPA Syncer <=
- [nongnu] elpa/visual-fill-column 0044394939 054/137: Make some changes to the README.md, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 982606896e 077/137: Change :group parameter of defgroup to `text`., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column d97017e9bc 058/137: Use correct option `visual-fill-column-fringes-outside-margins' in README., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column d05a7e9c62 004/137: Allow `visual-fill-column-width` to be set to an integer., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column b63174ec24 006/137: Update README, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column d3ebba9e60 009/137: Update version number in header block., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 7bf332089a 012/137: Fix typo., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 261e27c062 024/137: Update version number to 1.5, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 043485d16a 026/137: Rename ::window-body-width to ::window-max-text-width, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 96ac324638 031/137: Remove spurious empty line., ELPA Syncer, 2022/01/02