Use full path in undofile().  Updated docs.
diff --git a/runtime/indent/cmake.vim b/runtime/indent/cmake.vim
index 4315ad2..8c408fb 100644
--- a/runtime/indent/cmake.vim
+++ b/runtime/indent/cmake.vim
@@ -1,19 +1,11 @@
-" =============================================================================
-" 
-"   Program:   CMake - Cross-Platform Makefile Generator
-"   Module:    $RCSfile: cmake-indent.vim,v $
-"   Language:  VIM
-"   Date:      $Date: 2006/09/23 21:09:08 $
-"   Version:   $Revision: 1.7 $
-" 
-" =============================================================================
-
 " Vim indent file
+" Program:      CMake - Cross-Platform Makefile Generator
+" Module:       $RCSfile: cmake-indent.vim,v $
 " Language:     CMake (ft=cmake)
 " Author:       Andy Cedilnik <andy.cedilnik@kitware.com>
-" Maintainer:   Andy Cedilnik <andy.cedilnik@kitware.com>
-" Last Change:  $Date: 2006/09/23 21:09:08 $
-" Version:      $Revision: 1.7 $
+" Maintainer:   Karthik Krishnan <karthik.krishnan@kitware.com>
+" Last Change:  $Date: 2008-01-16 16:53:53 $
+" Version:      $Revision: 1.9 $
 "
 " Licence:      The CMake license applies to this file. See
 "               http://www.cmake.org/HTML/Copyright.html
@@ -25,6 +17,7 @@
 let b:did_indent = 1
 
 setlocal indentexpr=CMakeGetIndent(v:lnum)
+setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
 
 " Only define the function once.
 if exists("*CMakeGetIndent")
@@ -65,8 +58,8 @@
                     \            ')\s*' .
                     \            '\(' . cmake_regex_comment . '\)\?$'
 
-  let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\)\s*('
-  let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\)\s*('
+  let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\|FUNCTION\)\s*('
+  let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*('
 
   " Add
   if previous_line =~? cmake_indent_comment_line " Handle comments