From: Richard M. Stallman Date: Thu, 23 Dec 1993 04:46:18 +0000 (+0000) Subject: (c-delete-backslash): Do nothing if empty line. X-Git-Tag: emacs-19.34~10546 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7620dcc5bbcebe2bee80b9cab70777266c09d831;p=emacs.git (c-delete-backslash): Do nothing if empty line. --- diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index 429d0bf2292..ebab0c77130 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el @@ -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))))))) (defun c-up-conditional (count) "Move back to the containing preprocessor conditional, leaving mark behind.