[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cobol-mode 7133670 7/8: * packages/cobol-mode/cobol-mod
From: |
Stefan Monnier |
Subject: |
[elpa] externals/cobol-mode 7133670 7/8: * packages/cobol-mode/cobol-mode.el: Fix last change |
Date: |
Sat, 28 Nov 2020 00:16:40 -0500 (EST) |
branch: externals/cobol-mode
commit 71336700fddf1fb7918e4e27b8e9300400db96d0
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* 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.
---
cobol-mode.el | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/cobol-mode.el b/cobol-mode.el
index 27485af..226d00c 100644
--- a/cobol-mode.el
+++ b/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)
- [elpa] branch externals/cobol-mode created (now 5290d35), Stefan Monnier, 2020/11/28
- [elpa] externals/cobol-mode f6839ca 1/8: * packages/cobol-mode/cobol-mode.el: Fix copyright and maintainer, Stefan Monnier, 2020/11/28
- [elpa] externals/cobol-mode 3cc627e 5/8: * copyright_exceptions: Update for new uni-confusables/gen-confusables.el, Stefan Monnier, 2020/11/28
- [elpa] externals/cobol-mode 5290d35 8/8: * cobol-mode.el: Fix misrepresenting variable, Stefan Monnier, 2020/11/28
- [elpa] externals/cobol-mode 7413c81 4/8: * cobol-mode/cobol-mode.el: Tweak syntax-propertize and use cl-lib, Stefan Monnier, 2020/11/28
- [elpa] externals/cobol-mode 1f5f80f 6/8: * cobol-mode.el (cobol--fixed-comment-indicators-re): Clarify regexp, Stefan Monnier, 2020/11/28
- [elpa] externals/cobol-mode f9718ac 2/8: * cobol-mode/cobol-mode.el: Fix compilation and heed the warnings, Stefan Monnier, 2020/11/28
- [elpa] externals/cobol-mode 56da646 3/8: * cobol-mode/cobol-mode.el: Misc tweaks; some from checkdoc, Stefan Monnier, 2020/11/28
- [elpa] externals/cobol-mode 7133670 7/8: * packages/cobol-mode/cobol-mode.el: Fix last change,
Stefan Monnier <=