[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/ws-butler cbb0406f16 04/14: Fix comp warnings
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/ws-butler cbb0406f16 04/14: Fix comp warnings |
Date: |
Thu, 7 Nov 2024 01:01:08 -0500 (EST) |
branch: elpa/ws-butler
commit cbb0406f16cb83f81b50fe726321d3643d3066af
Author: Mattias Bengtsson <mattias.jc.bengtsson@gmail.com>
Commit: Mattias Bengtsson <mattias.jc.bengtsson@gmail.com>
Fix comp warnings
---
ws-butler.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/ws-butler.el b/ws-butler.el
index 4eb2261996..30e4e55646 100644
--- a/ws-butler.el
+++ b/ws-butler.el
@@ -80,7 +80,7 @@ i.e. only the \"virtual\" space is preserved in the buffer."
(defcustom ws-butler-convert-leading-tabs-or-spaces
nil
- "Make leading whitespace be tabs or spaces
+ "Make leading whitespace be tabs or spaces.
If `indent-tabs-mode' is non-nil, call `tabify', else call
`untabify'. Do neither if `smart-tabs-mode' is enabled for this
@@ -149,7 +149,7 @@ Also see `require-final-newline'."
(replace-match ""))))
(defun ws-butler-maybe-trim-eob-lines (last-modified-pos)
- "Delete extra newlines at end of buffer if LAST-MODIFIED-POS is in the patch
of excess newlines."
+ "Trim newlines at EOB if LAST-MODIFIED-POS is inside the excess newlines."
(interactive (list nil))
(unless buffer-read-only
(unless last-modified-pos
@@ -183,7 +183,7 @@ replaced by spaces, and vice versa if t."
(when (and ws-butler-convert-leading-tabs-or-spaces
(not (bound-and-true-p smart-tabs-mode)))
;; convert leading tabs to spaces or v.v.
- (let ((eol (point-at-eol)))
+ (let ((eol (line-end-position)))
(if indent-tabs-mode
(progn
(skip-chars-forward "\t" eol)
@@ -242,11 +242,11 @@ ensure point doesn't jump due to white space trimming."
(lambda (_prop beg end)
(save-excursion
(setq beg (progn (goto-char beg)
- (point-at-bol))
+ (line-end-position))
;; Subtract one from end to overcome Emacs bug #17784, since we
;; always expand to end of line anyway, this should be OK.
end (progn (goto-char (1- end))
- (point-at-eol))))
+ (line-end-position))))
(when (funcall ws-butler-trim-predicate beg end)
(ws-butler-clean-region beg end))
(setq last-end end)))
@@ -259,6 +259,8 @@ ensure point doesn't jump due to white space trimming."
(remove-list-of-text-properties start end
'(ws-butler-chg))))))
(defun ws-butler-after-change (beg end length-before)
+ "Update ws-butler text properties.
+See `after-change-functions' for explanation of BEG, END & LENGTH-BEFORE."
(let ((type (if (and (= beg end) (> length-before 0))
'delete
'chg)))
@@ -319,6 +321,7 @@ for lines modified by you."
;;;###autoload
(define-globalized-minor-mode ws-butler-global-mode ws-butler-mode
(lambda ()
+ "Enable `ws-butler-mode' unless current major mode is exempt."
(unless (apply #'derived-mode-p ws-butler-global-exempt-modes)
(ws-butler-mode))))
- [nongnu] elpa/ws-butler updated (e3a38d93e0 -> d3927f6131), ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler a49d9e3c4a 03/14: Add NonGNU ELPA badge to README.org, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler 5b8b57f278 01/14: Sharp-quote function symbols, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler c13632209c 05/14: looking-at -> looking-at-p, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler 16e07eeb0e 11/14: Merge pull request #42 from skangas/gnu-elpa-badge, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler cbb0406f16 04/14: Fix comp warnings,
ELPA Syncer <=
- [nongnu] elpa/ws-butler d3927f6131 14/14: tag 0.7, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler 6baf406d61 06/14: Add special, comint, term, & eshell to exempt modes, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler 2acf9ac04b 09/14: Merge pull request #53 from Apteryks/merge-hlissner-fork-improvements, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler a8612c15f6 08/14: Merge branch 'hlissner-master' into merge-hlissner-fork-improvements, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler ac9f5a5f90 13/14: Add minibuffer-mode to exempt-modes., ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler 0f8c2fe788 02/14: Add support to ppc64le. Install emacs, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler 85d4e32040 07/14: add diff-mode to ws-butler-global-exempt-modes, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler 345dbde68e 10/14: Merge pull request #51 from mattiasb/feature/fix-warnings, ELPA Syncer, 2024/11/07
- [nongnu] elpa/ws-butler 3596ad450d 12/14: Merge pull request #38 from gururajrkatti/master, ELPA Syncer, 2024/11/07