[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 85aa6ed: Use \r rather than ^M in string literals
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 85aa6ed: Use \r rather than ^M in string literals |
Date: |
Sat, 30 May 2015 16:44:44 +0000 |
branch: master
commit 85aa6ede9fe1b8165a99a4046dd8262ec93a02d5
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Use \r rather than ^M in string literals
This is less likely to cause problems on platforms that
use CRLF (or CR!) termination for lines.
---
lisp/cedet/semantic/grammar-wy.el | 4 ++--
lisp/gnus/nnimap.el | 2 +-
lisp/org/org.el | 6 +++---
lisp/progmodes/vhdl-mode.el | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lisp/cedet/semantic/grammar-wy.el
b/lisp/cedet/semantic/grammar-wy.el
index fba8adf..4b59e17 100644
--- a/lisp/cedet/semantic/grammar-wy.el
+++ b/lisp/cedet/semantic/grammar-wy.el
@@ -387,12 +387,12 @@
(let
((s $1))
(if
- (string-match "^{[
\n ]*" s)
+ (string-match "^{[\r\n\t ]*" s)
(setq s
(substring s
(match-end 0))))
(if
- (string-match "[
\n ]*}$" s)
+ (string-match "[\r\n\t ]*}$" s)
(setq s
(substring s 0
(match-beginning 0))))
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index c476be6..208fd07 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1266,7 +1266,7 @@ If LIMIT, first try to limit the search to the N last
articles."
(progn (skip-chars-forward " \"")
(point))
(progn (end-of-line)
- (skip-chars-backward "
\"")
+ (skip-chars-backward " \r\"")
(point)))))
(unless (member '%NoSelect flags)
(push (utf7-decode (if (stringp group)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 29ef8ef..e9dae19 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -16955,12 +16955,12 @@ Allowed values for TYPE are:
When TYPE is nil, fall back on returning a regexp that matches
both scheduled and deadline timestamps."
- (cond ((eq type 'all) "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?:
+[^]+0-9>
\n -]+\\)?\\(?: +[0-9]\\{1,2\\}:[0-9]\\{2\\}\\)?\\)")
+ (cond ((eq type 'all) "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?:
+[^]+0-9>\r\n -]+\\)?\\(?: +[0-9]\\{1,2\\}:[0-9]\\{2\\}\\)?\\)")
((eq type 'active) org-ts-regexp)
- ((eq type 'inactive) "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^
\n>]*?\\)\\]")
+ ((eq type 'inactive) "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}
?[^\r\n>]*?\\)\\]")
((eq type 'scheduled) (concat "\\<" org-scheduled-string "
*<\\([^>]+\\)>"))
((eq type 'deadline) (concat "\\<" org-deadline-string "
*<\\([^>]+\\)>"))
- ((eq type 'closed) (concat org-closed-string "
\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^
\n>]*?\\)\\]"))
+ ((eq type 'closed) (concat org-closed-string "
\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)\\]"))
((eq type 'scheduled-or-deadline)
(concat "\\<\\(?:" org-deadline-string "\\|" org-scheduled-string "\\)
*<\\([^>]+\\)>"))))
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index eb23494..f85f4c4 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8270,7 +8270,7 @@ case fixing to a region. Calls functions
`vhdl-indent-buffer',
(setq end (save-excursion (goto-char end) (point-marker)))
(save-excursion ; remove DOS EOL characters in UNIX file
(goto-char beg)
- (while (search-forward "
" nil t)
+ (while (search-forward "\r" nil t)
(replace-match "" nil t)))
(when (nth 0 vhdl-beautify-options) (vhdl-fixup-whitespace-region beg end t))
(when (nth 1 vhdl-beautify-options) (vhdl-fix-statement-region beg end))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 85aa6ed: Use \r rather than ^M in string literals,
Paul Eggert <=