summaryrefslogtreecommitdiffstats
path: root/scripts/kde-emacs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kde-emacs')
-rw-r--r--scripts/kde-emacs/dirvars.el14
-rw-r--r--scripts/kde-emacs/kde-emacs-bindings.el8
-rw-r--r--scripts/kde-emacs/kde-emacs-compat.el2
-rw-r--r--scripts/kde-emacs/kde-emacs-core.el474
-rw-r--r--scripts/kde-emacs/kde-emacs-doc.el38
-rw-r--r--scripts/kde-emacs/kde-emacs-general.el50
-rw-r--r--scripts/kde-emacs/kde-emacs-semantic.el78
-rw-r--r--scripts/kde-emacs/kde-emacs-tips.texi2
-rw-r--r--scripts/kde-emacs/kde-emacs-utils.el164
-rw-r--r--scripts/kde-emacs/kde-emacs.el4
-rw-r--r--scripts/kde-emacs/klaralv.el40
11 files changed, 437 insertions, 437 deletions
diff --git a/scripts/kde-emacs/dirvars.el b/scripts/kde-emacs/dirvars.el
index 5fba18e7..b9837eaf 100644
--- a/scripts/kde-emacs/dirvars.el
+++ b/scripts/kde-emacs/dirvars.el
@@ -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."
;; Chase links in the source file and search in the dir where it
;; points.
- (setq dir-name (or (and buffer-file-name
+ (set dir-name (or (and buffer-file-name
(file-name-directory (file-chase-links
buffer-file-name)))
default-directory))
;; Chase links before visiting the file. This makes it easier to
;; use a single file for several related directories.
- (setq dir-name (file-chase-links dir-name))
- (setq dir-name (expand-file-name dir-name))
+ (set dir-name (file-chase-links dir-name))
+ (set dir-name (expand-file-name dir-name))
;; Move up in the dir hierarchy till we find a change log file.
(let ((file1 (concat dir-name file-name))
parent-dir)
(while (and (not (file-exists-p file1))
- (progn (setq parent-dir
+ (progn (set parent-dir
(file-name-directory
(directory-file-name
(file-name-directory file1))))
@@ -106,7 +106,7 @@ The FILE-NAME specifies the file name to search for."
(not (string= (file-name-directory file1)
parent-dir))))
;; Move up to the parent dir and try again.
- (setq file1 (expand-file-name file-name parent-dir)))
+ (set file1 (expand-file-name file-name parent-dir)))
;; If we found the file in a parent dir, use that. Otherwise,
;; return nil
(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))
(if (eobp)
(throw 'done nil))
- (setq beg (point))
+ (set beg (point))
(skip-chars-forward "^:\n")
(if (not (looking-at ":"))
(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.
(skip-chars-forward "^:")
(forward-char 1)
- (setq val (read (current-buffer)))
+ (set val (read (current-buffer)))
(save-excursion
(set-buffer original-buffer)
(dirvars-hack-one-local-variable dirvars-file
diff --git a/scripts/kde-emacs/kde-emacs-bindings.el b/scripts/kde-emacs/kde-emacs-bindings.el
index 84202dfb..f51e742d 100644
--- a/scripts/kde-emacs/kde-emacs-bindings.el
+++ b/scripts/kde-emacs/kde-emacs-bindings.el
@@ -43,7 +43,7 @@
; 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
; 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
;
@@ -84,11 +84,11 @@
(if (featurep 'igrep)
(progn
- (setq igrep-find-prune-clause
+ (set igrep-find-prune-clause
(format "-type d %s -name CVS -o -name .libs -o -name .deps %s"
(shell-quote-argument "(")
(shell-quote-argument ")")))
- (setq igrep-find-file-clause
+ (set igrep-find-file-clause
(format "-type f %s -name %s %s -name %s %s -name %s %s -name %s" ; -type l
(shell-quote-argument "!")
(shell-quote-argument "*~") ; Emacs backup
@@ -105,7 +105,7 @@
(define-key global-map [(f2)] 'igrep)
(define-key global-map [(shift f2)] 'igrep-find)
(define-key global-map [(f12)] 'igrep-find) ; on the console, shift f2 gives f12 for some reason..
- ;(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 [(shift backspace)] 'kde-delete-backward-ws)
diff --git a/scripts/kde-emacs/kde-emacs-compat.el b/scripts/kde-emacs/kde-emacs-compat.el
index 1ff1fe7a..72d8c2b9 100644
--- a/scripts/kde-emacs/kde-emacs-compat.el
+++ b/scripts/kde-emacs/kde-emacs-compat.el
@@ -46,7 +46,7 @@ Otherwise treat `\\' in NEWTEXT as special:
(buffer-string))
(let ((start 0) newstr)
(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)))
str newstr))
str)))
diff --git a/scripts/kde-emacs/kde-emacs-core.el b/scripts/kde-emacs/kde-emacs-core.el
index eaa63a0c..030ffd39 100644
--- a/scripts/kde-emacs/kde-emacs-core.el
+++ b/scripts/kde-emacs/kde-emacs-core.el
@@ -67,7 +67,7 @@ Try to finish the symbol, or indent the line."
(let ((count 0)
(bmp (buffer-modified-p)))
(while (re-search-forward "[ \t]+$" nil t)
- (setq count (1+ count))
+ (set count (1+ count))
(replace-match "" t t))
(set-buffer-modified-p bmp)
nil
@@ -98,13 +98,13 @@ With arg, do it arg times."
"XEmacs doesn't have font-lock-add-keywords so we provide it."
(font-lock-set-defaults)
(if (eq append 'set)
- (setq font-lock-keywords keywords)
+ (set font-lock-keywords keywords)
; NOTE: write this function for XEmacs - Zack
;(font-lock-remove-keywords nil keywords) ;to avoid duplicates
(let ((old (if (eq (car-safe font-lock-keywords) t)
(cdr font-lock-keywords)
font-lock-keywords)))
- (setq font-lock-keywords (if append
+ (set font-lock-keywords (if append
(append old keywords)
(append keywords old))))))
)
@@ -138,7 +138,7 @@ With arg, do it arg times."
))
;; KDE C++ mode
-;; Not a "(setq c++-mode-hook ..." because this way we would
+;; Not a "(set c++-mode-hook ..." because this way we would
;; prune all other hooks!
(defun kde-c++-mode-hook ()
(font-lock-mode)
@@ -156,7 +156,7 @@ With arg, do it arg times."
;; access specifiers
(font-lock-add-keywords nil '(("\\<\\(\\(public\\|protected\\|private\\) Q_SLOTS\\)\\>"
. font-lock-reference-face)))
- ;; Add (setq magic-keys-mode nil) to your .emacs (before loading this file)
+ ;; Add (set magic-keys-mode nil) to your .emacs (before loading this file)
;; to disable the magic keys in C++ mode.
(and (boundp 'magic-keys-mode) magic-keys-mode
(progn
@@ -219,11 +219,11 @@ This function does not do any hidden buffer changes."
(progn
(goto-char (aref inclass-p 0))
(looking-at c-other-decl-block-key)))
- (setq inenclosing-p (match-string 1))
+ (set inenclosing-p (match-string 1))
(if (string-equal inenclosing-p "extern")
;; Compatibility with legacy choice of name for the
;; extern-lang syntactic symbols.
- (setq inenclosing-p "extern-lang")))))
+ (set inenclosing-p "extern-lang")))))
;; Init some position variables:
;;
@@ -246,22 +246,22 @@ This function does not do any hidden buffer changes."
;; opposed to c-state-cache.
(if c-state-cache
(progn
- (setq containing-sexp (car paren-state)
+ (set containing-sexp (car paren-state)
paren-state (cdr paren-state))
(if (consp containing-sexp)
(progn
- (setq lim (cdr containing-sexp))
+ (set lim (cdr containing-sexp))
(if (cdr c-state-cache)
;; Ignore balanced paren. The next entry
;; can't be another one.
- (setq containing-sexp (car (cdr c-state-cache))
+ (set containing-sexp (car (cdr c-state-cache))
paren-state (cdr paren-state))
;; If there is no surrounding open paren then
;; put the last balanced pair back on paren-state.
- (setq paren-state (cons containing-sexp paren-state)
+ (set paren-state (cons containing-sexp paren-state)
containing-sexp nil)))
- (setq lim (1+ containing-sexp))))
- (setq lim (point-min)))
+ (set lim (1+ containing-sexp))))
+ (set lim (point-min)))
;; If we're in a parenthesis list then ',' delimits the
;; "statements" rather than being an operator (with the
@@ -270,19 +270,19 @@ This function does not do any hidden buffer changes."
;; arglists.
(when (and containing-sexp
(eq (char-after containing-sexp) ?\())
- (setq c-stmt-delim-chars c-stmt-delim-chars-with-comma))
+ (set c-stmt-delim-chars c-stmt-delim-chars-with-comma))
;; cache char before and after indent point, and move point to
;; the most likely position to perform the majority of tests
(goto-char indent-point)
(c-backward-syntactic-ws lim)
- (setq char-before-ip (char-before))
+ (set char-before-ip (char-before))
(goto-char indent-point)
(skip-chars-forward " \t")
- (setq char-after-ip (char-after))
+ (set char-after-ip (char-after))
;; 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
(cond
@@ -299,15 +299,15 @@ This function does not do any hidden buffer changes."
;; versions, which results in that we get nil from
;; `c-literal-limits' even when `c-in-literal' claims
;; we're inside a comment.
- (setq placeholder (c-literal-limits lim)))
+ (set placeholder (c-literal-limits lim)))
(c-add-syntax literal (car placeholder)))
;; CASE 3: in a cpp preprocessor macro continuation.
((and (save-excursion
(when (c-beginning-of-macro)
- (setq macro-start (point))))
+ (set macro-start (point))))
(/= macro-start (c-point 'boi))
(progn
- (setq tmpsymbol 'cpp-macro-cont)
+ (set tmpsymbol 'cpp-macro-cont)
(or (not c-syntactic-indentation-in-macros)
(save-excursion
(goto-char macro-start)
@@ -319,13 +319,13 @@ This function does not do any hidden buffer changes."
;; or anywhere in a non-#define directive.
(if (c-forward-to-cpp-define-body)
(let ((indent-boi (c-point 'boi indent-point)))
- (setq in-macro-expr (> (point) indent-boi)
+ (set in-macro-expr (> (point) indent-boi)
tmpsymbol 'cpp-define-intro)
(= (point) indent-boi))
- (setq in-macro-expr t)
+ (set in-macro-expr t)
nil)))))
(c-add-syntax tmpsymbol macro-start)
- (setq macro-start nil))
+ (set macro-start nil))
;; CASE 11: an else clause?
((looking-at "else\\>[^_]")
(c-beginning-of-statement-1 containing-sexp)
@@ -336,7 +336,7 @@ This function does not do any hidden buffer changes."
(save-excursion
(prog1 (eq (c-beginning-of-statement-1 containing-sexp)
'beginning)
- (setq placeholder (point)))))
+ (set placeholder (point)))))
(goto-char placeholder)
(c-add-stmt-syntax 'do-while-closure nil t nil
containing-sexp paren-state))
@@ -359,7 +359,7 @@ This function does not do any hidden buffer changes."
(c-safe (c-backward-sexp) t)
t))
(looking-at "\\(try\\|catch\\)\\>[^_]")
- (setq placeholder (point))))
+ (set placeholder (point))))
(goto-char placeholder)
(c-add-stmt-syntax 'catch-clause nil t nil
containing-sexp paren-state))
@@ -376,24 +376,24 @@ This function does not do any hidden buffer changes."
(progn
;; Ought to cache the result from the
;; c-beginning-of-statement-1 calls here.
- (setq placeholder (point))
- (while (eq (setq step-type
+ (set placeholder (point))
+ (while (eq (set step-type
(c-beginning-of-statement-1 lim))
'label))
(if (eq step-type 'previous)
(goto-char placeholder)
- (setq placeholder (point))
+ (set placeholder (point))
(if (and (eq step-type 'same)
(not (looking-at c-opt-block-stmt-key)))
;; Step up to the containing statement if we
;; stayed in the same one.
(let (step)
(while (eq
- (setq step
+ (set step
(c-beginning-of-statement-1 lim))
'label))
(if (eq step 'up)
- (setq placeholder (point))
+ (set placeholder (point))
;; There was no containing statement afterall.
(goto-char placeholder)))))
placeholder))
@@ -434,19 +434,19 @@ This function does not do any hidden buffer changes."
((and (or c-opt-inexpr-class-key
c-opt-inexpr-block-key
c-opt-lambda-key)
- (setq placeholder (c-looking-at-inexpr-block
+ (set placeholder (c-looking-at-inexpr-block
(c-safe-position containing-sexp paren-state)
containing-sexp)))
- (setq tmpsymbol (assq (car placeholder)
+ (set tmpsymbol (assq (car placeholder)
'((inexpr-class . class-open)
(inexpr-statement . block-open))))
(if tmpsymbol
;; 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
;; lambda keyword and the argument list or at the defun
;; opener.
- (setq tmpsymbol (if (eq char-after-ip ?{)
+ (set tmpsymbol (if (eq char-after-ip ?{)
'inline-open
'lambda-intro-cont)))
(goto-char (cdr placeholder))
@@ -461,7 +461,7 @@ This function does not do any hidden buffer changes."
(cond
;; CASE 5A: we are looking at a defun, brace list, class,
;; or inline-inclass method opening brace
- ((setq special-brace-list
+ ((set special-brace-list
(or (and c-special-brace-lists
(c-looking-at-special-brace-list))
(eq char-after-ip ?{)))
@@ -472,7 +472,7 @@ This function does not do any hidden buffer changes."
(skip-chars-forward " \t")
(and (c-safe (c-backward-sexp 2) t)
(looking-at c-other-decl-block-key)
- (setq keyword (match-string 1)
+ (set keyword (match-string 1)
placeholder (point))
(if (string-equal keyword "extern")
;; Special case for extern-lang-open. The
@@ -482,8 +482,8 @@ This function does not do any hidden buffer changes."
;; (c-forward-sexp 1)
;; (c-forward-syntactic-ws)
;; (eq (char-after) ?\"))
- (setq tmpsymbol 'extern-lang-open))
- (setq tmpsymbol (intern (concat keyword "-open"))))
+ (set tmpsymbol 'extern-lang-open))
+ (set tmpsymbol (intern (concat keyword "-open"))))
))
(goto-char placeholder)
(c-add-syntax tmpsymbol (c-point 'boi)))
@@ -493,7 +493,7 @@ This function does not do any hidden buffer changes."
(skip-chars-forward " \t{")
(let ((decl (c-search-uplist-for-classkey (c-parse-state))))
(and decl
- (setq placeholder (aref decl 0)))
+ (set placeholder (aref decl 0)))
))
(c-add-syntax 'class-open placeholder))
;; CASE 5A.3: brace list open
@@ -502,18 +502,18 @@ This function does not do any hidden buffer changes."
(while (looking-at c-specifier-key)
(goto-char (match-end 1))
(c-forward-syntactic-ws indent-point))
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(or (consp special-brace-list)
(and (or (save-excursion
(goto-char indent-point)
- (setq tmpsymbol nil)
+ (set tmpsymbol nil)
(while (and (> (point) placeholder)
(zerop (c-backward-token-2 1 t))
(/= (char-after) ?=))
(and c-opt-inexpr-brace-list-key
(not tmpsymbol)
(looking-at c-opt-inexpr-brace-list-key)
- (setq tmpsymbol 'topmost-intro-cont)))
+ (set tmpsymbol 'topmost-intro-cont)))
(eq (char-after) ?=))
(looking-at c-brace-list-key))
(save-excursion
@@ -568,12 +568,12 @@ This function does not do any hidden buffer changes."
(c-backward-syntactic-ws lim)))
(if (eq (char-before) ?\))
(c-backward-sexp 1))
- (setq placeholder (point))
+ (set placeholder (point))
(save-excursion
(and (c-safe (c-backward-sexp 1) t)
(looking-at "throw[^_]")
(c-safe (c-backward-sexp 1) t)
- (setq placeholder (point))))
+ (set placeholder (point))))
(goto-char placeholder)
(c-add-syntax 'member-init-intro (c-point 'boi))
;; we don't need to add any class offset since this
@@ -627,13 +627,13 @@ This function does not do any hidden buffer changes."
(save-excursion
(while (not done)
(cond ((looking-at c-opt-postfix-decl-spec-key)
- (setq injava-inher (cons cont (point))
+ (set injava-inher (cons cont (point))
done t))
((or (not (c-safe (c-forward-sexp -1) t))
(<= (point) fence))
- (setq done t))
+ (set done t))
)
- (setq cont t)))
+ (set cont t)))
injava-inher)
(not (c-crosses-statement-barrier-p (cdr injava-inher)
(point)))
@@ -697,14 +697,14 @@ This function does not do any hidden buffer changes."
(zerop (c-backward-token-2 1 nil lim))
(eq (char-after) ?<)))))
(goto-char indent-point)
- (setq placeholder
+ (set placeholder
(c-beginning-of-member-init-list lim))
(cond
;; CASE 5D.1: hanging member init colon, but watch out
;; for bogus matches on access specifiers inside classes.
((and placeholder
(save-excursion
- (setq placeholder (point))
+ (set placeholder (point))
(c-backward-token-2 1 t lim)
(and (eq (char-after) ?:)
(not (eq (char-before) ?:))))
@@ -740,7 +740,7 @@ This function does not do any hidden buffer changes."
(save-restriction
(c-with-syntax-table c++-template-syntax-table
(goto-char indent-point)
- (setq placeholder (c-up-list-backward (point)))
+ (set placeholder (c-up-list-backward (point)))
(and placeholder
(eq (char-after placeholder) ?<))))))
;; we can probably indent it just like an arglist-cont
@@ -751,7 +751,7 @@ This function does not do any hidden buffer changes."
((and (c-major-mode-is 'c++-mode)
(save-excursion
(c-beginning-of-statement-1 lim)
- (setq placeholder (point))
+ (set placeholder (point))
(if (looking-at "static\\>[^_]")
(c-forward-token-2 1 nil indent-point))
(and (looking-at c-class-key)
@@ -785,7 +785,7 @@ This function does not do any hidden buffer changes."
((and inclass-p
c-opt-access-key
(looking-at c-opt-access-key))
- (setq placeholder (c-add-class-syntax 'inclass inclass-p
+ (set placeholder (c-add-class-syntax 'inclass inclass-p
paren-state))
;; Append access-label with the same anchor point as inclass gets.
(c-append-syntax 'access-label placeholder))
@@ -810,7 +810,7 @@ This function does not do any hidden buffer changes."
((and c-recognize-knr-p
(not (eq char-before-ip ?}))
(save-excursion
- (setq placeholder (cdr (c-beginning-of-decl-1 lim)))
+ (set placeholder (cdr (c-beginning-of-decl-1 lim)))
(and placeholder
;; Do an extra check to avoid tripping up on
;; statements that occur in invalid contexts
@@ -829,7 +829,7 @@ This function does not do any hidden buffer changes."
;; CASE 5P: AWK pattern or function or continuation
;; thereof.
((c-mode-is-new-awk-p)
- (setq placeholder (point))
+ (set placeholder (point))
(c-add-stmt-syntax
(if (and (eq (c-beginning-of-statement-1) 'same)
(/= (point) placeholder))
@@ -849,7 +849,7 @@ This function does not do any hidden buffer changes."
;; Speed up the backward search a bit.
(goto-char (car (car paren-state))))
(c-beginning-of-decl-1 containing-sexp)
- (setq placeholder (point))
+ (set placeholder (point))
(if (= start (point))
;; The '}' is unbalanced.
nil
@@ -900,7 +900,7 @@ This function does not do any hidden buffer changes."
macro-start
(/= macro-start (c-point 'boi indent-point)))
(c-add-syntax 'cpp-define-intro)
- (setq macro-start nil))
+ (set macro-start nil))
))
;; CASE 5K: we are at an ObjC method definition
;; continuation line.
@@ -934,7 +934,7 @@ This function does not do any hidden buffer changes."
;; C.f. case 7F.
((memq char-after-ip '(?\) ?\]))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(if (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(progn
@@ -949,11 +949,11 @@ This function does not do any hidden buffer changes."
;; and 17E.
((and (eq char-after-ip ?{)
(progn
- (setq placeholder (c-inside-bracelist-p (point)
+ (set placeholder (c-inside-bracelist-p (point)
c-state-cache))
(if placeholder
- (setq tmpsymbol '(brace-list-open . inexpr-class))
- (setq tmpsymbol '(block-open . inexpr-statement)
+ (set tmpsymbol '(brace-list-open . inexpr-class))
+ (set tmpsymbol '(block-open . inexpr-statement)
placeholder
(cdr-safe (c-looking-at-inexpr-block
(c-safe-position containing-sexp
@@ -975,12 +975,12 @@ This function does not do any hidden buffer changes."
;; looking at a close paren or bracket.
((memq char-before-ip '(?\( ?\[))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(forward-char)
(skip-chars-forward " \t")
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-add-syntax 'arglist-intro placeholder))
;; CASE 7D: we are inside a conditional test clause. treat
;; these things as statements
@@ -1016,7 +1016,7 @@ This function does not do any hidden buffer changes."
(and (not (eolp))
(not (looking-at "\\\\$"))))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(if (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(progn
@@ -1055,7 +1055,7 @@ This function does not do any hidden buffer changes."
)))
;; CASE 9: we are inside a brace-list
((and (not (c-mode-is-new-awk-p)) ; Maybe this isn't needed (ACM, 2002/3/29)
- (setq special-brace-list
+ (set special-brace-list
(or (and c-special-brace-lists
(save-excursion
(goto-char containing-sexp)
@@ -1072,8 +1072,8 @@ This function does not do any hidden buffer changes."
(skip-chars-backward " \t")
(if (and (bolp)
(assoc 'statement-cont
- (setq placeholder (c-guess-basic-syntax))))
- (setq c-syntactic-context placeholder)
+ (set placeholder (c-guess-basic-syntax))))
+ (set c-syntactic-context placeholder)
(c-beginning-of-statement-1
(c-safe-position (1- containing-sexp) paren-state))
(c-forward-token-2 0)
@@ -1103,7 +1103,7 @@ This function does not do any hidden buffer changes."
(= (point) containing-sexp)))
(if (eq (point) (c-point 'boi))
(c-add-syntax 'brace-list-close (point))
- (setq lim (c-most-enclosing-brace c-state-cache (point)))
+ (set lim (c-most-enclosing-brace c-state-cache (point)))
(c-beginning-of-statement-1 lim)
(c-add-stmt-syntax 'brace-list-close nil t t lim
(c-whack-state-after (point) paren-state))))
@@ -1128,7 +1128,7 @@ This function does not do any hidden buffer changes."
(goto-char containing-sexp))
(if (eq (point) (c-point 'boi))
(c-add-syntax 'brace-list-intro (point))
- (setq lim (c-most-enclosing-brace c-state-cache (point)))
+ (set lim (c-most-enclosing-brace c-state-cache (point)))
(c-beginning-of-statement-1 lim)
(c-add-stmt-syntax 'brace-list-intro nil t t lim
(c-whack-state-after (point) paren-state))))
@@ -1153,7 +1153,7 @@ This function does not do any hidden buffer changes."
(> (point)
(save-excursion
(c-beginning-of-statement-1 containing-sexp)
- (setq placeholder (point))))
+ (set placeholder (point))))
(/= placeholder containing-sexp))
;; This is shared with case 18.
(c-guess-continued-construct indent-point
@@ -1164,16 +1164,16 @@ This function does not do any hidden buffer changes."
;; CASE 14: A case or default label
((looking-at c-label-kwds-regexp)
(goto-char containing-sexp)
- (setq lim (c-most-enclosing-brace c-state-cache containing-sexp))
+ (set lim (c-most-enclosing-brace c-state-cache containing-sexp))
(c-backward-to-block-anchor lim)
(c-add-stmt-syntax 'case-label nil t nil
lim paren-state))
;; CASE 15: any other label
((looking-at c-label-key)
(goto-char containing-sexp)
- (setq lim (c-most-enclosing-brace c-state-cache containing-sexp))
+ (set lim (c-most-enclosing-brace c-state-cache containing-sexp))
(save-excursion
- (setq tmpsymbol
+ (set tmpsymbol
(if (and (eq (c-beginning-of-statement-1 lim) 'up)
(looking-at "switch\\>[^_]"))
;; If the surrounding statement is a switch then
@@ -1188,7 +1188,7 @@ This function does not do any hidden buffer changes."
;; the class
((eq char-after-ip ?})
;; From here on we have the next containing sexp in lim.
- (setq lim (c-most-enclosing-brace paren-state))
+ (set lim (c-most-enclosing-brace paren-state))
(goto-char containing-sexp)
(cond
;; CASE 16E: Closing a statement block? This catches
@@ -1201,10 +1201,10 @@ This function does not do any hidden buffer changes."
lim paren-state))
;; CASE 16A: closing a lambda defun or an in-expression
;; block? C.f. cases 4, 7B and 17E.
- ((setq placeholder (c-looking-at-inexpr-block
+ ((set placeholder (c-looking-at-inexpr-block
(c-safe-position containing-sexp paren-state)
nil))
- (setq tmpsymbol (if (eq (car placeholder) 'inlambda)
+ (set tmpsymbol (if (eq (car placeholder) 'inlambda)
'inline-close
'block-close))
(goto-char containing-sexp)
@@ -1220,7 +1220,7 @@ This function does not do any hidden buffer changes."
(c-add-syntax (car placeholder)))))
;; CASE 16B: does this close an inline or a function in
;; a non-class declaration level block?
- ((setq placeholder (c-search-uplist-for-classkey paren-state))
+ ((set placeholder (c-search-uplist-for-classkey paren-state))
(c-backward-to-decl-anchor lim)
(back-to-indentation)
(if (save-excursion
@@ -1239,7 +1239,7 @@ This function does not do any hidden buffer changes."
(save-excursion
(and (not (c-looking-at-bos))
(eq (c-beginning-of-statement-1 lim nil nil t) 'same)
- (setq placeholder (point)))))
+ (set placeholder (point)))))
(back-to-indentation)
(if (/= (point) containing-sexp)
(goto-char placeholder))
@@ -1255,7 +1255,7 @@ This function does not do any hidden buffer changes."
;; really fixes it better, but we do like this to keep
;; the indentation compatible with version 5.28 and
;; earlier.
- (while (and (/= (setq placeholder (point)) (c-point 'boi))
+ (while (and (/= (set placeholder (point)) (c-point 'boi))
(eq (c-beginning-of-statement-1 lim) 'label)))
(goto-char placeholder)
(if (looking-at c-label-kwds-regexp)
@@ -1287,9 +1287,9 @@ This function does not do any hidden buffer changes."
containing-sexp)))
(if (= (point) prev-point)
(progn
- (setq step-type (or step-type last-step-type))
+ (set step-type (or step-type last-step-type))
nil)
- (setq step-type last-step-type)
+ (set step-type last-step-type)
(/= (point) (c-point 'boi)))))
(cond
;; CASE 17B: continued statement
@@ -1301,7 +1301,7 @@ This function does not do any hidden buffer changes."
((progn
(while (and (eq step-type 'label)
(not (looking-at c-label-kwds-regexp)))
- (setq step-type
+ (set step-type
(c-beginning-of-statement-1 containing-sexp)))
(eq step-type 'label))
(c-add-stmt-syntax (if (eq char-after-ip ?{)
@@ -1311,7 +1311,7 @@ This function does not do any hidden buffer changes."
;; CASE 17D: any old statement
((progn
(while (eq step-type 'label)
- (setq step-type
+ (set step-type
(c-beginning-of-statement-1 containing-sexp)))
(eq step-type 'previous))
(c-add-stmt-syntax 'statement nil t nil
@@ -1323,7 +1323,7 @@ This function does not do any hidden buffer changes."
;; The following tests are all based on containing-sexp.
(goto-char containing-sexp)
;; From here on we have the next containing sexp in lim.
- (setq lim (c-most-enclosing-brace paren-state containing-sexp))
+ (set lim (c-most-enclosing-brace paren-state containing-sexp))
(c-after-conditional))
(c-backward-to-block-anchor lim)
(c-add-stmt-syntax 'statement-block-intro nil t nil
@@ -1332,10 +1332,10 @@ This function does not do any hidden buffer changes."
(c-add-syntax 'block-open)))
;; CASE 17E: first statement in an in-expression block.
;; C.f. cases 4, 7B and 16A.
- ((setq placeholder (c-looking-at-inexpr-block
+ ((set placeholder (c-looking-at-inexpr-block
(c-safe-position containing-sexp paren-state)
nil))
- (setq tmpsymbol (if (eq (car placeholder) 'inlambda)
+ (set tmpsymbol (if (eq (car placeholder) 'inlambda)
'defun-block-intro
'statement-block-intro))
(back-to-indentation)
@@ -1370,7 +1370,7 @@ This function does not do any hidden buffer changes."
((save-excursion
(and (not (c-looking-at-bos))
(eq (c-beginning-of-statement-1 lim nil nil t) 'same)
- (setq placeholder (point))))
+ (set placeholder (point))))
(back-to-indentation)
(if (/= (point) containing-sexp)
(goto-char placeholder))
@@ -1383,7 +1383,7 @@ This function does not do any hidden buffer changes."
;; boi. The default handling in c-add-stmt-syntax is
;; really fixes it better, but we do like this to keep the
;; indentation compatible with version 5.28 and earlier.
- (while (and (/= (setq placeholder (point)) (c-point 'boi))
+ (while (and (/= (set placeholder (point)) (c-point 'boi))
(eq (c-beginning-of-statement-1 lim) 'label)))
(goto-char placeholder)
(if (looking-at c-label-kwds-regexp)
@@ -1414,10 +1414,10 @@ This function does not do any hidden buffer changes."
(while (and p
(if (integerp (car-safe (cdr-safe (car p))))
(progn
- (setq syntactic-relpos (car (cdr (car p))))
+ (set syntactic-relpos (car (cdr (car p))))
nil)
t))
- (setq p (cdr p))))
+ (set p (cdr p))))
;; Start of or a continuation of a preprocessor directive?
(if (and macro-start
@@ -1440,7 +1440,7 @@ This function does not do any hidden buffer changes."
;; in the expression. That means the arglist
;; elements, if they are anchored inside the cpp
;; expression.
- (setq c-syntactic-context nil)
+ (set c-syntactic-context nil)
(c-add-syntax 'cpp-macro-cont macro-start))
(when (and (eq macro-start syntactic-relpos)
(not (assq 'cpp-define-intro c-syntactic-context))
@@ -1497,9 +1497,9 @@ This function does not do any hidden buffer changes."
(let ((enclosing (match-string 1)))
(cond
((string-equal enclosing "extern")
- (setq inenclosing-p 'extern))
+ (set inenclosing-p 'extern))
((string-equal enclosing "namespace")
- (setq inenclosing-p 'namespace))
+ (set inenclosing-p 'namespace))
)))))
;; Init some position variables:
@@ -1523,22 +1523,22 @@ This function does not do any hidden buffer changes."
;; opposed to c-state-cache.
(if c-state-cache
(progn
- (setq containing-sexp (car paren-state)
+ (set containing-sexp (car paren-state)
paren-state (cdr paren-state))
(if (consp containing-sexp)
(progn
- (setq lim (cdr containing-sexp))
+ (set lim (cdr containing-sexp))
(if (cdr c-state-cache)
;; Ignore balanced paren. The next entry
;; can't be another one.
- (setq containing-sexp (car (cdr c-state-cache))
+ (set containing-sexp (car (cdr c-state-cache))
paren-state (cdr paren-state))
;; If there is no surrounding open paren then
;; put the last balanced pair back on paren-state.
- (setq paren-state (cons containing-sexp paren-state)
+ (set paren-state (cons containing-sexp paren-state)
containing-sexp nil)))
- (setq lim (1+ containing-sexp))))
- (setq lim (point-min)))
+ (set lim (1+ containing-sexp))))
+ (set lim (point-min)))
;; If we're in a parenthesis list then ',' delimits the
;; "statements" rather than being an operator (with the
@@ -1547,19 +1547,19 @@ This function does not do any hidden buffer changes."
;; arglists.
(when (and containing-sexp
(eq (char-after containing-sexp) ?\())
- (setq c-stmt-delim-chars c-stmt-delim-chars-with-comma))
+ (set c-stmt-delim-chars c-stmt-delim-chars-with-comma))
;; cache char before and after indent point, and move point to
;; the most likely position to perform the majority of tests
(goto-char indent-point)
(c-backward-syntactic-ws lim)
- (setq char-before-ip (char-before))
+ (set char-before-ip (char-before))
(goto-char indent-point)
(skip-chars-forward " \t")
- (setq char-after-ip (char-after))
+ (set char-after-ip (char-after))
;; 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
(cond
@@ -1572,10 +1572,10 @@ This function does not do any hidden buffer changes."
;; CASE 3: in a cpp preprocessor macro continuation.
((and (save-excursion
(when (c-beginning-of-macro)
- (setq macro-start (point))))
+ (set macro-start (point))))
(/= macro-start (c-point 'boi))
(progn
- (setq tmpsymbol 'cpp-macro-cont)
+ (set tmpsymbol 'cpp-macro-cont)
(or (not c-syntactic-indentation-in-macros)
(save-excursion
(goto-char macro-start)
@@ -1587,13 +1587,13 @@ This function does not do any hidden buffer changes."
;; or anywhere in a non-#define directive.
(if (c-forward-to-cpp-define-body)
(let ((indent-boi (c-point 'boi indent-point)))
- (setq in-macro-expr (> (point) indent-boi)
+ (set in-macro-expr (> (point) indent-boi)
tmpsymbol 'cpp-define-intro)
(= (point) indent-boi))
- (setq in-macro-expr t)
+ (set in-macro-expr t)
nil)))))
(c-add-syntax tmpsymbol macro-start)
- (setq macro-start nil))
+ (set macro-start nil))
;; CASE 11: an else clause?
((looking-at "else\\>[^_]")
(c-beginning-of-statement-1 containing-sexp)
@@ -1603,7 +1603,7 @@ This function does not do any hidden buffer changes."
(save-excursion
(prog1 (eq (c-beginning-of-statement-1 containing-sexp)
'beginning)
- (setq placeholder (point)))))
+ (set placeholder (point)))))
(goto-char placeholder)
(c-add-stmt-syntax 'do-while-closure t containing-sexp paren-state))
;; CASE 13: A catch or finally clause? This case is simpler
@@ -1625,7 +1625,7 @@ This function does not do any hidden buffer changes."
(c-safe (c-backward-sexp) t)
t))
(looking-at "\\(try\\|catch\\)\\>[^_]")
- (setq placeholder (point))))
+ (set placeholder (point))))
(goto-char placeholder)
(c-add-stmt-syntax 'catch-clause t containing-sexp paren-state))
;; CASE 18: A substatement we can recognize by keyword.
@@ -1639,24 +1639,24 @@ This function does not do any hidden buffer changes."
(progn
;; Ought to cache the result from the
;; c-beginning-of-statement-1 calls here.
- (setq placeholder (point))
- (while (eq (setq step-type
+ (set placeholder (point))
+ (while (eq (set step-type
(c-beginning-of-statement-1 lim))
'label))
(if (eq step-type 'previous)
(goto-char placeholder)
- (setq placeholder (point))
+ (set placeholder (point))
(if (and (eq step-type 'same)
(not (looking-at c-opt-block-stmt-key)))
;; Step up to the containing statement if we
;; stayed in the same one.
(let (step)
(while (eq
- (setq step
+ (set step
(c-beginning-of-statement-1 lim))
'label))
(if (eq step 'up)
- (setq placeholder (point))
+ (set placeholder (point))
;; There was no containing statement afterall.
(goto-char placeholder)))))
placeholder))
@@ -1697,19 +1697,19 @@ This function does not do any hidden buffer changes."
((and (or c-opt-inexpr-class-key
c-opt-inexpr-block-key
c-opt-lambda-key)
- (setq placeholder (c-looking-at-inexpr-block
+ (set placeholder (c-looking-at-inexpr-block
(c-safe-position containing-sexp paren-state)
containing-sexp)))
- (setq tmpsymbol (assq (car placeholder)
+ (set tmpsymbol (assq (car placeholder)
'((inexpr-class . class-open)
(inexpr-statement . block-open))))
(if tmpsymbol
;; 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
;; lambda keyword and the argument list or at the defun
;; opener.
- (setq tmpsymbol (if (eq char-after-ip ?{)
+ (set tmpsymbol (if (eq char-after-ip ?{)
'inline-open
'lambda-intro-cont)))
(goto-char (cdr placeholder))
@@ -1724,7 +1724,7 @@ This function does not do any hidden buffer changes."
(cond
;; CASE 5A: we are looking at a defun, brace list, class,
;; or inline-inclass method opening brace
- ((setq special-brace-list
+ ((set special-brace-list
(or (and c-special-brace-lists
(c-looking-at-special-brace-list))
(eq char-after-ip ?{)))
@@ -1735,16 +1735,16 @@ This function does not do any hidden buffer changes."
(skip-chars-forward " \t")
(and (c-safe (progn (c-backward-sexp 2) t))
(looking-at c-other-decl-block-key)
- (setq keyword (match-string 1)
+ (set keyword (match-string 1)
placeholder (point))
(or (and (string-equal keyword "namespace")
- (setq tmpsymbol 'namespace-open))
+ (set tmpsymbol 'namespace-open))
(and (string-equal keyword "extern")
(progn
(c-forward-sexp 1)
(c-forward-syntactic-ws)
(eq (char-after) ?\"))
- (setq tmpsymbol 'extern-lang-open)))
+ (set tmpsymbol 'extern-lang-open)))
))
(goto-char placeholder)
(c-add-syntax tmpsymbol (c-point 'boi)))
@@ -1754,7 +1754,7 @@ This function does not do any hidden buffer changes."
(skip-chars-forward " \t{")
(let ((decl (c-search-uplist-for-classkey (c-parse-state))))
(and decl
- (setq placeholder (aref decl 0)))
+ (set placeholder (aref decl 0)))
))
(c-add-syntax 'class-open placeholder))
;; CASE 5A.3: brace list open
@@ -1763,17 +1763,17 @@ This function does not do any hidden buffer changes."
(if (looking-at "typedef\\>[^_]")
(progn (c-forward-sexp 1)
(c-forward-syntactic-ws indent-point)))
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(or (consp special-brace-list)
(and (or (save-excursion
(goto-char indent-point)
- (setq tmpsymbol nil)
+ (set tmpsymbol nil)
(while (and (> (point) placeholder)
(= (c-backward-token-1 1 t) 0)
(/= (char-after) ?=))
(if (and (not tmpsymbol)
(looking-at "new\\>[^_]"))
- (setq tmpsymbol 'topmost-intro-cont)))
+ (set tmpsymbol 'topmost-intro-cont)))
(eq (char-after) ?=))
(looking-at "enum\\>[^_]"))
(save-excursion
@@ -1827,12 +1827,12 @@ This function does not do any hidden buffer changes."
(c-backward-syntactic-ws lim)))
(if (eq (char-before) ?\))
(c-backward-sexp 1))
- (setq placeholder (point))
+ (set placeholder (point))
(save-excursion
(and (c-safe (c-backward-sexp 1) t)
(looking-at "throw[^_]")
(c-safe (c-backward-sexp 1) t)
- (setq placeholder (point))))
+ (set placeholder (point))))
(goto-char placeholder)
(c-add-syntax 'member-init-intro (c-point 'boi))
;; we don't need to add any class offset since this
@@ -1886,13 +1886,13 @@ This function does not do any hidden buffer changes."
(save-excursion
(while (not done)
(cond ((looking-at c-opt-decl-spec-key)
- (setq injava-inher (cons cont (point))
+ (set injava-inher (cons cont (point))
done t))
((or (not (c-safe (c-forward-sexp -1) t))
(<= (point) fence))
- (setq done t))
+ (set done t))
)
- (setq cont t)))
+ (set cont t)))
injava-inher)
(not (c-crosses-statement-barrier-p (cdr injava-inher)
(point)))
@@ -1916,7 +1916,7 @@ This function does not do any hidden buffer changes."
c-access-key
(looking-at c-access-key))
(c-add-syntax 'access-label (c-point 'bonl))
- (setq placeholder (c-add-class-syntax 'inclass inclass-p
+ (set placeholder (c-add-class-syntax 'inclass inclass-p
paren-state)))
;;(nconc syntax (list (cons 'access-label placeholder))))
;; KDE Hack End.
@@ -1963,7 +1963,7 @@ This function does not do any hidden buffer changes."
;; CASE 5D.1: hanging member init colon, but watch out
;; for bogus matches on access specifiers inside classes.
((and (save-excursion
- (setq placeholder (point))
+ (set placeholder (point))
(c-backward-token-1 1 t lim)
(and (eq (char-after) ?:)
(not (eq (char-before) ?:))))
@@ -1999,7 +1999,7 @@ This function does not do any hidden buffer changes."
(save-restriction
(c-with-syntax-table c++-template-syntax-table
(goto-char indent-point)
- (setq placeholder (c-up-list-backward (point)))
+ (set placeholder (c-up-list-backward (point)))
(and placeholder
(eq (char-after placeholder) ?<))))))
;; we can probably indent it just like an arglist-cont
@@ -2010,7 +2010,7 @@ This function does not do any hidden buffer changes."
((and (c-major-mode-is 'c++-mode)
(save-excursion
(c-beginning-of-statement-1 lim)
- (setq placeholder (point))
+ (set placeholder (point))
(if (looking-at "static\\>[^_]")
(c-forward-token-1 1 nil indent-point))
(and (looking-at c-class-key)
@@ -2044,14 +2044,14 @@ This function does not do any hidden buffer changes."
((and inclass-p
c-opt-access-key
(looking-at c-opt-access-key))
- (setq placeholder (c-add-class-syntax 'inclass inclass-p
+ (set placeholder (c-add-class-syntax 'inclass inclass-p
paren-state))
;; Append access-label with the same anchor point as inclass gets.
(nconc syntax (list (cons 'access-label placeholder))))
;; CASE 5F: extern-lang-close or namespace-close?
((and inenclosing-p
(eq char-after-ip ?}))
- (setq tmpsymbol (if (eq inenclosing-p 'extern)
+ (set tmpsymbol (if (eq inenclosing-p 'extern)
'extern-lang-close
'namespace-close))
(c-add-syntax tmpsymbol (aref inclass-p 0)))
@@ -2071,7 +2071,7 @@ This function does not do any hidden buffer changes."
((and c-recognize-knr-p
(not (eq char-before-ip ?}))
(save-excursion
- (setq placeholder (cdr (c-beginning-of-decl-1 lim)))
+ (set placeholder (cdr (c-beginning-of-decl-1 lim)))
(and placeholder
;; Do an extra check to avoid tripping up on
;; statements that occur in invalid contexts
@@ -2099,7 +2099,7 @@ This function does not do any hidden buffer changes."
;; Speed up the backward search a bit.
(goto-char (car (car paren-state))))
(c-beginning-of-decl-1 containing-sexp)
- (setq placeholder (point))
+ (set placeholder (point))
(if (= start (point))
;; The '}' is unbalanced.
nil
@@ -2150,7 +2150,7 @@ This function does not do any hidden buffer changes."
macro-start
(/= macro-start (c-point 'boi indent-point)))
(c-add-syntax 'cpp-define-intro)
- (setq macro-start nil))
+ (set macro-start nil))
))
;; CASE 5K: we are at an ObjC method definition
;; continuation line.
@@ -2193,23 +2193,23 @@ This function does not do any hidden buffer changes."
;; CASE 7A: we are looking at the arglist closing paren
((memq char-after-ip '(?\) ?\]))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(forward-char)
(skip-chars-forward " \t")
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-add-syntax 'arglist-close placeholder))
;; CASE 7B: Looking at the opening brace of an
;; in-expression block or brace list. C.f. cases 4, 16A
;; and 17E.
((and (eq char-after-ip ?{)
(progn
- (setq placeholder (c-inside-bracelist-p (point)
+ (set placeholder (c-inside-bracelist-p (point)
c-state-cache))
(if placeholder
- (setq tmpsymbol '(brace-list-open . inexpr-class))
- (setq tmpsymbol '(block-open . inexpr-statement)
+ (set tmpsymbol '(brace-list-open . inexpr-class))
+ (set tmpsymbol '(block-open . inexpr-statement)
placeholder
(cdr-safe (c-looking-at-inexpr-block
(c-safe-position containing-sexp
@@ -2231,12 +2231,12 @@ This function does not do any hidden buffer changes."
;; looking at a close paren or bracket.
((memq char-before-ip '(?\( ?\[))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(forward-char)
(skip-chars-forward " \t")
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-add-syntax 'arglist-intro placeholder))
;; CASE 7D: we are inside a conditional test clause. treat
;; these things as statements
@@ -2272,12 +2272,12 @@ This function does not do any hidden buffer changes."
(and (not (eolp))
(not (looking-at "\\\\$"))))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(forward-char)
(skip-chars-forward " \t")
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-add-syntax 'arglist-cont-nonempty placeholder))
;; CASE 7G: we are looking at just a normal arglist
;; continuation line
@@ -2306,7 +2306,7 @@ This function does not do any hidden buffer changes."
(c-add-syntax 'inher-cont (point))
)))
;; CASE 9: we are inside a brace-list
- ((setq special-brace-list
+ ((set special-brace-list
(or (and c-special-brace-lists
(save-excursion
(goto-char containing-sexp)
@@ -2323,8 +2323,8 @@ This function does not do any hidden buffer changes."
(skip-chars-backward " \t")
(if (and (bolp)
(assoc 'statement-cont
- (setq placeholder (c-guess-basic-syntax))))
- (setq syntax placeholder)
+ (set placeholder (c-guess-basic-syntax))))
+ (set syntax placeholder)
(c-beginning-of-statement-1
(c-safe-position (1- containing-sexp) paren-state))
(c-forward-token-1 0)
@@ -2353,7 +2353,7 @@ This function does not do any hidden buffer changes."
(= (point) containing-sexp)))
(if (eq (point) (c-point 'boi))
(c-add-syntax 'brace-list-close (point))
- (setq lim (c-most-enclosing-brace c-state-cache (point)))
+ (set lim (c-most-enclosing-brace c-state-cache (point)))
(c-beginning-of-statement-1 lim)
(c-add-stmt-syntax 'brace-list-close t lim
(c-whack-state-after (point) paren-state)
@@ -2379,7 +2379,7 @@ This function does not do any hidden buffer changes."
(goto-char containing-sexp))
(if (eq (point) (c-point 'boi))
(c-add-syntax 'brace-list-intro (point))
- (setq lim (c-most-enclosing-brace c-state-cache (point)))
+ (set lim (c-most-enclosing-brace c-state-cache (point)))
(c-beginning-of-statement-1 lim)
(c-add-stmt-syntax 'brace-list-intro t lim
(c-whack-state-after (point) paren-state)
@@ -2403,7 +2403,7 @@ This function does not do any hidden buffer changes."
(> (point)
(save-excursion
(c-beginning-of-statement-1 containing-sexp)
- (setq placeholder (point))))
+ (set placeholder (point))))
(/= placeholder containing-sexp))
;; This is shared with case 18.
(c-guess-continued-construct indent-point
@@ -2414,15 +2414,15 @@ This function does not do any hidden buffer changes."
;; CASE 14: A case or default label
((looking-at c-label-kwds-regexp)
(goto-char containing-sexp)
- (setq lim (c-most-enclosing-brace c-state-cache containing-sexp))
+ (set lim (c-most-enclosing-brace c-state-cache containing-sexp))
(c-backward-to-block-anchor lim)
(c-add-stmt-syntax 'case-label t lim paren-state))
;; CASE 15: any other label
((looking-at c-label-key)
(goto-char containing-sexp)
- (setq lim (c-most-enclosing-brace c-state-cache containing-sexp))
+ (set lim (c-most-enclosing-brace c-state-cache containing-sexp))
(save-excursion
- (setq tmpsymbol
+ (set tmpsymbol
(if (and (eq (c-beginning-of-statement-1 lim) 'up)
(looking-at "switch\\>[^_]"))
;; If the surrounding statement is a switch then
@@ -2436,7 +2436,7 @@ This function does not do any hidden buffer changes."
;; the class
((eq char-after-ip ?})
;; From here on we have the next containing sexp in lim.
- (setq lim (c-most-enclosing-brace paren-state))
+ (set lim (c-most-enclosing-brace paren-state))
(goto-char containing-sexp)
(cond
;; CASE 16E: Closing a statement block? This catches
@@ -2448,10 +2448,10 @@ This function does not do any hidden buffer changes."
(c-add-stmt-syntax 'block-close t lim paren-state))
;; CASE 16A: closing a lambda defun or an in-expression
;; block? C.f. cases 4, 7B and 17E.
- ((setq placeholder (c-looking-at-inexpr-block
+ ((set placeholder (c-looking-at-inexpr-block
(c-safe-position containing-sexp paren-state)
nil))
- (setq tmpsymbol (if (eq (car placeholder) 'inlambda)
+ (set tmpsymbol (if (eq (car placeholder) 'inlambda)
'inline-close
'block-close))
(goto-char containing-sexp)
@@ -2467,7 +2467,7 @@ This function does not do any hidden buffer changes."
(c-add-syntax (car placeholder)))))
;; CASE 16B: does this close an inline or a function in
;; an extern block or namespace?
- ((setq placeholder (c-search-uplist-for-classkey paren-state))
+ ((set placeholder (c-search-uplist-for-classkey paren-state))
(c-backward-to-decl-anchor lim)
(back-to-indentation)
(if (save-excursion
@@ -2486,7 +2486,7 @@ This function does not do any hidden buffer changes."
(save-excursion
(and (not (c-looking-at-bos))
(eq (c-beginning-of-statement-1 lim nil nil t) 'same)
- (setq placeholder (point)))))
+ (set placeholder (point)))))
(back-to-indentation)
(if (/= (point) containing-sexp)
(goto-char placeholder))
@@ -2501,7 +2501,7 @@ This function does not do any hidden buffer changes."
;; really fixes it better, but we do like this to keep
;; the indentation compatible with version 5.28 and
;; earlier.
- (while (and (/= (setq placeholder (point)) (c-point 'boi))
+ (while (and (/= (set placeholder (point)) (c-point 'boi))
(eq (c-beginning-of-statement-1 lim) 'label)))
(goto-char placeholder)
(if (looking-at c-label-kwds-regexp)
@@ -2532,9 +2532,9 @@ This function does not do any hidden buffer changes."
containing-sexp)))
(if (= (point) prev-point)
(progn
- (setq step-type (or step-type last-step-type))
+ (set step-type (or step-type last-step-type))
nil)
- (setq step-type last-step-type)
+ (set step-type last-step-type)
(/= (point) (c-point 'boi)))))
(cond
;; CASE 17B: continued statement
@@ -2546,7 +2546,7 @@ This function does not do any hidden buffer changes."
((progn
(while (and (eq step-type 'label)
(not (looking-at c-label-kwds-regexp)))
- (setq step-type
+ (set step-type
(c-beginning-of-statement-1 containing-sexp)))
(eq step-type 'label))
(c-add-stmt-syntax (if (eq char-after-ip ?{)
@@ -2556,7 +2556,7 @@ This function does not do any hidden buffer changes."
;; CASE 17D: any old statement
((progn
(while (eq step-type 'label)
- (setq step-type
+ (set step-type
(c-beginning-of-statement-1 containing-sexp)))
(eq step-type 'previous))
(c-add-stmt-syntax 'statement t containing-sexp paren-state)
@@ -2567,7 +2567,7 @@ This function does not do any hidden buffer changes."
;; The following tests are all based on containing-sexp.
(goto-char containing-sexp)
;; From here on we have the next containing sexp in lim.
- (setq lim (c-most-enclosing-brace paren-state containing-sexp))
+ (set lim (c-most-enclosing-brace paren-state containing-sexp))
(c-after-conditional))
(c-backward-to-block-anchor lim)
(c-add-stmt-syntax 'statement-block-intro t lim paren-state)
@@ -2575,10 +2575,10 @@ This function does not do any hidden buffer changes."
(c-add-syntax 'block-open)))
;; CASE 17E: first statement in an in-expression block.
;; C.f. cases 4, 7B and 16A.
- ((setq placeholder (c-looking-at-inexpr-block
+ ((set placeholder (c-looking-at-inexpr-block
(c-safe-position containing-sexp paren-state)
nil))
- (setq tmpsymbol (if (eq (car placeholder) 'inlambda)
+ (set tmpsymbol (if (eq (car placeholder) 'inlambda)
'defun-block-intro
'statement-block-intro))
(back-to-indentation)
@@ -2617,7 +2617,7 @@ This function does not do any hidden buffer changes."
((save-excursion
(and (not (c-looking-at-bos))
(eq (c-beginning-of-statement-1 lim nil nil t) 'same)
- (setq placeholder (point))))
+ (set placeholder (point))))
(back-to-indentation)
(if (/= (point) containing-sexp)
(goto-char placeholder))
@@ -2629,7 +2629,7 @@ This function does not do any hidden buffer changes."
;; boi. The default handling in c-add-stmt-syntax is
;; really fixes it better, but we do like this to keep the
;; indentation compatible with version 5.28 and earlier.
- (while (and (/= (setq placeholder (point)) (c-point 'boi))
+ (while (and (/= (set placeholder (point)) (c-point 'boi))
(eq (c-beginning-of-statement-1 lim) 'label)))
(goto-char placeholder)
(if (looking-at c-label-kwds-regexp)
@@ -2672,7 +2672,7 @@ This function does not do any hidden buffer changes."
;; in the expression. That means the arglist
;; elements, if they are anchored inside the cpp
;; expression.
- (setq syntax `((cpp-macro-cont . ,macro-start))))
+ (set syntax `((cpp-macro-cont . ,macro-start))))
(when (and (eq macro-start syntactic-relpos)
(not (assq 'cpp-define-intro syntax))
(save-excursion
@@ -2713,9 +2713,9 @@ This function does not do any hidden buffer changes."
(let ((enclosing (match-string 1)))
(cond
((string-equal enclosing "extern")
- (setq inenclosing-p 'extern))
+ (set inenclosing-p 'extern))
((string-equal enclosing "namespace")
- (setq inenclosing-p 'namespace))
+ (set inenclosing-p 'namespace))
)))))
;; get the buffer position of the most nested opening brace,
;; if there is one, and it hasn't been narrowed out
@@ -2725,23 +2725,23 @@ This function does not do any hidden buffer changes."
(skip-chars-backward " \t")
(while (and state
(not containing-sexp))
- (setq containing-sexp (car state)
+ (set containing-sexp (car state)
state (cdr state))
(if (consp containing-sexp)
;; if cdr == point, then containing sexp is the brace
;; that opens the sexp we close
(if (= (cdr containing-sexp) (point))
- (setq containing-sexp (car containing-sexp))
+ (set containing-sexp (car containing-sexp))
;; otherwise, ignore this element
- (setq containing-sexp nil))
+ (set containing-sexp nil))
;; ignore the bufpos if its been narrowed out by the
;; containing class or does not contain the indent point
(if (or (<= containing-sexp (point-min))
(>= containing-sexp indent-point))
- (setq containing-sexp nil)))))
+ (set containing-sexp nil)))))
;; (imenu "agulbra-c++-tab")
;; 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))
(cdr (car fullstate))
nil)
@@ -2751,14 +2751,14 @@ This function does not do any hidden buffer changes."
;; the most likely position to perform the majority of tests
(goto-char indent-point)
(skip-chars-forward " \t")
- (setq char-after-ip (char-after))
+ (set char-after-ip (char-after))
(c-backward-syntactic-ws lim)
- (setq char-before-ip (char-before))
+ (set char-before-ip (char-before))
(goto-char indent-point)
(skip-chars-forward " \t")
;; 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
(cond
@@ -2772,22 +2772,22 @@ This function does not do any hidden buffer changes."
((and (eq literal 'pound)
(/= (save-excursion
(c-beginning-of-macro lim)
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-point 'boi)))
(c-add-syntax 'cpp-macro-cont placeholder))
;; CASE 4: In-expression statement.
((and (or c-inexpr-class-key c-inexpr-block-key c-lambda-key)
- (setq placeholder (c-looking-at-inexpr-block)))
- (setq tmpsymbol (assq (car placeholder)
+ (set placeholder (c-looking-at-inexpr-block)))
+ (set tmpsymbol (assq (car placeholder)
'((inexpr-class . class-open)
(inexpr-statement . block-open))))
(if tmpsymbol
;; 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
;; lambda keyword and the argument list or at the defun
;; opener.
- (setq tmpsymbol (if (eq char-after-ip ?{)
+ (set tmpsymbol (if (eq char-after-ip ?{)
'inline-open
'lambda-intro-cont)))
(goto-char (cdr placeholder))
@@ -2800,7 +2800,7 @@ This function does not do any hidden buffer changes."
(cond
;; CASE 5A: we are looking at a defun, brace list, class,
;; or inline-inclass method opening brace
- ((setq special-brace-list
+ ((set special-brace-list
(or (and c-special-brace-lists
(c-looking-at-special-brace-list))
(eq char-after-ip ?{)))
@@ -2811,16 +2811,16 @@ This function does not do any hidden buffer changes."
(skip-chars-forward " \t")
(and (c-safe (progn (c-backward-sexp 2) t))
(looking-at (concat c-extra-toplevel-key "[^_]"))
- (setq keyword (match-string 1)
+ (set keyword (match-string 1)
placeholder (point))
(or (and (string-equal keyword "namespace")
- (setq tmpsymbol 'namespace-open))
+ (set tmpsymbol 'namespace-open))
(and (string-equal keyword "extern")
(progn
(c-forward-sexp 1)
(c-forward-syntactic-ws)
(eq (char-after) ?\"))
- (setq tmpsymbol 'extern-lang-open)))
+ (set tmpsymbol 'extern-lang-open)))
))
(goto-char placeholder)
(c-add-syntax tmpsymbol (c-point 'boi)))
@@ -2837,7 +2837,7 @@ This function does not do any hidden buffer changes."
(c-search-uplist-for-classkey (c-parse-state))
)))
(and decl
- (setq placeholder (aref decl 0)))
+ (set placeholder (aref decl 0)))
))
(c-add-syntax 'class-open placeholder))
;; CASE 5A.3: brace list open
@@ -2849,17 +2849,17 @@ This function does not do any hidden buffer changes."
(if (looking-at "typedef[^_]")
(progn (c-forward-sexp 1)
(c-forward-syntactic-ws indent-point)))
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(or (consp special-brace-list)
(and (or (save-excursion
(goto-char indent-point)
- (setq tmpsymbol nil)
+ (set tmpsymbol nil)
(while (and (> (point) placeholder)
(= (c-backward-token-1 1 t) 0)
(/= (char-after) ?=))
(if (and (not tmpsymbol)
(looking-at "new\\>[^_]"))
- (setq tmpsymbol 'topmost-intro-cont)))
+ (set tmpsymbol 'topmost-intro-cont)))
(eq (char-after) ?=))
(looking-at "enum[ \t\n]+"))
(save-excursion
@@ -2913,12 +2913,12 @@ This function does not do any hidden buffer changes."
(c-backward-syntactic-ws lim)))
(if (eq (char-before) ?\))
(c-backward-sexp 1))
- (setq placeholder (point))
+ (set placeholder (point))
(save-excursion
(and (c-safe (c-backward-sexp 1) t)
(looking-at "throw[^_]")
(c-safe (c-backward-sexp 1) t)
- (setq placeholder (point))))
+ (set placeholder (point))))
(goto-char placeholder)
(c-add-syntax 'member-init-intro (c-point 'boi))
;; we don't need to add any class offset since this
@@ -2970,13 +2970,13 @@ This function does not do any hidden buffer changes."
(save-excursion
(while (not done)
(cond ((looking-at c-Java-special-key)
- (setq injava-inher (cons cont (point))
+ (set injava-inher (cons cont (point))
done t))
((or (not (c-safe (c-forward-sexp -1) t))
(<= (point) fence))
- (setq done t))
+ (set done t))
)
- (setq cont t)))
+ (set cont t)))
injava-inher)
(not (c-crosses-statement-barrier-p (cdr injava-inher)
(point)))
@@ -3038,7 +3038,7 @@ This function does not do any hidden buffer changes."
;; CASE 5D.1: hanging member init colon, but watch out
;; for bogus matches on access specifiers inside classes.
((and (save-excursion
- (setq plaaceholder (point))
+ (set plaaceholder (point))
(c-backward-token-1 1 t lim)
(and (eq (char-after) ?:)
(not (eq (char-before) ?:))))
@@ -3069,7 +3069,7 @@ This function does not do any hidden buffer changes."
;; CASE 5D.3: perhaps a multiple inheritance line?
((save-excursion
(c-beginning-of-statement-1 lim)
- (setq placeholder (point))
+ (set placeholder (point))
(looking-at c-inher-key))
(goto-char placeholder)
(c-add-syntax 'inher-cont (c-point 'boi)))
@@ -3079,7 +3079,7 @@ This function does not do any hidden buffer changes."
(skip-chars-backward "^<" lim)
;; not sure if this is the right test, but it should
;; be fast and mostly accurate.
- (setq placeholder (point))
+ (set placeholder (point))
(and (eq (char-before) ?<)
(not (c-in-literal lim))))
;; we can probably indent it just like an arglist-cont
@@ -3106,7 +3106,7 @@ This function does not do any hidden buffer changes."
;; CASE 5F: extern-lang-close or namespace-close?
((and inenclosing-p
(eq char-after-ip ?}))
- (setq tmpsymbol (if (eq inenclosing-p 'extern)
+ (set tmpsymbol (if (eq inenclosing-p 'extern)
'extern-lang-close
'namespace-close))
(c-add-syntax tmpsymbol (aref inclass-p 0)))
@@ -3134,11 +3134,11 @@ This function does not do any hidden buffer changes."
(point))))
(save-excursion
(c-backward-syntactic-ws limit)
- (setq placeholder (point))
+ (set placeholder (point))
(while (and (memq (char-before) '(?\; ?,))
(> (point) limit))
(beginning-of-line)
- (setq placeholder (point))
+ (set placeholder (point))
(c-backward-syntactic-ws limit))
(and (eq (char-before) ?\))
(or (not c-method-key)
@@ -3235,18 +3235,18 @@ This function does not do any hidden buffer changes."
(not (eq char-before-ip ?,)))
(memq char-after-ip '(?\) ?\])))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(forward-char)
(skip-chars-forward " \t")
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-add-syntax 'arglist-close placeholder))
;; CASE 7B: Looking at the opening brace of an
;; in-expression block or brace list.
((eq char-after-ip ?{)
(goto-char indent-point)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(goto-char containing-sexp)
(if (c-inside-bracelist-p placeholder
(cons containing-sexp state))
@@ -3260,12 +3260,12 @@ This function does not do any hidden buffer changes."
;; looking at a close paren or bracket.
((memq char-before-ip '(?\( ?\[))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(forward-char)
(skip-chars-forward " \t")
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-add-syntax 'arglist-intro placeholder))
;; CASE 7D: we are inside a conditional test clause. treat
;; these things as statements
@@ -3301,12 +3301,12 @@ This function does not do any hidden buffer changes."
(skip-chars-forward " \t")
(not (eolp)))
(goto-char containing-sexp)
- (setq placeholder (c-point 'boi))
+ (set placeholder (c-point 'boi))
(when (and (c-safe (backward-up-list 1) t)
(> (point) placeholder))
(forward-char)
(skip-chars-forward " \t")
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-add-syntax 'arglist-cont-nonempty placeholder))
;; CASE 7G: we are looking at just a normal arglist
;; continuation line
@@ -3337,7 +3337,7 @@ This function does not do any hidden buffer changes."
(c-add-syntax 'inher-cont (point))
)))
;; CASE 9: we are inside a brace-list
- ((setq special-brace-list
+ ((set special-brace-list
(or (and c-special-brace-lists
(save-excursion
(goto-char containing-sexp)
@@ -3354,8 +3354,8 @@ This function does not do any hidden buffer changes."
(skip-chars-backward " \t")
(if (and (bolp)
(assoc 'statement-cont
- (setq placeholder (c-guess-basic-syntax))))
- (setq syntax placeholder)
+ (set placeholder (c-guess-basic-syntax))))
+ (set syntax placeholder)
(c-beginning-of-statement-1 lim)
(c-forward-token-1 0)
(if (looking-at "typedef\\>") (c-forward-token-1 1))
@@ -3422,7 +3422,7 @@ This function does not do any hidden buffer changes."
(save-excursion
(c-beginning-of-statement-1 containing-sexp)
(c-forward-syntactic-ws)
- (setq placeholder (point))))
+ (set placeholder (point))))
(/= placeholder containing-sexp))
(goto-char indent-point)
(skip-chars-forward " \t")
@@ -3448,7 +3448,7 @@ This function does not do any hidden buffer changes."
(c-add-syntax 'substatement-open (c-point 'boi))
(c-add-syntax 'substatement (c-point 'boi))))
;; CASE 10B: open braces for class or brace-lists
- ((setq special-brace-list
+ ((set special-brace-list
(or (and c-special-brace-lists
(c-looking-at-special-brace-list))
(eq char-after-ip ?{)))
@@ -3459,7 +3459,7 @@ This function does not do any hidden buffer changes."
(skip-chars-forward " \t{")
(let ((decl (c-search-uplist-for-classkey (c-parse-state))))
(and decl
- (setq placeholder (aref decl 0)))
+ (set placeholder (aref decl 0)))
))
(c-add-syntax 'class-open placeholder))
;; CASE 10B.2: brace-list-open
@@ -3539,7 +3539,7 @@ This function does not do any hidden buffer changes."
(and (looking-at "while\\b[^_]")
(save-excursion
(c-backward-to-start-of-do containing-sexp)
- (setq placeholder (point))
+ (set placeholder (point))
(looking-at "do\\b[^_]"))
))
(goto-char placeholder)
@@ -3559,7 +3559,7 @@ This function does not do any hidden buffer changes."
(c-safe (c-backward-sexp) t)
t)
(looking-at "\\<\\(try\\|catch\\)\\>[^_]")
- (setq placeholder (c-point 'boi))))
+ (set placeholder (c-point 'boi))))
(c-add-syntax 'catch-clause placeholder))
;; CASE 14: A case or default label
((looking-at c-switch-label-key)
@@ -3589,8 +3589,8 @@ This function does not do any hidden buffer changes."
;; block?
((save-excursion
(goto-char containing-sexp)
- (setq placeholder (c-looking-at-inexpr-block)))
- (setq tmpsymbol (if (eq (car placeholder) 'inlambda)
+ (set placeholder (c-looking-at-inexpr-block)))
+ (set tmpsymbol (if (eq (car placeholder) 'inlambda)
'inline-close
'block-close))
(goto-char containing-sexp)
@@ -3606,7 +3606,7 @@ This function does not do any hidden buffer changes."
;; an extern block or namespace?
((progn
(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))
(if (looking-at (concat c-extra-toplevel-key "[^_]"))
(c-add-syntax 'defun-close relpos)
@@ -3646,7 +3646,7 @@ This function does not do any hidden buffer changes."
(while (or (c-skip-case-statement-forward fullstate indent-point)
(and (looking-at c-switch-label-key)
(not inswitch-p)))
- (setq inswitch-p t))
+ (set inswitch-p t))
;; we want to ignore non-case labels when skipping forward
(while (and (looking-at c-label-key)
(goto-char (match-end 0)))
@@ -3659,11 +3659,11 @@ This function does not do any hidden buffer changes."
(progn
(goto-char indent-point)
(c-beginning-of-statement-1 containing-sexp)
- (setq placeholder (point))
+ (set placeholder (point))
(beginning-of-line)
(when (re-search-forward c-switch-label-key
(max placeholder (c-point 'eol)) t)
- (setq placeholder (match-beginning 0)))))
+ (set placeholder (match-beginning 0)))))
(goto-char indent-point)
(skip-chars-forward " \t")
(if (eq (char-after) ?{)
@@ -3710,19 +3710,19 @@ This function does not do any hidden buffer changes."
(progn
(goto-char (match-end 0))
(c-forward-syntactic-ws)))
- (setq relpos (c-point 'boi))
+ (set relpos (c-point 'boi))
(while (and (not done)
(<= safepos (point))
(/= relpos (point)))
(c-beginning-of-statement-1 safepos)
(if (= relpos (c-point 'boi))
- (setq done t))
- (setq relpos (c-point 'boi)))
+ (set done t))
+ (set relpos (c-point 'boi)))
(c-add-syntax 'statement relpos)
(if (eq char-after-ip ?{)
(c-add-syntax 'block-open))))
;; CASE 17E: first statement in an in-expression block
- ((setq placeholder
+ ((set placeholder
(save-excursion
(goto-char containing-sexp)
(c-looking-at-inexpr-block)))
@@ -3800,7 +3800,7 @@ This function does not do any hidden buffer changes."
((and (eq literal 'pound)
(= (save-excursion
(c-beginning-of-macro lim)
- (setq placeholder (point)))
+ (set placeholder (point)))
(c-point 'boi))
(not (and (c-major-mode-is 'pike-mode)
(eq (char-after (1+ placeholder)) ?\"))))
@@ -3814,10 +3814,10 @@ This function does not do any hidden buffer changes."
(add-hook 'c++-mode-hook 'kde-c++-mode-hook)
(add-hook 'c-mode-hook 'kde-c-mode-hook)
; always end a file with a newline
-(setq-default require-final-newline t)
+(set-default require-final-newline t)
; 'next-line won't be adding newlines
-(setq-default next-line-add-newlines nil)
-(setq compilation-error-regexp-systems-list '(gnu of comma 4bsd)
+(set-default next-line-add-newlines nil)
+(set compilation-error-regexp-systems-list '(gnu of comma 4bsd)
compilation-ask-about-save nil)
(provide 'kde-emacs-core)
diff --git a/scripts/kde-emacs/kde-emacs-doc.el b/scripts/kde-emacs/kde-emacs-doc.el
index 5fca1361..fb1f5116 100644
--- a/scripts/kde-emacs/kde-emacs-doc.el
+++ b/scripts/kde-emacs/kde-emacs-doc.el
@@ -165,8 +165,8 @@ See `comment-styles' for a list of available styles."
(defun kde-license-header ()
(let ((ret (file-name-nondirectory (buffer-file-name))))
- (setq ret (concat ret " \n\n"))
- (setq ret (concat ret "Copyright (C) " (format-time-string "%Y ")
+ (set ret (concat ret " \n\n"))
+ (set ret (concat ret "Copyright (C) " (format-time-string "%Y ")
kde-full-name " <"kde-email">\n\n"))
))
@@ -181,7 +181,7 @@ buffer."
(let ((start (point-min))
(end)
)
- (setq comment-style kde-license-comment-style)
+ (set comment-style kde-license-comment-style)
(goto-char start)
(if license
(progn
@@ -203,7 +203,7 @@ buffer."
)
)
(insert "\n")
- (setq end (point))
+ (set end (point))
(comment-region start end)
)
)
@@ -225,10 +225,10 @@ buffer."
(defun kde-function-documentation (function)
(let ((ret "") (rettype (semantic-token-type function)))
- (setq ret (kde-doc-type-string 'start))
- (setq ret (concat ret (kde-doc-type-string 'separator)))
+ (set ret (kde-doc-type-string 'start))
+ (set ret (concat ret (kde-doc-type-string 'separator)))
(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))))
)
(if (not (or
@@ -236,13 +236,13 @@ buffer."
(semantic-token-function-destructor function)))
(progn
(if (listp rettype)
- (setq rettype (car rettype)))
+ (set rettype (car rettype)))
(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 ()
@@ -258,13 +258,13 @@ at the current location."
(if (not token)
(error "There's no function at %d." pt)
(progn
- (setq ret (kde-function-documentation token))
+ (set ret (kde-function-documentation token))
(goto-char (semantic-token-start token))
(previous-line)
(goto-char (point-at-eol))
- (setq start (point))
+ (set start (point))
(insert "\n " ret)
- (setq end (semantic-token-end token))
+ (set end (semantic-token-end token))
(indent-region start end nil)
)
)
@@ -276,15 +276,15 @@ at the current location."
(let ((thisblank)(pt))
(save-excursion
(beginning-of-line)
- (setq pt (point))
- (setq thisblank (looking-at "[ \t]*$"))
+ (set pt (point))
+ (set thisblank (looking-at "[ \t]*$"))
(if (not thisblank)
(progn
(newline)
(goto-char pt)
))
(insert (kde-doc-type-string 'oneliner))
- (setq pt (point-at-eol))
+ (set pt (point-at-eol))
(end-of-line)
)
(goto-char pt)
@@ -297,8 +297,8 @@ the functions inserts a newline."
(let ((thisblank)(start) (end))
(save-excursion
(beginning-of-line)
- (setq start (point))
- (setq thisblank (looking-at "[ \t]*$"))
+ (set start (point))
+ (set thisblank (looking-at "[ \t]*$"))
(if (not thisblank)
(progn
(newline)
@@ -311,7 +311,7 @@ the functions inserts a newline."
(kde-doc-type-string 'separator) "\n"
(kde-doc-type-string 'end)
)
- (setq end (point))
+ (set end (point))
(indent-region start end nil)
)
(goto-char start)
diff --git a/scripts/kde-emacs/kde-emacs-general.el b/scripts/kde-emacs/kde-emacs-general.el
index be34047c..23bc9b7f 100644
--- a/scripts/kde-emacs/kde-emacs-general.el
+++ b/scripts/kde-emacs/kde-emacs-general.el
@@ -52,61 +52,61 @@ return (\"test.cpp\" t)."
(listit nil))
(cond
((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
- (setq path (concat nname "." (car listit)))
+ (set path (concat nname "." (car listit)))
(if (file-readable-p path)
- (setq ret (cons path t))
+ (set ret (cons path t))
)
(if (not ret)
(if (string-match "_p$" nname)
(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)
- (setq ret (cons path t))
+ (set ret (cons path t))
)))
)
(if (not ret)
(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
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
(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)
- (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
- (setq path (concat nname "." (car listit)))
+ (set path (concat nname "." (car listit)))
; look in current dir
(if (file-readable-p path)
- (setq ret (cons path t)))
+ (set ret (cons path t)))
(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)
- (setq ret (cons path t)))))
+ (set ret (cons path t)))))
(if (not (file-readable-p path))
(progn ; look in kde-include-directory
- (setq path (kde-find-file (file-name-nondirectory path) kde-include-directory))
+ (set path (kde-find-file (file-name-nondirectory path) kde-include-directory))
(if (and
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
(if (not ret)
- (setq ret (cons (concat nname "." (car kde-header-files)) nil ))
+ (set ret (cons (concat nname "." (car kde-header-files)) nil ))
))
)
ret
@@ -129,10 +129,10 @@ return (\"test.cpp\" t)."
(let ((start (point))
end)
(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)
- (setq end (point-at-bol))
- (setq end (1+ end))))
+ (set end (point-at-bol))
+ (set end (1+ end))))
(delete-backward-char (- start end))))
(defun kde-skip-blank-lines ()
@@ -146,10 +146,10 @@ at a first non-blank line"
(string-match "^[ \t\r\n]+$" mstring)
(and (string= mstring "")
(= ret 0)))
- (setq ret (forward-line -1)) ; if ret != 0, we stop, since we're at the first line...
- (setq start (point-at-bol)
+ (set ret (forward-line -1)) ; if ret != 0, we stop, since we're at the first line...
+ (set start (point-at-bol)
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.
Presumes no \"/*\" strings are nested within multi-line comments."
(let ((opoint))
- (while (progn (setq opoint (point))
+ (while (progn (set opoint (point))
;; To previous line
(if (zerop (forward-line -1))
(cond
diff --git a/scripts/kde-emacs/kde-emacs-semantic.el b/scripts/kde-emacs/kde-emacs-semantic.el
index 6cc8dd54..3e700ed3 100644
--- a/scripts/kde-emacs/kde-emacs-semantic.el
+++ b/scripts/kde-emacs/kde-emacs-semantic.el
@@ -87,24 +87,24 @@ follows : \"func (int arg\"."
;* Functions ... */
;*---------------------------------------------------------------------*/
;; FIXME : semantic doesn't handle QT access specifiers
-;(setq-default global-semantic-show-unmatched-syntax-mode nil)
-;(setq-default global-semantic-show-dirty-mode nil)
+;(set-default global-semantic-show-unmatched-syntax-mode nil)
+;(set-default global-semantic-show-dirty-mode nil)
(defun kde-format-func-arg (arg)
"Formats one argument (from token to string)."
(let ((ret ""))
(if (semantic-token-variable-extra-spec arg 'const)
- (setq ret "const "))
- (setq ret (concat ret (car (semantic-token-type arg))))
+ (set ret "const "))
+ (set ret (concat ret (car (semantic-token-type arg))))
(if (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)
- (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
))
@@ -114,15 +114,15 @@ Token has to be the function variable list e.g.
from semantic-token-function-args"
(let ((res kde-expand-arg-start) (idx 1))
(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))
- (setq res (concat res kde-expand-arg-break)))
- (setq idx (1+ idx))
+ (set res (concat res kde-expand-arg-break)))
+ (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 "()"
(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
))
@@ -131,8 +131,8 @@ from semantic-token-function-args"
token and TOKENS have to be a list of functions from buffer."
(let ((ret)(elt))
(while (and TOKENS (not ret))
- (setq elt (car TOKENS))
- (setq TOKENS (cdr TOKENS))
+ (set elt (car TOKENS))
+ (set TOKENS (cdr TOKENS))
(if (and (string= (semantic-token-name FUNC)
(semantic-token-name elt))
(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))
(string= (kde-format-args (semantic-token-function-args FUNC))
(kde-format-args (semantic-token-function-args elt))))
- (setq ret t))
+ (set ret t))
)
ret
))
@@ -164,8 +164,8 @@ token and TOKENS have to be a list of functions from buffer."
(if (looking-at "::")
(let ((start) (end))
(re-search-backward "\\b\\w+" (point-at-bol) t)
- (setq start (match-beginning 0))
- (setq end (match-end 0))
+ (set start (match-beginning 0))
+ (set end (match-end 0))
(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."
(let ((fname (semantic-token-name token)))
(if (semantic-token-function-destructor token)
- (setq fname (concat "~" fname))
+ (set fname (concat "~" fname))
)
(if pclass
- (setq fname (concat pclass "::" fname))
+ (set fname (concat pclass "::" fname))
)
(if (and
(not (kde-is-constructor token))
@@ -238,21 +238,21 @@ would return t"
(progn
(cond
((stringp (semantic-token-type token))
- (setq fname (concat (semantic-token-type token) "\n" fname))
+ (set fname (concat (semantic-token-type token) "\n" fname))
)
(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)
- (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)
- (setq fname (concat fname " const" ))
+ (set fname (concat fname " const" ))
)
- (setq fname (concat fname "\n{" "\n}"))
+ (set fname (concat fname "\n{" "\n}"))
fname
)
)
@@ -271,8 +271,8 @@ class-token has to be a token representing either a class or a struct."
(namespace)
)
(dolist (elt parts ret)
- (setq cur-token (semantic-token-token elt))
- (setq cur-token-name (semantic-token-name elt))
+ (set cur-token (semantic-token-token elt))
+ (set cur-token-name (semantic-token-name elt))
(cond
((and
(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
(if (and (kde-is-prototype elt)
(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")
)
((and
(eq cur-token 'label)
(stringp cur-token-name))
- (setq aslot nil
+ (set aslot nil
asignal nil)
;;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)))
;;SIGNALS - next prototypes belong to Q_SIGNALS and we don't want to
;; expand those
- (setq asignal t
+ (set asignal t
aslot nil)
)
((kde-label-namespace (car (semantic-token-extent elt)))
;;NAMESPACE - semantic doesn't handle things like Qt::ButtonState correctly
;; 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)))
;;SLOTS - for now just unset Q_SIGNALS
- (setq aslot t
+ (set aslot t
asignal nil)
)
(t
@@ -346,11 +346,11 @@ class-token has to be a token representing either a class or a struct."
(dolist (elt tokens ret)
(cond
((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)
(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)
@@ -375,7 +375,7 @@ class-token has to be a token representing either a class or a struct."
(if exists
(progn
(find-file FILENAME)
- (setq tokens (semantic-bovinate-toplevel t))
+ (set tokens (semantic-bovinate-toplevel t))
(switch-to-buffer buf)
tokens)
nil)
@@ -434,13 +434,13 @@ in the current header file."
(buf)
(parent))
(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))
(kde-is-prototype func))
(progn
- (setq func (kde-function-construct func parent))
- (setq file (car (kde-file-get-cpp-h)))
- (setq buf (current-buffer))
+ (set func (kde-function-construct func parent))
+ (set file (car (kde-file-get-cpp-h)))
+ (set buf (current-buffer))
(find-file file)
(save-excursion
(goto-char (point-max))
diff --git a/scripts/kde-emacs/kde-emacs-tips.texi b/scripts/kde-emacs/kde-emacs-tips.texi
index ee7c0f19..9fd24300 100644
--- a/scripts/kde-emacs/kde-emacs-tips.texi
+++ b/scripts/kde-emacs/kde-emacs-tips.texi
@@ -169,7 +169,7 @@ like Borland JBuilder does it?}
@strong{A.} To your @file{.emacs} add a line like:
@example
-(setq frame-title-format "%b (%m)")
+(set frame-title-format "%b (%m)")
@end example
which will display ``filename (mode)'' type of string in the
taskbar. Type @kbd{C-h v frame-title-format} to get more info.
diff --git a/scripts/kde-emacs/kde-emacs-utils.el b/scripts/kde-emacs/kde-emacs-utils.el
index c6904539..37cc8977 100644
--- a/scripts/kde-emacs/kde-emacs-utils.el
+++ b/scripts/kde-emacs/kde-emacs-utils.el
@@ -41,9 +41,9 @@ This function does not do any hidden buffer changes."
(let (found)
(save-excursion
(beginning-of-buffer)
- (setq found (re-search-forward "^using" nil 1))
+ (set found (re-search-forward "^using" nil 1))
(if found
- (setq found (search-forward namespace (line-end-position) 1))
+ (set found (search-forward namespace (line-end-position) 1))
)
)
found)
@@ -55,9 +55,9 @@ This function does not do any hidden buffer changes."
(let (found)
(save-excursion
(beginning-of-buffer)
- (setq found (re-search-forward "^namespace" nil 1))
+ (set found (re-search-forward "^namespace" nil 1))
(if found
- (setq found (search-forward namespace (line-end-position) 1))
+ (set found (search-forward namespace (line-end-position) 1))
)
)
found)
@@ -88,7 +88,7 @@ This function does not do any hidden buffer changes."
(re-search-forward "[ \t]" nil t))
(while (looking-at "[ \t]")
(forward-char 1))
- (setq start (point))
+ (set start (point))
; Parse class name ("Foo" or "Foo::Bar::Blah").
; Beware of "Foo:"
(while (or (looking-at "[A-Za-z0-9_]") (looking-at "::"))
@@ -99,9 +99,9 @@ This function does not do any hidden buffer changes."
)
(cond
(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
- (setq class (buffer-substring start (point)))))
+ (set class (buffer-substring start (point)))))
)
; Go up one level again
(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]*")
(while (looking-at "[ \t]")
(forward-char 1))
- (setq function (buffer-substring (point) end))
+ (set function (buffer-substring (point) end))
)
) ; end of global save-excursion
(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.
(defun canonical-function-sig (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)
- (setq function (replace-match "" t t function)))
+ (set function (replace-match "" t 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)
- (setq function (replace-match "" t t function)))
+ (set function (replace-match "" t t function)))
(while (string-match " +" function) ; simplifyWhiteSpace
- (setq function (replace-match " " t t function)))
+ (set function (replace-match " " t 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
- (setq function (replace-match "" t t function)))
+ (set function (replace-match "" t t function)))
(let ((startargs (string-match "(" function)))
(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
- (setq function (replace-match "," t t function)))
+ (set function (replace-match "," t t function)))
function ; the return value
)
@@ -164,13 +164,13 @@ This function does not do any hidden buffer changes."
(and (stringp class)
(cond
((string-match (concat "^ *" class "[ \\t]*(") function) ; constructor
- (setq insertion-string
+ (set insertion-string
(replace-match
(concat namespace class "::" class "(")
t t function)
))
((string-match (concat "^ *~" class "[ \\t]*(") function) ; destructor
- (setq insertion-string
+ (set insertion-string
(replace-match
(concat namespace class "::~" class "(")
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 (or (string-match " *\\([a-zA-Z0-9_]+\\)[ \\t]*(" function) ; normal method
(string-match " *\\(operator[^ \\t]+\\)[ \\t]*(" function)) ; operator
- (setq insertion-string
+ (set insertion-string
(replace-match
(if class
(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)))
(and (string-match "^\\(.*\\)::\\(.*\\)$" a)
(progn
- (setq class (match-string 1 a))
- (setq function (match-string 2 a))
+ (set class (match-string 1 a))
+ (set function (match-string 2 a))
(kde-switch-cpp-h)
(goto-char 0)
; 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))
(sig "")
(pos 0))
- (setq namespace (car mup))
- (setq class (car (cdr mup)))
- (setq function (cdr (cdr mup)))
+ (set namespace (car mup))
+ (set class (car (cdr mup)))
+ (set function (cdr (cdr mup)))
(kde-switch-cpp-h)
;; First search with namespace prefixed
(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
- (setq sig (replace-match "" nil t sig)))
- (setq found (re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) )
+ (set sig (replace-match "" nil t sig)))
+ (set found (re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) )
(if (not found)
(progn
; Now search without name space prefix
(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
- (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) ) )
)))))
@@ -280,7 +280,7 @@ This function does not do any hidden buffer changes."
(start nil)
(newcppfile nil)
)
- (setq insertion-string
+ (set insertion-string
(concat insertion-string "\n{\n"
(replace-in-string kde-make-member-default-impl "FUNCTION"
; 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)
; 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)
(kde-switch-cpp-h)
)
(goto-char (point-max))
(kde-comments-begin)
(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)
(progn
(forward-line -1)
@@ -330,7 +330,7 @@ This function does not do any hidden buffer changes."
(c-indent-defun)
(save-excursion
(and (string-match ".*/" file)
- (setq file (replace-match "" t nil file)))
+ (set file (replace-match "" t nil file)))
(and (string-match "\\.h$" file)
(functionp 'kdab-insert-include-file)
(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)))
(dotimes (i iters)
(let ((part (pop parts)))
- (setq definablestring
+ (set definablestring
(concat
(upcase (replace-in-string part "[\\.-]" "_"))
(if (not first-iter) "_" "")
definablestring
)
)
- (setq first-iter nil)
+ (set first-iter nil)
)
)
definablestring
@@ -435,13 +435,13 @@ This function does not do any hidden buffer changes."
(if (not (c-in-literal))
(let ((n nil) (except nil))
(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 "case"))
(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")
(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))
(let ((remv nil) (nospac nil))
(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)
- (setq nospac ; no space to be added
+ (set nospac ; no space to be added
(or (looking-at " ")
(looking-at "(")
(save-excursion ; check for kdDebug(123
@@ -520,15 +520,15 @@ This function does not do any hidden buffer changes."
(save-excursion
(save-excursion
(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
(if (not (looking-at " ")) ; the user already have inserted a space after
(forward-char 1) ; the closing parenthesis
- (setq spacep t))
+ (set spacep t))
(forward-char -2)
- (setq o (looking-at "()"))
+ (set o (looking-at "()"))
(forward-char 1)
- (setq n (looking-at ")"))
+ (set n (looking-at ")"))
(if (and
(not oneliner)
(not (eq
@@ -538,7 +538,7 @@ This function does not do any hidden buffer changes."
(next-line 1)
(beginning-of-line)
(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))
(if (file-readable-p "Makefile.am")
- (setq objext "\.lo")
- (setq objext "\.o"))
- (if (string-match "\.cpp$" f) (setq f (replace-match objext t t f)))
- (if (string-match "\.cc$" f) (setq f (replace-match objext t t f)))
+ (set objext "\.lo")
+ (set objext "\.o"))
+ (if (string-match "\.cpp$" f) (set 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)))
)
@@ -672,17 +672,17 @@ This function does not do any hidden buffer changes."
(ret)
)
(while (< pos l)
- (setq oldpos (+ pos 1))
- (setq pos (string-match "[,]" string (+ pos 1)))
- (unless pos (setq pos l))
- (setq currange (substring string oldpos pos))
+ (set oldpos (+ pos 1))
+ (set pos (string-match "[,]" string (+ pos 1)))
+ (unless pos (set pos l))
+ (set currange (substring string oldpos pos))
(string-match "[0-9]+" currange)
- (setq startyear (string-to-int (match-string 0 currange)))
- (setq endyear
+ (set startyear (string-to-int (match-string 0 currange)))
+ (set endyear
(if (string-match "-" currange)
(string-to-int (substring currange (match-end 0)))
startyear))
- (setq ret (cons (cons startyear endyear) ret))
+ (set ret (cons (cons startyear endyear) ret))
)
ret
)
@@ -694,14 +694,14 @@ This function does not do any hidden buffer changes."
(let ((ret))
(dolist (range ranges ret)
(when (and (>= year (car range)) (<= year (cdr range)))
- (setq ret t))
+ (set ret t))
)))
(defun kde-year-range-to-string (ranges)
"converts ranges to a string.."
(let ((ret ""))
(dolist (range ranges)
- (setq ret
+ (set ret
(concat
(int-to-string (car range))
(if (/= (cdr range) (car range))
@@ -712,7 +712,7 @@ This function does not do any hidden buffer changes."
)
)
; 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)))
(setcdr range (cddr range)))
)
- (setq range (cdr range))
+ (set range (cdr range))
)
origrange
)
@@ -738,16 +738,16 @@ This function does not do any hidden buffer changes."
(cond
((and (>= year (car years)) (<= year (cdr years))
; year is already in the range..
- (setq range nil)))
+ (set range nil)))
((= year (+ (cdr years) 1))
(setcdr years year)
- (setq range nil))
+ (set range nil))
((= year (- (car years) 1))
(setcar years year)
- (setq range nil))
+ (set range nil))
)
)
- (setq range (cdr range))
+ (set range (cdr 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"))))
(when (not (kde-year-range-contains-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)))
; finish new-copyright-string
- (setq new-copyright-string
+ (set new-copyright-string
(concat new-copyright-string " " kde-full-name " <" kde-email ">"))
(beginning-of-line)
(re-search-forward "Copyright ([Cc])")
(beginning-of-line)
- (setq wascomment
+ (set wascomment
(buffer-substring (point)
(match-beginning 0)
))
@@ -790,7 +790,7 @@ This function does not do any hidden buffer changes."
(progn
(goto-char first-copyright-str)
(beginning-of-line)
- (setq wascomment (buffer-substring (point) (match-beginning 0)))
+ (set wascomment (buffer-substring (point) (match-beginning 0)))
(forward-line 1)
)
(goto-line 2))
@@ -820,12 +820,12 @@ This function does not do any hidden buffer changes."
(final))
(save-excursion
(beginning-of-buffer)
- (setq startpoint (point))
- (setq endpoint (point-at-eol)))
- (setq firstline (buffer-substring startpoint endpoint))
+ (set startpoint (point))
+ (set endpoint (point-at-eol)))
+ (set firstline (buffer-substring startpoint endpoint))
(if (string-match "-\*-\\([A-Za-z0-9\-\+\:\; ]+\\)-\*-" firstline)
(delete-region startpoint endpoint))
- (setq final (concat "-*- "
+ (set final (concat "-*- "
"Mode: " mode-name "; "
"c-basic-offset: " (prin1-to-string c-basic-offset) "; "
"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 \"")
(progn
(forward-char 10)
- (setq begin (point))
+ (set begin (point))
(re-search-forward "\"" nil t)
(backward-char 1)
- (setq file (buffer-substring begin (point)))
- (setq buffer (current-buffer))
+ (set file (buffer-substring begin (point)))
+ (set buffer (current-buffer))
(qt-follow-includes file)
(kill-buffer buffer)
)
@@ -873,18 +873,18 @@ This function does not do any hidden buffer changes."
)
(save-excursion
; 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)
- (setq file f)
+ (set file f)
; 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)
- (setq file f)
+ (set file f)
; 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)
(if (file-readable-p (concat f "/" class) )
- (setq file (concat f "/" class))))
+ (set file (concat f "/" class))))
))
(and file
(qt-follow-includes file))
diff --git a/scripts/kde-emacs/kde-emacs.el b/scripts/kde-emacs/kde-emacs.el
index b2865c53..386e8966 100644
--- a/scripts/kde-emacs/kde-emacs.el
+++ b/scripts/kde-emacs/kde-emacs.el
@@ -26,8 +26,8 @@
;;
;; I also strongly recommend to add the following two lines to
;; .emacs file:
-;; (setq kde-full-name "Your Name")
-;; (setq kde-email "Your Email")
+;; (set kde-full-name "Your Name")
+;; (set kde-email "Your Email")
;;
;; 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
diff --git a/scripts/kde-emacs/klaralv.el b/scripts/kde-emacs/klaralv.el
index b4d7c6c8..2b6989c4 100644
--- a/scripts/kde-emacs/klaralv.el
+++ b/scripts/kde-emacs/klaralv.el
@@ -20,18 +20,18 @@
;; ------------------------------ INSTALLATION ------------------------------
;; To use this file, add the current directory to your load path.
;; 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
;; (require 'klaralv)
;; (global-set-key [(f5)] 'kdab-insert-header)
;; (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)
;;
;; 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
-;; (setq kdab-prefix-qpe nil)
+;; (set kdab-prefix-qpe nil)
;; ------------------------------ CONFIGURATION ------------------------------
(defvar kdab-qt-documentation
@@ -245,10 +245,10 @@
(defun kdab-get-special-include-list ()
(let (elm header classes (list kdab-qpe-includes) filename (result kdab-special-includes))
(while list
- (setq elm (car list))
- (setq list (cdr list))
- (setq filename (concat (if kdab-prefix-qpe "qpe/" "") (symbol-name (car elm))))
- (setq result (cons (cons (intern filename) (cdr elm)) result)))
+ (set elm (car list))
+ (set list (cdr list))
+ (set filename (concat (if kdab-prefix-qpe "qpe/" "") (symbol-name (car elm))))
+ (set result (cons (cons (intern filename) (cdr elm)) result)))
result))
;; Lookup class `cls' in kdab-special-includes and return the associate include file name
@@ -261,9 +261,9 @@
(classes (cdr elm)))
( while (and classes (not found))
(if (string= (downcase cls) (downcase (symbol-name (car classes))))
- (setq found include-file)
- (setq classes (cdr classes)))))
- (setq list (cdr list)))
+ (set found include-file)
+ (set classes (cdr classes)))))
+ (set list (cdr list)))
(if found
(symbol-name found)
nil) ; return value
@@ -304,15 +304,15 @@
;; decide on the header file.
(if (file-exists-p (concat word-with-case ".h"))
(progn ; file exists in given case in pwd.
- (setq header (concat word-with-case ".h"))
- (setq is-local 't))
+ (set header (concat word-with-case ".h"))
+ (set is-local 't))
(if (file-exists-p (concat word ".h")) ; file exists in lowercase in pwd
(progn
- (setq header (concat word ".h"))
- (setq is-local 't))
+ (set header (concat word ".h"))
+ (set is-local 't))
(progn ; header in <..> path
- (setq header special-header)
- (setq is-local nil))))
+ (set header special-header)
+ (set is-local nil))))
(kdab-insert-include-file header is-local t))))
@@ -395,12 +395,12 @@
(defun is-qpe-class (class)
(let ((list kdab-qpe-includes) classes (found nil))
(while (and (not found) list)
- (setq classes (cdr (car list)))
+ (set classes (cdr (car list)))
(while classes
(if (string= (downcase (symbol-name (car classes))) (downcase class))
- (setq found 't))
- (setq classes (cdr classes)))
- (setq list (cdr list)))
+ (set found 't))
+ (set classes (cdr classes)))
+ (set list (cdr list)))
found))
;--------------------------------------------------------------------------------