[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4c1bc8315d 2/2: Fix up some prefix registration problems in doc s
From: |
Lars Ingebrigtsen |
Subject: |
master 4c1bc8315d 2/2: Fix up some prefix registration problems in doc strings |
Date: |
Thu, 4 Aug 2022 05:03:16 -0400 (EDT) |
branch: master
commit 4c1bc8315d8e677e4eeb2760d7a5ab7b7553359b
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix up some prefix registration problems in doc strings
* lisp/uniquify.el (uniquify-buffer-name-style):
* lisp/org/ob-core.el (org-src-sha):
* lisp/emacs-lisp/cl-macs.el (cl--optimize):
* lisp/battery.el (battery-update-functions): Avoid triggering the
`register-definition-prefixes' in doc strings (bug#56968).
---
lisp/battery.el | 16 ++++++++--------
lisp/emacs-lisp/cl-macs.el | 6 +++---
lisp/org/ob-core.el | 12 ++++++------
lisp/uniquify.el | 4 ++--
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/lisp/battery.el b/lisp/battery.el
index 3cff3167a6..93f4070e4b 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -255,14 +255,14 @@ of the following information may or may not be available:
For instance, to play an alarm when the battery power dips below
10%, you could use a function like the following:
-(defvar my-prev-battery nil)
-(defun my-battery-alarm (data)
- (when (and my-prev-battery
- (equal (alist-get ?L data) \"off-line\")
- (< (string-to-number (alist-get ?p data)) 10)
- (>= (string-to-number (alist-get ?p my-prev-battery)) 10))
- (play-sound-file \"~/alarm.wav\" 5))
- (setq my-prev-battery data))"
+ (defvar my-prev-battery nil)
+ (defun my-battery-alarm (data)
+ (when (and my-prev-battery
+ (equal (alist-get ?L data) \"off-line\")
+ (< (string-to-number (alist-get ?p data)) 10)
+ (>= (string-to-number (alist-get ?p my-prev-battery)) 10))
+ (play-sound-file \"~/alarm.wav\" 5))
+ (setq my-prev-battery data))"
:version "29.1"
:type '(repeat function))
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 12917c99e1..eefaa36b91 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2563,9 +2563,9 @@ values. For compatibility, (cl-values A B C) is a
synonym for (list A B C).
(defun cl--optimize (f _args &rest qualities)
"Serve `cl-optimize' in function declarations.
Example:
-(defun foo (x)
- (declare (cl-optimize (speed 3) (safety 0)))
- x)"
+ (defun foo (x)
+ (declare (cl-optimize (speed 3) (safety 0)))
+ x)"
;; FIXME this should make use of `cl--declare-stack' but I suspect
;; this mechanism should be reviewed first.
(cl-loop for (qly val) in qualities
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el
index 3d159ed38a..3b114703cd 100644
--- a/lisp/org/ob-core.el
+++ b/lisp/org/ob-core.el
@@ -488,13 +488,13 @@ arguments, imagine you'd like to set the file name output
of a
latex source block to a sha1 of its contents. We could achieve
this with:
-(defun org-src-sha ()
- (let ((elem (org-element-at-point)))
- (concat (sha1 (org-element-property :value elem)) \".svg\")))
+ (defun org-src-sha ()
+ (let ((elem (org-element-at-point)))
+ (concat (sha1 (org-element-property :value elem)) \".svg\")))
-(setq org-babel-default-header-args:latex
- `((:results . \"file link replace\")
- (:file . (lambda () (org-src-sha)))))
+ (setq org-babel-default-header-args:latex
+ `((:results . \"file link replace\")
+ (:file . (lambda () (org-src-sha)))))
Because the closure is evaluated with point at the source block,
the call to `org-element-at-point' above will always retrieve
diff --git a/lisp/uniquify.el b/lisp/uniquify.el
index b75b47c03c..74655e299a 100644
--- a/lisp/uniquify.el
+++ b/lisp/uniquify.el
@@ -109,8 +109,8 @@ BASE and EXTRA-STRINGS where BASE is a string and
EXTRA-STRINGS
is a list of strings. For example the current implementation for
post-forward-angle-brackets could be:
-(defun my-post-forward-angle-brackets (base extra-string)
- (concat base \"<\" (mapconcat #\\='identity extra-string \"/\") \">\"))
+ (defun my-post-forward-angle-brackets (base extra-string)
+ (concat base \"<\" (mapconcat #\\='identity extra-string \"/\") \">\"))
The \"mumble\" part may be stripped as well, depending on the
setting of `uniquify-strip-common-suffix'. For more options that