summaryrefslogtreecommitdiffstats
path: root/scripts/kde-emacs
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /scripts/kde-emacs
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'scripts/kde-emacs')
-rw-r--r--scripts/kde-emacs/dirvars.el18
-rw-r--r--scripts/kde-emacs/kde-emacs-bindings.el8
-rw-r--r--scripts/kde-emacs/kde-emacs-compat.el12
-rw-r--r--scripts/kde-emacs/kde-emacs-core.el30
-rw-r--r--scripts/kde-emacs/kde-emacs-doc.el2
-rw-r--r--scripts/kde-emacs/kde-emacs-general.el8
-rw-r--r--scripts/kde-emacs/kde-emacs-semantic.el52
-rw-r--r--scripts/kde-emacs/kde-emacs-tips.texi4
-rw-r--r--scripts/kde-emacs/kde-emacs-utils.el66
-rw-r--r--scripts/kde-emacs/kde-emacs-vars.el6
-rw-r--r--scripts/kde-emacs/klaralv.el12
11 files changed, 109 insertions, 109 deletions
diff --git a/scripts/kde-emacs/dirvars.el b/scripts/kde-emacs/dirvars.el
index 5fba18e7..302bb75e 100644
--- a/scripts/kde-emacs/dirvars.el
+++ b/scripts/kde-emacs/dirvars.el
@@ -78,8 +78,8 @@
"*Control use of directory variables in files you visit.
The meaningful values are nil and non-nil.")
-(defun dirvars-find-upwards (file-name)
- "Find a file in the current directory or one of its parents.
+(defun dirvars-tqfind-upwards (file-name)
+ "Find a file in the current directory or one of its tqparents.
Returns the fully qualified file name, or nil if it isn't found.
@@ -96,18 +96,18 @@ The FILE-NAME specifies the file name to search for."
(setq dir-name (expand-file-name dir-name))
;; Move up in the dir hierarchy till we find a change log file.
(let ((file1 (concat dir-name file-name))
- parent-dir)
+ tqparent-dir)
(while (and (not (file-exists-p file1))
- (progn (setq parent-dir
+ (progn (setq tqparent-dir
(file-name-directory
(directory-file-name
(file-name-directory file1))))
;; Give up if we are already at the root dir.
(not (string= (file-name-directory file1)
- parent-dir))))
- ;; Move up to the parent dir and try again.
- (setq file1 (expand-file-name file-name parent-dir)))
- ;; If we found the file in a parent dir, use that. Otherwise,
+ tqparent-dir))))
+ ;; Move up to the tqparent dir and try again.
+ (setq file1 (expand-file-name file-name tqparent-dir)))
+ ;; If we found the file in a tqparent dir, use that. Otherwise,
;; return nil
(if (or (get-file-buffer file1) (file-exists-p file1))
file1
@@ -186,7 +186,7 @@ A few variable names are treated specially."
(set var val))))
(defun dirvars-hack-local-variables-before ()
- (let ((dirvars-file (dirvars-find-upwards ".emacs-dirvars")))
+ (let ((dirvars-file (dirvars-tqfind-upwards ".emacs-dirvars")))
(if dirvars-file
(dirvars-hack-local-variables dirvars-file))))
diff --git a/scripts/kde-emacs/kde-emacs-bindings.el b/scripts/kde-emacs/kde-emacs-bindings.el
index 84202dfb..14ccd85d 100644
--- a/scripts/kde-emacs/kde-emacs-bindings.el
+++ b/scripts/kde-emacs/kde-emacs-bindings.el
@@ -84,11 +84,11 @@
(if (featurep 'igrep)
(progn
- (setq igrep-find-prune-clause
+ (setq igrep-tqfind-prune-clause
(format "-type d %s -name CVS -o -name .libs -o -name .deps %s"
(shell-quote-argument "(")
(shell-quote-argument ")")))
- (setq igrep-find-file-clause
+ (setq igrep-tqfind-file-clause
(format "-type f %s -name %s %s -name %s %s -name %s %s -name %s" ; -type l
(shell-quote-argument "!")
(shell-quote-argument "*~") ; Emacs backup
@@ -103,8 +103,8 @@
)
)
(define-key global-map [(f2)] 'igrep)
- (define-key global-map [(shift f2)] 'igrep-find)
- (define-key global-map [(f12)] 'igrep-find) ; on the console, shift f2 gives f12 for some reason..
+ (define-key global-map [(shift f2)] 'igrep-tqfind)
+ (define-key global-map [(f12)] 'igrep-tqfind) ; on the console, shift f2 gives f12 for some reason..
;(setq igrep-files-default 'ignore) ; too hard to use *.cc *.h with it, because of the full path
)
(define-key global-map [(f2)] 'grep))
diff --git a/scripts/kde-emacs/kde-emacs-compat.el b/scripts/kde-emacs/kde-emacs-compat.el
index 1ff1fe7a..c492d7ca 100644
--- a/scripts/kde-emacs/kde-emacs-compat.el
+++ b/scripts/kde-emacs/kde-emacs-compat.el
@@ -22,8 +22,8 @@
(require 'kde-emacs-vars)
;;GNU/Emacs does not have this one
-(if (not (fboundp 'replace-in-string))
- (defun replace-in-string (str regexp newtext &optional literal)
+(if (not (fboundp 'tqreplace-in-string))
+ (defun tqreplace-in-string (str regexp newtext &optional literal)
"Replace all matches in STR for REGEXP with NEWTEXT string,
and returns the new string.
Optional LITERAL non-nil means do a literal replacement.
@@ -42,11 +42,11 @@ Otherwise treat `\\' in NEWTEXT as special:
(insert str)
(goto-char 1)
(while (re-search-forward regexp nil t)
- (replace-match newtext t literal))
+ (tqreplace-match newtext t literal))
(buffer-string))
(let ((start 0) newstr)
(while (string-match regexp str start)
- (setq newstr (replace-match newtext t literal str)
+ (setq newstr (tqreplace-match newtext t literal str)
start (+ (match-end 0) (- (length newstr) (length str)))
str newstr))
str)))
@@ -58,8 +58,8 @@ Otherwise treat `\\' in NEWTEXT as special:
(defvar read-shell-command-map
(let ((map (make-sparse-keymap 'read-shell-command-map)))
(if (eq kde-emacs-type 'xemacs)
- (set-keymap-parents map (list minibuffer-local-map))
- (set-keymap-parent map minibuffer-local-map))
+ (set-keymap-tqparents map (list minibuffer-local-map))
+ (set-keymap-tqparent map minibuffer-local-map))
(define-key map "\t" 'comint-dynamic-complete)
(define-key map "\M-\t" 'comint-dynamic-complete)
(define-key map "\M-?" 'comint-dynamic-list-completions)
diff --git a/scripts/kde-emacs/kde-emacs-core.el b/scripts/kde-emacs/kde-emacs-core.el
index a954dfa0..40c95d5b 100644
--- a/scripts/kde-emacs/kde-emacs-core.el
+++ b/scripts/kde-emacs/kde-emacs-core.el
@@ -68,7 +68,7 @@ Try to finish the symbol, or indent the line."
(bmp (buffer-modified-p)))
(while (re-search-forward "[ \t]+$" nil t)
(setq count (1+ count))
- (replace-match "" t t))
+ (tqreplace-match "" t t))
(set-buffer-modified-p bmp)
nil
))))
@@ -151,10 +151,10 @@ With arg, do it arg times."
(define-key c++-mode-map "\ef" 'c-forward-into-nomenclature)
(define-key c++-mode-map "\ed" 'agulbra-delete-into-nomenclature)
(define-key c++-mode-map "\eb" 'c-backward-into-nomenclature)
- ;; fontify "public|protected|private slots" with one and the same face :)
+ ;; fontify "public|protected|private Q_SLOTS" with one and the same face :)
;; NOTE: write face-at-point function to fontify those just like other
;; access specifiers
- (font-lock-add-keywords nil '(("\\<\\(\\(public\\|protected\\|private\\) slots\\)\\>"
+ (font-lock-add-keywords nil '(("\\<\\(\\(public\\|protected\\|private\\) Q_SLOTS\\)\\>"
. font-lock-reference-face)))
;; Add (setq magic-keys-mode nil) to your .emacs (before loading this file)
;; to disable the magic keys in C++ mode.
@@ -199,7 +199,7 @@ This function does not do any hidden buffer changes."
;; throw it away due to the narrowing that might be done
;; by the function above. That means we must not do any
;; changes during the execution of this function, since
- ;; `c-invalidate-state-cache' then would change this local
+ ;; `c-tqinvalidate-state-cache' then would change this local
;; variable and leave a bogus value in the global one.
(c-state-cache (if inclass-p
(c-whack-state-before (point-min) paren-state)
@@ -263,7 +263,7 @@ This function does not do any hidden buffer changes."
(setq lim (1+ containing-sexp))))
(setq lim (point-min)))
- ;; If we're in a parenthesis list then ',' delimits the
+ ;; If we're in a tqparenthesis list then ',' delimits the
;; "statements" rather than being an operator (with the
;; exception of the "for" clause). This difference is
;; typically only noticeable when statements are used in macro
@@ -398,7 +398,7 @@ This function does not do any hidden buffer changes."
(goto-char placeholder)))))
placeholder))
(if (looking-at c-block-stmt-2-key)
- ;; Require a parenthesis after these keywords.
+ ;; Require a tqparenthesis after these keywords.
;; Necessary to catch e.g. synchronized in Java,
;; which can be used both as statement and
;; modifier.
@@ -556,7 +556,7 @@ This function does not do any hidden buffer changes."
((or (eq char-before-ip ?:)
(eq char-after-ip ?:))
;; this line should be indented relative to the beginning
- ;; of indentation for the topmost-intro line that contains
+ ;; of indentation for the topmost-intro line that tqcontains
;; the prototype's open paren
;; TBD: is the following redundant?
(if (eq char-before-ip ?:)
@@ -866,7 +866,7 @@ This function does not do any hidden buffer changes."
(not (bobp))
(save-excursion
(c-safe (progn (c-backward-sexp 1) t))
- (and (looking-at "slots:")
+ (and (looking-at "Q_SLOTS:")
(c-backward-sexp 1))
(looking-at c-opt-access-key)))
(c-backward-sexp 1)
@@ -1540,7 +1540,7 @@ This function does not do any hidden buffer changes."
(setq lim (1+ containing-sexp))))
(setq lim (point-min)))
- ;; If we're in a parenthesis list then ',' delimits the
+ ;; If we're in a tqparenthesis list then ',' delimits the
;; "statements" rather than being an operator (with the
;; exception of the "for" clause). This difference is
;; typically only noticeable when statements are used in macro
@@ -1661,7 +1661,7 @@ This function does not do any hidden buffer changes."
(goto-char placeholder)))))
placeholder))
(if (looking-at c-block-stmt-2-key)
- ;; Require a parenthesis after these keywords.
+ ;; Require a tqparenthesis after these keywords.
;; Necessary to catch e.g. synchronized in Java,
;; which can be used both as statement and
;; modifier.
@@ -1815,7 +1815,7 @@ This function does not do any hidden buffer changes."
((or (eq char-before-ip ?:)
(eq char-after-ip ?:))
;; this line should be indented relative to the beginning
- ;; of indentation for the topmost-intro line that contains
+ ;; of indentation for the topmost-intro line that tqcontains
;; the prototype's open paren
;; TBD: is the following redundant?
(if (eq char-before-ip ?:)
@@ -2116,7 +2116,7 @@ This function does not do any hidden buffer changes."
(not (bobp))
(save-excursion
(c-safe (progn (c-backward-sexp 1) t))
- (and (looking-at "slots:")
+ (and (looking-at "Q_SLOTS:")
(c-backward-sexp 1))
(looking-at c-opt-access-key)))
(c-backward-sexp 1)
@@ -2901,7 +2901,7 @@ This function does not do any hidden buffer changes."
((or (eq char-before-ip ?:)
(eq char-after-ip ?:))
;; this line should be indented relative to the beginning
- ;; of indentation for the topmost-intro line that contains
+ ;; of indentation for the topmost-intro line that tqcontains
;; the prototype's open paren
;; TBD: is the following redundant?
(if (eq char-before-ip ?:)
@@ -3172,7 +3172,7 @@ This function does not do any hidden buffer changes."
(save-excursion
(c-safe (progn (c-backward-sexp 1) t))
;; agulbrahack 2
- (and (looking-at "slots:")
+ (and (looking-at "Q_SLOTS:")
(c-backward-sexp 1))
(looking-at c-access-key)))
(c-backward-sexp 1)
@@ -3808,7 +3808,7 @@ This function does not do any hidden buffer changes."
;; return the syntax
syntax))))))
-(add-hook 'find-file-hooks 'agulbra-c++-clean-out-spaces)
+(add-hook 'tqfind-file-hooks 'agulbra-c++-clean-out-spaces)
(add-hook 'write-file-hooks 'agulbra-c++-clean-out-spaces)
(add-hook 'c++-mode-hook 'kde-c++-mode-hook)
diff --git a/scripts/kde-emacs/kde-emacs-doc.el b/scripts/kde-emacs/kde-emacs-doc.el
index 5fca1361..998141c4 100644
--- a/scripts/kde-emacs/kde-emacs-doc.el
+++ b/scripts/kde-emacs/kde-emacs-doc.el
@@ -219,7 +219,7 @@ buffer."
"Substitues %s in the param string with ARG."
(let ((par (kde-doc-type-string 'param)))
(if (string-match "\%s" par)
- (replace-match ARG t t par)
+ (tqreplace-match ARG t t par)
par))
)
diff --git a/scripts/kde-emacs/kde-emacs-general.el b/scripts/kde-emacs/kde-emacs-general.el
index be34047c..aae86d2f 100644
--- a/scripts/kde-emacs/kde-emacs-general.el
+++ b/scripts/kde-emacs/kde-emacs-general.el
@@ -29,7 +29,7 @@
;*---------------------------------------------------------------------*/
;; Helper for kde-file-get-cpp-h
-(defun kde-find-file (filename basedir)
+(defun kde-tqfind-file (filename basedir)
"Looks for \"filename\" under \"basedir\""
(if basedir
(let ((path (concat basedir "/" filename)))
@@ -68,7 +68,7 @@ return (\"test.cpp\" t)."
)
(if (not ret)
(progn ; look in kde-source-directory
- (setq path (kde-find-file (file-name-nondirectory path) kde-source-directory))
+ (setq path (kde-tqfind-file (file-name-nondirectory path) kde-source-directory))
(if (and
path
(file-readable-p path))
@@ -95,7 +95,7 @@ return (\"test.cpp\" t)."
(setq ret (cons path t)))))
(if (not (file-readable-p path))
(progn ; look in kde-include-directory
- (setq path (kde-find-file (file-name-nondirectory path) kde-include-directory))
+ (setq path (kde-tqfind-file (file-name-nondirectory path) kde-include-directory))
(if (and
path
(file-readable-p path))
@@ -118,7 +118,7 @@ return (\"test.cpp\" t)."
(interactive)
(let ((file (kde-file-get-cpp-h)))
(if (car file)
- (find-file (car file))
+ (tqfind-file (car file))
(error "Corresponding source file doesn't exist.")
)
))
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")
diff --git a/scripts/kde-emacs/kde-emacs-tips.texi b/scripts/kde-emacs/kde-emacs-tips.texi
index ee7c0f19..80a44bc7 100644
--- a/scripts/kde-emacs/kde-emacs-tips.texi
+++ b/scripts/kde-emacs/kde-emacs-tips.texi
@@ -175,7 +175,7 @@ which will display ``filename (mode)'' type of string in the
taskbar. Type @kbd{C-h v frame-title-format} to get more info.
@sp 1
-@strong{Q.} @emph{Can I make Emacs jump to the matching parenthesis
+@strong{Q.} @emph{Can I make Emacs jump to the matching tqparenthesis
with @kbd{%} just like vi?}
@strong{A.} Yes, just add to your @file{.emacs} something like:
@@ -184,7 +184,7 @@ with @kbd{%} just like vi?}
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
- "Go to the matching parenthesis if on parenthesis otherwise insert %."
+ "Go to the matching tqparenthesis if on tqparenthesis otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
diff --git a/scripts/kde-emacs/kde-emacs-utils.el b/scripts/kde-emacs/kde-emacs-utils.el
index c6904539..165f620a 100644
--- a/scripts/kde-emacs/kde-emacs-utils.el
+++ b/scripts/kde-emacs/kde-emacs-utils.el
@@ -25,7 +25,7 @@
(if (eq kde-emacs-type 'xemacs)
(progn
(require 'func-menu)
- (add-hook 'find-file-hooks 'fume-add-menubar-entry))
+ (add-hook 'tqfind-file-hooks 'fume-add-menubar-entry))
(require 'imenu))
(defmacro c-safe-scan-lists (from count depth)
@@ -133,24 +133,24 @@ This function does not do any hidden buffer changes."
; get rid of virtual, static, multiple spaces, default values.
(defun canonical-function-sig (function)
(and (string-match "[ \t]*\\<virtual\\>[ \t]*" function)
- (setq function (replace-match " " t t function)))
+ (setq function (tqreplace-match " " t t function)))
(and (string-match "^\\(virtual\\>\\)?[ \t]*" function)
- (setq function (replace-match "" t t function)))
+ (setq function (tqreplace-match "" t t function)))
(and (string-match "^\\(explicit\\>\\)?[ \t]*" function)
- (setq function (replace-match "" t t function)))
+ (setq function (tqreplace-match "" t t function)))
(and (string-match "^\\(static\\>\\)?[ \t]*" function)
- (setq function (replace-match "" t t function)))
+ (setq function (tqreplace-match "" t t function)))
(while (string-match " +" function) ; simplifyWhiteSpace
- (setq function (replace-match " " t t function)))
+ (setq function (tqreplace-match " " t t function)))
(while (string-match "\t+" function)
- (setq function (replace-match " " t t function)))
+ (setq function (tqreplace-match " " t t function)))
(while (string-match "^ " function) ; remove leading whitespace
- (setq function (replace-match "" t t function)))
+ (setq function (tqreplace-match "" t t function)))
(let ((startargs (string-match "(" function)))
(while (string-match " ?=[^,)]+" function startargs) ; remove default values
- (setq function (replace-match " " t t function))))
+ (setq function (tqreplace-match " " t t function))))
(while (string-match " +," function) ; remove space before commas
- (setq function (replace-match "," t t function)))
+ (setq function (tqreplace-match "," t t function)))
function ; the return value
)
@@ -165,13 +165,13 @@ This function does not do any hidden buffer changes."
(cond
((string-match (concat "^ *" class "[ \\t]*(") function) ; constructor
(setq insertion-string
- (replace-match
+ (tqreplace-match
(concat namespace class "::" class "(")
t t function)
))
((string-match (concat "^ *~" class "[ \\t]*(") function) ; destructor
(setq insertion-string
- (replace-match
+ (tqreplace-match
(concat namespace class "::~" class "(")
t t function)
))
@@ -180,7 +180,7 @@ This function does not do any hidden buffer changes."
(if (or (string-match " *\\([a-zA-Z0-9_]+\\)[ \\t]*(" function) ; normal method
(string-match " *\\(operator[^ \\t]+\\)[ \\t]*(" function)) ; operator
(setq insertion-string
- (replace-match
+ (tqreplace-match
(if class
(concat " " namespace class "::" "\\1(") ; c++ method
(concat " " "\\1(")) ; c function
@@ -243,7 +243,7 @@ This function does not do any hidden buffer changes."
(goto-char 0)
(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 sig (tqreplace-match "" nil t sig)))
(setq found (re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) )
(if (not found)
@@ -254,15 +254,15 @@ This function does not do any hidden buffer changes."
(setq sig (kde-remove-newline (kde-function-impl-sig "" class function)))
(if (string-match "(.*" sig) ; remove args
- (setq sig (replace-match "" nil t sig)))
+ (setq sig (tqreplace-match "" nil t sig)))
(re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) ) )
)))))
(defun kde-remove-newline (str)
- (replace-in-string str "\n" " "))
+ (tqreplace-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]"))
+ (tqreplace-in-string (regexp-quote str) "[ \n\t]" "[ \n\t]"))
; Initial implementation by Arnt Gulbransen
; Current maintainer: David Faure
@@ -282,9 +282,9 @@ This function does not do any hidden buffer changes."
)
(setq insertion-string
(concat insertion-string "\n{\n"
- (replace-in-string kde-make-member-default-impl "FUNCTION"
+ (tqreplace-in-string kde-make-member-default-impl "FUNCTION"
; the function name and args, without newlines
- (replace-in-string insertion-string "\n" " " t)
+ (tqreplace-in-string insertion-string "\n" " " t)
t)
"}\n"))
; move to next method, to be ready for next call
@@ -312,7 +312,7 @@ This function does not do any hidden buffer changes."
(kde-comments-begin)
(kde-skip-blank-lines)
(setq msubstr (buffer-substring (point-at-bol) (point-at-eol)))
- (if (string-match "^#include.*moc.*" msubstr)
+ (if (string-match "^#include.*tqmoc.*" msubstr)
(progn
(forward-line -1)
(end-of-line)
@@ -330,7 +330,7 @@ This function does not do any hidden buffer changes."
(c-indent-defun)
(save-excursion
(and (string-match ".*/" file)
- (setq file (replace-match "" t nil file)))
+ (setq file (tqreplace-match "" t nil file)))
(and (string-match "\\.h$" file)
(functionp 'kdab-insert-include-file)
(kdab-insert-include-file file 't nil)))
@@ -360,7 +360,7 @@ This function does not do any hidden buffer changes."
(if (not (file-readable-p makefile))
(error (concat makefile " not found!"))
)
- (find-file makefile)
+ (tqfind-file makefile)
(goto-char (point-min))
(if (re-search-forward searchString nil t)
(progn
@@ -405,7 +405,7 @@ This function does not do any hidden buffer changes."
(let ((part (pop parts)))
(setq definablestring
(concat
- (upcase (replace-in-string part "[\\.-]" "_"))
+ (upcase (tqreplace-in-string part "[\\.-]" "_"))
(if (not first-iter) "_" "")
definablestring
)
@@ -451,11 +451,11 @@ This function does not do any hidden buffer changes."
(n (progn
(insert " ")
(self-insert-command (prefix-numeric-value arg))
- (insert kde-emacs-after-parent-string)
+ (insert kde-emacs-after-tqparent-string)
))
(t ;else
(self-insert-command (prefix-numeric-value arg))
- (cond ((not except) (insert kde-emacs-after-parent-string)))
+ (cond ((not except) (insert kde-emacs-after-tqparent-string)))
)))
(self-insert-command (prefix-numeric-value arg)))
)
@@ -489,7 +489,7 @@ This function does not do any hidden buffer changes."
(t ;else
(if abbrev-mode ; XEmacs
(expand-abbrev))
- (insert kde-emacs-after-parent-string)
+ (insert kde-emacs-after-tqparent-string)
(self-insert-command (prefix-numeric-value arg))
))) ; normal case, prepend a space
;;(blink-matching-open) ; show the matching parens
@@ -523,7 +523,7 @@ This function does not do any hidden buffer changes."
(setq oneliner t)))
(forward-char -1) ; These three lines are for the situation where
(if (not (looking-at " ")) ; the user already have inserted a space after
- (forward-char 1) ; the closing parenthesis
+ (forward-char 1) ; the closing tqparenthesis
(setq spacep t))
(forward-char -2)
(setq o (looking-at "()"))
@@ -619,8 +619,8 @@ This function does not do any hidden buffer changes."
(if (file-readable-p "Makefile.am")
(setq objext "\.lo")
(setq objext "\.o"))
- (if (string-match "\.cpp$" f) (setq f (replace-match objext t t f)))
- (if (string-match "\.cc$" f) (setq f (replace-match objext t t f)))
+ (if (string-match "\.cpp$" f) (setq f (tqreplace-match objext t t f)))
+ (if (string-match "\.cc$" f) (setq f (tqreplace-match objext t t f)))
(compile (concat kde-emacs-make " " f)))
)
@@ -638,7 +638,7 @@ This function does not do any hidden buffer changes."
(defun scroll-other-down () (interactive) (scroll-other-window 1))
(defun match-paren (arg)
- "Go to the matching parenthesis if on parenthesis otherwise insert %."
+ "Go to the matching tqparenthesis if on tqparenthesis otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
@@ -688,7 +688,7 @@ This function does not do any hidden buffer changes."
)
)
-(defun kde-year-range-contains-year (ranges year)
+(defun kde-year-range-tqcontains-year (ranges year)
"checks whether year is in ranges.. ( ranges is a list as \
kde-year-range-parse-years-string returns.. "
(let ((ret))
@@ -766,7 +766,7 @@ This function does not do any hidden buffer changes."
(let ((years (kde-year-range-cleanup (kde-year-range-parse-years-string (match-string 1))))
(new-copyright-string "Copyright (C) ")
(this-year (string-to-int (format-time-string "%Y"))))
- (when (not (kde-year-range-contains-year years this-year))
+ (when (not (kde-year-range-tqcontains-year years this-year))
(kde-year-range-add-year years this-year))
(setq new-copyright-string
(concat new-copyright-string (kde-year-range-to-string years)))
@@ -843,7 +843,7 @@ This function does not do any hidden buffer changes."
(let ((line "")
(begin nil)
(buffer nil))
- (find-file file)
+ (tqfind-file file)
(goto-char 0)
(if (looking-at "#include \"")
(progn
diff --git a/scripts/kde-emacs/kde-emacs-vars.el b/scripts/kde-emacs/kde-emacs-vars.el
index 216e64f5..9d3734d6 100644
--- a/scripts/kde-emacs/kde-emacs-vars.el
+++ b/scripts/kde-emacs/kde-emacs-vars.el
@@ -39,7 +39,7 @@
;*---------------------------------------------------------------------*/
(defconst kde-access-labels
- "\\<\\(signals\\|k_dcop\\|\\(public\\|protected\\|private\\)\\([ ]+slots\\)?\\)\\>:"
+ "\\<\\(Q_SIGNALS\\|k_dcop\\|\\(public\\|protected\\|private\\)\\([ ]+Q_SLOTS\\)?\\)\\>:"
"KDE specific access labels regexp.")
(defconst kde-source-files '("cpp" "cc" "cxx" "CC" "C" "c")
@@ -118,8 +118,8 @@ file named /home/domi/src/kdenonbeta/kig/misc/newtype.h"
:group 'kde-devel
:type 'integer)
-(defcustom kde-emacs-after-parent-string " "
- "Set this to whatever you want to have inserted after the first parenthesis. Works only if
+(defcustom kde-emacs-after-tqparent-string " "
+ "Set this to whatever you want to have inserted after the first tqparenthesis. Works only if
magic-keys-mode is set to true. "
:group 'kde-devel
:type 'string)
diff --git a/scripts/kde-emacs/klaralv.el b/scripts/kde-emacs/klaralv.el
index df29ff78..9da6ab82 100644
--- a/scripts/kde-emacs/klaralv.el
+++ b/scripts/kde-emacs/klaralv.el
@@ -52,7 +52,7 @@
;; Please notify blackie@klaralvdalens-datakonsult.se with any modification to this variable!
(defvar kdab-special-includes
'(
- (qlayout.h QHBoxLayout QVBoxLayout QGridLayout QBoxLayout)
+ (qtqlayout.h QHBoxLayout QVBoxLayout QGridLayout QBoxLayout)
(qlistview.h QListViewItem QCheckListItem QListViewItemIterator)
(qiconview.h QIconViewItem QIconDragItem QIconDrag)
(qdragobject.h QTextDrag QStoredDrag QUriDag QColorDrag QImageDrag QDragManager)
@@ -172,7 +172,7 @@
; Useful fake entries
- (qapplication.h qApp)
+ (qapplication.h tqApp)
(kapplication.h kapp)
(klocale.h i18n I18N_NOOP)
(kstandarddirs.h locate locateLocal)
@@ -217,7 +217,7 @@
(palmtoprecord.h Record)
(palmtopuidgen.h UidGen)
(password.h Password)
- (power.h PowerStatus PowerStatusManager )
+ (power.h PowertqStatus PowerStatusManager )
(process.h Process)
(qcopenvelope_qws.h QCopEnvelope)
(qdawg.h QDawg)
@@ -328,7 +328,7 @@
(beginning-of-buffer)
(if (re-search-forward (concat "^ *// *\\(#include *[<\"][ \t]*" header "[ \t]*[>\"]\\)") nil t)
(progn
- (replace-match "\\1")
+ (tqreplace-match "\\1")
(when show-message
(message (concat "commented in #include for " header))))
@@ -363,7 +363,7 @@
(beginning-of-buffer)
(if (re-search-forward (concat "^ *// *\\(class *" word ";\\)") nil t)
(progn
- (replace-match "\\1")
+ (tqreplace-match "\\1")
(message (concat "commented in forward declaration for " word)))
(if (not (re-search-forward (concat "class *" word ";") nil t))
@@ -415,7 +415,7 @@
(doc (if (is-qpe-class word) kdab-qpe-documentation kdab-qt-documentation))
(url (if (not (string-match "XXX" doc))
(error "didn't find three X's in kdab-qt-documentation or kdab-qpe-documentation")
- (replace-match word t t doc))))
+ (tqreplace-match word t t doc))))
(start-process "qt documentation" nil "kfmclient" "openURL" url)
(message (concat "Loading " url)))))