[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesdk/scripts/kde-emacs
From:       David Faure <faure () kde ! org>
Date:       2005-04-25 12:40:19
Message-ID: 20050425124019.850C73EF () office ! kde ! org
[Download RAW message or body]

CVS commit by faure: 

Support for defining a default implementation in agulbra-make-member (as requested by \
Kalle). For example, add this line in a .emacs-dirvars file:
kde-make-member-default-impl:  " // PENDING(dfaure) Implement this\n qFatal( \"Sorry, \
not implemented: FUNCTION\" );\n"


  M +5 -3      kde-emacs-utils.el   1.58
  M +5 -1      kde-emacs-vars.el   1.16


--- kdesdk/scripts/kde-emacs/kde-emacs-utils.el  #1.57:1.58
@@ -268,10 +268,12 @@
          (function (cdr (cdr mup)))
          (file (buffer-file-name))
-         (insertion-string nil)
+         (insertion-string (kde-function-impl-sig namespace class function))
          (msubstr nil)
          (start nil)
          )
     (setq insertion-string 
-          (concat (kde-function-impl-sig namespace class function) "\n{\n    \
\n}\n")) +          (concat insertion-string "\n{\n"
+                  (replace-in-string kde-make-member-default-impl "FUNCTION" \
insertion-string t) +                  "}\n"))
     ; move to next method, to be ready for next call
     (backward-char)                ; in case we're after the ';'
@@ -299,5 +301,5 @@
     (insert insertion-string)
     (forward-char -3)
-    (c-indent-command)
+    (c-indent-defun)   
     (save-excursion
       (and (string-match ".*/" file)

--- kdesdk/scripts/kde-emacs/kde-emacs-vars.el  #1.15:1.16
@@ -135,4 +135,9 @@
   :type 'string)
 
+(defcustom kde-make-member-default-impl "    \n"
+  "Default implementation added by agulbra-make-member. FUNCTION gets replaced by \
the full signature of the function/method." +  :group 'kde-devel
+  :type 'string)
+
 ; a grep in the part of kde-source I have gives: 
 ; 5579 files uses .cpp, 1402 uses .cc, 10 uses .cxx, and 1 uses .C
@@ -140,4 +145,3 @@
   "Source extension which kde-* functions should use for creating new files.")
 
-
 (provide 'kde-emacs-vars)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic