From: Lars Ingebrigtsen Date: Wed, 3 Feb 2021 13:36:17 +0000 (+0100) Subject: Make backslash characters no longer escape in `f90-mode' X-Git-Tag: emacs-28.0.90~3963 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ca55e4d89831cf25137e7d9df4110df16aab1800;p=emacs.git 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 --- diff --git a/etc/NEWS b/etc/NEWS index a376df62e33..7cdb9d94302 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 92b165bc641..90678c8cb1c 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 ?\\ ) ?\\ )