changeset 5305:1a32c9c9cfbb

(c-delete-backslash): Do nothing if empty line.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 04:46:18 +0000
parents 092d5d60f803
children a2f8f9c4e29b
files lisp/progmodes/c-mode.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/c-mode.el	Thu Dec 23 04:44:57 1993 +0000
+++ b/lisp/progmodes/c-mode.el	Thu Dec 23 04:46:18 1993 +0000
@@ -1314,10 +1314,12 @@
 
 (defun c-delete-backslash ()
   (end-of-line)
-  (forward-char -1)
-  (if (looking-at "\\\\")
-      (delete-region (1+ (point))
-		     (progn (skip-chars-backward " \t") (point)))))
+  (or (bolp)
+      (progn
+	(forward-char -1)
+	(if (looking-at "\\\\")
+	    (delete-region (1+ (point))
+			   (progn (skip-chars-backward " \t") (point)))))))
 
 (defun c-up-conditional (count)
   "Move back to the containing preprocessor conditional, leaving mark behind.