[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/lentic 2bce4eeb78 333/333: Minor cosmetic changes to si
From: |
ELPA Syncer |
Subject: |
[elpa] externals/lentic 2bce4eeb78 333/333: Minor cosmetic changes to silence compiler warnings |
Date: |
Tue, 27 Feb 2024 13:00:52 -0500 (EST) |
branch: externals/lentic
commit 2bce4eeb78199662169f0e833322112c87cde491
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Minor cosmetic changes to silence compiler warnings
* lentic-dev.el (lentic-dev-insert-face): Fix defvar.
* lentic.el (lentic-when-buffer): Simplify since `buffer-live-p` does
not need its arg to be a buffer.
(lentic-a-oset):
* lentic-mode.el (lentic-mode-update-all-display): Use `dolist` rather
than `-map` if we don't use the return value.
* examples/lentic-orgel-org-big.el (lentic-update-contents): Remove
unused `unwind-protect`.
---
examples/lentic-orgel-org-big.el | 43 ++++++++++++++++++++--------------------
lentic-dev.el | 7 +++----
lentic-mode.el | 11 ++++------
lentic.el | 27 +++++++++----------------
4 files changed, 37 insertions(+), 51 deletions(-)
diff --git a/examples/lentic-orgel-org-big.el b/examples/lentic-orgel-org-big.el
index 5e287ea0a4..e1433abf60 100644
--- a/examples/lentic-orgel-org-big.el
+++ b/examples/lentic-orgel-org-big.el
@@ -11,7 +11,7 @@
;; The contents of this file are subject to the GPL License, Version 3.0.
-;; Copyright (C) 2014-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -605,27 +605,26 @@ REST is currently just ignored."
(defun lentic-update-contents (conf &optional start stop length-before)
"Update the contents of that-buffer with the contents of this-buffer.
Update mechanism depends on CONF."
- (unwind-protect
- (m-buffer-with-markers
- ((start-converted
- (when (oref conf last-change-start-converted)
- (set-marker (make-marker)
- (oref conf last-change-start-converted)
- (oref conf that-buffer))))
- (stop-converted
- (when (oref conf last-change-stop-converted)
- (set-marker (make-marker)
- (oref conf last-change-stop-converted)
- (oref conf that-buffer)))))
- ;; used these, so dump them
- (oset conf last-change-start-converted nil)
- (oset conf last-change-stop-converted nil)
- (setq inhibit-read-only t)
- ;;(lentic-log
- ;;"Update config: %s" lentic-config)
- (lentic-clone conf start stop length-before
- start-converted stop-converted)
- (setq inhibit-read-only nil))))
+ (m-buffer-with-markers
+ ((start-converted
+ (when (oref conf last-change-start-converted)
+ (set-marker (make-marker)
+ (oref conf last-change-start-converted)
+ (oref conf that-buffer))))
+ (stop-converted
+ (when (oref conf last-change-stop-converted)
+ (set-marker (make-marker)
+ (oref conf last-change-stop-converted)
+ (oref conf that-buffer)))))
+ ;; used these, so dump them
+ (oset conf last-change-start-converted nil)
+ (oset conf last-change-stop-converted nil)
+ (setq inhibit-read-only t)
+ ;;(lentic-log
+ ;;"Update config: %s" lentic-config)
+ (lentic-clone conf start stop length-before
+ start-converted stop-converted)
+ (setq inhibit-read-only nil)))
(defun lentic-update-point (conf)
"Update the location of point in that-buffer to reflect this-buffer.
diff --git a/lentic-dev.el b/lentic-dev.el
index 2bfd5d5fba..946d9efe26 100644
--- a/lentic-dev.el
+++ b/lentic-dev.el
@@ -8,7 +8,7 @@
;; Maintainer: Phillip Lord <phillip.lord@russet.org.uk>
;; The contents of this file are subject to the GPL License, Version 3.0.
-;; Copyright (C) 2014-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -127,9 +127,8 @@ to make sure there is a new one."
;; #+begin_src emacs-lisp
-(defvar lentic-dev-insert-face
- "Start face to use for inserted text."
- 'font-lock-keyword-face)
+(defvar lentic-dev-insert-face 'font-lock-keyword-face
+ "Start face to use for inserted text.")
;;;###autoload
(defun lentic-dev-random-face ()
diff --git a/lentic-mode.el b/lentic-mode.el
index b0265f6d17..4b913319a7 100644
--- a/lentic-mode.el
+++ b/lentic-mode.el
@@ -8,7 +8,7 @@
;; Maintainer: Phillip Lord <phillip.lord@russet.org.uk>
;; The contents of this file are subject to the GPL License, Version 3.0.
-;; Copyright (C) 2014-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -293,12 +293,9 @@ See also `lentic-mode-move-lentic-window'."
(if lentic-emergency
(setq lentic-mode-line
(format " %s[Emergency]" lentic-mode-line-lighter))
- (-map
- (lambda (b)
- (lentic-when-with-current-buffer
- b
- (lentic-mode-update-mode-line)))
- (buffer-list))
+ (dolist (b (buffer-list))
+ (lentic-when-with-current-buffer b
+ (lentic-mode-update-mode-line)))
(force-mode-line-update t)))
;; ** lentic self-doc
diff --git a/lentic.el b/lentic.el
index 9667161b26..94d311bec6 100644
--- a/lentic.el
+++ b/lentic.el
@@ -11,7 +11,7 @@
;; The contents of this file are subject to the GPL License, Version 3.0.
-;; Copyright (C) 2014-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -616,26 +616,22 @@ see `lentic-init' for details."
"When BUFFER is a live buffer eval BODY."
(declare (debug t)
(indent 1))
- `(when (and ,buffer
- (buffer-live-p ,buffer))
+ `(when (buffer-live-p ,buffer)
,@body))
(defmacro lentic-when-with-current-buffer (buffer &rest body)
"When BUFFER is a live buffer eval BODY with BUFFER current."
(declare (debug t)
(indent 1))
- `(lentic-when-buffer
- ,buffer
- (with-current-buffer
- ,buffer
- ,@body)))
+ `(lentic-when-buffer ,buffer
+ (with-current-buffer ,buffer
+ ,@body)))
-(defmacro lentic-with-lentic-buffer (_buffer &rest body)
+(defmacro lentic-with-lentic-buffer (buffer &rest body)
"With BUFFER as current, eval BODY when BUFFER has a lentic."
(declare (debug t)
(indent 1))
- `(lentic-when-with-current-buffer
- buffer
+ `(lentic-when-with-current-buffer ,buffer
(when lentic-config
,@body)))
@@ -1286,13 +1282,8 @@ Returns OBJ. See also `lentic-a-oset'"
"On OBJ, set all properties in PLIST.
This is a utility function which just does the same as oset, but
for lots of things at once. Returns OBJ."
- (-map
- (lambda (n)
- (eieio-oset
- obj
- (car n)
- (cadr n)))
- (-partition 2 plist))
+ (dolist (n (-partition 2 plist))
+ (eieio-oset obj (car n) (cadr n)))
obj)
;; #+end_src
- [elpa] externals/lentic 497a4eda39 267/333: Checks lentic-config before re-running init., (continued)
- [elpa] externals/lentic 497a4eda39 267/333: Checks lentic-config before re-running init., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 4f6d564988 301/333: Add support for out-of-the-box script files., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 8e0d0b1205 325/333: Fix error when swapping is not possible., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 02073c4f1c 285/333: Remove buffer-list-update-hook., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e395e44723 270/333: lentic-block changed to lentic-chunk., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic f1f77812b0 330/333: Add markdown example, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e3c56fbf11 307/333: Migrate all tests to assess, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e6d013bf57 329/333: Fix missing files, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e5ee8287b2 328/333: Add 26.1 test, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e182a87d69 315/333: Fix broken creation of directory, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 2bce4eeb78 333/333: Minor cosmetic changes to silence compiler warnings,
ELPA Syncer <=
- [elpa] externals/lentic 2e74877cb7 311/333: Update for Emacs-25 org-mode, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 88877628d9 294/333: Rework doc start location., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic b1596a3a02 327/333: Fix lentic-script-conf-test, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 8745235908 317/333: Disable postamble in output HTML, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 0cc6568796 320/333: Add new mechanism for detection of skew., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic fa3b9bcbda 282/333: Move var declaration inside source markers., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic ed1d792d9f 286/333: Depend on melpa-stable only., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic fc44aa8c96 271/333: Change symbol names to chunk., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 17b82d8e29 150/333: Merge branch 'expt/incremental-whitelist', ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 5b6d83c4fc 227/333: show-all on create in org-mode., ELPA Syncer, 2024/02/27