[Cmake-commits] CMake branch, next, updated. v3.3.0-rc2-618-gac05313

Brad King brad.king at kitware.com
Tue Jun 23 08:52:08 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  ac05313642c35cb3cee047d897614896bd7ce063 (commit)
       via  b24b58bb7b100794846786521f1977f048ecf5b6 (commit)
      from  ca67de7f3bfb0947024441b360c427b487c959cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac05313642c35cb3cee047d897614896bd7ce063
commit ac05313642c35cb3cee047d897614896bd7ce063
Merge: ca67de7 b24b58b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jun 23 08:52:07 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 23 08:52:07 2015 -0400

    Merge topic 'emacs-mode-prog-mode-hooks' into next
    
    b24b58bb cmake-mode.el: Add support for prog-mode hooks (#15521)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b24b58bb7b100794846786521f1977f048ecf5b6
commit b24b58bb7b100794846786521f1977f048ecf5b6
Author:     Jostein Kjønigsen <jostein at kjonigsen.net>
AuthorDate: Tue Jun 23 10:05:37 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jun 23 08:48:01 2015 -0400

    cmake-mode.el: Add support for prog-mode hooks (#15521)
    
    Since version 24, Emacs supports a generic mode called prog-mode.  Like
    all other modes it has its own mode-hook, prog-mode-hook.  For Emacs
    users it is common to provide all your generic programming-mode related
    customizations in this mode-hook.
    
    cmake-mode is definitely a programming-mode and should support calling
    this hook. There are two ways to make that happen:
    
    * Make your major-mode a derived-mode from prog-mode.
    * Manually calling the hook upon mode-activation.
    
    Implementing a derived mode may be the most proper thing to do, but that
    may require quite a few structural changes.  For now just call the hook
    explicitly if it exists.  This should cover much of what users need.

diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index 7458a66..51663a8 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -259,7 +259,9 @@ the indentation.  Otherwise it retains the same position on the line"
   (setq comment-start "#")
 
   ; Run user hooks.
-  (run-hooks 'cmake-mode-hook))
+  (if (boundp 'prog-mode-hook)
+      (run-hooks 'prog-mode-hook 'cmake-mode-hook)
+    (run-hooks 'cmake-mode-hook)))
 
 ; Help mode starts here
 

-----------------------------------------------------------------------

Summary of changes:
 Auxiliary/cmake-mode.el |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list