[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesdk/scripts/kde-emacs
From: Zack Rusin <zack () kde ! org>
Date: 2003-01-27 13:22:42
[Download RAW message or body]
CVS commit by zrusin:
grep works, kde-emacs-compat.el added (kind of nasty but for now should be ok).
A kde-emacs-compat.el 1.1
M +1 -32 kde-emacs-utils.el 1.28
M +1 -0 kde-emacs.el 1.4
--- kdesdk/scripts/kde-emacs/kde-emacs-utils.el #1.27:1.28
@@ -21,4 +21,5 @@
(require 'kde-emacs-vars)
(require 'kde-emacs-general)
+(require 'kde-emacs-compat)
(if (eq kde-emacs-type 'xemacs)
@@ -228,36 +229,4 @@
(insert "k_funcinfo")
(insert " << endl;")
- )
-
-;;GNU/Emacs does not have this one
-(if (not (fboundp 'replace-in-string))
- (defun replace-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.
-Otherwise treat `\\' in NEWTEXT as special:
- `\\&' in NEWTEXT means substitute original matched text.
- `\\N' means substitute what matched the Nth `\\(...\\)'.
- If Nth parens didn't match, substitute nothing.
- `\\\\' means insert one `\\'.
- `\\u' means upcase the next character.
- `\\l' means downcase the next character.
- `\\U' means begin upcasing all following characters.
- `\\L' means begin downcasing all following characters.
- `\\E' means terminate the effect of any `\\U' or `\\L'."
- (if (> (length str) 50)
- (with-temp-buffer
- (insert str)
- (goto-char 1)
- (while (re-search-forward regexp nil t)
- (replace-match newtext t literal))
- (buffer-string))
- (let ((start 0) newstr)
- (while (string-match regexp str start)
- (setq newstr (replace-match newtext t literal str)
- start (+ (match-end 0) (- (length newstr) (length str)))
- str newstr))
- str)))
-
)
--- kdesdk/scripts/kde-emacs/kde-emacs.el #1.3:1.4
@@ -50,4 +50,5 @@
(require 'cc-mode) ;; needed by kde-emacs-core's test on c-version
+(require 'kde-emacs-compat)
(require 'kde-emacs-core)
(require 'kde-emacs-general)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic