summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-mode.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-07-15 02:05:20 +0000
committerMiles Bader <miles@gnu.org>2007-07-15 02:05:20 +0000
commit7eb1e4534e88a32fe5e549e630fdabf3e062be2b (patch)
tree34fc72789f1cfbfeb067cf507f8871c322df300a /lisp/progmodes/cc-mode.el
parent76d11d2cf9623e9f4c38e8239c4444ffc1fae485 (diff)
parent6f8a87c027ebd6f9cfdac5c0df97d651227bec62 (diff)
downloademacs-7eb1e4534e88a32fe5e549e630fdabf3e062be2b.tar.gz
emacs-7eb1e4534e88a32fe5e549e630fdabf3e062be2b.tar.bz2
emacs-7eb1e4534e88a32fe5e549e630fdabf3e062be2b.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 803-813) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 51-58) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 233-236) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-25
Diffstat (limited to 'lisp/progmodes/cc-mode.el')
-rw-r--r--lisp/progmodes/cc-mode.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 390d49eaea4..dcbcc618dca 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -790,7 +790,8 @@ compatible with old code; callers should always specify it."
;; If the buffer specifies `mode' or `eval' in its File Local Variable list
;; or on the first line, remove all occurrences. See
;; `c-postprocess-file-styles' for justification. There is no need to save
- ;; point here, or even bother too much about the buffer contents.
+ ;; point here, or even bother too much about the buffer contents. However,
+ ;; DON'T mess up the kill-ring.
;;
;; Most of the code here is derived from Emacs 21.3's `hack-local-variables'
;; in files.el.
@@ -819,8 +820,8 @@ compatible with old code; callers should always specify it."
(regexp-quote suffix)
"$")
nil t)
- (beginning-of-line)
- (delete-region (point) (progn (end-of-line) (point)))))
+ (forward-line 0)
+ (delete-region (point) (progn (forward-line) (point)))))
;; Delete the first line, if we've got one, in case it contains a mode spec.
(unless (and lv-point
@@ -828,7 +829,8 @@ compatible with old code; callers should always specify it."
(forward-line 0)
(bobp)))
(goto-char (point-min))
- (delete-region (point) (progn (end-of-line) (point))))))
+ (unless (eobp)
+ (delete-region (point) (progn (forward-line) (point)))))))
(defun c-postprocess-file-styles ()
"Function that post processes relevant file local variables in CC Mode.