]> git.eshelyaron.com Git - emacs.git/commitdiff
Use \r rather than ^M in string literals
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 May 2015 16:43:57 +0000 (09:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 30 May 2015 16:44:38 +0000 (09:44 -0700)
This is less likely to cause problems on platforms that
use CRLF (or CR!) termination for lines.

lisp/cedet/semantic/grammar-wy.el
lisp/gnus/nnimap.el
lisp/org/org.el
lisp/progmodes/vhdl-mode.el

index fba8adfcd75eb9e7b898e699e4cca37202893eca..4b59e17f1e0e4394a0bb2bbe3fdb9d4ed955fa43 100644 (file)
                 (let
                     ((s $1))
                   (if
-                      (string-match "^{[\r\n     ]*" s)
+                      (string-match "^{[\r\n\t ]*" s)
                       (setq s
                             (substring s
                                        (match-end 0))))
                   (if
-                      (string-match "[\r\n       ]*}$" s)
+                      (string-match "[\r\n\t ]*}$" s)
                       (setq s
                             (substring s 0
                                        (match-beginning 0))))
index c476be6bc8d26ab5bba260f52cb328bc9421b19d..208fd073caf0076a94769c26a122af96cd159cb1 100644 (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 " \r\"")
+                          (skip-chars-backward " \r\"")
                           (point)))))
        (unless (member '%NoSelect flags)
          (push (utf7-decode (if (stringp group)
index 29ef8efb640865ca55946c706e2eed28f932419f..e9dae191b99fcd7763158eec1191d9c5ad4778bd 100644 (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>\r\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\\} ?[^\r\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\\} ?[^\r\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 "\\) *<\\([^>]+\\)>"))))
 
index eb234944904a032180259cce138eb8b655917226..f85f4c4fadae937d4a3ae8c02b34bec4f7446b55 100644 (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 "\r" 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))