[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/notes-mode ecc1fdb 6/7: Fix some quoting problems in do
From: |
Stefan Monnier |
Subject: |
[elpa] externals/notes-mode ecc1fdb 6/7: Fix some quoting problems in doc strings |
Date: |
Tue, 1 Dec 2020 10:05:03 -0500 (EST) |
branch: externals/notes-mode
commit ecc1fdb58d2cf8b075ff13df91b4d2d98c8fd938
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Fix some quoting problems in doc strings
Most of these are minor issues involving, e.g., quoting `like this'
instead of 'like this'. A few involve escaping ` and ' with a
preceding \= when the characters should not be turned into curved single
quotes.
---
notes-index-mode.el | 12 +++++------
notes-mode.el | 60 ++++++++++++++++++++++++++---------------------------
notes-url.el | 20 +++++++++---------
notes-variables.el | 2 +-
4 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/notes-index-mode.el b/notes-index-mode.el
index 5d959ec..16012d5 100644
--- a/notes-index-mode.el
+++ b/notes-index-mode.el
@@ -102,7 +102,7 @@ Tenses passive will be."
(if (and notes-mode-complete-subjects (not notes-subject-table))
(setq notes-subject-table (make-vector
(- (expt
- 8
+ 8
(length
(format
"%o"
@@ -163,10 +163,10 @@ Returns the buffer position of a successful hit, or nil."
(defun notes-index-goto-date (date &optional direction)
"Goto the DATE in the current line of the index file, modified by DIRECTION.
-If DIRECTION is 'this, go there.
-If DIRECTION is 'next or 'prev, go to the corresponding entry.
+If DIRECTION is `this', go there.
+If DIRECTION is `next' or `prev', go to the corresponding entry.
If the entry doesn't exist, then go to the nearest entry according
-to DIRECTION (and the next one if DIRECTION is 'this)."
+to DIRECTION (and the next one if DIRECTION is `this')."
(cond
((eq direction 'prev)
(notes-index-date-search
@@ -190,7 +190,7 @@ to DIRECTION (and the next one if DIRECTION is 'this)."
(defun notes-index-link (link &optional tag where)
"* Follow a notes-index LINK.
Optionally takes a subject TAG and
-WHERE ('otherwindow or nil) to open the new file."
+WHERE (`otherwindow' or nil) to open the new file."
(interactive "sNotes-index link: ")
(notes-w3-url (notes-file-to-url link tag) where t))
@@ -203,7 +203,7 @@ WHERE ('otherwindow or nil) to open the new file."
(defun notes-index-follow-link (pt &optional where)
"Follow a link at PT in notes-index-mode.
The link is taken from the location PT,
-and the new information is shown WHERE (either 'otherwindow or not)."
+and the new information is shown WHERE (either `otherwindow' or nil)."
(interactive "d")
(save-excursion
(let (start date tag)
diff --git a/notes-mode.el b/notes-mode.el
index f113bb6..2f7d766 100644
--- a/notes-mode.el
+++ b/notes-mode.el
@@ -22,7 +22,7 @@
;;; Commentary:
-;;
+;;
;;; Code:
@@ -44,7 +44,7 @@
(defun notes-beginning-of-defun ()
- "Go to the beginning of a notes ``section''."
+ "Go to the beginning of a notes “section”."
(interactive)
(let
((old-point (point)))
@@ -59,7 +59,7 @@
(re-search-backward notes-beginning-of-defun-regexp nil 'to-limit))))
(defun notes-end-of-defun ()
- "Go to the end of a notes ``section''."
+ "Go to the end of a notes “section”."
(interactive)
(let ((regexp notes-beginning-of-defun-regexp))
(if (looking-at regexp)
@@ -120,7 +120,7 @@ we go to the last note based upon the index file."
;; undoing our work).
(if (eq start-buffer (car end-buffer-and-point))
(goto-char (cdr end-buffer-and-point)))))
-
+
(defun notes-follow-next-link ()
"Go to the next link for this topic."
@@ -146,14 +146,14 @@ Currently this is just a hack."
(if value
(car (cdr value))
key)))
-
+
(defun notes-complete-subject ()
"Complete the notes subject under point."
(interactive)
(let
- ((subject (save-excursion
- (beginning-of-line)
+ ((subject (save-excursion
+ (beginning-of-line)
(notes-extract-subject t)))
old-completion-ignore-case
full-subject)
@@ -174,7 +174,7 @@ Currently this is just a hack."
(t ;; Do our own completion.
(setq full-subject (try-completion subject notes-subject-table)
subject (completing-read "Subject: "
- notes-subject-table nil nil
+ notes-subject-table nil nil
(if (stringp full-subject)
full-subject
subject)))
@@ -196,7 +196,7 @@ Currently this code only handles brand new entries."
(goto-char (point-min))
(if (re-search-forward
(concat "^" (regexp-quote subject) ":.* \\([0-9]+\\)$")
- (point-max) t)
+ (point-max) t)
(save-window-excursion
(cond ((and (notes-w3-url
(notes-file-to-url (match-string 1) subject))
@@ -207,7 +207,7 @@ Currently this code only handles brand new entries."
(delete-char 6)
(insert this-url)
(setq last-url (notes-current-url))
- (if (and (null pre-modified)
+ (if (and (null pre-modified)
(>= notes-electric-prevnext 2))
(save-buffer))))))))
(if last-url
@@ -225,7 +225,7 @@ Currently this code only handles brand new entries."
(save-excursion
(beginning-of-line)
(and (not (eq cur-point (point))) ;; normal return if at b-o-ln
- (notes-extract-subject t))))
+ (notes-extract-subject t))))
(progn (notes-underline-line)
(if notes-electric-prevnext
(notes-fix-prevnext-this-entry)))
@@ -251,19 +251,19 @@ If we're not in an entry, we leave you in the index file.
If the current date doesn't exist, error in DIRECTION.
Returns nil if on errors (no index; no date in DIRECTION),
otherwise the point of the hit."
- (interactive)
+ (interactive)
(let ((start-buffer (current-buffer))
(subject (notes-extract-subject)) ; get subject if on it
- (date (if (null (buffer-file-name)) nil
+ (date (if (null (buffer-file-name)) nil
(file-name-nondirectory (buffer-file-name)))))
;; Try and get the subject, either forward...
(if (not subject)
- (save-excursion
+ (save-excursion
(notes-beginning-of-defun)
(setq subject (notes-extract-subject))))
;; ...or backwards.
(if (not subject)
- (save-excursion
+ (save-excursion
(notes-end-of-defun)
(setq subject (notes-extract-subject))))
;; Form and jump to the url for the index-entry.
@@ -409,7 +409,7 @@ Use the mknew cache if possible."
" '"
;; FIXME: Use shell-quote-argument.
(buffer-file-name) "'") 't)))))
-
+
;;;
;;; encryption
@@ -418,7 +418,7 @@ Use the mknew cache if possible."
;; or mailcrypt 3.4.x or >=3.5.x
;;
-(defvar notes-encryption-library
+(defvar notes-encryption-library
'mailcrypt
; (cond
; ((fboundp 'mc-encrypt-region) 'mailcrypt)
@@ -546,10 +546,10 @@ Should have a leading 0x.")
(forward-line 1)))
(setq start (point))
;; sanity check
- (if (re-search-forward "^-----BEGIN PGP MESSAGE"
- (progn
- (save-excursion
- (notes-end-of-defun)
+ (if (re-search-forward "^-----BEGIN PGP MESSAGE"
+ (progn
+ (save-excursion
+ (notes-end-of-defun)
(point))) t)
(error "Note is already encrypted."))
;; find the end
@@ -567,10 +567,10 @@ Should have a leading 0x.")
(save-excursion
(if (not (looking-at notes-beginning-of-defun-regexp))
(notes-beginning-of-defun))
- (if (null (re-search-forward "^-----BEGIN PGP"
- (progn
- (save-excursion
- (notes-end-of-defun)
+ (if (null (re-search-forward "^-----BEGIN PGP"
+ (progn
+ (save-excursion
+ (notes-end-of-defun)
(point))) t))
(error "Note is not encrypted."))
(beginning-of-line)
@@ -667,17 +667,17 @@ Inside a notes buffer one can click on URLs and follow
them to
other notes files.
See the file notes-variables.el for all customization options.
-To change options, (require 'notes-variables) in your .emacs
+To change options, (require \\='notes-variables) in your .emacs
and then change things.
Subjects in notes mode are lines beginning with an asterisk
-and underlined with dashes. Subjects can be completed
+and underlined with dashes. Subjects can be completed
with \\[notes-complete-subject] and are automatically underlined.
You may wish to add this code to your .emacs file:
- (add-to-list 'auto-mode-alist
- (cons \"/9[0-9][0-9][0-9][0-9][0-9].?\\\\'\" 'notes-mode))
- (define-key global-map [?\\C-c ?n] 'notes-index-todays-link)
+ (add-to-list \\='auto-mode-alist
+ (cons \"/9[0-9][0-9][0-9][0-9][0-9].?\\\\\\='\" \\='notes-mode))
+ (define-key global-map [?\\C-c ?n] \\='notes-index-todays-link)
to automatically enter notes mode.
I have two suggestions for how to organize your notes files.
diff --git a/notes-url.el b/notes-url.el
index 407f644..496f386 100644
--- a/notes-url.el
+++ b/notes-url.el
@@ -44,8 +44,8 @@ This record is useful for debugging.")
(defun notes-w3-url (url &optional where best-effort)
"Open a notes-url. Handle simple URLs here, or call notes-w3-alternate-url.
Takes the URL as an argument. Optionally you specify
-WHERE the information should appear (either 'otherwindow or not,
-defaults to not).
+WHERE the information should appear (either `otherwindow' or nil,
+defaults to nil).
BEST-EFFORT causes notes-w3-url allows the tag portion of the URL to not
match. If there's no tag match, it looks for the nearest matching prefix.
@@ -54,7 +54,7 @@ URLs optionally can begin with an URL: tag, which will be
ignored.
notes-w3-url handles only <file://localhost/...> (or <file:///...>) URLs.
Other URLs it hands off to the routine in notes-w3-alternate-url
for processing. If you use w3-mode, then
- (setq notes-w3-alternate-url 'w3-follow-link)
+ (setq notes-w3-alternate-url \\='w3-follow-link)
will have w3 handle tough URLs."
(if (string-match "\\`[Uu][Rr][Ll]:" url)
(setq url (substring url 4)))
@@ -91,7 +91,7 @@ will have w3 handle tough URLs."
t))))
(defun notes-w3-url-tag-backup (tag)
- "Strip the last ``part'' off of TAG."
+ "Strip the last “part” off of TAG."
(let ((result)
(separators " /\t.:")
(buf (get-buffer-create " *notes-w3-url-tag-backup")))
@@ -110,7 +110,7 @@ will have w3 handle tough URLs."
"Find the TAG in the current buffer according to MODE.
BEST-EFFORT is either t (do prefix matching),
nil find the tag exactly,
-or 'searching (used internally)."
+or `searching' (used internally)."
(cond
((not tag) nil)
((and (string= tag "") (eq best-effort 'searching)) nil)
@@ -127,17 +127,17 @@ or 'searching (used internally)."
(if (not best-effort)
(error "Cannot find tag ``%s'' in %s." tag fname))
(notes-w3-url-tag (notes-w3-url-tag-backup tag) 'searching)))))
-
+
(defun notes-w3-pass-through-alternate-url (url &optional where)
"Pass a click event through to the old binding for notes-w3-url.
Try this combination:
- (add-hook 'notes-mode-load-hooks
+ (add-hook \\='notes-mode-load-hooks
(function (lambda ()
(define-key notes-mode-map [mouse-2]
- 'notes-w3-follow-link-mouse)
+ \\='notes-w3-follow-link-mouse)
(setq notes-w3-alternate-url
- 'notes-w3-my-alternate-url))))"
+ \\='notes-w3-my-alternate-url))))"
(let ((event last-input-event))
(funcall (lookup-key
(current-global-map)
@@ -147,7 +147,7 @@ Try this combination:
;;;###autoload
(defun notes-w3-follow-link (pt &optional where)
"* Follow the URL at the point.
-Takes a PT to look at and a WHERE to open the URL ('otherwindow or nil).
+Takes a PT to look at and a WHERE to open the URL (`otherwindow' or nil).
This code works hard to recognize URLs based on context information.
URLs can be quoted by whitespace, beginning and end of lines,
or the official < and >.
diff --git a/notes-variables.el b/notes-variables.el
index de141c5..7a20967 100644
--- a/notes-variables.el
+++ b/notes-variables.el
@@ -101,7 +101,7 @@ Turning this off for large notes-index's can improve
performance.")
(defvar notes-bold-face 'notes-bold-face
"* Face to use for notes-index-mode and notes-mode subjects.
-The default face is copied from 'bold.")
+The default face is copied from `bold'.")
(defvar notes-font-lock-keywords
'(("^\\* .*$" . notes-bold-face)
- [elpa] branch externals/notes-mode created (now 2fc3a16), Stefan Monnier, 2020/12/01
- [elpa] externals/notes-mode dd37919 1/7: Add notes-mode., Stefan Monnier, 2020/12/01
- [elpa] externals/notes-mode e7d1fbc 2/7: First cut at cleaning up notes-mode., Stefan Monnier, 2020/12/01
- [elpa] externals/notes-mode c6b386e 4/7: notes-mode/mkconfig: don't reference undefined envvar NOTES_BIN_DIR, Stefan Monnier, 2020/12/01
- [elpa] externals/notes-mode 2fc3a16 7/7: * .gitignore: New file, Stefan Monnier, 2020/12/01
- [elpa] externals/notes-mode 3afb72a 5/7: Only keep the strictly necessary *-pkg.el files, Stefan Monnier, 2020/12/01
- [elpa] externals/notes-mode 13332f0 3/7: * notes-mode: Add missing -pkg.el file., Stefan Monnier, 2020/12/01
- [elpa] externals/notes-mode ecc1fdb 6/7: Fix some quoting problems in doc strings,
Stefan Monnier <=