emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 9f08524: Fix broken regexps


From: Mattias Engdegård
Subject: emacs-27 9f08524: Fix broken regexps
Date: Thu, 20 Feb 2020 10:01:10 -0500 (EST)

branch: emacs-27
commit 9f0852474810311fd2b26fa3756ab6d816016389
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>

    Fix broken regexps
    
    Incorrect escaping prevented these from working as intended.
    Found by relint.
    
    * lisp/progmodes/cc-defs.el (c-search-backward-char-property):
    Add missing backslash.
    * lisp/progmodes/simula.el (simula-mode):
    Remove one backslash too many.
---
 lisp/progmodes/cc-defs.el | 2 +-
 lisp/progmodes/simula.el  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 5ca64a0..12be09d 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -1278,7 +1278,7 @@ point is then left undefined."
                    place ,property nil ,(or limit '(point-min)))))
      (when (> place ,(or limit '(point-min)))
        (goto-char place)
-       (search-backward-regexp "\\(n\\|.\\)")  ; to set the match-data.
+       (search-backward-regexp "\\(\n\\|.\\)") ; to set the match-data.
        (point))))
 
 (defun c-clear-char-property-with-value-function (from to property value)
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el
index 5d5f180..be3edfd 100644
--- a/lisp/progmodes/simula.el
+++ b/lisp/progmodes/simula.el
@@ -367,7 +367,7 @@ Turning on SIMULA mode calls the value of the variable 
simula-mode-hook
 with no arguments, if that value is non-nil."
   (set (make-local-variable 'comment-column) 40)
   ;; (set (make-local-variable 'end-comment-column) 75)
-  (set (make-local-variable 'paragraph-start) "[ \t]*$\\|\\f")
+  (set (make-local-variable 'paragraph-start) "[ \t]*$\\|\f")
   (set (make-local-variable 'paragraph-separate) paragraph-start)
   (set (make-local-variable 'indent-line-function) 'simula-indent-line)
   (set (make-local-variable 'comment-start) "! ")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]