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.
This commit is contained in:
Paul Eggert 2015-05-30 09:43:57 -07:00
parent e553c503f4
commit 85aa6ede9f
4 changed files with 7 additions and 7 deletions

View file

@ -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))))

View file

@ -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)

View file

@ -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 "\\) *<\\([^>]+\\)>"))))

View file

@ -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))