summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cfengine.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2004-04-29 19:48:22 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2004-04-29 19:48:22 +0000
commit7d5f942b02c4806e4d68c3764dbfd6d04c7c1624 (patch)
tree5753f6cd748d67fa21eb750892693c6dc2738046 /lisp/progmodes/cfengine.el
parent7830c895a2d36ef47f38f9284c96a506731f3981 (diff)
downloademacs-7d5f942b02c4806e4d68c3764dbfd6d04c7c1624.tar.gz
(cfengine-beginning-of-defun, cfengine-end-of-defun):
Ensure progress through buffer.
Diffstat (limited to 'lisp/progmodes/cfengine.el')
-rw-r--r--lisp/progmodes/cfengine.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index 62633fe2940..16064586ee9 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -1,6 +1,6 @@
;;; cfengine.el --- mode for editing Cfengine files
-;; Copyright (C) 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: languages
@@ -102,7 +102,8 @@ This includes those for cfservd as well as cfagent."))
(defun cfengine-beginning-of-defun ()
"`beginning-of-defun' function for Cfengine mode.
Treats actions as defuns."
- (end-of-line)
+ (unless (<= (current-column) (current-indentation))
+ (end-of-line))
(if (re-search-backward "^[[:alpha:]]+: *$" nil t)
(beginning-of-line)
(goto-char (point-min)))
@@ -113,7 +114,7 @@ Treats actions as defuns."
Treats actions as defuns."
(end-of-line)
(if (re-search-forward "^[[:alpha:]]+: *$" nil t)
- (progn (forward-line -1) (end-of-line))
+ (beginning-of-line)
(goto-char (point-max)))
t)