(defun auth-source-pass--parse-data (contents)
"Parse the password-store data in the string CONTENTS and return an alist.
CONTENTS is the contents of a password-store formatted file."
- (let ((lines (split-string contents "\n" t "\\\s")))
+ (let ((lines (split-string contents "\n" t "[ \t]+")))
(seq-remove #'null
(mapcar (lambda (line)
(let ((pair (mapcar (lambda (s) (string-trim s))
"^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
year month day))))
-(defun org-datetree--find-create (regex year &optional month day insert)
- "Find the datetree matched by REGEX for YEAR, MONTH, or DAY.
-REGEX is passed to `format' with YEAR, MONTH, and DAY as
+(defun org-datetree--find-create
+ (regex-template year &optional month day insert)
+ "Find the datetree matched by REGEX-TEMPLATE for YEAR, MONTH, or DAY.
+REGEX-TEMPLATE is passed to `format' with YEAR, MONTH, and DAY as
arguments. Match group 1 is compared against the specified date
component. If INSERT is non-nil and there is no match then it is
inserted into the buffer."
(when (or month day)
(org-narrow-to-subtree))
- (let ((re (format regex year month day))
+ (let ((re (format regex-template year month day))
match)
(goto-char (point-min))
(while (and (setq match (re-search-forward re nil t))
"Examine the thing at point and let the caller know what it is.
The return value is a string naming the thing at point."
(let ((beg1 (save-excursion
- (skip-chars-backward "[:alnum:]-_@")
+ (skip-chars-backward "-[:alnum:]_@")
(point)))
(beg (save-excursion
- (skip-chars-backward "a-zA-Z0-9-_:$")
+ (skip-chars-backward "-a-zA-Z0-9_:$")
(point)))
(line-to-here (buffer-substring (point-at-bol) (point))))
(cond
;;Point is at start of real comment."
;; (let ((c (current-column)) target cnt prevc)
;; (if (= c comment-column) nil
-;; (setq cnt (skip-chars-backward "[ \t]"))
+;; (setq cnt (skip-chars-backward " \t"))
;; (setq target (max (1+ (setq prevc
;; (current-column))) ; Else indent at comment column
;; comment-column))
(save-match-data
(when (looking-at "\\s-*\\_<while\\_>")
(if (save-excursion
- (skip-chars-backward "[ \t\n]*}")
+ (skip-chars-backward " \t\n}")
(looking-at "[ \t\n]*}"))
(save-excursion
(backward-list) (forward-symbol -1) (looking-at "\\_<do\\_>"))
(condition-case err
(save-excursion
(goto-char end)
- (skip-chars-backward "[:alnum:]-_.:")
+ (skip-chars-backward "-[:alnum:]_.:")
(if (and ;; (<= (point) beg) ; This poses problems for downcase-word.
(or (eq (char-before) ?<)
(and (eq (char-before) ?/)
(null (get-char-property (point) 'text-clones)))
(let* ((endp (eq (char-before) ?/))
(cl-start (point))
- (cl-end (progn (skip-chars-forward "[:alnum:]-_.:") (point)))
+ (cl-end (progn (skip-chars-forward "-[:alnum:]_.:") (point)))
(match
(if endp
(when (sgml-skip-tag-backward 1) (forward-char 1) t)
(equal (buffer-substring cl-start cl-end)
(buffer-substring (point)
(save-excursion
- (skip-chars-forward "[:alnum:]-_.:")
+ (skip-chars-forward
+ "-[:alnum:]_.:")
(point))))
(or (not endp) (eq (char-after cl-end) ?>)))
(when clones
"Return description field of old menu line as string.
Point must be located just after the node name. Point left before description.
Single argument, END-OF-MENU, is position limiting search."
- (skip-chars-forward "[:.,\t\n ]+")
+ (skip-chars-forward ":.,\t\n ")
;; don't copy a carriage return at line beginning with asterisk!
;; don't copy @detailmenu or @end menu or @ignore as descriptions!
;; do copy a description that begins with an `@'!
(setq url-http-response-version
(buffer-substring (point)
(progn
- (skip-chars-forward "[0-9].")
+ (skip-chars-forward "0-9.")
(point))))
(setq url-http-response-status (read (current-buffer))))