[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 35202cd: * packages/cobol-mode/cobol-mode.el: Fix last cha
From: |
Stefan Monnier |
Subject: |
[elpa] master 35202cd: * packages/cobol-mode/cobol-mode.el: Fix last change |
Date: |
Fri, 12 Apr 2019 10:33:38 -0400 (EDT) |
branch: master
commit 35202cdf8750a99e89d9d32279bff752973bedd2
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* packages/cobol-mode/cobol-mode.el: Fix last change
(cobol--fixed-comment-indicators-re): Revert mistaken last change.
(cobol--with-opt-whitespace-line): Simplify.
(cobol--mf-set-directive): Escape the `$` in the regexp.
(cobol-mode-map): Remove RET binding.
---
packages/cobol-mode/cobol-mode.el | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/packages/cobol-mode/cobol-mode.el
b/packages/cobol-mode/cobol-mode.el
index 27485af..226d00c 100644
--- a/packages/cobol-mode/cobol-mode.el
+++ b/packages/cobol-mode/cobol-mode.el
@@ -1959,7 +1959,8 @@ The next key typed is executed unless it is SPC."
"Regexp matching a complete sequence area.")
(defconst cobol--fixed-comment-indicators-re
- "\\*/"
+ ;; FIXME: Confusing name and docstring: it's not a regexp!
+ "*/"
"Regexp containing COBOL fixed-form comment indicators.")
(defconst cobol--fixed-form-comment-re
@@ -2022,7 +2023,7 @@ lines.")
(defun cobol--with-opt-whitespace-line (&rest strs)
"Return STRS concatenated after
`cobol--optional-leading-whitespace-line-re'."
- (apply #'concat (cons cobol--optional-leading-whitespace-line-re strs))))
+ (apply #'concat cobol--optional-leading-whitespace-line-re strs)))
(defconst cobol--free-form-comment-line-re
(cobol--with-opt-whitespace-line cobol--free-form-comment-re)
@@ -2033,12 +2034,14 @@ lines.")
"Regexp matching an identifier in a separate group preceded by whitespace.")
(defconst cobol--mf-set-directive
- (cobol--with-opt-whitespace-line "$SET\\s-+\\w+")
+ (cobol--with-opt-whitespace-line "\\$SET\\s-+\\w+")
"Regexp matching MF compiler directive with optional whitespace.")
(defconst cobol--mf-compiler-directive-re
(if (not (eq cobol-source-format 'free))
(concat cobol--fixed-form-sequence-area-re
+ ;; FIXME: cobol--mf-set-directive starts with "^" so it can't
+ ;; match after cobol--fixed-form-sequence-area-re!
cobol--mf-set-directive)
(concat "^" cobol--mf-set-directive))
"Regexp matching Micro Focus compiler directives.")
@@ -3045,11 +3048,7 @@ start of area A, if fixed-format)."
(defvar cobol-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [remap back-to-indentation] 'cobol-back-to-indentation)
- ;; FIXME: I strongly suspect this was a user-preference rather than
- ;; something which belongs in a major mode. And now that
- ;; electric-indent-mode is enabled by default, this should probably be
- ;; removed altogether.
- (define-key map (kbd "RET") #'newline-and-indent)
+ ;;(define-key map (kbd "RET") #'newline-and-indent)
map))
(defvar cobol-mode-syntax-table
@@ -3069,7 +3068,6 @@ start of area A, if fixed-format)."
;;;###autoload
(define-derived-mode cobol-mode prog-mode "COBOL"
"COBOL mode is a major mode for handling COBOL files."
- :group 'cobol
(set (make-local-variable 'font-lock-defaults) cobol-font-lock-defaults)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 35202cd: * packages/cobol-mode/cobol-mode.el: Fix last change,
Stefan Monnier <=