[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-mode.el, v [EMACS_22_BA
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-mode.el, v [EMACS_22_BASE] |
Date: |
Wed, 20 Jun 2007 08:27:53 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Alan Mackenzie <acmacm> 07/06/20 08:27:53
Index: cc-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-mode.el,v
retrieving revision 1.58.2.1
retrieving revision 1.58.2.2
diff -u -b -r1.58.2.1 -r1.58.2.2
--- cc-mode.el 28 Apr 2007 20:39:11 -0000 1.58.2.1
+++ cc-mode.el 20 Jun 2007 08:27:53 -0000 1.58.2.2
@@ -790,7 +790,8 @@
;; 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 @@
(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 @@
(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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-mode.el, v [EMACS_22_BASE],
Alan Mackenzie <=