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
This commit is contained in:
Lars Ingebrigtsen 2021-02-03 14:36:17 +01:00
parent 20e48b6fd6
commit ca55e4d898
2 changed files with 12 additions and 6 deletions

View file

@ -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.

View file

@ -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 ?\\ ) ?\\ )