emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/lentic 19a85aadf8 007/333: Reworked form to circumvent


From: ELPA Syncer
Subject: [elpa] externals/lentic 19a85aadf8 007/333: Reworked form to circumvent byte-compiler warning.
Date: Tue, 27 Feb 2024 12:59:52 -0500 (EST)

branch: externals/lentic
commit 19a85aadf899d44a1c77dd600f4bddbaab24d75e
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Reworked form to circumvent byte-compiler warning.
---
 linked-buffer.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/linked-buffer.el b/linked-buffer.el
index 4d84995ace..3308aa1920 100644
--- a/linked-buffer.el
+++ b/linked-buffer.el
@@ -498,11 +498,13 @@ be an implicit start and END an implicit stop."
 
 (defun linked-buffer-pabbrev-expansion-length ()
   "Returns the length of any text that pabbrev has currently added to the 
buffer."
-  (if (and (boundp 'pabbrev-expansion)
-           pabbrev-expansion)
-      ;; pabbrev sorts the expansion but also adds "[]" either side"
-      (+ 2 (length pabbrev-expansion))
-    0))
+  ;; this *exact* form suppresses byte compiler warnings.
+  ;; when or if and does not!
+  (if (boundp 'pabbrev-expansion)
+      (if pabbrev-expansion
+          ;; pabbrev sorts the expansion but also adds "[]" either side"
+          (+ 2 (length pabbrev-expansion))
+        0)))
 
 (defun linked-buffer-blk-convert-location (location from to)
   "Converts a LOCATION in buffer FROM into one from TO.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]