summaryrefslogtreecommitdiffstats
path: root/scripts/kde-emacs/kde-emacs-utils.el
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kde-emacs/kde-emacs-utils.el')
-rw-r--r--scripts/kde-emacs/kde-emacs-utils.el66
1 files changed, 33 insertions, 33 deletions
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