# HG changeset patch # User Stefan Monnier # Date 1083268102 0 # Node ID 1af59a842b932247c1ea151ace3e8d933d95a6d7 # Parent 373bc9e19710e108bf054e3b5d8fcd99a6b752da (cfengine-beginning-of-defun, cfengine-end-of-defun): Ensure progress through buffer. diff -r 373bc9e19710 -r 1af59a842b93 lisp/progmodes/cfengine.el --- a/lisp/progmodes/cfengine.el Thu Apr 29 19:09:20 2004 +0000 +++ b/lisp/progmodes/cfengine.el Thu Apr 29 19:48:22 2004 +0000 @@ -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 ;; Keywords: languages @@ -102,7 +102,8 @@ (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." (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)