[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdesdk/scripts/kde-emacs
From: David Faure <faure () kde ! org>
Date: 2005-10-25 10:36:11
Message-ID: 1130236571.852670.12899.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 474036 by dfaure:
Fix switch-to-function-def for .cpp files with a newline between the return type
and the method name, like "void\nFoo::bar()" in kbuildservicetypefactory.cpp
M +7 -7 kde-emacs-utils.el
M +1 -1 klaralv.el
--- trunk/KDE/kdesdk/scripts/kde-emacs/kde-emacs-utils.el #474035:474036
@@ -224,7 +224,7 @@
(concat "\\(class\\|struct\\|namespace\\)\\s-+"
class "[^;]+{") nil t)
;; TODO keep looking, until we find a match that's not inside a \
comment
- (re-search-forward (concat "[ \t]+" (regexp-quote function) "[ \
\t]*(") nil t))))) + (re-search-forward (concat "[ \t]+" \
(kde-function-regexp-quote function) "[ \t]*(") nil t))))) (if (string-match "\\.h$" \
n) (progn
(let ((mup (method-under-point))
@@ -240,7 +240,7 @@
(setq sig (kde-remove-newline (kde-function-impl-sig namespace class \
function))) (if (string-match "(.*" sig) ; remove args
(setq sig (replace-match "" nil t sig)))
- (setq found (re-search-forward (concat "^[^()]*" (regexp-quote sig) "[ \t]*(") \
nil t) ) + (setq found (re-search-forward (concat "^[^()]*" \
(kde-function-regexp-quote sig) "[ \t]*(") nil t) )
(if (not found)
(progn
@@ -251,14 +251,14 @@
(if (string-match "(.*" sig) ; remove args
(setq sig (replace-match "" nil t sig)))
- (re-search-forward (concat "^[^()]*" (regexp-quote sig) "[ \t]*(") nil \
t) ) ) + (re-search-forward (concat "^[^()]*" (kde-function-regexp-quote \
sig) "[ \t]*(") nil t) ) ) )))))
(defun kde-remove-newline (str)
- (let ((res str))
- (while (string-match "\n" res )
- (setq res (replace-match " " nil t res)))
- res))
+ (replace-in-string str "\n" " "))
+; quote for use as regexp, but replace spaces with "any whitespace"
+(defun kde-function-regexp-quote (str)
+ (replace-in-string (regexp-quote str) "[ \n\t]" "[ \n\t]"))
; Initial implementation by Arnt Gulbransen
; Current maintainer: David Faure
--- trunk/KDE/kdesdk/scripts/kde-emacs/klaralv.el #474035:474036
@@ -206,7 +206,7 @@
'(
; Useful fake entries
(QApplication qApp)
- (qglobal.h qDebug qWarning)
+ (QDebug qDebug qWarning)
(QEventLoop eventloop)
))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic