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.el54
1 files changed, 27 insertions, 27 deletions
diff --git a/scripts/kde-emacs/kde-emacs-utils.el b/scripts/kde-emacs/kde-emacs-utils.el
index ee1ae19e..cb5b58da 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 'tqfind-file-hooks 'fume-add-menubar-entry))
+ (add-hook 'find-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 (tqreplace-match " " t t function)))
+ (setq function (replace-match " " t t function)))
(and (string-match "^\\(virtual\\>\\)?[ \t]*" function)
- (setq function (tqreplace-match "" t t function)))
+ (setq function (replace-match "" t t function)))
(and (string-match "^\\(explicit\\>\\)?[ \t]*" function)
- (setq function (tqreplace-match "" t t function)))
+ (setq function (replace-match "" t t function)))
(and (string-match "^\\(static\\>\\)?[ \t]*" function)
- (setq function (tqreplace-match "" t t function)))
+ (setq function (replace-match "" t t function)))
(while (string-match " +" function) ; simplifyWhiteSpace
- (setq function (tqreplace-match " " t t function)))
+ (setq function (replace-match " " t t function)))
(while (string-match "\t+" function)
- (setq function (tqreplace-match " " t t function)))
+ (setq function (replace-match " " t t function)))
(while (string-match "^ " function) ; remove leading whitespace
- (setq function (tqreplace-match "" t t function)))
+ (setq function (replace-match "" t t function)))
(let ((startargs (string-match "(" function)))
(while (string-match " ?=[^,)]+" function startargs) ; remove default values
- (setq function (tqreplace-match " " t t function))))
+ (setq function (replace-match " " t t function))))
(while (string-match " +," function) ; remove space before commas
- (setq function (tqreplace-match "," t t function)))
+ (setq function (replace-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
- (tqreplace-match
+ (replace-match
(concat namespace class "::" class "(")
t t function)
))
((string-match (concat "^ *~" class "[ \\t]*(") function) ; destructor
(setq insertion-string
- (tqreplace-match
+ (replace-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
- (tqreplace-match
+ (replace-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 (tqreplace-match "" nil t sig)))
+ (setq sig (replace-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 (tqreplace-match "" nil t sig)))
+ (setq sig (replace-match "" nil t sig)))
(re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) ) )
)))))
(defun kde-remove-newline (str)
- (tqreplace-in-string str "\n" " "))
+ (replace-in-string str "\n" " "))
; quote for use as regexp, but replace spaces with "any whitespace"
(defun kde-function-regexp-quote (str)
- (tqreplace-in-string (regexp-quote str) "[ \n\t]" "[ \n\t]"))
+ (replace-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"
- (tqreplace-in-string kde-make-member-default-impl "FUNCTION"
+ (replace-in-string kde-make-member-default-impl "FUNCTION"
; the function name and args, without newlines
- (tqreplace-in-string insertion-string "\n" " " t)
+ (replace-in-string insertion-string "\n" " " t)
t)
"}\n"))
; move to next method, to be ready for next call
@@ -330,7 +330,7 @@ This function does not do any hidden buffer changes."
(c-indent-defun)
(save-excursion
(and (string-match ".*/" file)
- (setq file (tqreplace-match "" t nil file)))
+ (setq file (replace-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!"))
)
- (tqfind-file makefile)
+ (find-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 (tqreplace-in-string part "[\\.-]" "_"))
+ (upcase (replace-in-string part "[\\.-]" "_"))
(if (not first-iter) "_" "")
definablestring
)
@@ -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 (tqreplace-match objext t t f)))
- (if (string-match "\.cc$" f) (setq f (tqreplace-match objext t t f)))
+ (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)))
(compile (concat kde-emacs-make " " f)))
)
@@ -688,7 +688,7 @@ This function does not do any hidden buffer changes."
)
)
-(defun kde-year-range-tqcontains-year (ranges year)
+(defun kde-year-range-contains-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-tqcontains-year years this-year))
+ (when (not (kde-year-range-contains-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))
- (tqfind-file file)
+ (find-file file)
(goto-char 0)
(if (looking-at "#include \"")
(progn