summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-04-02 15:00:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-04-02 15:01:34 -0700
commitf9ff60e0d7288e30cdbd1e43225059f1374441f1 (patch)
tree0e7e37a750e55adc0f959ca372369f4aa81cd3c2 /lisp/files.el
parentbb669166ba6b33cd1a927c772c87ee2240a10f89 (diff)
downloademacs-f9ff60e0d7288e30cdbd1e43225059f1374441f1.tar.gz
emacs-f9ff60e0d7288e30cdbd1e43225059f1374441f1.tar.bz2
emacs-f9ff60e0d7288e30cdbd1e43225059f1374441f1.zip
Improve regexp advice again, and unchain ranges
* doc/lispref/searching.texi (Regexp Special): Mention char classes earlier, in a more-logical place. Advise sticking to ASCII letters and digits in ranges. Reword negative advice to make it clearer that it’s negative. * lisp/files.el (make-auto-save-file-name): * lisp/gnus/message.el (message-mailer-swallows-blank-line): * lisp/gnus/nndoc.el (nndoc-lanl-gov-announce-type-p) (nndoc-generate-lanl-gov-head): * lisp/org/org-eshell.el (org-eshell-open): * lisp/org/org.el (org-deadline-time-hour-regexp) (org-scheduled-time-hour-regexp): * lisp/progmodes/bat-mode.el (bat-font-lock-keywords): * lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): * lisp/textmodes/less-css-mode.el (less-css-font-lock-keywords): * lisp/vc/vc-cvs.el (vc-cvs-valid-symbolic-tag-name-p): * lisp/vc/vc-svn.el (vc-svn-valid-symbolic-tag-name-p): Avoid attempts to chain ranges, as this can be confusing. For example, instead of [0-9-_.], use [0-9_.-].
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 77a194b085d..1dae57593a0 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6316,7 +6316,7 @@ See also `auto-save-file-name-p'."
;; We do this on all platforms, because even if we are not
;; running on DOS/Windows, the current directory may be on a
;; mounted VFAT filesystem, such as a USB memory stick.
- (while (string-match "[^A-Za-z0-9-_.~#+]" buffer-name limit)
+ (while (string-match "[^A-Za-z0-9_.~#+-]" buffer-name limit)
(let* ((character (aref buffer-name (match-beginning 0)))
(replacement
;; For multibyte characters, this will produce more than