]> git.eshelyaron.com Git - emacs.git/commitdiff
(c-delete-backslash): Do nothing if empty line.
authorRichard M. Stallman <rms@gnu.org>
Thu, 23 Dec 1993 04:46:18 +0000 (04:46 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 23 Dec 1993 04:46:18 +0000 (04:46 +0000)
lisp/progmodes/c-mode.el

index 429d0bf2292959e1632936a8dd8873a82c63bcf2..ebab0c77130759b9e90c6138e960aaf118e6065f 100644 (file)
@@ -1314,10 +1314,12 @@ definition and conveniently use this command."
 
 (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)))))))
 \f
 (defun c-up-conditional (count)
   "Move back to the containing preprocessor conditional, leaving mark behind.