]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix up some prefix registration problems in doc strings
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 4 Aug 2022 09:02:49 +0000 (11:02 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 4 Aug 2022 09:03:10 +0000 (11:03 +0200)
* 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
lisp/emacs-lisp/cl-macs.el
lisp/org/ob-core.el
lisp/uniquify.el

index 3cff3167a6c534c16873e02ba8284231b728197a..93f4070e4bc44f91e2c49289ffafdb7514e2df61 100644 (file)
@@ -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))
 
index 12917c99e10d046335aaf03baa75d6c165f81133..eefaa36b9112ede5f184aab59fadf137b8b76e1f 100644 (file)
@@ -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
index 3d159ed38a9d44badb95523812f75b80babba7ff..3b114703cdce4e40243974dc8f8defe261314000 100644 (file)
@@ -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
index b75b47c03c5bc075cbbd9623a3b2c7cb235961dd..74655e299a826c93ee66fa3f5909d03a0f6c2329 100644 (file)
@@ -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