[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ca55e4d: Make backslash characters no longer escape in `f90-mode'
From: |
Lars Ingebrigtsen |
Subject: |
master ca55e4d: Make backslash characters no longer escape in `f90-mode' |
Date: |
Wed, 3 Feb 2021 08:36:26 -0500 (EST) |
branch: master
commit ca55e4d89831cf25137e7d9df4110df16aab1800
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make backslash characters no longer escape in `f90-mode'
* lisp/progmodes/f90.el (f90-backslash-not-special): Make obsolete
(bug#32766).
(f90-mode-syntax-table): Make the backslash be a normal
(non-escape) character, which is the default since about 2007 (and
F2K): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34203
---
etc/NEWS | 7 +++++++
lisp/progmodes/f90.el | 11 +++++------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index a376df6..7cdb9d9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2010,6 +2010,13 @@ first).
* Incompatible Editing Changes in Emacs 28.1
+** In 'f90-mode', the backslash character ('\') no longer escapes.
+For about a decade, the backslash character has no longer had a
+special escape syntax in Fortran F90. To get the old behaviour back,
+say something like:
+
+ (modify-syntax-entry ?\\ "\\" f90-mode-syntax-table)
+
** In 'nroff-mode', 'center-line' is now bound to 'M-o M-s'.
The original key binding was 'M-s', which interfered with I-search,
since the latter uses 'M-s' as a prefix key of the search prefix map.
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 92b165b..90678c8 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -718,10 +718,7 @@ Can be overridden by the value of
`font-lock-maximum-decoration'.")
(modify-syntax-entry ?* "." table)
(modify-syntax-entry ?/ "." table)
(modify-syntax-entry ?% "." table) ; bug#8820
- ;; I think that the f95 standard leaves the behavior of \
- ;; unspecified, but that f2k will require it to be non-special.
- ;; Use `f90-backslash-not-special' to change.
- (modify-syntax-entry ?\\ "\\" table) ; escape chars
+ (modify-syntax-entry ?\\ "." table)
table)
"Syntax table used in F90 mode.")
@@ -2395,9 +2392,11 @@ CHANGE-WORD should be one of `upcase-word',
`downcase-word', `capitalize-word'."
(defun f90-backslash-not-special (&optional all)
"Make the backslash character (\\) be non-special in the current buffer.
+This is the default in `f90-mode'.
+
With optional argument ALL, change the default for all present
-and future F90 buffers. F90 mode normally treats backslash as an
-escape character."
+and future F90 buffers."
+ (declare (obsolete nil "28.1"))
(or (derived-mode-p 'f90-mode)
(user-error "This function should only be used in F90 buffers"))
(when (equal (char-syntax ?\\ ) ?\\ )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ca55e4d: Make backslash characters no longer escape in `f90-mode',
Lars Ingebrigtsen <=