Fix unintended renaming

pull/1/head
Darrell Anderson 11 years ago
parent 10510f1d19
commit a6a23aed1b

@ -3,13 +3,13 @@
; To use this file, add this to your .emacs, uncommented : ; To use this file, add this to your .emacs, uncommented :
;(load "cc-engine.elc") ;(load "cc-engine.elc")
;(load "~/kde2/tdesdk/scripts/kde-devel-emacs.el") ;(load "~/kde2/tdesdk/scripts/kde-devel-emacs.el")
; (setq auto-mode-alist ; (set auto-mode-alist
; (append '(("\\.h$" . c++-mode)) auto-mode-alist)) ; (append '(("\\.h$" . c++-mode)) auto-mode-alist))
; Tip: also add (gnuserv-start), to be able to use gnuclient to open new files from a shell ; Tip: also add (gnuserv-start), to be able to use gnuclient to open new files from a shell
; Add (setq magic-keys-mode t) to your .xemacs/init.el or ~/.emacs (before loading this file) ; Add (set magic-keys-mode t) to your .xemacs/init.el or ~/.emacs (before loading this file)
; to enable the magic keys in C++ mode (auto-insertion of spaces and newlines). ; to enable the magic keys in C++ mode (auto-insertion of spaces and newlines).
; See the end of this file for the list of key bindings and for customizing them ; See the end of this file for the list of key bindings and for customizing them
@ -24,11 +24,11 @@
(if (string= (substring (emacs-version) 0 6) "XEmacs") (if (string= (substring (emacs-version) 0 6) "XEmacs")
(progn (progn
(setq emacs nil) (set emacs nil)
(setq xemacs t)) (set xemacs t))
(progn (progn
(setq emacs t) (set emacs t)
(setq xemacs nil))) (set xemacs nil)))
;; ------- First part, from Arnt's "c++ stuff" ;; ------- First part, from Arnt's "c++ stuff"
@ -56,7 +56,7 @@
(let ((count 0) (let ((count 0)
(bmp (buffer-modified-p))) (bmp (buffer-modified-p)))
(while (re-search-forward "[ \t]+$" nil t) (while (re-search-forward "[ \t]+$" nil t)
(setq count (1+ count)) (set count (1+ count))
(replace-match "" t t)) (replace-match "" t t))
(set-buffer-modified-p bmp) (set-buffer-modified-p bmp)
(and (buffer-modified-p) (and (buffer-modified-p)
@ -89,11 +89,11 @@ With arg, to it arg times."
(delete-region b (point-marker))))) (delete-region b (point-marker)))))
(setq c++-mode-hook (set c++-mode-hook
(lambda () (lambda ()
(font-lock-mode) (font-lock-mode)
(c-set-style "stroustrup") (c-set-style "stroustrup")
(setq c-tab-always-indent nil (set c-tab-always-indent nil
insert-tab-mode nil insert-tab-mode nil
indent-tabs-mode nil indent-tabs-mode nil
fume-auto-rescan-buffer-p nil fume-auto-rescan-buffer-p nil
@ -108,7 +108,7 @@ With arg, to it arg times."
(cond ((string-match "^\\(.*/qt/src\\)/.*/" buffer-file-truename) (cond ((string-match "^\\(.*/qt/src\\)/.*/" buffer-file-truename)
(progn (progn
(make-local-variable 'compile-command) (make-local-variable 'compile-command)
(setq compile-command (set compile-command
(concat "make -k -j 3 -C " (concat "make -k -j 3 -C "
(substring buffer-file-truename (substring buffer-file-truename
(match-beginning 1) (match-end 1)) (match-beginning 1) (match-end 1))
@ -119,7 +119,7 @@ With arg, to it arg times."
((string-match "^\\\(.*/2x/src\\\)/.*/" buffer-file-truename) ((string-match "^\\\(.*/2x/src\\\)/.*/" buffer-file-truename)
(progn (progn
(make-local-variable 'compile-command) (make-local-variable 'compile-command)
(setq compile-command (set compile-command
(concat "make -k -C " (concat "make -k -C "
(substring buffer-file-truename (substring buffer-file-truename
(match-beginning 1) (match-beginning 1)
@ -130,7 +130,7 @@ With arg, to it arg times."
(define-key c++-mode-map "\ed" 'agulbra-delete-into-nomenclature) (define-key c++-mode-map "\ed" 'agulbra-delete-into-nomenclature)
(define-key c++-mode-map "\eb" 'c-backward-into-nomenclature) (define-key c++-mode-map "\eb" 'c-backward-into-nomenclature)
; Add (setq magic-keys-mode t) to your .emacs (before loading this file) ; Add (set magic-keys-mode t) to your .emacs (before loading this file)
; to enable the magic keys in C++ mode. ; to enable the magic keys in C++ mode.
(and (boundp 'magic-keys-mode) (and (boundp 'magic-keys-mode)
(progn (progn
@ -141,10 +141,10 @@ With arg, to it arg times."
)) ))
)) ))
(setq c-mode-hook (set c-mode-hook
(lambda () (lambda ()
(font-lock-mode) (font-lock-mode)
(setq c-tab-always-indent nil (set c-tab-always-indent nil
c-basic-offset 4 c-basic-offset 4
c-offsets-alist (append '((case-label . 4) c-offsets-alist (append '((case-label . 4)
(access-label . -) (access-label . -)
@ -169,10 +169,10 @@ With arg, to it arg times."
(forward-word 2)) (forward-word 2))
(while (looking-at "[ \t]") (while (looking-at "[ \t]")
(forward-char 1)) (forward-char 1))
(setq start (point)) (set start (point))
(while (looking-at "[A-Za-z0-9_]") (while (looking-at "[A-Za-z0-9_]")
(forward-char 1)) (forward-char 1))
(setq class (buffer-substring start (point)))))) (set class (buffer-substring start (point))))))
(progn (progn
(and (looking-at "$") (and (looking-at "$")
(progn (progn
@ -184,7 +184,7 @@ With arg, to it arg times."
(progn (progn
(while (looking-at "[ \t]") (while (looking-at "[ \t]")
(forward-char 1)) (forward-char 1))
(setq start (point)) (set start (point))
(and (search-forward "(" nil t) (and (search-forward "(" nil t)
(progn (progn
(forward-char -1) (forward-char -1)
@ -192,31 +192,31 @@ With arg, to it arg times."
(and (looking-at "[ \t]+const") (and (looking-at "[ \t]+const")
(forward-word 1)) (forward-word 1))
(and (looking-at ";") (and (looking-at ";")
(setq function (buffer-substring start (point)))) (set function (buffer-substring start (point))))
(re-search-forward "(" nil t)))) (re-search-forward "(" nil t))))
(and (stringp function) (and (stringp function)
(progn ;; get rid of virtual, static, multiple spaces, default values. (progn ;; get rid of virtual, static, multiple spaces, default values.
(and (string-match "[ \t]*\\<virtual\\>[ \t]*" function) (and (string-match "[ \t]*\\<virtual\\>[ \t]*" function)
(setq function (replace-match " " t t function))) (set function (replace-match " " t t function)))
(and (string-match "^\\(virtual\\>\\)?[ \t]*" function) (and (string-match "^\\(virtual\\>\\)?[ \t]*" function)
(setq function (replace-match "" t t function))) (set function (replace-match "" t t function)))
(and (string-match "^\\(static\\>\\)?[ \t]*" function) (and (string-match "^\\(static\\>\\)?[ \t]*" function)
(setq function (replace-match "" t t function))) (set function (replace-match "" t t function)))
(while (string-match " +" function) (while (string-match " +" function)
(setq function (replace-match " " t t function))) (set function (replace-match " " t t function)))
(while (string-match "\t+" function) (while (string-match "\t+" function)
(setq function (replace-match " " t t function))) (set function (replace-match " " t t function)))
(while (string-match " ?=[^,)]+" function) (while (string-match " ?=[^,)]+" function)
(setq function (replace-match " " t t function))) (set function (replace-match " " t t function)))
(while (string-match " +," function) (while (string-match " +," function)
(setq function (replace-match "," t t function))))) (set function (replace-match "," t t function)))))
(and (stringp function) (and (stringp function)
(stringp class) (stringp class)
(stringp file) (stringp file)
(progn (progn
(cond ((string-match (concat "^ *" class "[ \\t]*(") function) (cond ((string-match (concat "^ *" class "[ \\t]*(") function)
(progn (progn
(setq insertion-string (set insertion-string
(concat (concat
(replace-match (replace-match
(concat class "::" class "(") (concat class "::" class "(")
@ -224,7 +224,7 @@ With arg, to it arg times."
"\n{\n \n}\n")))) "\n{\n \n}\n"))))
((string-match (concat "^ *~" class "[ \\t]*(") function) ((string-match (concat "^ *~" class "[ \\t]*(") function)
(progn (progn
(setq insertion-string (set insertion-string
(concat (concat
(replace-match (replace-match
(concat class "::~" class "(") (concat class "::~" class "(")
@ -232,7 +232,7 @@ With arg, to it arg times."
"\n{\n \n}\n")))) "\n{\n \n}\n"))))
((string-match " *\\([a-zA-Z0-9_]+\\)[ \\t]*(" function) ((string-match " *\\([a-zA-Z0-9_]+\\)[ \\t]*(" function)
(progn (progn
(setq insertion-string (set insertion-string
(concat (concat
(replace-match (replace-match
(concat " " class "::" "\\1(") (concat " " class "::" "\\1(")
@ -244,12 +244,12 @@ With arg, to it arg times."
"'', aborting")))) "'', aborting"))))
(stringp insertion-string)) (stringp insertion-string))
(string-match "\\.h$" file) (string-match "\\.h$" file)
(setq f (replace-match ".cpp" t t file)) (set f (replace-match ".cpp" t t file))
(if (file-readable-p f ) (if (file-readable-p f )
(message "") (message "")
(progn (progn
(string-match "\\.h$" file) (string-match "\\.h$" file)
(setq f (replace-match ".cc" t t file)) (set f (replace-match ".cc" t t file))
)) ))
(find-file f) (find-file f)
(progn (progn
@ -258,7 +258,7 @@ With arg, to it arg times."
(forward-char -3) (forward-char -3)
(save-excursion (save-excursion
(and (string-match ".*/" file) (and (string-match ".*/" file)
(setq file (replace-match "" t nil file))) (set file (replace-match "" t nil file)))
(or (re-search-backward (or (re-search-backward
(concat "^#include *\"" file "\"$") nil t) (concat "^#include *\"" file "\"$") nil t)
(progn (progn
@ -269,7 +269,7 @@ With arg, to it arg times."
) )
(setq compilation-error-regexp-systems-list '(gnu of comma 4bsd) (set compilation-error-regexp-systems-list '(gnu of comma 4bsd)
compilation-ask-about-save nil) compilation-ask-about-save nil)
@ -300,9 +300,9 @@ With arg, to it arg times."
(let ((enclosing (match-string 1))) (let ((enclosing (match-string 1)))
(cond (cond
((string-equal enclosing "extern") ((string-equal enclosing "extern")
(setq inenclosing-p 'extern)) (set inenclosing-p 'extern))
((string-equal enclosing "namespace") ((string-equal enclosing "namespace")
(setq inenclosing-p 'namespace)) (set inenclosing-p 'namespace))
))))) )))))
;; get the buffer position of the most nested opening brace, ;; get the buffer position of the most nested opening brace,
;; if there is one, and it hasn't been narrowed out ;; if there is one, and it hasn't been narrowed out
@ -312,23 +312,23 @@ With arg, to it arg times."
(skip-chars-backward " \t") (skip-chars-backward " \t")
(while (and state (while (and state
(not containing-sexp)) (not containing-sexp))
(setq containing-sexp (car state) (set containing-sexp (car state)
state (cdr state)) state (cdr state))
(if (consp containing-sexp) (if (consp containing-sexp)
;; if cdr == point, then containing sexp is the brace ;; if cdr == point, then containing sexp is the brace
;; that opens the sexp we close ;; that opens the sexp we close
(if (= (cdr containing-sexp) (point)) (if (= (cdr containing-sexp) (point))
(setq containing-sexp (car containing-sexp)) (set containing-sexp (car containing-sexp))
;; otherwise, ignore this element ;; otherwise, ignore this element
(setq containing-sexp nil)) (set containing-sexp nil))
;; ignore the bufpos if its been narrowed out by the ;; ignore the bufpos if its been narrowed out by the
;; containing class or does not contain the indent point ;; containing class or does not contain the indent point
(if (or (<= containing-sexp (point-min)) (if (or (<= containing-sexp (point-min))
(>= containing-sexp indent-point)) (>= containing-sexp indent-point))
(setq containing-sexp nil))))) (set containing-sexp nil)))))
;; set the limit on the farthest back we need to search ;; set the limit on the farthest back we need to search
(setq lim (or containing-sexp (set lim (or containing-sexp
(if (consp (car fullstate)) (if (consp (car fullstate))
(cdr (car fullstate)) (cdr (car fullstate))
nil) nil)
@ -338,14 +338,14 @@ With arg, to it arg times."
;; the most likely position to perform the majority of tests ;; the most likely position to perform the majority of tests
(goto-char indent-point) (goto-char indent-point)
(skip-chars-forward " \t") (skip-chars-forward " \t")
(setq char-after-ip (char-after)) (set char-after-ip (char-after))
(c-backward-syntactic-ws lim) (c-backward-syntactic-ws lim)
(setq char-before-ip (char-before)) (set char-before-ip (char-before))
(goto-char indent-point) (goto-char indent-point)
(skip-chars-forward " \t") (skip-chars-forward " \t")
;; are we in a literal? ;; are we in a literal?
(setq literal (c-in-literal lim)) (set literal (c-in-literal lim))
;; now figure out syntactic qualities of the current line ;; now figure out syntactic qualities of the current line
(cond (cond
@ -359,22 +359,22 @@ With arg, to it arg times."
((and (eq literal 'pound) ((and (eq literal 'pound)
(/= (save-excursion (/= (save-excursion
(c-beginning-of-macro lim) (c-beginning-of-macro lim)
(setq placeholder (point))) (set placeholder (point)))
(c-point 'boi))) (c-point 'boi)))
(c-add-syntax 'cpp-macro-cont placeholder)) (c-add-syntax 'cpp-macro-cont placeholder))
;; CASE 4: In-expression statement. ;; CASE 4: In-expression statement.
((and (or c-inexpr-class-key c-inexpr-block-key c-lambda-key) ((and (or c-inexpr-class-key c-inexpr-block-key c-lambda-key)
(setq placeholder (c-looking-at-inexpr-block))) (set placeholder (c-looking-at-inexpr-block)))
(setq tmpsymbol (assq (car placeholder) (set tmpsymbol (assq (car placeholder)
'((inexpr-class . class-open) '((inexpr-class . class-open)
(inexpr-statement . block-open)))) (inexpr-statement . block-open))))
(if tmpsymbol (if tmpsymbol
;; It's a statement block or an anonymous class. ;; It's a statement block or an anonymous class.
(setq tmpsymbol (cdr tmpsymbol)) (set tmpsymbol (cdr tmpsymbol))
;; It's a Pike lambda. Check whether we are between the ;; It's a Pike lambda. Check whether we are between the
;; lambda keyword and the argument list or at the defun ;; lambda keyword and the argument list or at the defun
;; opener. ;; opener.
(setq tmpsymbol (if (eq char-after-ip ?{) (set tmpsymbol (if (eq char-after-ip ?{)
'inline-open 'inline-open
'lambda-intro-cont))) 'lambda-intro-cont)))
(goto-char (cdr placeholder)) (goto-char (cdr placeholder))
@ -387,7 +387,7 @@ With arg, to it arg times."
(cond (cond
;; CASE 5A: we are looking at a defun, brace list, class, ;; CASE 5A: we are looking at a defun, brace list, class,
;; or inline-inclass method opening brace ;; or inline-inclass method opening brace
((setq special-brace-list ((set special-brace-list
(or (and c-special-brace-lists (or (and c-special-brace-lists
(c-looking-at-special-brace-list)) (c-looking-at-special-brace-list))
(eq char-after-ip ?{))) (eq char-after-ip ?{)))
@ -398,16 +398,16 @@ With arg, to it arg times."
(skip-chars-forward " \t") (skip-chars-forward " \t")
(and (c-safe (progn (c-backward-sexp 2) t)) (and (c-safe (progn (c-backward-sexp 2) t))
(looking-at (concat c-extra-toplevel-key "[^_]")) (looking-at (concat c-extra-toplevel-key "[^_]"))
(setq keyword (match-string 1) (set keyword (match-string 1)
placeholder (point)) placeholder (point))
(or (and (string-equal keyword "namespace") (or (and (string-equal keyword "namespace")
(setq tmpsymbol 'namespace-open)) (set tmpsymbol 'namespace-open))
(and (string-equal keyword "extern") (and (string-equal keyword "extern")
(progn (progn
(c-forward-sexp 1) (c-forward-sexp 1)
(c-forward-syntactic-ws) (c-forward-syntactic-ws)
(eq (char-after) ?\")) (eq (char-after) ?\"))
(setq tmpsymbol 'extern-lang-open))) (set tmpsymbol 'extern-lang-open)))
)) ))
(goto-char placeholder) (goto-char placeholder)
(c-add-syntax tmpsymbol (c-point 'boi))) (c-add-syntax tmpsymbol (c-point 'boi)))
@ -424,7 +424,7 @@ With arg, to it arg times."
(c-search-uplist-for-classkey (c-parse-state)) (c-search-uplist-for-classkey (c-parse-state))
))) )))
(and decl (and decl
(setq placeholder (aref decl 0))) (set placeholder (aref decl 0)))
)) ))
(c-add-syntax 'class-open placeholder)) (c-add-syntax 'class-open placeholder))
;; CASE 5A.3: brace list open ;; CASE 5A.3: brace list open
@ -436,17 +436,17 @@ With arg, to it arg times."
(if (looking-at "typedef[^_]") (if (looking-at "typedef[^_]")
(progn (c-forward-sexp 1) (progn (c-forward-sexp 1)
(c-forward-syntactic-ws indent-point))) (c-forward-syntactic-ws indent-point)))
(setq placeholder (c-point 'boi)) (set placeholder (c-point 'boi))
(or (consp special-brace-list) (or (consp special-brace-list)
(and (or (save-excursion (and (or (save-excursion
(goto-char indent-point) (goto-char indent-point)
(setq tmpsymbol nil) (set tmpsymbol nil)
(while (and (> (point) placeholder) (while (and (> (point) placeholder)
(= (c-backward-token-1 1 t) 0) (= (c-backward-token-1 1 t) 0)
(/= (char-after) ?=)) (/= (char-after) ?=))
(if (and (not tmpsymbol) (if (and (not tmpsymbol)
(looking-at "new\\>[^_]")) (looking-at "new\\>[^_]"))
(setq tmpsymbol 'topmost-intro-cont))) (set tmpsymbol 'topmost-intro-cont)))
(eq (char-after) ?=)) (eq (char-after) ?=))
(looking-at "enum[ \t\n]+")) (looking-at "enum[ \t\n]+"))
(save-excursion (save-excursion
@ -500,12 +500,12 @@ With arg, to it arg times."
(c-backward-syntactic-ws lim))) (c-backward-syntactic-ws lim)))
(if (eq (char-before) ?\)) (if (eq (char-before) ?\))
(c-backward-sexp 1)) (c-backward-sexp 1))
(setq placeholder (point)) (set placeholder (point))
(save-excursion (save-excursion
(and (c-safe (c-backward-sexp 1) t) (and (c-safe (c-backward-sexp 1) t)
(looking-at "throw[^_]") (looking-at "throw[^_]")
(c-safe (c-backward-sexp 1) t) (c-safe (c-backward-sexp 1) t)
(setq placeholder (point)))) (set placeholder (point))))
(goto-char placeholder) (goto-char placeholder)
(c-add-syntax 'member-init-intro (c-point 'boi)) (c-add-syntax 'member-init-intro (c-point 'boi))
;; we don't need to add any class offset since this ;; we don't need to add any class offset since this
@ -557,13 +557,13 @@ With arg, to it arg times."
(save-excursion (save-excursion
(while (not done) (while (not done)
(cond ((looking-at c-Java-special-key) (cond ((looking-at c-Java-special-key)
(setq injava-inher (cons cont (point)) (set injava-inher (cons cont (point))
done t)) done t))
((or (not (c-safe (c-forward-sexp -1) t)) ((or (not (c-safe (c-forward-sexp -1) t))
(<= (point) fence)) (<= (point) fence))
(setq done t)) (set done t))
) )
(setq cont t))) (set cont t)))
injava-inher) injava-inher)
(not (c-crosses-statement-barrier-p (cdr injava-inher) (not (c-crosses-statement-barrier-p (cdr injava-inher)
(point))) (point)))
@ -624,7 +624,7 @@ With arg, to it arg times."
;; CASE 5D.1: hanging member init colon, but watch out ;; CASE 5D.1: hanging member init colon, but watch out
;; for bogus matches on access specifiers inside classes. ;; for bogus matches on access specifiers inside classes.
((and (save-excursion ((and (save-excursion
(setq placeholder (point)) (set placeholder (point))
(c-backward-token-1 1 t lim) (c-backward-token-1 1 t lim)
(and (eq (char-after) ?:) (and (eq (char-after) ?:)
(not (eq (char-before) ?:)))) (not (eq (char-before) ?:))))
@ -655,7 +655,7 @@ With arg, to it arg times."
;; CASE 5D.3: perhaps a multiple inheritance line? ;; CASE 5D.3: perhaps a multiple inheritance line?
((save-excursion ((save-excursion
(c-beginning-of-statement-1 lim) (c-beginning-of-statement-1 lim)
(setq placeholder (point)) (set placeholder (point))
(looking-at c-inher-key)) (looking-at c-inher-key))
(goto-char placeholder) (goto-char placeholder)
(c-add-syntax 'inher-cont (c-point 'boi))) (c-add-syntax 'inher-cont (c-point 'boi)))
@ -665,7 +665,7 @@ With arg, to it arg times."
(skip-chars-backward "^<" lim) (skip-chars-backward "^<" lim)
;; not sure if this is the right test, but it should ;; not sure if this is the right test, but it should
;; be fast and mostly accurate. ;; be fast and mostly accurate.
(setq placeholder (point)) (set placeholder (point))
(and (eq (char-before) ?<) (and (eq (char-before) ?<)
(not (c-in-literal lim)))) (not (c-in-literal lim))))
;; we can probably indent it just like an arglist-cont ;; we can probably indent it just like an arglist-cont
@ -692,7 +692,7 @@ With arg, to it arg times."
;; CASE 5F: extern-lang-close or namespace-close? ;; CASE 5F: extern-lang-close or namespace-close?
((and inenclosing-p ((and inenclosing-p
(eq char-after-ip ?})) (eq char-after-ip ?}))
(setq tmpsymbol (if (eq inenclosing-p 'extern) (set tmpsymbol (if (eq inenclosing-p 'extern)
'extern-lang-close 'extern-lang-close
'namespace-close)) 'namespace-close))
(c-add-syntax tmpsymbol (aref inclass-p 0))) (c-add-syntax tmpsymbol (aref inclass-p 0)))
@ -720,11 +720,11 @@ With arg, to it arg times."
(point)))) (point))))
(save-excursion (save-excursion
(c-backward-syntactic-ws limit) (c-backward-syntactic-ws limit)
(setq placeholder (point)) (set placeholder (point))
(while (and (memq (char-before) '(?\; ?,)) (while (and (memq (char-before) '(?\; ?,))
(> (point) limit)) (> (point) limit))
(beginning-of-line) (beginning-of-line)
(setq placeholder (point)) (set placeholder (point))
(c-backward-syntactic-ws limit)) (c-backward-syntactic-ws limit))
(and (eq (char-before) ?\)) (and (eq (char-before) ?\))
(or (not c-method-key) (or (not c-method-key)
@ -821,18 +821,18 @@ With arg, to it arg times."
(not (eq char-before-ip ?,))) (not (eq char-before-ip ?,)))
(memq char-after-ip '(?\) ?\]))) (memq char-after-ip '(?\) ?\])))
(goto-char containing-sexp) (goto-char containing-sexp)
(setq placeholder (c-point 'boi)) (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t) (when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder)) (> (point) placeholder))
(forward-char) (forward-char)
(skip-chars-forward " \t") (skip-chars-forward " \t")
(setq placeholder (point))) (set placeholder (point)))
(c-add-syntax 'arglist-close placeholder)) (c-add-syntax 'arglist-close placeholder))
;; CASE 7B: Looking at the opening brace of an ;; CASE 7B: Looking at the opening brace of an
;; in-expression block or brace list. ;; in-expression block or brace list.
((eq char-after-ip ?{) ((eq char-after-ip ?{)
(goto-char indent-point) (goto-char indent-point)
(setq placeholder (c-point 'boi)) (set placeholder (c-point 'boi))
(goto-char containing-sexp) (goto-char containing-sexp)
(if (c-inside-bracelist-p placeholder (if (c-inside-bracelist-p placeholder
(cons containing-sexp state)) (cons containing-sexp state))
@ -846,12 +846,12 @@ With arg, to it arg times."
;; looking at a close paren or bracket. ;; looking at a close paren or bracket.
((memq char-before-ip '(?\( ?\[)) ((memq char-before-ip '(?\( ?\[))
(goto-char containing-sexp) (goto-char containing-sexp)
(setq placeholder (c-point 'boi)) (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t) (when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder)) (> (point) placeholder))
(forward-char) (forward-char)
(skip-chars-forward " \t") (skip-chars-forward " \t")
(setq placeholder (point))) (set placeholder (point)))
(c-add-syntax 'arglist-intro placeholder)) (c-add-syntax 'arglist-intro placeholder))
;; CASE 7D: we are inside a conditional test clause. treat ;; CASE 7D: we are inside a conditional test clause. treat
;; these things as statements ;; these things as statements
@ -887,12 +887,12 @@ With arg, to it arg times."
(skip-chars-forward " \t") (skip-chars-forward " \t")
(not (eolp))) (not (eolp)))
(goto-char containing-sexp) (goto-char containing-sexp)
(setq placeholder (c-point 'boi)) (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t) (when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder)) (> (point) placeholder))
(forward-char) (forward-char)
(skip-chars-forward " \t") (skip-chars-forward " \t")
(setq placeholder (point))) (set placeholder (point)))
(c-add-syntax 'arglist-cont-nonempty placeholder)) (c-add-syntax 'arglist-cont-nonempty placeholder))
;; CASE 7G: we are looking at just a normal arglist ;; CASE 7G: we are looking at just a normal arglist
;; continuation line ;; continuation line
@ -923,7 +923,7 @@ With arg, to it arg times."
(c-add-syntax 'inher-cont (point)) (c-add-syntax 'inher-cont (point))
))) )))
;; CASE 9: we are inside a brace-list ;; CASE 9: we are inside a brace-list
((setq special-brace-list ((set special-brace-list
(or (and c-special-brace-lists (or (and c-special-brace-lists
(save-excursion (save-excursion
(goto-char containing-sexp) (goto-char containing-sexp)
@ -940,8 +940,8 @@ With arg, to it arg times."
(skip-chars-backward " \t") (skip-chars-backward " \t")
(if (and (bolp) (if (and (bolp)
(assoc 'statement-cont (assoc 'statement-cont
(setq placeholder (c-guess-basic-syntax)))) (set placeholder (c-guess-basic-syntax))))
(setq syntax placeholder) (set syntax placeholder)
(c-beginning-of-statement-1 lim) (c-beginning-of-statement-1 lim)
(c-forward-token-1 0) (c-forward-token-1 0)
(if (looking-at "typedef\\>") (c-forward-token-1 1)) (if (looking-at "typedef\\>") (c-forward-token-1 1))
@ -1008,7 +1008,7 @@ With arg, to it arg times."
(save-excursion (save-excursion
(c-beginning-of-statement-1 containing-sexp) (c-beginning-of-statement-1 containing-sexp)
(c-forward-syntactic-ws) (c-forward-syntactic-ws)
(setq placeholder (point)))) (set placeholder (point))))
(/= placeholder containing-sexp)) (/= placeholder containing-sexp))
(goto-char indent-point) (goto-char indent-point)
(skip-chars-forward " \t") (skip-chars-forward " \t")
@ -1034,7 +1034,7 @@ With arg, to it arg times."
(c-add-syntax 'substatement-open (c-point 'boi)) (c-add-syntax 'substatement-open (c-point 'boi))
(c-add-syntax 'substatement (c-point 'boi)))) (c-add-syntax 'substatement (c-point 'boi))))
;; CASE 10B: open braces for class or brace-lists ;; CASE 10B: open braces for class or brace-lists
((setq special-brace-list ((set special-brace-list
(or (and c-special-brace-lists (or (and c-special-brace-lists
(c-looking-at-special-brace-list)) (c-looking-at-special-brace-list))
(eq char-after-ip ?{))) (eq char-after-ip ?{)))
@ -1045,7 +1045,7 @@ With arg, to it arg times."
(skip-chars-forward " \t{") (skip-chars-forward " \t{")
(let ((decl (c-search-uplist-for-classkey (c-parse-state)))) (let ((decl (c-search-uplist-for-classkey (c-parse-state))))
(and decl (and decl
(setq placeholder (aref decl 0))) (set placeholder (aref decl 0)))
)) ))
(c-add-syntax 'class-open placeholder)) (c-add-syntax 'class-open placeholder))
;; CASE 10B.2: brace-list-open ;; CASE 10B.2: brace-list-open
@ -1125,7 +1125,7 @@ With arg, to it arg times."
(and (looking-at "while\\b[^_]") (and (looking-at "while\\b[^_]")
(save-excursion (save-excursion
(c-backward-to-start-of-do containing-sexp) (c-backward-to-start-of-do containing-sexp)
(setq placeholder (point)) (set placeholder (point))
(looking-at "do\\b[^_]")) (looking-at "do\\b[^_]"))
)) ))
(goto-char placeholder) (goto-char placeholder)
@ -1145,7 +1145,7 @@ With arg, to it arg times."
(c-safe (c-backward-sexp) t) (c-safe (c-backward-sexp) t)
t) t)
(looking-at "\\<\\(try\\|catch\\)\\>[^_]") (looking-at "\\<\\(try\\|catch\\)\\>[^_]")
(setq placeholder (c-point 'boi)))) (set placeholder (c-point 'boi))))
(c-add-syntax 'catch-clause placeholder)) (c-add-syntax 'catch-clause placeholder))
;; CASE 14: A case or default label ;; CASE 14: A case or default label
((looking-at c-switch-label-key) ((looking-at c-switch-label-key)
@ -1175,8 +1175,8 @@ With arg, to it arg times."
;; block? ;; block?
((save-excursion ((save-excursion
(goto-char containing-sexp) (goto-char containing-sexp)
(setq placeholder (c-looking-at-inexpr-block))) (set placeholder (c-looking-at-inexpr-block)))
(setq tmpsymbol (if (eq (car placeholder) 'inlambda) (set tmpsymbol (if (eq (car placeholder) 'inlambda)
'inline-close 'inline-close
'block-close)) 'block-close))
(goto-char containing-sexp) (goto-char containing-sexp)
@ -1192,7 +1192,7 @@ With arg, to it arg times."
;; an extern block or namespace? ;; an extern block or namespace?
((progn ((progn
(goto-char containing-sexp) (goto-char containing-sexp)
(setq placeholder (c-search-uplist-for-classkey state))) (set placeholder (c-search-uplist-for-classkey state)))
(goto-char (aref placeholder 0)) (goto-char (aref placeholder 0))
(if (looking-at (concat c-extra-toplevel-key "[^_]")) (if (looking-at (concat c-extra-toplevel-key "[^_]"))
(c-add-syntax 'defun-close relpos) (c-add-syntax 'defun-close relpos)
@ -1232,7 +1232,7 @@ With arg, to it arg times."
(while (or (c-skip-case-statement-forward fullstate indent-point) (while (or (c-skip-case-statement-forward fullstate indent-point)
(and (looking-at c-switch-label-key) (and (looking-at c-switch-label-key)
(not inswitch-p))) (not inswitch-p)))
(setq inswitch-p t)) (set inswitch-p t))
;; we want to ignore non-case labels when skipping forward ;; we want to ignore non-case labels when skipping forward
(while (and (looking-at c-label-key) (while (and (looking-at c-label-key)
(goto-char (match-end 0))) (goto-char (match-end 0)))
@ -1245,11 +1245,11 @@ With arg, to it arg times."
(progn (progn
(goto-char indent-point) (goto-char indent-point)
(c-beginning-of-statement-1 containing-sexp) (c-beginning-of-statement-1 containing-sexp)
(setq placeholder (point)) (set placeholder (point))
(beginning-of-line) (beginning-of-line)
(when (re-search-forward c-switch-label-key (when (re-search-forward c-switch-label-key
(max placeholder (c-point 'eol)) t) (max placeholder (c-point 'eol)) t)
(setq placeholder (match-beginning 0))))) (set placeholder (match-beginning 0)))))
(goto-char indent-point) (goto-char indent-point)
(skip-chars-forward " \t") (skip-chars-forward " \t")
(if (eq (char-after) ?{) (if (eq (char-after) ?{)
@ -1296,19 +1296,19 @@ With arg, to it arg times."
(progn (progn
(goto-char (match-end 0)) (goto-char (match-end 0))
(c-forward-syntactic-ws))) (c-forward-syntactic-ws)))
(setq relpos (c-point 'boi)) (set relpos (c-point 'boi))
(while (and (not done) (while (and (not done)
(<= safepos (point)) (<= safepos (point))
(/= relpos (point))) (/= relpos (point)))
(c-beginning-of-statement-1 safepos) (c-beginning-of-statement-1 safepos)
(if (= relpos (c-point 'boi)) (if (= relpos (c-point 'boi))
(setq done t)) (set done t))
(setq relpos (c-point 'boi))) (set relpos (c-point 'boi)))
(c-add-syntax 'statement relpos) (c-add-syntax 'statement relpos)
(if (eq char-after-ip ?{) (if (eq char-after-ip ?{)
(c-add-syntax 'block-open)))) (c-add-syntax 'block-open))))
;; CASE 17E: first statement in an in-expression block ;; CASE 17E: first statement in an in-expression block
((setq placeholder ((set placeholder
(save-excursion (save-excursion
(goto-char containing-sexp) (goto-char containing-sexp)
(c-looking-at-inexpr-block))) (c-looking-at-inexpr-block)))
@ -1386,7 +1386,7 @@ With arg, to it arg times."
((and (eq literal 'pound) ((and (eq literal 'pound)
(= (save-excursion (= (save-excursion
(c-beginning-of-macro lim) (c-beginning-of-macro lim)
(setq placeholder (point))) (set placeholder (point)))
(c-point 'boi)) (c-point 'boi))
(not (and (c-major-mode-is 'pike-mode) (not (and (c-major-mode-is 'pike-mode)
(eq (char-after (1+ placeholder)) ?\")))) (eq (char-after (1+ placeholder)) ?\"))))
@ -1402,17 +1402,17 @@ With arg, to it arg times."
(c nil)) (c nil))
(cond ((and (string-match "\\.h$" n) (cond ((and (string-match "\\.h$" n)
(progn (progn
(setq c (replace-match ".cpp" t t n)) (set c (replace-match ".cpp" t t n))
(file-readable-p c))) (file-readable-p c)))
(find-file c)) (find-file c))
((and (string-match "\\.h$" n) ((and (string-match "\\.h$" n)
(progn (progn
(setq c (replace-match ".cc" t t n)) (set c (replace-match ".cc" t t n))
(file-readable-p c))) (file-readable-p c)))
(find-file c)) (find-file c))
((and (string-match "\\.h$" n) ((and (string-match "\\.h$" n)
(progn (progn
(setq c (replace-match ".C" t t n)) (set c (replace-match ".C" t t n))
(file-readable-p c))) (file-readable-p c)))
(find-file c)) (find-file c))
((string-match "\\.h$" n) ((string-match "\\.h$" n)
@ -1505,9 +1505,9 @@ With arg, to it arg times."
(classes (cdr elm))) (classes (cdr elm)))
( while (and classes (not found)) ( while (and classes (not found))
(if (string= (downcase cls) (downcase (symbol-name (car classes)))) (if (string= (downcase cls) (downcase (symbol-name (car classes))))
(setq found include-file) (set found include-file)
(setq classes (cdr classes))))) (set classes (cdr classes)))))
(setq list (cdr list))) (set list (cdr list)))
(if found (if found
(symbol-name found) (symbol-name found)
nil) ; return value nil) ; return value
@ -1603,8 +1603,8 @@ With arg, to it arg times."
(let ((a (fume-function-before-point))) (let ((a (fume-function-before-point)))
(and (string-match "^\\(.*\\)::\\(.*\\)$" a) (and (string-match "^\\(.*\\)::\\(.*\\)$" a)
(progn (progn
(setq class (match-string 1 a)) (set class (match-string 1 a))
(setq fn (match-string 2 a)) (set fn (match-string 2 a))
(agulbra-switch-cpp-h) (agulbra-switch-cpp-h)
(goto-char 0) (goto-char 0)
(re-search-forward class nil t) (re-search-forward class nil t)
@ -1614,12 +1614,12 @@ With arg, to it arg times."
(save-excursion (save-excursion
(forward-line 0) (forward-line 0)
(re-search-forward "[ \t]+\\([^ \t(]+\\)[ \t]*(" nil t) (re-search-forward "[ \t]+\\([^ \t(]+\\)[ \t]*(" nil t)
(setq fn (match-string 1)) (set fn (match-string 1))
(re-search-backward "^class \\([a-zA-Z0-9_]+\\)[ \t]*\\([a-zA-Z0-9_]*\\)" nil t) (re-search-backward "^class \\([a-zA-Z0-9_]+\\)[ \t]*\\([a-zA-Z0-9_]*\\)" nil t)
(setq class (match-string 1)) (set class (match-string 1))
(setq save (match-string 2)) (set save (match-string 2))
(and (string-match "Q_EXPORT" class) (and (string-match "Q_EXPORT" class)
(setq class save)) (set class save))
(message (concat class "::" fn)) (message (concat class "::" fn))
) )
(agulbra-switch-cpp-h) (agulbra-switch-cpp-h)
@ -1670,9 +1670,9 @@ With arg, to it arg times."
(interactive) (interactive)
(let ((f (buffer-file-name))) (let ((f (buffer-file-name)))
(if (string-match "^.*/" f) (if (string-match "^.*/" f)
(setq f (replace-match "" t t f))) (set f (replace-match "" t t f)))
(while (string-match "\\." f) (while (string-match "\\." f)
(setq f (replace-match "_" t t f))) (set f (replace-match "_" t t f)))
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(insert "#ifndef " (upcase f) "\n#define " (upcase f) "\n\n") (insert "#ifndef " (upcase f) "\n#define " (upcase f) "\n\n")
@ -1688,7 +1688,7 @@ With arg, to it arg times."
(if (not (c-in-literal)) (if (not (c-in-literal))
(let ((n nil)) (let ((n nil))
(save-excursion (save-excursion
(setq n (or (progn (forward-char -2) (looking-at "if")) (set n (or (progn (forward-char -2) (looking-at "if"))
(progn (forward-char -1) (looking-at "for")) (progn (forward-char -1) (looking-at "for"))
(progn (forward-char -1) (looking-at "case")) (progn (forward-char -1) (looking-at "case"))
(progn (forward-char -1) (looking-at "while")) (progn (forward-char -1) (looking-at "while"))
@ -1712,9 +1712,9 @@ With arg, to it arg times."
(if (not (c-in-literal)) (if (not (c-in-literal))
(let ((remv nil) (nospac nil)) (let ((remv nil) (nospac nil))
(forward-char -2) (forward-char -2)
(setq remv (looking-at "( ")) ; () -> we'll have to remove that space (set remv (looking-at "( ")) ; () -> we'll have to remove that space
(forward-char 1) (forward-char 1)
(setq nospac (or (looking-at " ") (looking-at "(")) ) ; no space to be added (set nospac (or (looking-at " ") (looking-at "(")) ) ; no space to be added
(forward-char 1) (forward-char 1)
(cond (cond
(remv (progn (remv (progn
@ -1747,9 +1747,9 @@ With arg, to it arg times."
(let ((n nil) (o nil)) (let ((n nil) (o nil))
(save-excursion (save-excursion
(forward-char -2) (forward-char -2)
(setq o (looking-at "()")) (set o (looking-at "()"))
(forward-char 1) (forward-char 1)
(setq n (looking-at ")")) (set n (looking-at ")"))
) )
(cond (cond
(n (progn (n (progn
@ -1798,15 +1798,15 @@ With arg, to it arg times."
(defun makeinstallexec () (interactive) (compile "make install-exec")) (defun makeinstallexec () (interactive) (compile "make install-exec"))
(defun makethisfile () (interactive) (defun makethisfile () (interactive)
(let ((f (buffer-name))) (let ((f (buffer-name)))
(if (string-match "\.cpp$" f) (setq f (replace-match "\.lo" t t f))) (if (string-match "\.cpp$" f) (set f (replace-match "\.lo" t t f)))
(if (string-match "\.cc$" f) (setq f (replace-match "\.lo" t t f))) (if (string-match "\.cc$" f) (set f (replace-match "\.lo" t t f)))
(compile (concat "make " f )))) (compile (concat "make " f ))))
;; Indentation: 4 characters, no tabs. ;; Indentation: 4 characters, no tabs.
(setq c-basic-offset 4) (set c-basic-offset 4)
(setq insert-tab-mode nil) (set insert-tab-mode nil)
(setq-default require-final-newline t) (set-default require-final-newline t)
(setq-default next-line-add-newlines nil) (set-default next-line-add-newlines nil)
;; pc-like textmarking ;; pc-like textmarking
(load "pc-select") (load "pc-select")
@ -1873,7 +1873,7 @@ With arg, to it arg times."
; Shift-F10: Place point on a class name, and press Shift-F10, and konqueror will load ; Shift-F10: Place point on a class name, and press Shift-F10, and konqueror will load
; Qt documentation. Customize the location of the Qt documentation with the ; Qt documentation. Customize the location of the Qt documentation with the
; variable kdab-qt-documentation. XXX will be replace with the class name. ; variable kdab-qt-documentation. XXX will be replace with the class name.
; Example (setq kdab-qt-location "file:/packages/kde-src/qt-copy/doc/html/XXX.html") ; Example (set kdab-qt-location "file:/packages/kde-src/qt-copy/doc/html/XXX.html")
; ;
; Ctrl+Meta+D : insert a kdDebug statement with the name of the current method ; Ctrl+Meta+D : insert a kdDebug statement with the name of the current method
; [the new hide-all-windows shortcut conflicts with that, you may have to ; [the new hide-all-windows shortcut conflicts with that, you may have to
@ -1885,6 +1885,6 @@ With arg, to it arg times."
; C-x r m to set a named bookmark in the buffer ; C-x r m to set a named bookmark in the buffer
; C-x r b to jump to a named bookmark in the buffer ; C-x r b to jump to a named bookmark in the buffer
(setq-default initial-scratch-message (set-default initial-scratch-message
"File kde-devel-emacs.el is deprecated! "File kde-devel-emacs.el is deprecated!
Please use KDE-Emacs from tdesdk/scripts/kde-emacs.") Please use KDE-Emacs from tdesdk/scripts/kde-emacs.")

@ -86,19 +86,19 @@ Returns the fully qualified file name, or nil if it isn't found.
The FILE-NAME specifies the file name to search for." The FILE-NAME specifies the file name to search for."
;; Chase links in the source file and search in the dir where it ;; Chase links in the source file and search in the dir where it
;; points. ;; points.
(setq dir-name (or (and buffer-file-name (set dir-name (or (and buffer-file-name
(file-name-directory (file-chase-links (file-name-directory (file-chase-links
buffer-file-name))) buffer-file-name)))
default-directory)) default-directory))
;; Chase links before visiting the file. This makes it easier to ;; Chase links before visiting the file. This makes it easier to
;; use a single file for several related directories. ;; use a single file for several related directories.
(setq dir-name (file-chase-links dir-name)) (set dir-name (file-chase-links dir-name))
(setq dir-name (expand-file-name dir-name)) (set dir-name (expand-file-name dir-name))
;; Move up in the dir hierarchy till we find a change log file. ;; Move up in the dir hierarchy till we find a change log file.
(let ((file1 (concat dir-name file-name)) (let ((file1 (concat dir-name file-name))
parent-dir) parent-dir)
(while (and (not (file-exists-p file1)) (while (and (not (file-exists-p file1))
(progn (setq parent-dir (progn (set parent-dir
(file-name-directory (file-name-directory
(directory-file-name (directory-file-name
(file-name-directory file1)))) (file-name-directory file1))))
@ -106,7 +106,7 @@ The FILE-NAME specifies the file name to search for."
(not (string= (file-name-directory file1) (not (string= (file-name-directory file1)
parent-dir)))) parent-dir))))
;; Move up to the parent dir and try again. ;; Move up to the parent dir and try again.
(setq file1 (expand-file-name file-name parent-dir))) (set file1 (expand-file-name file-name parent-dir)))
;; If we found the file in a parent dir, use that. Otherwise, ;; If we found the file in a parent dir, use that. Otherwise,
;; return nil ;; return nil
(if (or (get-file-buffer file1) (file-exists-p file1)) (if (or (get-file-buffer file1) (file-exists-p file1))
@ -146,7 +146,7 @@ The FILE-NAME specifies the file name to search for."
(goto-char (scan-sexps (point) -1)) (goto-char (scan-sexps (point) -1))
(if (eobp) (if (eobp)
(throw 'done nil)) (throw 'done nil))
(setq beg (point)) (set beg (point))
(skip-chars-forward "^:\n") (skip-chars-forward "^:\n")
(if (not (looking-at ":")) (if (not (looking-at ":"))
(error (format "Missing colon in directory variables entry at %d" (error (format "Missing colon in directory variables entry at %d"
@ -158,7 +158,7 @@ The FILE-NAME specifies the file name to search for."
;; Read the variable value. ;; Read the variable value.
(skip-chars-forward "^:") (skip-chars-forward "^:")
(forward-char 1) (forward-char 1)
(setq val (read (current-buffer))) (set val (read (current-buffer)))
(save-excursion (save-excursion
(set-buffer original-buffer) (set-buffer original-buffer)
(dirvars-hack-one-local-variable dirvars-file (dirvars-hack-one-local-variable dirvars-file

@ -43,7 +43,7 @@
; Meta-F10: Place point on a class name, and press Meta-F10, and konqueror will load ; Meta-F10: Place point on a class name, and press Meta-F10, and konqueror will load
; Qt documentation. Customize the location of the Qt documentation with the ; Qt documentation. Customize the location of the Qt documentation with the
; variable kdab-qt-documentation. XXX will be replace with the class name. ; variable kdab-qt-documentation. XXX will be replace with the class name.
; Example (setq kdab-qt-location "file:/packages/kde-src/qt-copy/doc/html/XXX.html") ; Example (set kdab-qt-location "file:/packages/kde-src/qt-copy/doc/html/XXX.html")
; ;
; M-n: jump to the next error (after compiling) or grep matches ; M-n: jump to the next error (after compiling) or grep matches
; ;
@ -84,11 +84,11 @@
(if (featurep 'igrep) (if (featurep 'igrep)
(progn (progn
(setq igrep-find-prune-clause (set igrep-find-prune-clause
(format "-type d %s -name CVS -o -name .libs -o -name .deps %s" (format "-type d %s -name CVS -o -name .libs -o -name .deps %s"
(shell-quote-argument "(") (shell-quote-argument "(")
(shell-quote-argument ")"))) (shell-quote-argument ")")))
(setq igrep-find-file-clause (set igrep-find-file-clause
(format "-type f %s -name %s %s -name %s %s -name %s %s -name %s" ; -type l (format "-type f %s -name %s %s -name %s %s -name %s %s -name %s" ; -type l
(shell-quote-argument "!") (shell-quote-argument "!")
(shell-quote-argument "*~") ; Emacs backup (shell-quote-argument "*~") ; Emacs backup
@ -105,7 +105,7 @@
(define-key global-map [(f2)] 'igrep) (define-key global-map [(f2)] 'igrep)
(define-key global-map [(shift f2)] 'igrep-find) (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 [(f12)] 'igrep-find) ; 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 ;(set igrep-files-default 'ignore) ; too hard to use *.cc *.h with it, because of the full path
) )
(define-key global-map [(f2)] 'grep)) (define-key global-map [(f2)] 'grep))
(define-key global-map [(shift backspace)] 'kde-delete-backward-ws) (define-key global-map [(shift backspace)] 'kde-delete-backward-ws)

@ -46,7 +46,7 @@ Otherwise treat `\\' in NEWTEXT as special:
(buffer-string)) (buffer-string))
(let ((start 0) newstr) (let ((start 0) newstr)
(while (string-match regexp str start) (while (string-match regexp str start)
(setq newstr (replace-match newtext t literal str) (set newstr (replace-match newtext t literal str)
start (+ (match-end 0) (- (length newstr) (length str))) start (+ (match-end 0) (- (length newstr) (length str)))
str newstr)) str newstr))
str))) str)))

File diff suppressed because it is too large Load Diff

@ -165,8 +165,8 @@ See `comment-styles' for a list of available styles."
(defun kde-license-header () (defun kde-license-header ()
(let ((ret (file-name-nondirectory (buffer-file-name)))) (let ((ret (file-name-nondirectory (buffer-file-name))))
(setq ret (concat ret " \n\n")) (set ret (concat ret " \n\n"))
(setq ret (concat ret "Copyright (C) " (format-time-string "%Y ") (set ret (concat ret "Copyright (C) " (format-time-string "%Y ")
kde-full-name " <"kde-email">\n\n")) kde-full-name " <"kde-email">\n\n"))
)) ))
@ -181,7 +181,7 @@ buffer."
(let ((start (point-min)) (let ((start (point-min))
(end) (end)
) )
(setq comment-style kde-license-comment-style) (set comment-style kde-license-comment-style)
(goto-char start) (goto-char start)
(if license (if license
(progn (progn
@ -203,7 +203,7 @@ buffer."
) )
) )
(insert "\n") (insert "\n")
(setq end (point)) (set end (point))
(comment-region start end) (comment-region start end)
) )
) )
@ -225,10 +225,10 @@ buffer."
(defun kde-function-documentation (function) (defun kde-function-documentation (function)
(let ((ret "") (rettype (semantic-token-type function))) (let ((ret "") (rettype (semantic-token-type function)))
(setq ret (kde-doc-type-string 'start)) (set ret (kde-doc-type-string 'start))
(setq ret (concat ret (kde-doc-type-string 'separator))) (set ret (concat ret (kde-doc-type-string 'separator)))
(dolist (elt (semantic-token-function-args function) ret) (dolist (elt (semantic-token-function-args function) ret)
(setq ret (concat ret (kde-doc-type-string 'separator) " " (set ret (concat ret (kde-doc-type-string 'separator) " "
(kde-doc-param-string (semantic-token-name elt)))) (kde-doc-param-string (semantic-token-name elt))))
) )
(if (not (or (if (not (or
@ -236,13 +236,13 @@ buffer."
(semantic-token-function-destructor function))) (semantic-token-function-destructor function)))
(progn (progn
(if (listp rettype) (if (listp rettype)
(setq rettype (car rettype))) (set rettype (car rettype)))
(if (not (string= rettype "void")) (if (not (string= rettype "void"))
(setq ret (concat ret (kde-doc-type-string 'separator) " " (kde-doc-type-string 'return))) (set ret (concat ret (kde-doc-type-string 'separator) " " (kde-doc-type-string 'return)))
) )
) )
) )
(setq ret (concat ret "\n" (kde-doc-type-string 'end) )) (set ret (concat ret "\n" (kde-doc-type-string 'end) ))
)) ))
(defun kde-doc-function-insert () (defun kde-doc-function-insert ()
@ -258,13 +258,13 @@ at the current location."
(if (not token) (if (not token)
(error "There's no function at %d." pt) (error "There's no function at %d." pt)
(progn (progn
(setq ret (kde-function-documentation token)) (set ret (kde-function-documentation token))
(goto-char (semantic-token-start token)) (goto-char (semantic-token-start token))
(previous-line) (previous-line)
(goto-char (point-at-eol)) (goto-char (point-at-eol))
(setq start (point)) (set start (point))
(insert "\n " ret) (insert "\n " ret)
(setq end (semantic-token-end token)) (set end (semantic-token-end token))
(indent-region start end nil) (indent-region start end nil)
) )
) )
@ -276,15 +276,15 @@ at the current location."
(let ((thisblank)(pt)) (let ((thisblank)(pt))
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
(setq pt (point)) (set pt (point))
(setq thisblank (looking-at "[ \t]*$")) (set thisblank (looking-at "[ \t]*$"))
(if (not thisblank) (if (not thisblank)
(progn (progn
(newline) (newline)
(goto-char pt) (goto-char pt)
)) ))
(insert (kde-doc-type-string 'oneliner)) (insert (kde-doc-type-string 'oneliner))
(setq pt (point-at-eol)) (set pt (point-at-eol))
(end-of-line) (end-of-line)
) )
(goto-char pt) (goto-char pt)
@ -297,8 +297,8 @@ the functions inserts a newline."
(let ((thisblank)(start) (end)) (let ((thisblank)(start) (end))
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
(setq start (point)) (set start (point))
(setq thisblank (looking-at "[ \t]*$")) (set thisblank (looking-at "[ \t]*$"))
(if (not thisblank) (if (not thisblank)
(progn (progn
(newline) (newline)
@ -311,7 +311,7 @@ the functions inserts a newline."
(kde-doc-type-string 'separator) "\n" (kde-doc-type-string 'separator) "\n"
(kde-doc-type-string 'end) (kde-doc-type-string 'end)
) )
(setq end (point)) (set end (point))
(indent-region start end nil) (indent-region start end nil)
) )
(goto-char start) (goto-char start)

@ -52,61 +52,61 @@ return (\"test.cpp\" t)."
(listit nil)) (listit nil))
(cond (cond
((member ext kde-header-files) ((member ext kde-header-files)
(setq listit kde-source-files) (set listit kde-source-files)
(while (and listit (not ret)) ; loop over the list but stop once ret is set (while (and listit (not ret)) ; loop over the list but stop once ret is set
(setq path (concat nname "." (car listit))) (set path (concat nname "." (car listit)))
(if (file-readable-p path) (if (file-readable-p path)
(setq ret (cons path t)) (set ret (cons path t))
) )
(if (not ret) (if (not ret)
(if (string-match "_p$" nname) (if (string-match "_p$" nname)
(progn (progn
(setq path (concat (substring nname 0 (string-match "_p$" nname)) "." (car listit))) (set path (concat (substring nname 0 (string-match "_p$" nname)) "." (car listit)))
(if (file-readable-p path) (if (file-readable-p path)
(setq ret (cons path t)) (set ret (cons path t))
))) )))
) )
(if (not ret) (if (not ret)
(progn ; look in kde-source-directory (progn ; look in kde-source-directory
(setq path (kde-find-file (file-name-nondirectory path) kde-source-directory)) (set path (kde-find-file (file-name-nondirectory path) kde-source-directory))
(if (and (if (and
path path
(file-readable-p path)) (file-readable-p path))
(setq ret (cons path t)) (set ret (cons path t))
)) ))
) )
(setq listit (cdr listit)) ; ++listit (set listit (cdr listit)) ; ++listit
) )
; not found, will create one ; not found, will create one
(if (not ret) (if (not ret)
(setq ret (cons (concat nname "." kde-prefered-source-extension) nil )) (set ret (cons (concat nname "." kde-prefered-source-extension) nil ))
)) ))
((member ext kde-source-files) ((member ext kde-source-files)
(setq listit kde-header-files) (set listit kde-header-files)
(while (and listit (not ret)) ; loop over the list but stop once ret is set (while (and listit (not ret)) ; loop over the list but stop once ret is set
(setq path (concat nname "." (car listit))) (set path (concat nname "." (car listit)))
; look in current dir ; look in current dir
(if (file-readable-p path) (if (file-readable-p path)
(setq ret (cons path t))) (set ret (cons path t)))
(if (not ret) ;check for header_p.h files (if (not ret) ;check for header_p.h files
(progn (setq path (concat nname "_p." (car listit))) (progn (set path (concat nname "_p." (car listit)))
(if (file-readable-p path) (if (file-readable-p path)
(setq ret (cons path t))))) (set ret (cons path t)))))
(if (not (file-readable-p path)) (if (not (file-readable-p path))
(progn ; look in kde-include-directory (progn ; look in kde-include-directory
(setq path (kde-find-file (file-name-nondirectory path) kde-include-directory)) (set path (kde-find-file (file-name-nondirectory path) kde-include-directory))
(if (and (if (and
path path
(file-readable-p path)) (file-readable-p path))
(setq ret (cons path t)) (set ret (cons path t))
)) ))
) )
(setq listit (cdr listit)) ; ++listit (set listit (cdr listit)) ; ++listit
) )
; not found, will create one ; not found, will create one
(if (not ret) (if (not ret)
(setq ret (cons (concat nname "." (car kde-header-files)) nil )) (set ret (cons (concat nname "." (car kde-header-files)) nil ))
)) ))
) )
ret ret
@ -129,10 +129,10 @@ return (\"test.cpp\" t)."
(let ((start (point)) (let ((start (point))
end) end)
(save-excursion (save-excursion
(setq end (re-search-backward "[^ \t]" (point-at-bol) t)) (set end (re-search-backward "[^ \t]" (point-at-bol) t))
(if (not end) (if (not end)
(setq end (point-at-bol)) (set end (point-at-bol))
(setq end (1+ end)))) (set end (1+ end))))
(delete-backward-char (- start end)))) (delete-backward-char (- start end))))
(defun kde-skip-blank-lines () (defun kde-skip-blank-lines ()
@ -146,10 +146,10 @@ at a first non-blank line"
(string-match "^[ \t\r\n]+$" mstring) (string-match "^[ \t\r\n]+$" mstring)
(and (string= mstring "") (and (string= mstring "")
(= ret 0))) (= ret 0)))
(setq ret (forward-line -1)) ; if ret != 0, we stop, since we're at the first line... (set ret (forward-line -1)) ; if ret != 0, we stop, since we're at the first line...
(setq start (point-at-bol) (set start (point-at-bol)
end (point-at-eol)) end (point-at-eol))
(setq mstring (buffer-substring start end)) (set mstring (buffer-substring start end))
) )
)) ))
@ -157,7 +157,7 @@ at a first non-blank line"
"Skip back from current point past any preceding C-based comments at the beginning of lines. "Skip back from current point past any preceding C-based comments at the beginning of lines.
Presumes no \"/*\" strings are nested within multi-line comments." Presumes no \"/*\" strings are nested within multi-line comments."
(let ((opoint)) (let ((opoint))
(while (progn (setq opoint (point)) (while (progn (set opoint (point))
;; To previous line ;; To previous line
(if (zerop (forward-line -1)) (if (zerop (forward-line -1))
(cond (cond

@ -87,24 +87,24 @@ follows : \"func (int arg\"."
;* Functions ... */ ;* Functions ... */
;*---------------------------------------------------------------------*/ ;*---------------------------------------------------------------------*/
;; FIXME : semantic doesn't handle QT access specifiers ;; FIXME : semantic doesn't handle QT access specifiers
;(setq-default global-semantic-show-unmatched-syntax-mode nil) ;(set-default global-semantic-show-unmatched-syntax-mode nil)
;(setq-default global-semantic-show-dirty-mode nil) ;(set-default global-semantic-show-dirty-mode nil)
(defun kde-format-func-arg (arg) (defun kde-format-func-arg (arg)
"Formats one argument (from token to string)." "Formats one argument (from token to string)."
(let ((ret "")) (let ((ret ""))
(if (semantic-token-variable-extra-spec arg 'const) (if (semantic-token-variable-extra-spec arg 'const)
(setq ret "const ")) (set ret "const "))
(setq ret (concat ret (car (semantic-token-type arg)))) (set ret (concat ret (car (semantic-token-type arg))))
(if (semantic-token-variable-extra-spec arg 'pointer) (if (semantic-token-variable-extra-spec arg 'pointer)
(dotimes (idx (semantic-token-variable-extra-spec arg 'pointer)) (dotimes (idx (semantic-token-variable-extra-spec arg 'pointer))
(setq ret (concat ret "*")) (set ret (concat ret "*"))
) )
) )
(if (semantic-token-variable-extra-spec arg 'reference) (if (semantic-token-variable-extra-spec arg 'reference)
(setq ret (concat ret "&")) (set ret (concat ret "&"))
) )
(setq ret (concat ret " " (semantic-token-name arg))) (set ret (concat ret " " (semantic-token-name arg)))
ret ret
)) ))
@ -114,15 +114,15 @@ Token has to be the function variable list e.g.
from semantic-token-function-args" from semantic-token-function-args"
(let ((res kde-expand-arg-start) (idx 1)) (let ((res kde-expand-arg-start) (idx 1))
(dolist (elt token res) (dolist (elt token res)
(setq res (concat res (kde-format-func-arg elt))) (set res (concat res (kde-format-func-arg elt)))
(when (< idx (length token)) (when (< idx (length token))
(setq res (concat res kde-expand-arg-break))) (set res (concat res kde-expand-arg-break)))
(setq idx (1+ idx)) (set idx (1+ idx))
) )
(setq res (concat res kde-expand-arg-end)) (set res (concat res kde-expand-arg-end))
;; if it's something like "( )" replace it with "()" ;; if it's something like "( )" replace it with "()"
(when (string= res (concat kde-expand-arg-start kde-expand-arg-end)) (when (string= res (concat kde-expand-arg-start kde-expand-arg-end))
(setq res (replace-regexp-in-string "([ \t]+)" "()" res))) (set res (replace-regexp-in-string "([ \t]+)" "()" res)))
res res
)) ))
@ -131,8 +131,8 @@ from semantic-token-function-args"
token and TOKENS have to be a list of functions from buffer." token and TOKENS have to be a list of functions from buffer."
(let ((ret)(elt)) (let ((ret)(elt))
(while (and TOKENS (not ret)) (while (and TOKENS (not ret))
(setq elt (car TOKENS)) (set elt (car TOKENS))
(setq TOKENS (cdr TOKENS)) (set TOKENS (cdr TOKENS))
(if (and (string= (semantic-token-name FUNC) (if (and (string= (semantic-token-name FUNC)
(semantic-token-name elt)) (semantic-token-name elt))
(equal (semantic-token-type FUNC) (equal (semantic-token-type FUNC)
@ -143,7 +143,7 @@ token and TOKENS have to be a list of functions from buffer."
;; (semantic-token-function-parent FUNC2)) ;; (semantic-token-function-parent FUNC2))
(string= (kde-format-args (semantic-token-function-args FUNC)) (string= (kde-format-args (semantic-token-function-args FUNC))
(kde-format-args (semantic-token-function-args elt)))) (kde-format-args (semantic-token-function-args elt))))
(setq ret t)) (set ret t))
) )
ret ret
)) ))
@ -164,8 +164,8 @@ token and TOKENS have to be a list of functions from buffer."
(if (looking-at "::") (if (looking-at "::")
(let ((start) (end)) (let ((start) (end))
(re-search-backward "\\b\\w+" (point-at-bol) t) (re-search-backward "\\b\\w+" (point-at-bol) t)
(setq start (match-beginning 0)) (set start (match-beginning 0))
(setq end (match-end 0)) (set end (match-end 0))
(buffer-substring-no-properties start end) (buffer-substring-no-properties start end)
) )
) )
@ -227,10 +227,10 @@ would return t"
"Constructs a function string from the TOKEN, with the parent class PCLASS." "Constructs a function string from the TOKEN, with the parent class PCLASS."
(let ((fname (semantic-token-name token))) (let ((fname (semantic-token-name token)))
(if (semantic-token-function-destructor token) (if (semantic-token-function-destructor token)
(setq fname (concat "~" fname)) (set fname (concat "~" fname))
) )
(if pclass (if pclass
(setq fname (concat pclass "::" fname)) (set fname (concat pclass "::" fname))
) )
(if (and (if (and
(not (kde-is-constructor token)) (not (kde-is-constructor token))
@ -238,21 +238,21 @@ would return t"
(progn (progn
(cond (cond
((stringp (semantic-token-type token)) ((stringp (semantic-token-type token))
(setq fname (concat (semantic-token-type token) "\n" fname)) (set fname (concat (semantic-token-type token) "\n" fname))
) )
(t (t
(setq fname (concat (car (semantic-token-type token)) "\n" fname))) (set fname (concat (car (semantic-token-type token)) "\n" fname)))
) )
(if (semantic-token-function-extra-spec token 'const) (if (semantic-token-function-extra-spec token 'const)
(setq fname (concat "const " fname)) (set fname (concat "const " fname))
) )
) )
) )
(setq fname (concat fname (kde-format-args (semantic-token-function-args token)))) (set fname (concat fname (kde-format-args (semantic-token-function-args token))))
(if (kde-function-const token) (if (kde-function-const token)
(setq fname (concat fname " const" )) (set fname (concat fname " const" ))
) )
(setq fname (concat fname "\n{" "\n}")) (set fname (concat fname "\n{" "\n}"))
fname fname
) )
) )
@ -271,8 +271,8 @@ class-token has to be a token representing either a class or a struct."
(namespace) (namespace)
) )
(dolist (elt parts ret) (dolist (elt parts ret)
(setq cur-token (semantic-token-token elt)) (set cur-token (semantic-token-token elt))
(setq cur-token-name (semantic-token-name elt)) (set cur-token-name (semantic-token-name elt))
(cond (cond
((and ((and
(eq cur-token 'type) (eq cur-token 'type)
@ -295,14 +295,14 @@ class-token has to be a token representing either a class or a struct."
;;FUNCTION - generate a skeleton for it ;;FUNCTION - generate a skeleton for it
(if (and (kde-is-prototype elt) (if (and (kde-is-prototype elt)
(not asignal)) (not asignal))
(setq ret (concat ret (kde-function-construct elt name) "\n\n")) (set ret (concat ret (kde-function-construct elt name) "\n\n"))
) )
;(insert (kde-function-documentation elt) "\n") ;(insert (kde-function-documentation elt) "\n")
) )
((and ((and
(eq cur-token 'label) (eq cur-token 'label)
(stringp cur-token-name)) (stringp cur-token-name))
(setq aslot nil (set aslot nil
asignal nil) asignal nil)
;;LABEL - unsets both Q_SIGNALS and Q_SLOTS ;;LABEL - unsets both Q_SIGNALS and Q_SLOTS
) )
@ -316,17 +316,17 @@ class-token has to be a token representing either a class or a struct."
((kde-label-Q_SIGNALS (car (semantic-token-extent elt))) ((kde-label-Q_SIGNALS (car (semantic-token-extent elt)))
;;SIGNALS - next prototypes belong to Q_SIGNALS and we don't want to ;;SIGNALS - next prototypes belong to Q_SIGNALS and we don't want to
;; expand those ;; expand those
(setq asignal t (set asignal t
aslot nil) aslot nil)
) )
((kde-label-namespace (car (semantic-token-extent elt))) ((kde-label-namespace (car (semantic-token-extent elt)))
;;NAMESPACE - semantic doesn't handle things like Qt::ButtonState correctly ;;NAMESPACE - semantic doesn't handle things like Qt::ButtonState correctly
;; so we do ;) ;; so we do ;)
(setq namespace (kde-label-namespace (car (semantic-token-extent elt)))) (set namespace (kde-label-namespace (car (semantic-token-extent elt))))
) )
((kde-label-Q_SLOTS (car (semantic-token-extent elt))) ((kde-label-Q_SLOTS (car (semantic-token-extent elt)))
;;SLOTS - for now just unset Q_SIGNALS ;;SLOTS - for now just unset Q_SIGNALS
(setq aslot t (set aslot t
asignal nil) asignal nil)
) )
(t (t
@ -346,11 +346,11 @@ class-token has to be a token representing either a class or a struct."
(dolist (elt tokens ret) (dolist (elt tokens ret)
(cond (cond
((eq (semantic-token-token elt) 'type) ((eq (semantic-token-token elt) 'type)
(setq ret (concat ret (kde-class-expand elt))) (set ret (concat ret (kde-class-expand elt)))
) )
((eq (semantic-token-token elt) 'function) ((eq (semantic-token-token elt) 'function)
(if (kde-is-prototype elt) (if (kde-is-prototype elt)
(setq ret (concat ret (kde-function-construct elt nil) "\n\n")) (set ret (concat ret (kde-function-construct elt nil) "\n\n"))
) )
) )
((eq (semantic-token-token elt) 'variable) ((eq (semantic-token-token elt) 'variable)
@ -375,7 +375,7 @@ class-token has to be a token representing either a class or a struct."
(if exists (if exists
(progn (progn
(find-file FILENAME) (find-file FILENAME)
(setq tokens (semantic-bovinate-toplevel t)) (set tokens (semantic-bovinate-toplevel t))
(switch-to-buffer buf) (switch-to-buffer buf)
tokens) tokens)
nil) nil)
@ -434,13 +434,13 @@ in the current header file."
(buf) (buf)
(parent)) (parent))
(if (and object (equal (semantic-token-type object) "class")) (if (and object (equal (semantic-token-type object) "class"))
(setq parent (semantic-token-name object))) (set parent (semantic-token-name object)))
(if (and (not (kde-function-expanded-at-point PT)) (if (and (not (kde-function-expanded-at-point PT))
(kde-is-prototype func)) (kde-is-prototype func))
(progn (progn
(setq func (kde-function-construct func parent)) (set func (kde-function-construct func parent))
(setq file (car (kde-file-get-cpp-h))) (set file (car (kde-file-get-cpp-h)))
(setq buf (current-buffer)) (set buf (current-buffer))
(find-file file) (find-file file)
(save-excursion (save-excursion
(goto-char (point-max)) (goto-char (point-max))

@ -169,7 +169,7 @@ like Borland JBuilder does it?}
@strong{A.} To your @file{.emacs} add a line like: @strong{A.} To your @file{.emacs} add a line like:
@example @example
(setq frame-title-format "%b (%m)") (set frame-title-format "%b (%m)")
@end example @end example
which will display ``filename (mode)'' type of string in the which will display ``filename (mode)'' type of string in the
taskbar. Type @kbd{C-h v frame-title-format} to get more info. taskbar. Type @kbd{C-h v frame-title-format} to get more info.

@ -41,9 +41,9 @@ This function does not do any hidden buffer changes."
(let (found) (let (found)
(save-excursion (save-excursion
(beginning-of-buffer) (beginning-of-buffer)
(setq found (re-search-forward "^using" nil 1)) (set found (re-search-forward "^using" nil 1))
(if found (if found
(setq found (search-forward namespace (line-end-position) 1)) (set found (search-forward namespace (line-end-position) 1))
) )
) )
found) found)
@ -55,9 +55,9 @@ This function does not do any hidden buffer changes."
(let (found) (let (found)
(save-excursion (save-excursion
(beginning-of-buffer) (beginning-of-buffer)
(setq found (re-search-forward "^namespace" nil 1)) (set found (re-search-forward "^namespace" nil 1))
(if found (if found
(setq found (search-forward namespace (line-end-position) 1)) (set found (search-forward namespace (line-end-position) 1))
) )
) )
found) found)
@ -88,7 +88,7 @@ This function does not do any hidden buffer changes."
(re-search-forward "[ \t]" nil t)) (re-search-forward "[ \t]" nil t))
(while (looking-at "[ \t]") (while (looking-at "[ \t]")
(forward-char 1)) (forward-char 1))
(setq start (point)) (set start (point))
; Parse class name ("Foo" or "Foo::Bar::Blah"). ; Parse class name ("Foo" or "Foo::Bar::Blah").
; Beware of "Foo:" ; Beware of "Foo:"
(while (or (looking-at "[A-Za-z0-9_]") (looking-at "::")) (while (or (looking-at "[A-Za-z0-9_]") (looking-at "::"))
@ -99,9 +99,9 @@ This function does not do any hidden buffer changes."
) )
(cond (cond
(class ; class found already, so the rest goes into the namespace (class ; class found already, so the rest goes into the namespace
(setq namespace (concat (buffer-substring start (point)) "::" namespace))) (set namespace (concat (buffer-substring start (point)) "::" namespace)))
(t ; class==nil (t ; class==nil
(setq class (buffer-substring start (point))))) (set class (buffer-substring start (point)))))
) )
; Go up one level again ; Go up one level again
(let ((pos (c-safe-scan-lists (point) -1 1))) (let ((pos (c-safe-scan-lists (point) -1 1)))
@ -123,7 +123,7 @@ This function does not do any hidden buffer changes."
(re-search-backward "^[ \t]*") (re-search-backward "^[ \t]*")
(while (looking-at "[ \t]") (while (looking-at "[ \t]")
(forward-char 1)) (forward-char 1))
(setq function (buffer-substring (point) end)) (set function (buffer-substring (point) end))
) )
) ; end of global save-excursion ) ; end of global save-excursion
(cons namespace (cons class function)) ; the returned value (cons namespace (cons class function)) ; the returned value
@ -133,24 +133,24 @@ This function does not do any hidden buffer changes."
; get rid of virtual, static, multiple spaces, default values. ; get rid of virtual, static, multiple spaces, default values.
(defun canonical-function-sig (function) (defun canonical-function-sig (function)
(and (string-match "[ \t]*\\<virtual\\>[ \t]*" function) (and (string-match "[ \t]*\\<virtual\\>[ \t]*" function)
(setq function (replace-match " " t t function))) (set function (replace-match " " t t function)))
(and (string-match "^\\(virtual\\>\\)?[ \t]*" function) (and (string-match "^\\(virtual\\>\\)?[ \t]*" function)
(setq function (replace-match "" t t function))) (set function (replace-match "" t t function)))
(and (string-match "^\\(explicit\\>\\)?[ \t]*" function) (and (string-match "^\\(explicit\\>\\)?[ \t]*" function)
(setq function (replace-match "" t t function))) (set function (replace-match "" t t function)))
(and (string-match "^\\(static\\>\\)?[ \t]*" function) (and (string-match "^\\(static\\>\\)?[ \t]*" function)
(setq function (replace-match "" t t function))) (set function (replace-match "" t t function)))
(while (string-match " +" function) ; simplifyWhiteSpace (while (string-match " +" function) ; simplifyWhiteSpace
(setq function (replace-match " " t t function))) (set function (replace-match " " t t function)))
(while (string-match "\t+" function) (while (string-match "\t+" function)
(setq function (replace-match " " t t function))) (set function (replace-match " " t t function)))
(while (string-match "^ " function) ; remove leading whitespace (while (string-match "^ " function) ; remove leading whitespace
(setq function (replace-match "" t t function))) (set function (replace-match "" t t function)))
(let ((startargs (string-match "(" function))) (let ((startargs (string-match "(" function)))
(while (string-match " ?=[^,)]+" function startargs) ; remove default values (while (string-match " ?=[^,)]+" function startargs) ; remove default values
(setq function (replace-match " " t t function)))) (set function (replace-match " " t t function))))
(while (string-match " +," function) ; remove space before commas (while (string-match " +," function) ; remove space before commas
(setq function (replace-match "," t t function))) (set function (replace-match "," t t function)))
function ; the return value function ; the return value
) )
@ -164,13 +164,13 @@ This function does not do any hidden buffer changes."
(and (stringp class) (and (stringp class)
(cond (cond
((string-match (concat "^ *" class "[ \\t]*(") function) ; constructor ((string-match (concat "^ *" class "[ \\t]*(") function) ; constructor
(setq insertion-string (set insertion-string
(replace-match (replace-match
(concat namespace class "::" class "(") (concat namespace class "::" class "(")
t t function) t t function)
)) ))
((string-match (concat "^ *~" class "[ \\t]*(") function) ; destructor ((string-match (concat "^ *~" class "[ \\t]*(") function) ; destructor
(setq insertion-string (set insertion-string
(replace-match (replace-match
(concat namespace class "::~" class "(") (concat namespace class "::~" class "(")
t t function) t t function)
@ -179,7 +179,7 @@ This function does not do any hidden buffer changes."
(if (not (stringp insertion-string)) ; no ctor nor dtor (if (not (stringp insertion-string)) ; no ctor nor dtor
(if (or (string-match " *\\([a-zA-Z0-9_]+\\)[ \\t]*(" function) ; normal method (if (or (string-match " *\\([a-zA-Z0-9_]+\\)[ \\t]*(" function) ; normal method
(string-match " *\\(operator[^ \\t]+\\)[ \\t]*(" function)) ; operator (string-match " *\\(operator[^ \\t]+\\)[ \\t]*(" function)) ; operator
(setq insertion-string (set insertion-string
(replace-match (replace-match
(if class (if class
(concat " " namespace class "::" "\\1(") ; c++ method (concat " " namespace class "::" "\\1(") ; c++ method
@ -216,8 +216,8 @@ This function does not do any hidden buffer changes."
(let ((a (fume-function-before-point))) (let ((a (fume-function-before-point)))
(and (string-match "^\\(.*\\)::\\(.*\\)$" a) (and (string-match "^\\(.*\\)::\\(.*\\)$" a)
(progn (progn
(setq class (match-string 1 a)) (set class (match-string 1 a))
(setq function (match-string 2 a)) (set function (match-string 2 a))
(kde-switch-cpp-h) (kde-switch-cpp-h)
(goto-char 0) (goto-char 0)
; Look for beginning of class ("\\s-+" means whitespace including newlines) ; Look for beginning of class ("\\s-+" means whitespace including newlines)
@ -234,27 +234,27 @@ This function does not do any hidden buffer changes."
(let ((mup (method-under-point)) (let ((mup (method-under-point))
(sig "") (sig "")
(pos 0)) (pos 0))
(setq namespace (car mup)) (set namespace (car mup))
(setq class (car (cdr mup))) (set class (car (cdr mup)))
(setq function (cdr (cdr mup))) (set function (cdr (cdr mup)))
(kde-switch-cpp-h) (kde-switch-cpp-h)
;; First search with namespace prefixed ;; First search with namespace prefixed
(goto-char 0) (goto-char 0)
(setq sig (kde-remove-newline (kde-function-impl-sig namespace class function))) (set sig (kde-remove-newline (kde-function-impl-sig namespace class function)))
(if (string-match "(.*" sig) ; remove args (if (string-match "(.*" sig) ; remove args
(setq sig (replace-match "" nil t sig))) (set sig (replace-match "" nil t sig)))
(setq found (re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) ) (set found (re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) )
(if (not found) (if (not found)
(progn (progn
; Now search without name space prefix ; Now search without name space prefix
(goto-char 0) (goto-char 0)
(setq sig (kde-remove-newline (kde-function-impl-sig "" class function))) (set sig (kde-remove-newline (kde-function-impl-sig "" class function)))
(if (string-match "(.*" sig) ; remove args (if (string-match "(.*" sig) ; remove args
(setq sig (replace-match "" nil t sig))) (set sig (replace-match "" nil t sig)))
(re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) ) ) (re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) ) )
))))) )))))
@ -280,7 +280,7 @@ This function does not do any hidden buffer changes."
(start nil) (start nil)
(newcppfile nil) (newcppfile nil)
) )
(setq insertion-string (set insertion-string
(concat insertion-string "\n{\n" (concat insertion-string "\n{\n"
(replace-in-string kde-make-member-default-impl "FUNCTION" (replace-in-string kde-make-member-default-impl "FUNCTION"
; the function name and args, without newlines ; the function name and args, without newlines
@ -299,19 +299,19 @@ This function does not do any hidden buffer changes."
(forward-char -1)) (forward-char -1))
(forward-char 1) (forward-char 1)
; move to next method again if we're at a pure virtual method ; move to next method again if we're at a pure virtual method
(setq moveToNext (looking-at "[ \t]*=[ \t]*0;")) (set moveToNext (looking-at "[ \t]*=[ \t]*0;"))
) )
) )
) )
(setq newcppfile (not (cdr (kde-file-get-cpp-h)))) (set newcppfile (not (cdr (kde-file-get-cpp-h))))
(if (string-match "\\.h$" file) (if (string-match "\\.h$" file)
(kde-switch-cpp-h) (kde-switch-cpp-h)
) )
(goto-char (point-max)) (goto-char (point-max))
(kde-comments-begin) (kde-comments-begin)
(kde-skip-blank-lines) (kde-skip-blank-lines)
(setq msubstr (buffer-substring (point-at-bol) (point-at-eol))) (set msubstr (buffer-substring (point-at-bol) (point-at-eol)))
(if (string-match "^#include.*moc.*" msubstr) (if (string-match "^#include.*moc.*" msubstr)
(progn (progn
(forward-line -1) (forward-line -1)
@ -330,7 +330,7 @@ This function does not do any hidden buffer changes."
(c-indent-defun) (c-indent-defun)
(save-excursion (save-excursion
(and (string-match ".*/" file) (and (string-match ".*/" file)
(setq file (replace-match "" t nil file))) (set file (replace-match "" t nil file)))
(and (string-match "\\.h$" file) (and (string-match "\\.h$" file)
(functionp 'kdab-insert-include-file) (functionp 'kdab-insert-include-file)
(kdab-insert-include-file file 't nil))) (kdab-insert-include-file file 't nil)))
@ -403,14 +403,14 @@ This function does not do any hidden buffer changes."
(iters (min (length parts) kde-header-protection-parts-to-show))) (iters (min (length parts) kde-header-protection-parts-to-show)))
(dotimes (i iters) (dotimes (i iters)
(let ((part (pop parts))) (let ((part (pop parts)))
(setq definablestring (set definablestring
(concat (concat
(upcase (replace-in-string part "[\\.-]" "_")) (upcase (replace-in-string part "[\\.-]" "_"))
(if (not first-iter) "_" "") (if (not first-iter) "_" "")
definablestring definablestring
) )
) )
(setq first-iter nil) (set first-iter nil)
) )
) )
definablestring definablestring
@ -435,13 +435,13 @@ This function does not do any hidden buffer changes."
(if (not (c-in-literal)) (if (not (c-in-literal))
(let ((n nil) (except nil)) (let ((n nil) (except nil))
(save-excursion (save-excursion
(setq n (or (progn (forward-char -2) (looking-at "if")) (set n (or (progn (forward-char -2) (looking-at "if"))
(progn (forward-char -1) (looking-at "for")) (progn (forward-char -1) (looking-at "for"))
(progn (forward-char -1) (looking-at "case")) (progn (forward-char -1) (looking-at "case"))
(progn (forward-char -1) (looking-at "while")) (progn (forward-char -1) (looking-at "while"))
) )
) )
(setq except (or (progn (forward-char -2) (looking-at "kdDebug")) (set except (or (progn (forward-char -2) (looking-at "kdDebug"))
(looking-at "kdError") (looking-at "kdError")
(progn (forward-char -2) (looking-at "kdWarning")) (progn (forward-char -2) (looking-at "kdWarning"))
) )
@ -464,9 +464,9 @@ This function does not do any hidden buffer changes."
(if (not (c-in-literal)) (if (not (c-in-literal))
(let ((remv nil) (nospac nil)) (let ((remv nil) (nospac nil))
(forward-char -2) (forward-char -2)
(setq remv (looking-at "( ")) ; () -> we'll have to remove that space (set remv (looking-at "( ")) ; () -> we'll have to remove that space
(forward-char 1) (forward-char 1)
(setq nospac ; no space to be added (set nospac ; no space to be added
(or (looking-at " ") (or (looking-at " ")
(looking-at "(") (looking-at "(")
(save-excursion ; check for kdDebug(123 (save-excursion ; check for kdDebug(123
@ -520,15 +520,15 @@ This function does not do any hidden buffer changes."
(save-excursion (save-excursion
(save-excursion (save-excursion
(if (re-search-forward "[a-zA-Z]" (point-at-eol) t) (if (re-search-forward "[a-zA-Z]" (point-at-eol) t)
(setq oneliner t))) (set oneliner t)))
(forward-char -1) ; These three lines are for the situation where (forward-char -1) ; These three lines are for the situation where
(if (not (looking-at " ")) ; the user already have inserted a space after (if (not (looking-at " ")) ; the user already have inserted a space after
(forward-char 1) ; the closing parenthesis (forward-char 1) ; the closing parenthesis
(setq spacep t)) (set spacep t))
(forward-char -2) (forward-char -2)
(setq o (looking-at "()")) (set o (looking-at "()"))
(forward-char 1) (forward-char 1)
(setq n (looking-at ")")) (set n (looking-at ")"))
(if (and (if (and
(not oneliner) (not oneliner)
(not (eq (not (eq
@ -538,7 +538,7 @@ This function does not do any hidden buffer changes."
(next-line 1) (next-line 1)
(beginning-of-line) (beginning-of-line)
(if (re-search-forward "[a-zA-Z]" (point-at-eol) t) (if (re-search-forward "[a-zA-Z]" (point-at-eol) t)
(setq c (eq (car (car (c-guess-basic-syntax))) 'substatement))) (set c (eq (car (car (c-guess-basic-syntax))) 'substatement)))
) )
) )
) )
@ -617,10 +617,10 @@ This function does not do any hidden buffer changes."
(objext nil)) (objext nil))
(if (file-readable-p "Makefile.am") (if (file-readable-p "Makefile.am")
(setq objext "\.lo") (set objext "\.lo")
(setq objext "\.o")) (set objext "\.o"))
(if (string-match "\.cpp$" f) (setq f (replace-match objext t t f))) (if (string-match "\.cpp$" f) (set f (replace-match objext t t f)))
(if (string-match "\.cc$" f) (setq f (replace-match objext t t f))) (if (string-match "\.cc$" f) (set f (replace-match objext t t f)))
(compile (concat kde-emacs-make " " f))) (compile (concat kde-emacs-make " " f)))
) )
@ -672,17 +672,17 @@ This function does not do any hidden buffer changes."
(ret) (ret)
) )
(while (< pos l) (while (< pos l)
(setq oldpos (+ pos 1)) (set oldpos (+ pos 1))
(setq pos (string-match "[,]" string (+ pos 1))) (set pos (string-match "[,]" string (+ pos 1)))
(unless pos (setq pos l)) (unless pos (set pos l))
(setq currange (substring string oldpos pos)) (set currange (substring string oldpos pos))
(string-match "[0-9]+" currange) (string-match "[0-9]+" currange)
(setq startyear (string-to-int (match-string 0 currange))) (set startyear (string-to-int (match-string 0 currange)))
(setq endyear (set endyear
(if (string-match "-" currange) (if (string-match "-" currange)
(string-to-int (substring currange (match-end 0))) (string-to-int (substring currange (match-end 0)))
startyear)) startyear))
(setq ret (cons (cons startyear endyear) ret)) (set ret (cons (cons startyear endyear) ret))
) )
ret ret
) )
@ -694,14 +694,14 @@ This function does not do any hidden buffer changes."
(let ((ret)) (let ((ret))
(dolist (range ranges ret) (dolist (range ranges ret)
(when (and (>= year (car range)) (<= year (cdr range))) (when (and (>= year (car range)) (<= year (cdr range)))
(setq ret t)) (set ret t))
))) )))
(defun kde-year-range-to-string (ranges) (defun kde-year-range-to-string (ranges)
"converts ranges to a string.." "converts ranges to a string.."
(let ((ret "")) (let ((ret ""))
(dolist (range ranges) (dolist (range ranges)
(setq ret (set ret
(concat (concat
(int-to-string (car range)) (int-to-string (car range))
(if (/= (cdr range) (car range)) (if (/= (cdr range) (car range))
@ -712,7 +712,7 @@ This function does not do any hidden buffer changes."
) )
) )
; remove extraneous ", " ; remove extraneous ", "
(setq ret (substring ret 0 (- (length ret) 2))) (set ret (substring ret 0 (- (length ret) 2)))
) )
) )
@ -725,7 +725,7 @@ This function does not do any hidden buffer changes."
(setcar range (cons (car nyears) (cdr years))) (setcar range (cons (car nyears) (cdr years)))
(setcdr range (cddr range))) (setcdr range (cddr range)))
) )
(setq range (cdr range)) (set range (cdr range))
) )
origrange origrange
) )
@ -738,16 +738,16 @@ This function does not do any hidden buffer changes."
(cond (cond
((and (>= year (car years)) (<= year (cdr years)) ((and (>= year (car years)) (<= year (cdr years))
; year is already in the range.. ; year is already in the range..
(setq range nil))) (set range nil)))
((= year (+ (cdr years) 1)) ((= year (+ (cdr years) 1))
(setcdr years year) (setcdr years year)
(setq range nil)) (set range nil))
((= year (- (car years) 1)) ((= year (- (car years) 1))
(setcar years year) (setcar years year)
(setq range nil)) (set range nil))
) )
) )
(setq range (cdr range)) (set range (cdr range))
) )
(kde-year-range-cleanup range) (kde-year-range-cleanup range)
) )
@ -768,15 +768,15 @@ This function does not do any hidden buffer changes."
(this-year (string-to-int (format-time-string "%Y")))) (this-year (string-to-int (format-time-string "%Y"))))
(when (not (kde-year-range-contains-year years this-year)) (when (not (kde-year-range-contains-year years this-year))
(kde-year-range-add-year years this-year)) (kde-year-range-add-year years this-year))
(setq new-copyright-string (set new-copyright-string
(concat new-copyright-string (kde-year-range-to-string years))) (concat new-copyright-string (kde-year-range-to-string years)))
; finish new-copyright-string ; finish new-copyright-string
(setq new-copyright-string (set new-copyright-string
(concat new-copyright-string " " kde-full-name " <" kde-email ">")) (concat new-copyright-string " " kde-full-name " <" kde-email ">"))
(beginning-of-line) (beginning-of-line)
(re-search-forward "Copyright ([Cc])") (re-search-forward "Copyright ([Cc])")
(beginning-of-line) (beginning-of-line)
(setq wascomment (set wascomment
(buffer-substring (point) (buffer-substring (point)
(match-beginning 0) (match-beginning 0)
)) ))
@ -790,7 +790,7 @@ This function does not do any hidden buffer changes."
(progn (progn
(goto-char first-copyright-str) (goto-char first-copyright-str)
(beginning-of-line) (beginning-of-line)
(setq wascomment (buffer-substring (point) (match-beginning 0))) (set wascomment (buffer-substring (point) (match-beginning 0)))
(forward-line 1) (forward-line 1)
) )
(goto-line 2)) (goto-line 2))
@ -820,12 +820,12 @@ This function does not do any hidden buffer changes."
(final)) (final))
(save-excursion (save-excursion
(beginning-of-buffer) (beginning-of-buffer)
(setq startpoint (point)) (set startpoint (point))
(setq endpoint (point-at-eol))) (set endpoint (point-at-eol)))
(setq firstline (buffer-substring startpoint endpoint)) (set firstline (buffer-substring startpoint endpoint))
(if (string-match "-\*-\\([A-Za-z0-9\-\+\:\; ]+\\)-\*-" firstline) (if (string-match "-\*-\\([A-Za-z0-9\-\+\:\; ]+\\)-\*-" firstline)
(delete-region startpoint endpoint)) (delete-region startpoint endpoint))
(setq final (concat "-*- " (set final (concat "-*- "
"Mode: " mode-name "; " "Mode: " mode-name "; "
"c-basic-offset: " (prin1-to-string c-basic-offset) "; " "c-basic-offset: " (prin1-to-string c-basic-offset) "; "
"indent-tabs-mode: " (prin1-to-string indent-tabs-mode) "; " "indent-tabs-mode: " (prin1-to-string indent-tabs-mode) "; "
@ -848,11 +848,11 @@ This function does not do any hidden buffer changes."
(if (looking-at "#include \"") (if (looking-at "#include \"")
(progn (progn
(forward-char 10) (forward-char 10)
(setq begin (point)) (set begin (point))
(re-search-forward "\"" nil t) (re-search-forward "\"" nil t)
(backward-char 1) (backward-char 1)
(setq file (buffer-substring begin (point))) (set file (buffer-substring begin (point)))
(setq buffer (current-buffer)) (set buffer (current-buffer))
(qt-follow-includes file) (qt-follow-includes file)
(kill-buffer buffer) (kill-buffer buffer)
) )
@ -873,18 +873,18 @@ This function does not do any hidden buffer changes."
) )
(save-excursion (save-excursion
; The Qt3 case: the includes are directly in $QTDIR/include/, lowercased ; The Qt3 case: the includes are directly in $QTDIR/include/, lowercased
(setq f (concat qtinc (downcase class) ".h" )) (set f (concat qtinc (downcase class) ".h" ))
(if (file-readable-p f) (if (file-readable-p f)
(setq file f) (set file f)
; For some Qt3/e classes: add _qws ; For some Qt3/e classes: add _qws
(setq f (concat qtinc (downcase class) "_qws.h" )) (set f (concat qtinc (downcase class) "_qws.h" ))
(if (file-readable-p f) (if (file-readable-p f)
(setq file f) (set file f)
; The Qt4 case: the includes are in $QTDIR/include/QSomething/, in original case ; The Qt4 case: the includes are in $QTDIR/include/QSomething/, in original case
(setq files (directory-files qtinc t nil "dirsonly")) (set files (directory-files qtinc t nil "dirsonly"))
(dolist (f files nil) (dolist (f files nil)
(if (file-readable-p (concat f "/" class) ) (if (file-readable-p (concat f "/" class) )
(setq file (concat f "/" class)))) (set file (concat f "/" class))))
)) ))
(and file (and file
(qt-follow-includes file)) (qt-follow-includes file))

@ -26,8 +26,8 @@
;; ;;
;; I also strongly recommend to add the following two lines to ;; I also strongly recommend to add the following two lines to
;; .emacs file: ;; .emacs file:
;; (setq kde-full-name "Your Name") ;; (set kde-full-name "Your Name")
;; (setq kde-email "Your Email") ;; (set kde-email "Your Email")
;; ;;
;; You may want to byte-compile the package to speed it up ;; You may want to byte-compile the package to speed it up
;; a bit. To do it in the *scratch* buffer type in the following ;; a bit. To do it in the *scratch* buffer type in the following

@ -20,18 +20,18 @@
;; ------------------------------ INSTALLATION ------------------------------ ;; ------------------------------ INSTALLATION ------------------------------
;; To use this file, add the current directory to your load path. ;; To use this file, add the current directory to your load path.
;; you do this by inserting something like the following to your .emacs: ;; you do this by inserting something like the following to your .emacs:
;; (setq load-path (cons "/home/blackie/Emacs/" load-path)) ;; (set load-path (cons "/home/blackie/Emacs/" load-path))
;; ;;
;; Next insert the following line into your .emacs ;; Next insert the following line into your .emacs
;; (require 'klaralv) ;; (require 'klaralv)
;; (global-set-key [(f5)] 'kdab-insert-header) ;; (global-set-key [(f5)] 'kdab-insert-header)
;; (global-set-key [(shift f5)] 'kdab-insert-forward-decl) ;; (global-set-key [(shift f5)] 'kdab-insert-forward-decl)
;; (setq kdab-qt-documentation "file://usr/local/qt/html/doc/XXX.html") ;; (set kdab-qt-documentation "file://usr/local/qt/html/doc/XXX.html")
;; (global-set-key [(control f5)] 'kdab-lookup-qt-documentation) ;; (global-set-key [(control f5)] 'kdab-lookup-qt-documentation)
;; ;;
;; If you use QTopia, and do not want include files to be prefixed with qpe/, ;; If you use QTopia, and do not want include files to be prefixed with qpe/,
;; as in qpe/qpeapplication, then insert the following code in your setup ;; as in qpe/qpeapplication, then insert the following code in your setup
;; (setq kdab-prefix-qpe nil) ;; (set kdab-prefix-qpe nil)
;; ------------------------------ CONFIGURATION ------------------------------ ;; ------------------------------ CONFIGURATION ------------------------------
(defvar kdab-qt-documentation (defvar kdab-qt-documentation
@ -245,10 +245,10 @@
(defun kdab-get-special-include-list () (defun kdab-get-special-include-list ()
(let (elm header classes (list kdab-qpe-includes) filename (result kdab-special-includes)) (let (elm header classes (list kdab-qpe-includes) filename (result kdab-special-includes))
(while list (while list
(setq elm (car list)) (set elm (car list))
(setq list (cdr list)) (set list (cdr list))
(setq filename (concat (if kdab-prefix-qpe "qpe/" "") (symbol-name (car elm)))) (set filename (concat (if kdab-prefix-qpe "qpe/" "") (symbol-name (car elm))))
(setq result (cons (cons (intern filename) (cdr elm)) result))) (set result (cons (cons (intern filename) (cdr elm)) result)))
result)) result))
;; Lookup class `cls' in kdab-special-includes and return the associate include file name ;; Lookup class `cls' in kdab-special-includes and return the associate include file name
@ -261,9 +261,9 @@
(classes (cdr elm))) (classes (cdr elm)))
( while (and classes (not found)) ( while (and classes (not found))
(if (string= (downcase cls) (downcase (symbol-name (car classes)))) (if (string= (downcase cls) (downcase (symbol-name (car classes))))
(setq found include-file) (set found include-file)
(setq classes (cdr classes))))) (set classes (cdr classes)))))
(setq list (cdr list))) (set list (cdr list)))
(if found (if found
(symbol-name found) (symbol-name found)
nil) ; return value nil) ; return value
@ -304,15 +304,15 @@
;; decide on the header file. ;; decide on the header file.
(if (file-exists-p (concat word-with-case ".h")) (if (file-exists-p (concat word-with-case ".h"))
(progn ; file exists in given case in pwd. (progn ; file exists in given case in pwd.
(setq header (concat word-with-case ".h")) (set header (concat word-with-case ".h"))
(setq is-local 't)) (set is-local 't))
(if (file-exists-p (concat word ".h")) ; file exists in lowercase in pwd (if (file-exists-p (concat word ".h")) ; file exists in lowercase in pwd
(progn (progn
(setq header (concat word ".h")) (set header (concat word ".h"))
(setq is-local 't)) (set is-local 't))
(progn ; header in <..> path (progn ; header in <..> path
(setq header special-header) (set header special-header)
(setq is-local nil)))) (set is-local nil))))
(kdab-insert-include-file header is-local t)))) (kdab-insert-include-file header is-local t))))
@ -395,12 +395,12 @@
(defun is-qpe-class (class) (defun is-qpe-class (class)
(let ((list kdab-qpe-includes) classes (found nil)) (let ((list kdab-qpe-includes) classes (found nil))
(while (and (not found) list) (while (and (not found) list)
(setq classes (cdr (car list))) (set classes (cdr (car list)))
(while classes (while classes
(if (string= (downcase (symbol-name (car classes))) (downcase class)) (if (string= (downcase (symbol-name (car classes))) (downcase class))
(setq found 't)) (set found 't))
(setq classes (cdr classes))) (set classes (cdr classes)))
(setq list (cdr list))) (set list (cdr list)))
found)) found))
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

Loading…
Cancel
Save