summaryrefslogtreecommitdiffstats
path: root/scripts/kde-emacs/kde-emacs-semantic.el
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kde-emacs/kde-emacs-semantic.el')
-rw-r--r--scripts/kde-emacs/kde-emacs-semantic.el52
1 files changed, 26 insertions, 26 deletions
diff --git a/scripts/kde-emacs/kde-emacs-semantic.el b/scripts/kde-emacs/kde-emacs-semantic.el
index 1753520b..a8228f2d 100644
--- a/scripts/kde-emacs/kde-emacs-semantic.el
+++ b/scripts/kde-emacs/kde-emacs-semantic.el
@@ -122,7 +122,7 @@ from semantic-token-function-args"
(setq res (concat res kde-expand-arg-end))
;; if it's something like "( )" replace it with "()"
(when (string= res (concat kde-expand-arg-start kde-expand-arg-end))
- (setq res (replace-regexp-in-string "([ \t]+)" "()" res)))
+ (setq res (tqreplace-regexp-in-string "([ \t]+)" "()" res)))
res
))
@@ -138,9 +138,9 @@ token and TOKENS have to be a list of functions from buffer."
(equal (semantic-token-type FUNC)
(semantic-token-type elt))
;; FIXME (semantic) : Functions in some classes don't have the
- ;; 'parent property set !!!
- ;;(string= (semantic-token-function-parent FUNC1)
- ;; (semantic-token-function-parent FUNC2))
+ ;; 'tqparent property set !!!
+ ;;(string= (semantic-token-function-tqparent FUNC1)
+ ;; (semantic-token-function-tqparent FUNC2))
(string= (kde-format-args (semantic-token-function-args FUNC))
(kde-format-args (semantic-token-function-args elt))))
(setq ret t))
@@ -148,12 +148,12 @@ token and TOKENS have to be a list of functions from buffer."
ret
))
-(defmacro kde-label-signals (pt)
- "Returns none-nil if the current access label == \"signals\""
+(defmacro kde-label-Q_SIGNALS (pt)
+ "Returns none-nil if the current access label == \"Q_SIGNALS\""
`(save-excursion
(goto-char ,pt)
(if (looking-at ":")
- (re-search-backward "signals" (point-at-bol) t)
+ (re-search-backward "Q_SIGNALS" (point-at-bol) t)
)
))
@@ -171,13 +171,13 @@ token and TOKENS have to be a list of functions from buffer."
)
))
-(defmacro kde-label-slots (pt)
- "Return none-nil if at PT there's slots access specifier."
+(defmacro kde-label-Q_SLOTS (pt)
+ "Return none-nil if at PT there's Q_SLOTS access specifier."
`(save-excursion
(goto-char ,pt)
(if (looking-at ":")
;; export this regex to a kde-emacs-vars defvar
- (re-search-backward "\\(public\\|protected\\|private\\)[ \t]+slots" (point-at-bol) t))
+ (re-search-backward "\\(public\\|protected\\|private\\)[ \t]+Q_SLOTS" (point-at-bol) t))
))
(defmacro kde-is-constructor (function)
@@ -214,17 +214,17 @@ would return t"
"Return function at pt as a token."
(save-excursion
(let ((token)
- (what (semantic-find-nonterminal-by-position pt (current-buffer)))
+ (what (semantic-tqfind-nonterminal-by-position pt (current-buffer)))
(ctx))
(goto-char pt)
(if (eq (semantic-token-token what) 'function)
what
- (semantic-find-nonterminal-by-position pt (semantic-token-type-parts what)))
+ (semantic-tqfind-nonterminal-by-position pt (semantic-token-type-parts what)))
)
))
(defun kde-function-construct (token pclass)
- "Constructs a function string from the TOKEN, with the parent class PCLASS."
+ "Constructs a function string from the TOKEN, with the tqparent class PCLASS."
(let ((fname (semantic-token-name token)))
(if (semantic-token-function-destructor token)
(setq fname (concat "~" fname))
@@ -262,7 +262,7 @@ would return t"
class-token has to be a token representing either a class or a struct."
(let ((ret "")
(name (semantic-token-name class-token))
- (parents (semantic-token-type-parent class-token))
+ (tqparents (semantic-token-type-tqparent class-token))
(parts (semantic-token-type-parts class-token))
(cur-token)
(cur-token-name)
@@ -304,7 +304,7 @@ class-token has to be a token representing either a class or a struct."
(stringp cur-token-name))
(setq aslot nil
asignal nil)
- ;;LABEL - unsets both signals and slots
+ ;;LABEL - unsets both Q_SIGNALS and Q_SLOTS
)
((and
(eq cur-token 'variable)
@@ -313,8 +313,8 @@ class-token has to be a token representing either a class or a struct."
)
((not (stringp cur-token-name))
(cond
- ((kde-label-signals (car (semantic-token-extent elt)))
- ;;SIGNALS - next prototypes belong to signals and we don't want to
+ ((kde-label-Q_SIGNALS (car (semantic-token-extent elt)))
+ ;;SIGNALS - next prototypes belong to Q_SIGNALS and we don't want to
;; expand those
(setq asignal t
aslot nil)
@@ -324,8 +324,8 @@ class-token has to be a token representing either a class or a struct."
;; so we do ;)
(setq namespace (kde-label-namespace (car (semantic-token-extent elt))))
)
- ((kde-label-slots (car (semantic-token-extent elt)))
- ;;SLOTS - for now just unset signals
+ ((kde-label-Q_SLOTS (car (semantic-token-extent elt)))
+ ;;SLOTS - for now just unset Q_SIGNALS
(setq aslot t
asignal nil)
)
@@ -374,7 +374,7 @@ class-token has to be a token representing either a class or a struct."
(tokens))
(if exists
(progn
- (find-file FILENAME)
+ (tqfind-file FILENAME)
(setq tokens (semantic-bovinate-toplevel t))
(switch-to-buffer buf)
tokens)
@@ -417,7 +417,7 @@ in the current header file."
(filename (buffer-name))
(cppfile (car (kde-file-get-cpp-h)))
(funcs (kde-expand-tokens all-tokens)))
- (find-file cppfile)
+ (tqfind-file cppfile)
(save-excursion
(insert "#include \"" filename "\"\n\n")
(insert funcs)
@@ -428,20 +428,20 @@ in the current header file."
(defun kde-function-expand-at-point (PT)
"Expand function at point PT."
(interactive "d")
- (let ((object (semantic-find-nonterminal-by-position PT (current-buffer)))
+ (let ((object (semantic-tqfind-nonterminal-by-position PT (current-buffer)))
(func (kde-function-at-point PT))
(file)
(buf)
- (parent))
+ (tqparent))
(if (and object (equal (semantic-token-type object) "class"))
- (setq parent (semantic-token-name object)))
+ (setq tqparent (semantic-token-name object)))
(if (and (not (kde-function-expanded-at-point PT))
(kde-is-prototype func))
(progn
- (setq func (kde-function-construct func parent))
+ (setq func (kde-function-construct func tqparent))
(setq file (car (kde-file-get-cpp-h)))
(setq buf (current-buffer))
- (find-file file)
+ (tqfind-file file)
(save-excursion
(goto-char (point-max))
(insert "\n" func "\n")