Removed old emacs files
This commit is contained in:
parent
7c4787a7f4
commit
1ca854dbec
40 changed files with 0 additions and 37011 deletions
73
.emacs
73
.emacs
|
@ -1,73 +0,0 @@
|
||||||
(require 'paren)
|
|
||||||
(require 'uniquify)
|
|
||||||
|
|
||||||
(load-file "~/.emacs.d/include.el")
|
|
||||||
|
|
||||||
(if (eq system-type 'gnu/linux) ; if we're running linux
|
|
||||||
(load-file "~/.emacs.d/linux/.emacs"))
|
|
||||||
|
|
||||||
(setq inhibit-startup-message t) ; don't show welcome
|
|
||||||
(setq-default indent-tabs-mode nil) ; spaces, no tabs
|
|
||||||
(tool-bar-mode nil) ; no toolbar
|
|
||||||
(menu-bar-mode nil) ; no menu
|
|
||||||
(line-number-mode nil) ; don't show line numbers in splitter
|
|
||||||
(global-linum-mode t) ; show line numbers in gutter
|
|
||||||
(column-number-mode t) ; show column numbers in splitter
|
|
||||||
(color-theme-weirdness) ; my theme
|
|
||||||
(global-font-lock-mode t) ; always show syntax higlighting, this may
|
|
||||||
; be old
|
|
||||||
(fset 'yes-or-no-p 'y-or-n-p) ; don't want to have to type yes or no
|
|
||||||
(setq require-final-newline t) ; I always get bothered by this with the likes of fstab
|
|
||||||
(show-paren-mode t)
|
|
||||||
(setq font-lock-maximum-decoration t) ; denotes our interest in maximum possible fontification
|
|
||||||
(setq uniquify-buffer-name-style 'reverse)
|
|
||||||
|
|
||||||
;; Keybindings
|
|
||||||
(global-set-key "\C-m" 'newline-and-indent)
|
|
||||||
|
|
||||||
;; Autopair Mode
|
|
||||||
(autopair-global-mode)
|
|
||||||
|
|
||||||
;; Vala Mode
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.vala$" . vala-mode))
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.vapi$" . vala-mode))
|
|
||||||
(add-to-list 'file-coding-system-alist '("\\.vala$" . utf-8))
|
|
||||||
(add-to-list 'file-coding-system-alist '("\\.vapi$" . utf-8))
|
|
||||||
|
|
||||||
;; C# Mode
|
|
||||||
(setq auto-mode-alist (cons `("\\.cs\\'" . csharp-mode) auto-mode-alist))
|
|
||||||
|
|
||||||
;; Batch Mode
|
|
||||||
(setq auto-mode-alist (cons `("\\.bat\\'" . batch-mode) auto-mode-alist))
|
|
||||||
|
|
||||||
;; Autosave location
|
|
||||||
(setq backup-directory-alist
|
|
||||||
`((".*" . ,temporary-file-directory)))
|
|
||||||
(setq auto-save-file-name-transforms
|
|
||||||
`((".*" ,temporary-file-directory t)))
|
|
||||||
|
|
||||||
;; Autocomplete
|
|
||||||
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
|
|
||||||
(ac-config-default)
|
|
||||||
|
|
||||||
;; ide-skel
|
|
||||||
(global-set-key [f4] 'ide-skel-proj-find-files-by-regexp)
|
|
||||||
(global-set-key [f5] 'ide-skel-proj-grep-files-by-regexp)
|
|
||||||
(global-set-key [f10] 'ide-skel-toggle-left-view-window)
|
|
||||||
(global-set-key [f11] 'ide-skel-toggle-bottom-view-window)
|
|
||||||
(global-set-key [f12] 'ide-skel-toggle-right-view-window)
|
|
||||||
(global-set-key [C-next] 'tabbar-backward)
|
|
||||||
(global-set-key [C-prior] 'tabbar-forward)
|
|
||||||
|
|
||||||
(custom-set-variables
|
|
||||||
;; custom-set-variables was added by Custom.
|
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
|
||||||
;; Your init file should contain only one such instance.
|
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
)
|
|
||||||
(custom-set-faces
|
|
||||||
;; custom-set-faces was added by Custom.
|
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
|
||||||
;; Your init file should contain only one such instance.
|
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
)
|
|
|
@ -1,74 +0,0 @@
|
||||||
and
|
|
||||||
and_eq
|
|
||||||
asm
|
|
||||||
auto
|
|
||||||
bitand
|
|
||||||
bitor
|
|
||||||
bool
|
|
||||||
break
|
|
||||||
case
|
|
||||||
catch
|
|
||||||
char
|
|
||||||
class
|
|
||||||
compl
|
|
||||||
const
|
|
||||||
const_cast
|
|
||||||
continue
|
|
||||||
default
|
|
||||||
delete
|
|
||||||
do
|
|
||||||
double
|
|
||||||
dynamic_cast
|
|
||||||
else
|
|
||||||
enum
|
|
||||||
explicit
|
|
||||||
export
|
|
||||||
extern
|
|
||||||
false
|
|
||||||
float
|
|
||||||
for
|
|
||||||
friend
|
|
||||||
goto
|
|
||||||
if
|
|
||||||
inline
|
|
||||||
int
|
|
||||||
long
|
|
||||||
mutable
|
|
||||||
namespace
|
|
||||||
new
|
|
||||||
not
|
|
||||||
not_eq
|
|
||||||
operator
|
|
||||||
or
|
|
||||||
or_eq
|
|
||||||
private
|
|
||||||
protected
|
|
||||||
public
|
|
||||||
register
|
|
||||||
reinterpret_cast
|
|
||||||
return
|
|
||||||
short
|
|
||||||
signed
|
|
||||||
sizeof
|
|
||||||
static
|
|
||||||
static_cast
|
|
||||||
struct
|
|
||||||
switch
|
|
||||||
template
|
|
||||||
this
|
|
||||||
throw
|
|
||||||
true
|
|
||||||
try
|
|
||||||
typedef
|
|
||||||
typeid
|
|
||||||
typename
|
|
||||||
union
|
|
||||||
unsigned
|
|
||||||
using
|
|
||||||
virtual
|
|
||||||
void
|
|
||||||
volatile
|
|
||||||
wchar_t
|
|
||||||
while
|
|
||||||
xor
|
|
||||||
xor_eq
|
|
|
@ -1,37 +0,0 @@
|
||||||
auto
|
|
||||||
_Bool
|
|
||||||
break
|
|
||||||
case
|
|
||||||
char
|
|
||||||
_Complex
|
|
||||||
const
|
|
||||||
continue
|
|
||||||
default
|
|
||||||
do
|
|
||||||
double
|
|
||||||
else
|
|
||||||
enum
|
|
||||||
extern
|
|
||||||
float
|
|
||||||
for
|
|
||||||
goto
|
|
||||||
if
|
|
||||||
_Imaginary
|
|
||||||
inline
|
|
||||||
int
|
|
||||||
long
|
|
||||||
register
|
|
||||||
restrict
|
|
||||||
return
|
|
||||||
short
|
|
||||||
signed
|
|
||||||
sizeof
|
|
||||||
static
|
|
||||||
struct
|
|
||||||
switch
|
|
||||||
typedef
|
|
||||||
union
|
|
||||||
unsigned
|
|
||||||
void
|
|
||||||
volatile
|
|
||||||
while
|
|
|
@ -1,475 +0,0 @@
|
||||||
*agent*
|
|
||||||
*clojure-version*
|
|
||||||
*command-line-args*
|
|
||||||
*compile-files*
|
|
||||||
*compile-path*
|
|
||||||
*err*
|
|
||||||
*file*
|
|
||||||
*flush-on-newline*
|
|
||||||
*in*
|
|
||||||
*ns*
|
|
||||||
*out*
|
|
||||||
*print-dup*
|
|
||||||
*print-length*
|
|
||||||
*print-level*
|
|
||||||
*print-meta*
|
|
||||||
*print-readably*
|
|
||||||
*read-eval*
|
|
||||||
*warn-on-reflection*
|
|
||||||
accessor
|
|
||||||
aclone
|
|
||||||
add-classpath
|
|
||||||
add-watch
|
|
||||||
agent
|
|
||||||
agent-error
|
|
||||||
agent-errors
|
|
||||||
aget
|
|
||||||
alength
|
|
||||||
alias
|
|
||||||
all-ns
|
|
||||||
alter
|
|
||||||
alter-meta!
|
|
||||||
alter-var-root
|
|
||||||
amap
|
|
||||||
ancestors
|
|
||||||
and
|
|
||||||
apply
|
|
||||||
areduce
|
|
||||||
array-map
|
|
||||||
aset
|
|
||||||
aset-boolean
|
|
||||||
aset-byte
|
|
||||||
aset-char
|
|
||||||
aset-double
|
|
||||||
aset-float
|
|
||||||
aset-int
|
|
||||||
aset-long
|
|
||||||
aset-short
|
|
||||||
assert
|
|
||||||
assoc
|
|
||||||
assoc!
|
|
||||||
assoc-in
|
|
||||||
associative?
|
|
||||||
atom
|
|
||||||
await
|
|
||||||
await-for
|
|
||||||
bases
|
|
||||||
bean
|
|
||||||
bigdec
|
|
||||||
bigint
|
|
||||||
binding
|
|
||||||
bit-and
|
|
||||||
bit-and-not
|
|
||||||
bit-clear
|
|
||||||
bit-flip
|
|
||||||
bit-not
|
|
||||||
bit-or
|
|
||||||
bit-set
|
|
||||||
bit-shift-left
|
|
||||||
bit-shift-right
|
|
||||||
bit-test
|
|
||||||
bit-xor
|
|
||||||
boolean
|
|
||||||
boolean-array
|
|
||||||
booleans
|
|
||||||
bound-fn
|
|
||||||
bound-fn*
|
|
||||||
butlast
|
|
||||||
byte
|
|
||||||
byte-array
|
|
||||||
bytes
|
|
||||||
case
|
|
||||||
cast
|
|
||||||
char
|
|
||||||
char-array
|
|
||||||
char-escape-string
|
|
||||||
char-name-string
|
|
||||||
char?
|
|
||||||
chars
|
|
||||||
class
|
|
||||||
class?
|
|
||||||
clear-agent-errors
|
|
||||||
clojure-version
|
|
||||||
coll?
|
|
||||||
comment
|
|
||||||
commute
|
|
||||||
comp
|
|
||||||
comparator
|
|
||||||
compare
|
|
||||||
compare-and-set!
|
|
||||||
compile
|
|
||||||
complement
|
|
||||||
concat
|
|
||||||
cond
|
|
||||||
condp
|
|
||||||
conj
|
|
||||||
conj!
|
|
||||||
cons
|
|
||||||
constantly
|
|
||||||
construct-proxy
|
|
||||||
contains?
|
|
||||||
count
|
|
||||||
counted?
|
|
||||||
create-ns
|
|
||||||
create-struct
|
|
||||||
cycle
|
|
||||||
dec
|
|
||||||
decimal?
|
|
||||||
declare
|
|
||||||
definline
|
|
||||||
defmacro
|
|
||||||
defmethod
|
|
||||||
defmulti
|
|
||||||
defn
|
|
||||||
defn-
|
|
||||||
defonce
|
|
||||||
defprotocol
|
|
||||||
defstruct
|
|
||||||
deftype
|
|
||||||
delay
|
|
||||||
delay?
|
|
||||||
deliver
|
|
||||||
deref
|
|
||||||
derive
|
|
||||||
descendants
|
|
||||||
disj
|
|
||||||
disj!
|
|
||||||
dissoc
|
|
||||||
dissoc!
|
|
||||||
distinct
|
|
||||||
distinct?
|
|
||||||
doall
|
|
||||||
doc
|
|
||||||
dorun
|
|
||||||
doseq
|
|
||||||
dosync
|
|
||||||
dotimes
|
|
||||||
doto
|
|
||||||
double
|
|
||||||
double-array
|
|
||||||
doubles
|
|
||||||
drop
|
|
||||||
drop-last
|
|
||||||
drop-while
|
|
||||||
dtype
|
|
||||||
empty
|
|
||||||
empty?
|
|
||||||
ensure
|
|
||||||
enumeration-seq
|
|
||||||
error-handler
|
|
||||||
error-mode
|
|
||||||
eval
|
|
||||||
even?
|
|
||||||
every?
|
|
||||||
extend
|
|
||||||
extend-class
|
|
||||||
extend-protocol
|
|
||||||
extend-type
|
|
||||||
extenders
|
|
||||||
extends?
|
|
||||||
false?
|
|
||||||
ffirst
|
|
||||||
file-seq
|
|
||||||
filter
|
|
||||||
find
|
|
||||||
find-doc
|
|
||||||
find-ns
|
|
||||||
find-var
|
|
||||||
first
|
|
||||||
float
|
|
||||||
float-array
|
|
||||||
float?
|
|
||||||
floats
|
|
||||||
flush
|
|
||||||
fn
|
|
||||||
fn?
|
|
||||||
fnext
|
|
||||||
for
|
|
||||||
force
|
|
||||||
format
|
|
||||||
future
|
|
||||||
future-call
|
|
||||||
future-cancel
|
|
||||||
future-cancelled?
|
|
||||||
future-done?
|
|
||||||
future?
|
|
||||||
gen-class
|
|
||||||
gen-interface
|
|
||||||
gensym
|
|
||||||
get
|
|
||||||
get-in
|
|
||||||
get-method
|
|
||||||
get-proxy-class
|
|
||||||
get-thread-bindings
|
|
||||||
get-validator
|
|
||||||
hash
|
|
||||||
hash-map
|
|
||||||
hash-set
|
|
||||||
identical?
|
|
||||||
identity
|
|
||||||
if-let
|
|
||||||
if-not
|
|
||||||
ifn?
|
|
||||||
import
|
|
||||||
in-ns
|
|
||||||
inc
|
|
||||||
init-proxy
|
|
||||||
instance?
|
|
||||||
int
|
|
||||||
int-array
|
|
||||||
integer?
|
|
||||||
interleave
|
|
||||||
intern
|
|
||||||
interpose
|
|
||||||
into
|
|
||||||
into-array
|
|
||||||
ints
|
|
||||||
io!
|
|
||||||
isa?
|
|
||||||
iterate
|
|
||||||
iterator-seq
|
|
||||||
juxt
|
|
||||||
key
|
|
||||||
keys
|
|
||||||
keyword
|
|
||||||
keyword?
|
|
||||||
last
|
|
||||||
lazy-cat
|
|
||||||
lazy-seq
|
|
||||||
let
|
|
||||||
letfn
|
|
||||||
line-seq
|
|
||||||
list
|
|
||||||
list*
|
|
||||||
list?
|
|
||||||
load
|
|
||||||
load-file
|
|
||||||
load-reader
|
|
||||||
load-string
|
|
||||||
loaded-libs
|
|
||||||
locking
|
|
||||||
long
|
|
||||||
long-array
|
|
||||||
longs
|
|
||||||
loop
|
|
||||||
macroexpand
|
|
||||||
macroexpand-1
|
|
||||||
make-array
|
|
||||||
make-hierarchy
|
|
||||||
map
|
|
||||||
map?
|
|
||||||
mapcat
|
|
||||||
max
|
|
||||||
max-key
|
|
||||||
memfn
|
|
||||||
memoize
|
|
||||||
merge
|
|
||||||
merge-with
|
|
||||||
meta
|
|
||||||
methods
|
|
||||||
min
|
|
||||||
min-key
|
|
||||||
mod
|
|
||||||
name
|
|
||||||
namespace
|
|
||||||
neg?
|
|
||||||
newline
|
|
||||||
next
|
|
||||||
nfirst
|
|
||||||
nil?
|
|
||||||
nnext
|
|
||||||
not
|
|
||||||
not-any?
|
|
||||||
not-empty
|
|
||||||
not-every?
|
|
||||||
not=
|
|
||||||
ns
|
|
||||||
ns-aliases
|
|
||||||
ns-imports
|
|
||||||
ns-interns
|
|
||||||
ns-map
|
|
||||||
ns-name
|
|
||||||
ns-publics
|
|
||||||
ns-refers
|
|
||||||
ns-resolve
|
|
||||||
ns-unalias
|
|
||||||
ns-unmap
|
|
||||||
nth
|
|
||||||
nthnext
|
|
||||||
num
|
|
||||||
number?
|
|
||||||
object-array
|
|
||||||
odd?
|
|
||||||
or
|
|
||||||
parents
|
|
||||||
partial
|
|
||||||
partition
|
|
||||||
pcalls
|
|
||||||
peek
|
|
||||||
persistent!
|
|
||||||
pmap
|
|
||||||
pop
|
|
||||||
pop!
|
|
||||||
pop-thread-bindings
|
|
||||||
pos?
|
|
||||||
pr
|
|
||||||
pr-str
|
|
||||||
prefer-method
|
|
||||||
prefers
|
|
||||||
print
|
|
||||||
print-namespace-doc
|
|
||||||
print-str
|
|
||||||
printf
|
|
||||||
println
|
|
||||||
println-str
|
|
||||||
prn
|
|
||||||
prn-str
|
|
||||||
promise
|
|
||||||
proxy
|
|
||||||
proxy-mappings
|
|
||||||
proxy-super
|
|
||||||
push-thread-bindings
|
|
||||||
pvalues
|
|
||||||
quot
|
|
||||||
rand
|
|
||||||
rand-int
|
|
||||||
range
|
|
||||||
ratio?
|
|
||||||
rationalize
|
|
||||||
re-find
|
|
||||||
re-groups
|
|
||||||
re-matcher
|
|
||||||
re-matches
|
|
||||||
re-pattern
|
|
||||||
re-seq
|
|
||||||
read
|
|
||||||
read-line
|
|
||||||
read-string
|
|
||||||
reduce
|
|
||||||
ref
|
|
||||||
ref-history-count
|
|
||||||
ref-max-history
|
|
||||||
ref-min-history
|
|
||||||
ref-set
|
|
||||||
refer
|
|
||||||
refer-clojure
|
|
||||||
reify
|
|
||||||
release-pending-sends
|
|
||||||
rem
|
|
||||||
remove
|
|
||||||
remove-method
|
|
||||||
remove-ns
|
|
||||||
remove-watch
|
|
||||||
repeat
|
|
||||||
repeatedly
|
|
||||||
replace
|
|
||||||
replicate
|
|
||||||
require
|
|
||||||
reset!
|
|
||||||
reset-meta!
|
|
||||||
resolve
|
|
||||||
rest
|
|
||||||
restart-agent
|
|
||||||
resultset-seq
|
|
||||||
reverse
|
|
||||||
reversible?
|
|
||||||
rseq
|
|
||||||
rsubseq
|
|
||||||
satisfies?
|
|
||||||
second
|
|
||||||
select-keys
|
|
||||||
send
|
|
||||||
send-off
|
|
||||||
seq
|
|
||||||
seq?
|
|
||||||
seque
|
|
||||||
sequence
|
|
||||||
sequential?
|
|
||||||
set
|
|
||||||
set-error-handler!
|
|
||||||
set-error-mode!
|
|
||||||
set-validator!
|
|
||||||
set?
|
|
||||||
short
|
|
||||||
short-array
|
|
||||||
shorts
|
|
||||||
shutdown-agents
|
|
||||||
slurp
|
|
||||||
some
|
|
||||||
sort
|
|
||||||
sort-by
|
|
||||||
sorted-map
|
|
||||||
sorted-map-by
|
|
||||||
sorted-set
|
|
||||||
sorted-set-by
|
|
||||||
sorted?
|
|
||||||
special-form-anchor
|
|
||||||
special-symbol?
|
|
||||||
split-at
|
|
||||||
split-with
|
|
||||||
str
|
|
||||||
stream?
|
|
||||||
string?
|
|
||||||
struct
|
|
||||||
struct-map
|
|
||||||
subs
|
|
||||||
subseq
|
|
||||||
subvec
|
|
||||||
supers
|
|
||||||
swap!
|
|
||||||
symbol
|
|
||||||
symbol?
|
|
||||||
sync
|
|
||||||
syntax-symbol-anchor
|
|
||||||
take
|
|
||||||
take-last
|
|
||||||
take-nth
|
|
||||||
take-while
|
|
||||||
test
|
|
||||||
the-ns
|
|
||||||
time
|
|
||||||
to-array
|
|
||||||
to-array-2d
|
|
||||||
trampoline
|
|
||||||
transient
|
|
||||||
tree-seq
|
|
||||||
true?
|
|
||||||
type
|
|
||||||
unchecked-add
|
|
||||||
unchecked-dec
|
|
||||||
unchecked-divide
|
|
||||||
unchecked-inc
|
|
||||||
unchecked-multiply
|
|
||||||
unchecked-negate
|
|
||||||
unchecked-remainder
|
|
||||||
unchecked-subtract
|
|
||||||
underive
|
|
||||||
update-in
|
|
||||||
update-proxy
|
|
||||||
use
|
|
||||||
val
|
|
||||||
vals
|
|
||||||
var-get
|
|
||||||
var-set
|
|
||||||
var?
|
|
||||||
vary-meta
|
|
||||||
vec
|
|
||||||
vector
|
|
||||||
vector-of
|
|
||||||
vector?
|
|
||||||
when
|
|
||||||
when-first
|
|
||||||
when-let
|
|
||||||
when-not
|
|
||||||
while
|
|
||||||
with-bindings
|
|
||||||
with-bindings*
|
|
||||||
with-in-str
|
|
||||||
with-local-vars
|
|
||||||
with-meta
|
|
||||||
with-open
|
|
||||||
with-out-str
|
|
||||||
with-precision
|
|
||||||
xml-seq
|
|
||||||
zero?
|
|
||||||
zipmap
|
|
|
@ -1,747 +0,0 @@
|
||||||
!important
|
|
||||||
ActiveBorder
|
|
||||||
ActiveCaption
|
|
||||||
Alpha
|
|
||||||
AppWorkspace
|
|
||||||
Background
|
|
||||||
Barn
|
|
||||||
BasicImage
|
|
||||||
Blinds
|
|
||||||
Blur
|
|
||||||
ButtonFace
|
|
||||||
ButtonHighlight
|
|
||||||
ButtonShadow
|
|
||||||
ButtonText
|
|
||||||
CaptionText
|
|
||||||
CheckerBoard
|
|
||||||
Chroma
|
|
||||||
Compositor
|
|
||||||
CradientWipe
|
|
||||||
DXImageTransform
|
|
||||||
DropShadow
|
|
||||||
Emboss
|
|
||||||
Engrave
|
|
||||||
Fade
|
|
||||||
FlipH
|
|
||||||
FlipV
|
|
||||||
Glow
|
|
||||||
Gray
|
|
||||||
GrayText
|
|
||||||
Highlight
|
|
||||||
HighlightText
|
|
||||||
Hz
|
|
||||||
ICMFilter
|
|
||||||
InactiveBorder
|
|
||||||
InactiveCaption
|
|
||||||
InactiveCaptionText
|
|
||||||
InfoBackground
|
|
||||||
InfoText
|
|
||||||
Inset
|
|
||||||
Invert
|
|
||||||
Iris
|
|
||||||
Light
|
|
||||||
MaskFilter
|
|
||||||
Matrix
|
|
||||||
Menu
|
|
||||||
MenuText
|
|
||||||
Microsoft
|
|
||||||
MotionBlur
|
|
||||||
Pixelate
|
|
||||||
RadialWipe
|
|
||||||
RandomBars
|
|
||||||
RandomDissolve
|
|
||||||
RevealTrans
|
|
||||||
Scrollbar
|
|
||||||
Shadow
|
|
||||||
Slide
|
|
||||||
Spiral
|
|
||||||
Stretch
|
|
||||||
Strips
|
|
||||||
ThreeDDarkShadow
|
|
||||||
ThreeDFace
|
|
||||||
ThreeDHighlight
|
|
||||||
ThreeDLightShadow
|
|
||||||
ThreeDShadow
|
|
||||||
Wave
|
|
||||||
Wheel
|
|
||||||
Window
|
|
||||||
WindowFrame
|
|
||||||
WindowText
|
|
||||||
Xray
|
|
||||||
Zigzag
|
|
||||||
_azimuth
|
|
||||||
_background
|
|
||||||
_background-position-x
|
|
||||||
_background-position-y
|
|
||||||
_border
|
|
||||||
_bottom
|
|
||||||
_caption
|
|
||||||
_clear
|
|
||||||
_clip
|
|
||||||
_color
|
|
||||||
_content
|
|
||||||
_counter
|
|
||||||
_cue
|
|
||||||
_cursor
|
|
||||||
_direction
|
|
||||||
_display
|
|
||||||
_elevation
|
|
||||||
_empty
|
|
||||||
_filter
|
|
||||||
_filter:progid:DXImageTransform.Microsoft
|
|
||||||
_float
|
|
||||||
_font
|
|
||||||
_height
|
|
||||||
_ime
|
|
||||||
_ime-mode
|
|
||||||
_layout
|
|
||||||
_layout-flow
|
|
||||||
_layout-grid
|
|
||||||
_layout-grid-char
|
|
||||||
_layout-grid-line
|
|
||||||
_layout-grid-mode
|
|
||||||
_layout-grid-type
|
|
||||||
_left
|
|
||||||
_letter
|
|
||||||
_line
|
|
||||||
_line-break
|
|
||||||
_list
|
|
||||||
_margin
|
|
||||||
_orphans
|
|
||||||
_outline
|
|
||||||
_overflow
|
|
||||||
_overflow-x
|
|
||||||
_overflow-y
|
|
||||||
_padding
|
|
||||||
_page
|
|
||||||
_pause
|
|
||||||
_pitch
|
|
||||||
_play
|
|
||||||
_position
|
|
||||||
_quotes
|
|
||||||
_richness
|
|
||||||
_right
|
|
||||||
_ruby
|
|
||||||
_ruby-align
|
|
||||||
_ruby-overhang
|
|
||||||
_ruby-position
|
|
||||||
_scrollbar
|
|
||||||
_scrollbar-3dlight-color
|
|
||||||
_scrollbar-arrow-color
|
|
||||||
_scrollbar-base-color
|
|
||||||
_scrollbar-darkshadow-color
|
|
||||||
_scrollbar-face-color
|
|
||||||
_scrollbar-highlight-color
|
|
||||||
_scrollbar-track-color
|
|
||||||
_speak
|
|
||||||
_speech
|
|
||||||
_stress
|
|
||||||
_table
|
|
||||||
_text
|
|
||||||
_text-align-last
|
|
||||||
_text-autospace
|
|
||||||
_text-justify
|
|
||||||
_text-kashida-space
|
|
||||||
_text-overflow
|
|
||||||
_text-underline-position
|
|
||||||
_top
|
|
||||||
_unicode
|
|
||||||
_vertical
|
|
||||||
_visibility
|
|
||||||
_voice
|
|
||||||
_volume
|
|
||||||
_white
|
|
||||||
_widows
|
|
||||||
_width
|
|
||||||
_word
|
|
||||||
_word-break
|
|
||||||
_word-wrap
|
|
||||||
_writing
|
|
||||||
_writing-mode
|
|
||||||
_z
|
|
||||||
_zoom
|
|
||||||
above
|
|
||||||
active
|
|
||||||
adjust
|
|
||||||
after
|
|
||||||
aliceblue
|
|
||||||
align
|
|
||||||
always
|
|
||||||
antiquewhite
|
|
||||||
aqua
|
|
||||||
aquamarine
|
|
||||||
armenian
|
|
||||||
arrow
|
|
||||||
attachment
|
|
||||||
auto
|
|
||||||
autospace
|
|
||||||
avoid
|
|
||||||
azimuth
|
|
||||||
azure
|
|
||||||
background
|
|
||||||
background-attachment
|
|
||||||
background-color
|
|
||||||
background-image
|
|
||||||
background-position
|
|
||||||
background-repeat
|
|
||||||
bar
|
|
||||||
base
|
|
||||||
baseline
|
|
||||||
before
|
|
||||||
behind
|
|
||||||
beige
|
|
||||||
below
|
|
||||||
bidi
|
|
||||||
bidi-override
|
|
||||||
bisque
|
|
||||||
black
|
|
||||||
blanchedalmond
|
|
||||||
blink
|
|
||||||
block
|
|
||||||
blue
|
|
||||||
blueviolet
|
|
||||||
bold
|
|
||||||
bolder
|
|
||||||
border
|
|
||||||
border-bottom
|
|
||||||
border-bottom-color
|
|
||||||
border-bottom-style
|
|
||||||
border-bottom-width
|
|
||||||
border-collapse
|
|
||||||
border-color
|
|
||||||
border-left
|
|
||||||
border-left-color
|
|
||||||
border-left-style
|
|
||||||
border-left-width
|
|
||||||
border-right
|
|
||||||
border-right-color
|
|
||||||
border-right-style
|
|
||||||
border-right-width
|
|
||||||
border-spacing
|
|
||||||
border-style
|
|
||||||
border-top
|
|
||||||
border-top-color
|
|
||||||
border-top-style
|
|
||||||
border-top-width
|
|
||||||
border-width
|
|
||||||
both
|
|
||||||
bottom
|
|
||||||
box
|
|
||||||
break
|
|
||||||
brown
|
|
||||||
burlwood
|
|
||||||
cadetblue
|
|
||||||
capitalize
|
|
||||||
caps
|
|
||||||
caption
|
|
||||||
caption-side
|
|
||||||
cell
|
|
||||||
cells
|
|
||||||
center
|
|
||||||
center-left
|
|
||||||
center-right
|
|
||||||
char
|
|
||||||
chartreuse
|
|
||||||
chocolate
|
|
||||||
circle
|
|
||||||
cjk
|
|
||||||
cjk-ideographic
|
|
||||||
clear
|
|
||||||
clip
|
|
||||||
close
|
|
||||||
close-quote
|
|
||||||
cm
|
|
||||||
code
|
|
||||||
collapse
|
|
||||||
color
|
|
||||||
column
|
|
||||||
compact
|
|
||||||
condensed
|
|
||||||
content
|
|
||||||
continuous
|
|
||||||
coral
|
|
||||||
cornflowerblue
|
|
||||||
cornsilk
|
|
||||||
counter
|
|
||||||
counter-increment
|
|
||||||
counter-reset
|
|
||||||
crimson
|
|
||||||
crop
|
|
||||||
cross
|
|
||||||
crosshair
|
|
||||||
cue
|
|
||||||
cue-after
|
|
||||||
cue-before
|
|
||||||
cursive
|
|
||||||
cursor
|
|
||||||
cyan
|
|
||||||
darkblue
|
|
||||||
darkcyan
|
|
||||||
darkgoldenrod
|
|
||||||
darkgray
|
|
||||||
darkgreen
|
|
||||||
darkkhaki
|
|
||||||
darkmagenta
|
|
||||||
darkolivegreen
|
|
||||||
darkorange
|
|
||||||
darkorchid
|
|
||||||
darkred
|
|
||||||
darksalmon
|
|
||||||
darkseagreen
|
|
||||||
darkshadow
|
|
||||||
darkslateblue
|
|
||||||
darkslategray
|
|
||||||
darkturquoise
|
|
||||||
darkviolet
|
|
||||||
dashed
|
|
||||||
decimal
|
|
||||||
decimal-leading-zero
|
|
||||||
decoration
|
|
||||||
deeppink
|
|
||||||
deepskyblue
|
|
||||||
default
|
|
||||||
deg
|
|
||||||
digits
|
|
||||||
dimgray
|
|
||||||
direction
|
|
||||||
disc
|
|
||||||
display
|
|
||||||
dodgerblue
|
|
||||||
dotted
|
|
||||||
double
|
|
||||||
during
|
|
||||||
e
|
|
||||||
e-resize
|
|
||||||
elevation
|
|
||||||
em
|
|
||||||
embed
|
|
||||||
empty
|
|
||||||
empty-cells
|
|
||||||
ex
|
|
||||||
expanded
|
|
||||||
extra
|
|
||||||
extra-condensed
|
|
||||||
extra-expanded
|
|
||||||
face
|
|
||||||
family
|
|
||||||
fantasy
|
|
||||||
far
|
|
||||||
far-left
|
|
||||||
far-right
|
|
||||||
fast
|
|
||||||
faster
|
|
||||||
firebrick
|
|
||||||
first
|
|
||||||
first-child
|
|
||||||
first-letter
|
|
||||||
first-line
|
|
||||||
fixed
|
|
||||||
float
|
|
||||||
floralwhite
|
|
||||||
flow
|
|
||||||
focus
|
|
||||||
font
|
|
||||||
font-family
|
|
||||||
font-size
|
|
||||||
font-size-adjust
|
|
||||||
font-stretch
|
|
||||||
font-style
|
|
||||||
font-variant
|
|
||||||
font-weight
|
|
||||||
footer
|
|
||||||
forestgreen
|
|
||||||
fuchsia
|
|
||||||
gainsboro
|
|
||||||
georgian
|
|
||||||
ghostwhite
|
|
||||||
gold
|
|
||||||
goldenrod
|
|
||||||
gray
|
|
||||||
greek
|
|
||||||
green
|
|
||||||
greenyellow
|
|
||||||
grid
|
|
||||||
groove
|
|
||||||
group
|
|
||||||
header
|
|
||||||
hebrew
|
|
||||||
height
|
|
||||||
help
|
|
||||||
hidden
|
|
||||||
hide
|
|
||||||
high
|
|
||||||
higher
|
|
||||||
hiragana
|
|
||||||
hiragana-iroha
|
|
||||||
honeydew
|
|
||||||
hotpink
|
|
||||||
hover
|
|
||||||
icon
|
|
||||||
ideographic
|
|
||||||
image
|
|
||||||
in
|
|
||||||
increment
|
|
||||||
indent
|
|
||||||
index
|
|
||||||
indianred
|
|
||||||
indigo
|
|
||||||
inherit
|
|
||||||
inline
|
|
||||||
inline-block
|
|
||||||
inline-table
|
|
||||||
inset
|
|
||||||
inside
|
|
||||||
iroha
|
|
||||||
italic
|
|
||||||
item
|
|
||||||
ivory
|
|
||||||
justify
|
|
||||||
kHz
|
|
||||||
kashida
|
|
||||||
katakana
|
|
||||||
katakana-iroha
|
|
||||||
khaki
|
|
||||||
landscape
|
|
||||||
lang()
|
|
||||||
large
|
|
||||||
larger
|
|
||||||
last
|
|
||||||
latin
|
|
||||||
lavender
|
|
||||||
lavenderblush
|
|
||||||
lawngreen
|
|
||||||
layout
|
|
||||||
leading
|
|
||||||
left
|
|
||||||
left-side
|
|
||||||
leftwards
|
|
||||||
lenonchiffon
|
|
||||||
letter
|
|
||||||
letter-spacing
|
|
||||||
level
|
|
||||||
lightblue
|
|
||||||
lightcoral
|
|
||||||
lightcyan
|
|
||||||
lighter
|
|
||||||
lightgoldenrodyellow
|
|
||||||
lightgray
|
|
||||||
lightgreen
|
|
||||||
lightgrey
|
|
||||||
lightpink
|
|
||||||
lightsalmon
|
|
||||||
lightseagreen
|
|
||||||
lightskyblue
|
|
||||||
lightslategray
|
|
||||||
lightsteelblue
|
|
||||||
lightyellow
|
|
||||||
lime
|
|
||||||
limegreen
|
|
||||||
line
|
|
||||||
line-height
|
|
||||||
line-through
|
|
||||||
linen
|
|
||||||
link
|
|
||||||
list
|
|
||||||
list-item
|
|
||||||
list-style
|
|
||||||
list-style-image
|
|
||||||
list-style-position
|
|
||||||
list-style-type
|
|
||||||
loud
|
|
||||||
low
|
|
||||||
lower
|
|
||||||
lower-alpha
|
|
||||||
lower-greek
|
|
||||||
lower-latin
|
|
||||||
lower-roman
|
|
||||||
lowercase
|
|
||||||
ltr
|
|
||||||
magenta
|
|
||||||
margin
|
|
||||||
margin-bottom
|
|
||||||
margin-left
|
|
||||||
margin-right
|
|
||||||
margin-top
|
|
||||||
marker
|
|
||||||
marker-offset
|
|
||||||
marks
|
|
||||||
maroon
|
|
||||||
max
|
|
||||||
max-height
|
|
||||||
max-width
|
|
||||||
medium
|
|
||||||
mediumaquamarine
|
|
||||||
mediumblue
|
|
||||||
mediumorchid
|
|
||||||
mediumpurple
|
|
||||||
mediumseagreen
|
|
||||||
mediumslateblue
|
|
||||||
mediumspringgreen
|
|
||||||
mediumturquoise
|
|
||||||
mediumvioletred
|
|
||||||
menu
|
|
||||||
message
|
|
||||||
message-box
|
|
||||||
middle
|
|
||||||
midnightblue
|
|
||||||
min
|
|
||||||
min-height
|
|
||||||
min-width
|
|
||||||
mintcream
|
|
||||||
mistyrose
|
|
||||||
mix
|
|
||||||
mm
|
|
||||||
moccasin
|
|
||||||
mode
|
|
||||||
monospace
|
|
||||||
move
|
|
||||||
ms
|
|
||||||
n
|
|
||||||
n-resize
|
|
||||||
naby
|
|
||||||
narrower
|
|
||||||
navajowhite
|
|
||||||
ne
|
|
||||||
ne-resize
|
|
||||||
no
|
|
||||||
no-close-quote
|
|
||||||
no-open-quote
|
|
||||||
no-repeat
|
|
||||||
none
|
|
||||||
normal
|
|
||||||
nowrap
|
|
||||||
number
|
|
||||||
numeral
|
|
||||||
nw
|
|
||||||
nw-resize
|
|
||||||
oblique
|
|
||||||
offset
|
|
||||||
oldlace
|
|
||||||
olive
|
|
||||||
olivedrab
|
|
||||||
once
|
|
||||||
open
|
|
||||||
open-quote
|
|
||||||
orange
|
|
||||||
orangered
|
|
||||||
orchid
|
|
||||||
orphans
|
|
||||||
out
|
|
||||||
outline
|
|
||||||
outline-color
|
|
||||||
outline-style
|
|
||||||
outline-width
|
|
||||||
outset
|
|
||||||
outside
|
|
||||||
overflow
|
|
||||||
overhang
|
|
||||||
overline
|
|
||||||
override
|
|
||||||
padding
|
|
||||||
padding-bottom
|
|
||||||
padding-left
|
|
||||||
padding-right
|
|
||||||
padding-top
|
|
||||||
page
|
|
||||||
page-break-after
|
|
||||||
page-break-before
|
|
||||||
page-break-inside
|
|
||||||
palegoldenrod
|
|
||||||
palegreen
|
|
||||||
paleturquoise
|
|
||||||
palevioletred
|
|
||||||
papayawhip
|
|
||||||
pause
|
|
||||||
pause-after
|
|
||||||
pause-before
|
|
||||||
pc
|
|
||||||
peachpuff
|
|
||||||
peru
|
|
||||||
pink
|
|
||||||
pitch
|
|
||||||
pitch-range
|
|
||||||
play
|
|
||||||
play-during
|
|
||||||
plum
|
|
||||||
pointer
|
|
||||||
portarait
|
|
||||||
position
|
|
||||||
powderblue
|
|
||||||
pre
|
|
||||||
pre-line
|
|
||||||
pre-wrap
|
|
||||||
progid
|
|
||||||
progress
|
|
||||||
pt
|
|
||||||
punctuation
|
|
||||||
purple
|
|
||||||
px
|
|
||||||
quote
|
|
||||||
quotes
|
|
||||||
rad
|
|
||||||
range
|
|
||||||
rate
|
|
||||||
red
|
|
||||||
relative
|
|
||||||
repeat
|
|
||||||
repeat-x
|
|
||||||
repeat-y
|
|
||||||
reset
|
|
||||||
resize
|
|
||||||
richness
|
|
||||||
ridge
|
|
||||||
right
|
|
||||||
right-side
|
|
||||||
rightwards
|
|
||||||
roman
|
|
||||||
rosybrown
|
|
||||||
row
|
|
||||||
royalblue
|
|
||||||
rtl
|
|
||||||
run
|
|
||||||
run-in
|
|
||||||
s
|
|
||||||
s-resize
|
|
||||||
saddlebrown
|
|
||||||
salmon
|
|
||||||
sandybrown
|
|
||||||
sans-serif
|
|
||||||
scroll
|
|
||||||
se
|
|
||||||
se-resize
|
|
||||||
seagreen
|
|
||||||
seashell
|
|
||||||
semi
|
|
||||||
semi-condensed
|
|
||||||
semi-expanded
|
|
||||||
separate
|
|
||||||
serif
|
|
||||||
shadow
|
|
||||||
show
|
|
||||||
side
|
|
||||||
sienna
|
|
||||||
silent
|
|
||||||
silever
|
|
||||||
silver
|
|
||||||
size
|
|
||||||
skyblue
|
|
||||||
slateblue
|
|
||||||
slategray
|
|
||||||
slow
|
|
||||||
slower
|
|
||||||
small
|
|
||||||
small-caps
|
|
||||||
small-caption
|
|
||||||
smaller
|
|
||||||
snow
|
|
||||||
soft
|
|
||||||
solid
|
|
||||||
space
|
|
||||||
spacing
|
|
||||||
speak
|
|
||||||
speak-header
|
|
||||||
speak-numeral
|
|
||||||
speak-punctuation
|
|
||||||
specific
|
|
||||||
specific-voice
|
|
||||||
speech
|
|
||||||
speech-rate
|
|
||||||
spell
|
|
||||||
spell-out
|
|
||||||
springgreen
|
|
||||||
square
|
|
||||||
static
|
|
||||||
status
|
|
||||||
status-bar
|
|
||||||
steelblue
|
|
||||||
stress
|
|
||||||
stretch
|
|
||||||
style
|
|
||||||
sub
|
|
||||||
super
|
|
||||||
sw
|
|
||||||
sw-resize
|
|
||||||
table
|
|
||||||
table-caption
|
|
||||||
table-cell
|
|
||||||
table-column
|
|
||||||
table-column-group
|
|
||||||
table-footer-group
|
|
||||||
table-header-group
|
|
||||||
table-layout
|
|
||||||
table-row
|
|
||||||
table-row-group
|
|
||||||
tan
|
|
||||||
teal
|
|
||||||
text
|
|
||||||
text-align
|
|
||||||
text-bottom
|
|
||||||
text-decoration
|
|
||||||
text-indent
|
|
||||||
text-shadow
|
|
||||||
text-top
|
|
||||||
text-transform
|
|
||||||
thick
|
|
||||||
thin
|
|
||||||
thistle
|
|
||||||
through
|
|
||||||
tomato
|
|
||||||
top
|
|
||||||
track
|
|
||||||
transform
|
|
||||||
transparent
|
|
||||||
turquoise
|
|
||||||
type
|
|
||||||
ultra
|
|
||||||
ultra-condensed
|
|
||||||
ultra-expanded
|
|
||||||
underline
|
|
||||||
unicode
|
|
||||||
unicode-bidi
|
|
||||||
upper
|
|
||||||
upper-alpha
|
|
||||||
upper-latin
|
|
||||||
upper-roman
|
|
||||||
uppercase
|
|
||||||
variant
|
|
||||||
vertical
|
|
||||||
vertical-align
|
|
||||||
violet
|
|
||||||
visibility
|
|
||||||
visible
|
|
||||||
visited
|
|
||||||
voice
|
|
||||||
voice-family
|
|
||||||
volume
|
|
||||||
w
|
|
||||||
w-resize
|
|
||||||
wait
|
|
||||||
weight
|
|
||||||
wheat
|
|
||||||
white
|
|
||||||
white-space
|
|
||||||
whitesmoke
|
|
||||||
wider
|
|
||||||
widows
|
|
||||||
width
|
|
||||||
word
|
|
||||||
word-spacing
|
|
||||||
wrap
|
|
||||||
x
|
|
||||||
x-fast
|
|
||||||
x-high
|
|
||||||
x-large
|
|
||||||
x-loud
|
|
||||||
x-low
|
|
||||||
x-slow
|
|
||||||
x-small
|
|
||||||
x-soft
|
|
||||||
xx
|
|
||||||
xx-large
|
|
||||||
xx-small
|
|
||||||
y
|
|
||||||
yellow
|
|
||||||
yellowgreen
|
|
||||||
z
|
|
||||||
z-index
|
|
||||||
zero
|
|
|
@ -1,50 +0,0 @@
|
||||||
abstract
|
|
||||||
assert
|
|
||||||
boolean
|
|
||||||
break
|
|
||||||
byte
|
|
||||||
case
|
|
||||||
catch
|
|
||||||
char
|
|
||||||
class
|
|
||||||
const
|
|
||||||
continue
|
|
||||||
default
|
|
||||||
do
|
|
||||||
double
|
|
||||||
else
|
|
||||||
enum
|
|
||||||
extends
|
|
||||||
final
|
|
||||||
finally
|
|
||||||
float
|
|
||||||
for
|
|
||||||
goto
|
|
||||||
if
|
|
||||||
implements
|
|
||||||
import
|
|
||||||
instanceof
|
|
||||||
int
|
|
||||||
interface
|
|
||||||
long
|
|
||||||
native
|
|
||||||
new
|
|
||||||
package
|
|
||||||
private
|
|
||||||
protected
|
|
||||||
public
|
|
||||||
return
|
|
||||||
short
|
|
||||||
static
|
|
||||||
strictfp
|
|
||||||
super
|
|
||||||
switch
|
|
||||||
synchronized
|
|
||||||
this
|
|
||||||
throw
|
|
||||||
throws
|
|
||||||
transient
|
|
||||||
try
|
|
||||||
void
|
|
||||||
volatile
|
|
||||||
while
|
|
|
@ -1,148 +0,0 @@
|
||||||
Anchor
|
|
||||||
Area
|
|
||||||
Array
|
|
||||||
Boolean
|
|
||||||
Button
|
|
||||||
Checkbox
|
|
||||||
Date
|
|
||||||
Document
|
|
||||||
Element
|
|
||||||
FileUpload
|
|
||||||
Form
|
|
||||||
Frame
|
|
||||||
Function
|
|
||||||
Hidden
|
|
||||||
History
|
|
||||||
Image
|
|
||||||
Infinity
|
|
||||||
JavaArray
|
|
||||||
JavaClass
|
|
||||||
JavaObject
|
|
||||||
JavaPackage
|
|
||||||
Link
|
|
||||||
Location
|
|
||||||
Math
|
|
||||||
MimeType
|
|
||||||
NaN
|
|
||||||
Navigator
|
|
||||||
Number
|
|
||||||
Object
|
|
||||||
Option
|
|
||||||
Packages
|
|
||||||
Password
|
|
||||||
Plugin
|
|
||||||
Radio
|
|
||||||
RegExp
|
|
||||||
Reset
|
|
||||||
Select
|
|
||||||
String
|
|
||||||
Submit
|
|
||||||
Text
|
|
||||||
Textarea
|
|
||||||
Window
|
|
||||||
alert
|
|
||||||
arguments
|
|
||||||
assign
|
|
||||||
blur
|
|
||||||
break
|
|
||||||
callee
|
|
||||||
caller
|
|
||||||
captureEvents
|
|
||||||
case
|
|
||||||
clearInterval
|
|
||||||
clearTimeout
|
|
||||||
close
|
|
||||||
closed
|
|
||||||
comment
|
|
||||||
confirm
|
|
||||||
constructor
|
|
||||||
continue
|
|
||||||
default
|
|
||||||
defaultStatus
|
|
||||||
delete
|
|
||||||
do
|
|
||||||
document
|
|
||||||
else
|
|
||||||
escape
|
|
||||||
eval
|
|
||||||
export
|
|
||||||
find
|
|
||||||
focus
|
|
||||||
for
|
|
||||||
frames
|
|
||||||
function
|
|
||||||
getClass
|
|
||||||
history
|
|
||||||
home
|
|
||||||
if
|
|
||||||
import
|
|
||||||
in
|
|
||||||
innerHeight
|
|
||||||
innerWidth
|
|
||||||
isFinite
|
|
||||||
isNan
|
|
||||||
java
|
|
||||||
label
|
|
||||||
length
|
|
||||||
location
|
|
||||||
locationbar
|
|
||||||
menubar
|
|
||||||
moveBy
|
|
||||||
moveTo
|
|
||||||
name
|
|
||||||
navigate
|
|
||||||
navigator
|
|
||||||
netscape
|
|
||||||
new
|
|
||||||
onBlur
|
|
||||||
onError
|
|
||||||
onFocus
|
|
||||||
onLoad
|
|
||||||
onUnload
|
|
||||||
open
|
|
||||||
opener
|
|
||||||
outerHeight
|
|
||||||
outerWidth
|
|
||||||
pageXoffset
|
|
||||||
pageYoffset
|
|
||||||
parent
|
|
||||||
parseFloat
|
|
||||||
parseInt
|
|
||||||
personalbar
|
|
||||||
print
|
|
||||||
prompt
|
|
||||||
prototype
|
|
||||||
ref
|
|
||||||
releaseEvents
|
|
||||||
resizeBy
|
|
||||||
resizeTo
|
|
||||||
return
|
|
||||||
routeEvent
|
|
||||||
scroll
|
|
||||||
scrollBy
|
|
||||||
scrollTo
|
|
||||||
scrollbars
|
|
||||||
self
|
|
||||||
setInterval
|
|
||||||
setTimeout
|
|
||||||
status
|
|
||||||
statusbar
|
|
||||||
stop
|
|
||||||
sun
|
|
||||||
switch
|
|
||||||
taint
|
|
||||||
this
|
|
||||||
toString
|
|
||||||
toolbar
|
|
||||||
top
|
|
||||||
typeof
|
|
||||||
unescape
|
|
||||||
untaint
|
|
||||||
unwatch
|
|
||||||
valueOf
|
|
||||||
var
|
|
||||||
void
|
|
||||||
watch
|
|
||||||
while
|
|
||||||
window
|
|
||||||
with
|
|
|
@ -1,62 +0,0 @@
|
||||||
and
|
|
||||||
array
|
|
||||||
as
|
|
||||||
break
|
|
||||||
case
|
|
||||||
catch
|
|
||||||
cfunction
|
|
||||||
class
|
|
||||||
clone
|
|
||||||
const
|
|
||||||
continue
|
|
||||||
declare
|
|
||||||
default
|
|
||||||
die
|
|
||||||
do
|
|
||||||
echo
|
|
||||||
else
|
|
||||||
elseif
|
|
||||||
empty
|
|
||||||
enddeclare
|
|
||||||
endfor
|
|
||||||
endforeach
|
|
||||||
endif
|
|
||||||
endswitch
|
|
||||||
endwhile
|
|
||||||
eval
|
|
||||||
exit
|
|
||||||
extends
|
|
||||||
final
|
|
||||||
for
|
|
||||||
foreach
|
|
||||||
function
|
|
||||||
global
|
|
||||||
goto
|
|
||||||
if
|
|
||||||
implements
|
|
||||||
include
|
|
||||||
include_once
|
|
||||||
instanceof
|
|
||||||
interface
|
|
||||||
isset
|
|
||||||
list
|
|
||||||
namespace
|
|
||||||
new
|
|
||||||
old_function
|
|
||||||
or
|
|
||||||
print
|
|
||||||
private
|
|
||||||
protected
|
|
||||||
public
|
|
||||||
require
|
|
||||||
require_once
|
|
||||||
return
|
|
||||||
static
|
|
||||||
switch
|
|
||||||
throw
|
|
||||||
try
|
|
||||||
unset
|
|
||||||
use
|
|
||||||
var
|
|
||||||
while
|
|
||||||
xor
|
|
|
@ -1,104 +0,0 @@
|
||||||
__import__
|
|
||||||
abs
|
|
||||||
and
|
|
||||||
any
|
|
||||||
apply
|
|
||||||
as
|
|
||||||
assert
|
|
||||||
basestring
|
|
||||||
bin
|
|
||||||
bool
|
|
||||||
break
|
|
||||||
buffer
|
|
||||||
class
|
|
||||||
cmp
|
|
||||||
coerce
|
|
||||||
complex
|
|
||||||
continue
|
|
||||||
def
|
|
||||||
del
|
|
||||||
delattr
|
|
||||||
dict
|
|
||||||
dir
|
|
||||||
divmod
|
|
||||||
elif
|
|
||||||
else
|
|
||||||
enumerate
|
|
||||||
eval
|
|
||||||
except
|
|
||||||
exec
|
|
||||||
execfile
|
|
||||||
file
|
|
||||||
filter
|
|
||||||
finally
|
|
||||||
float
|
|
||||||
for
|
|
||||||
format
|
|
||||||
from
|
|
||||||
frozenset
|
|
||||||
getattr
|
|
||||||
global
|
|
||||||
globals
|
|
||||||
hasattr
|
|
||||||
hash
|
|
||||||
help
|
|
||||||
hex
|
|
||||||
id
|
|
||||||
if
|
|
||||||
import
|
|
||||||
in
|
|
||||||
input
|
|
||||||
int
|
|
||||||
intern
|
|
||||||
is
|
|
||||||
isinstance
|
|
||||||
issubclass
|
|
||||||
iter
|
|
||||||
lambda
|
|
||||||
len
|
|
||||||
list
|
|
||||||
locals
|
|
||||||
long
|
|
||||||
map
|
|
||||||
max
|
|
||||||
min
|
|
||||||
next
|
|
||||||
not
|
|
||||||
object
|
|
||||||
oct
|
|
||||||
open
|
|
||||||
or
|
|
||||||
ord
|
|
||||||
pass
|
|
||||||
pow
|
|
||||||
print
|
|
||||||
print
|
|
||||||
property
|
|
||||||
raise
|
|
||||||
range
|
|
||||||
raw_input
|
|
||||||
reduce
|
|
||||||
reload
|
|
||||||
repr
|
|
||||||
return
|
|
||||||
reversed
|
|
||||||
round
|
|
||||||
set
|
|
||||||
setattr
|
|
||||||
slice
|
|
||||||
sorted
|
|
||||||
staticmethod
|
|
||||||
str
|
|
||||||
sum
|
|
||||||
super
|
|
||||||
try
|
|
||||||
tuple
|
|
||||||
type
|
|
||||||
unichr
|
|
||||||
unicode
|
|
||||||
vars
|
|
||||||
while
|
|
||||||
with
|
|
||||||
xrange
|
|
||||||
yield
|
|
||||||
zip
|
|
|
@ -1,181 +0,0 @@
|
||||||
$!
|
|
||||||
$"
|
|
||||||
$$
|
|
||||||
$&
|
|
||||||
$'
|
|
||||||
$*
|
|
||||||
$+
|
|
||||||
$,
|
|
||||||
$-0
|
|
||||||
$-F
|
|
||||||
$-I
|
|
||||||
$-K
|
|
||||||
$-a
|
|
||||||
$-d
|
|
||||||
$-i
|
|
||||||
$-l
|
|
||||||
$-p
|
|
||||||
$-v
|
|
||||||
$-w
|
|
||||||
$.
|
|
||||||
$/
|
|
||||||
$0
|
|
||||||
$1
|
|
||||||
$10
|
|
||||||
$11
|
|
||||||
$2
|
|
||||||
$3
|
|
||||||
$4
|
|
||||||
$5
|
|
||||||
$6
|
|
||||||
$7
|
|
||||||
$8
|
|
||||||
$9
|
|
||||||
$:
|
|
||||||
$;
|
|
||||||
$<
|
|
||||||
$=
|
|
||||||
$>
|
|
||||||
$?
|
|
||||||
$@
|
|
||||||
$DEBUG
|
|
||||||
$FILENAME
|
|
||||||
$KCODE
|
|
||||||
$LOADED_FEATURES
|
|
||||||
$LOAD_PATH
|
|
||||||
$PROGRAM_NAME
|
|
||||||
$SAFE
|
|
||||||
$VERBOSE
|
|
||||||
$\
|
|
||||||
$_
|
|
||||||
$`
|
|
||||||
$deferr
|
|
||||||
$defout
|
|
||||||
$stderr
|
|
||||||
$stdin
|
|
||||||
$stdout
|
|
||||||
$~
|
|
||||||
ARGF
|
|
||||||
ARGV
|
|
||||||
Array
|
|
||||||
BEGIN
|
|
||||||
DATA
|
|
||||||
END
|
|
||||||
ENV
|
|
||||||
FALSE
|
|
||||||
Float
|
|
||||||
Integer
|
|
||||||
NIL
|
|
||||||
PLATFORM
|
|
||||||
RELEASE_DATE
|
|
||||||
RUBY_COPYRIGHT
|
|
||||||
RUBY_DESCRIPTION
|
|
||||||
RUBY_PATCHLEVEL
|
|
||||||
RUBY_PLATFORM
|
|
||||||
RUBY_RELEASE_DATE
|
|
||||||
RUBY_VERSION
|
|
||||||
SCRIPT_LINES__
|
|
||||||
STDERR
|
|
||||||
STDIN
|
|
||||||
STDOUT
|
|
||||||
String
|
|
||||||
TOPLEVEL_BINDING
|
|
||||||
TRUE
|
|
||||||
VERSION
|
|
||||||
__method__
|
|
||||||
`
|
|
||||||
abort
|
|
||||||
alias
|
|
||||||
and
|
|
||||||
at_exit
|
|
||||||
autoload
|
|
||||||
autoload?
|
|
||||||
begin
|
|
||||||
binding
|
|
||||||
block_given
|
|
||||||
break
|
|
||||||
callcc
|
|
||||||
caller
|
|
||||||
case
|
|
||||||
catch
|
|
||||||
chomp
|
|
||||||
chomp!
|
|
||||||
chop
|
|
||||||
chop
|
|
||||||
class
|
|
||||||
def
|
|
||||||
defined?
|
|
||||||
do
|
|
||||||
else
|
|
||||||
elsif
|
|
||||||
end
|
|
||||||
ensure
|
|
||||||
eval
|
|
||||||
exec
|
|
||||||
exit
|
|
||||||
exit!
|
|
||||||
fail
|
|
||||||
false
|
|
||||||
for
|
|
||||||
fork
|
|
||||||
format
|
|
||||||
getc
|
|
||||||
gets
|
|
||||||
global_variables
|
|
||||||
gsub
|
|
||||||
gsub!
|
|
||||||
if
|
|
||||||
in
|
|
||||||
iterator?
|
|
||||||
lambda
|
|
||||||
load
|
|
||||||
local_varaibles
|
|
||||||
loop
|
|
||||||
module
|
|
||||||
next
|
|
||||||
nil
|
|
||||||
not
|
|
||||||
open
|
|
||||||
or
|
|
||||||
p
|
|
||||||
printf
|
|
||||||
proc
|
|
||||||
putc
|
|
||||||
puts
|
|
||||||
raise
|
|
||||||
rand
|
|
||||||
readline
|
|
||||||
readlines
|
|
||||||
redo
|
|
||||||
require
|
|
||||||
require_relative
|
|
||||||
rescue
|
|
||||||
retry
|
|
||||||
return
|
|
||||||
scan
|
|
||||||
select
|
|
||||||
self
|
|
||||||
set_trace_func
|
|
||||||
sleep
|
|
||||||
split
|
|
||||||
sprintf
|
|
||||||
srand
|
|
||||||
sub
|
|
||||||
sub!
|
|
||||||
super
|
|
||||||
syscall
|
|
||||||
system
|
|
||||||
test
|
|
||||||
then
|
|
||||||
throw
|
|
||||||
trace_var
|
|
||||||
trap
|
|
||||||
true
|
|
||||||
undef
|
|
||||||
unless
|
|
||||||
until
|
|
||||||
untrace_var
|
|
||||||
warn
|
|
||||||
when
|
|
||||||
while
|
|
||||||
yield
|
|
|
@ -1,216 +0,0 @@
|
||||||
case-lambda
|
|
||||||
call/cc
|
|
||||||
class
|
|
||||||
define-class
|
|
||||||
exit-handler
|
|
||||||
field
|
|
||||||
import
|
|
||||||
inherit
|
|
||||||
init-field
|
|
||||||
interface
|
|
||||||
let*-values
|
|
||||||
let-values
|
|
||||||
let/ec
|
|
||||||
mixin
|
|
||||||
opt-lambda
|
|
||||||
override
|
|
||||||
protect
|
|
||||||
provide
|
|
||||||
public
|
|
||||||
rename
|
|
||||||
require
|
|
||||||
require-for-syntax
|
|
||||||
syntax
|
|
||||||
syntax-case
|
|
||||||
syntax-error
|
|
||||||
unit/sig
|
|
||||||
unless
|
|
||||||
when
|
|
||||||
with-syntax
|
|
||||||
and
|
|
||||||
begin
|
|
||||||
call-with-current-continuation
|
|
||||||
call-with-input-file
|
|
||||||
call-with-output-file
|
|
||||||
case
|
|
||||||
cond
|
|
||||||
define
|
|
||||||
define-syntax
|
|
||||||
delay
|
|
||||||
do
|
|
||||||
dynamic-wind
|
|
||||||
else
|
|
||||||
for-each
|
|
||||||
if
|
|
||||||
lambda
|
|
||||||
let
|
|
||||||
let*
|
|
||||||
let-syntax
|
|
||||||
letrec
|
|
||||||
letrec-syntax
|
|
||||||
map
|
|
||||||
or
|
|
||||||
syntax-rules
|
|
||||||
abs
|
|
||||||
acos
|
|
||||||
angle
|
|
||||||
append
|
|
||||||
apply
|
|
||||||
asin
|
|
||||||
assoc
|
|
||||||
assq
|
|
||||||
assv
|
|
||||||
atan
|
|
||||||
boolean?
|
|
||||||
caar
|
|
||||||
cadr
|
|
||||||
call-with-input-file
|
|
||||||
call-with-output-file
|
|
||||||
call-with-values
|
|
||||||
car
|
|
||||||
cdddar
|
|
||||||
cddddr
|
|
||||||
cdr
|
|
||||||
ceiling
|
|
||||||
char->integer
|
|
||||||
char-alphabetic?
|
|
||||||
char-ci<=?
|
|
||||||
char-ci<?
|
|
||||||
char-ci=?
|
|
||||||
char-ci>=?
|
|
||||||
char-ci>?
|
|
||||||
char-downcase
|
|
||||||
char-lower-case?
|
|
||||||
char-numeric?
|
|
||||||
char-ready?
|
|
||||||
char-upcase
|
|
||||||
char-upper-case?
|
|
||||||
char-whitespace?
|
|
||||||
char<=?
|
|
||||||
char<?
|
|
||||||
char=?
|
|
||||||
char>=?
|
|
||||||
char>?
|
|
||||||
char?
|
|
||||||
close-input-port
|
|
||||||
close-output-port
|
|
||||||
complex?
|
|
||||||
cons
|
|
||||||
cos
|
|
||||||
current-input-port
|
|
||||||
current-output-port
|
|
||||||
denominator
|
|
||||||
display
|
|
||||||
eof-object?
|
|
||||||
eq?
|
|
||||||
equal?
|
|
||||||
eqv?
|
|
||||||
eval
|
|
||||||
even?
|
|
||||||
exact->inexact
|
|
||||||
exact?
|
|
||||||
exp
|
|
||||||
expt
|
|
||||||
#f
|
|
||||||
floor
|
|
||||||
force
|
|
||||||
gcd
|
|
||||||
imag-part
|
|
||||||
inexact->exact
|
|
||||||
inexact?
|
|
||||||
input-port?
|
|
||||||
integer->char
|
|
||||||
integer?
|
|
||||||
interaction-environment
|
|
||||||
lcm
|
|
||||||
length
|
|
||||||
list
|
|
||||||
list->string
|
|
||||||
list->vector
|
|
||||||
list-ref
|
|
||||||
list-tail
|
|
||||||
list?
|
|
||||||
load
|
|
||||||
log
|
|
||||||
magnitude
|
|
||||||
make-polar
|
|
||||||
make-rectangular
|
|
||||||
make-string
|
|
||||||
make-vector
|
|
||||||
max
|
|
||||||
member
|
|
||||||
memq
|
|
||||||
memv
|
|
||||||
min
|
|
||||||
modulo
|
|
||||||
negative?
|
|
||||||
newline
|
|
||||||
not
|
|
||||||
null-environment
|
|
||||||
null?
|
|
||||||
number->string
|
|
||||||
number?
|
|
||||||
numerator
|
|
||||||
odd?
|
|
||||||
open-input-file
|
|
||||||
open-output-file
|
|
||||||
output-port?
|
|
||||||
pair?
|
|
||||||
peek-char
|
|
||||||
port?
|
|
||||||
positive?
|
|
||||||
procedure?
|
|
||||||
quasiquote
|
|
||||||
quote
|
|
||||||
quotient
|
|
||||||
rational?
|
|
||||||
rationalize
|
|
||||||
read
|
|
||||||
read-char
|
|
||||||
real-part
|
|
||||||
real?
|
|
||||||
remainder
|
|
||||||
reverse
|
|
||||||
round
|
|
||||||
scheme-report-environment
|
|
||||||
set!
|
|
||||||
set-car!
|
|
||||||
set-cdr!
|
|
||||||
sin
|
|
||||||
sqrt
|
|
||||||
string
|
|
||||||
string->list
|
|
||||||
string->number
|
|
||||||
string->symbol
|
|
||||||
string-append
|
|
||||||
string-ci<=?
|
|
||||||
string-ci<?
|
|
||||||
string-ci=?
|
|
||||||
string-ci>=?
|
|
||||||
string-ci>?
|
|
||||||
string-copy
|
|
||||||
string-fill!
|
|
||||||
string-length
|
|
||||||
string-ref
|
|
||||||
string-set!
|
|
||||||
string<=?
|
|
||||||
string<?
|
|
||||||
string=?
|
|
||||||
string>=?
|
|
||||||
string>?
|
|
||||||
string?
|
|
||||||
substring
|
|
||||||
symbol->string
|
|
||||||
symbol?
|
|
||||||
#t
|
|
||||||
tan
|
|
||||||
transcript-off
|
|
||||||
transcript-on
|
|
||||||
truncate
|
|
||||||
values
|
|
||||||
vector
|
|
||||||
vector->list
|
|
||||||
vector-fill!
|
|
||||||
vector-length
|
|
||||||
vector-ref
|
|
||||||
vector-set!
|
|
|
@ -1,172 +0,0 @@
|
||||||
after
|
|
||||||
append
|
|
||||||
apply
|
|
||||||
array
|
|
||||||
auto_execok
|
|
||||||
auto_import
|
|
||||||
auto_load
|
|
||||||
auto_load_index
|
|
||||||
auto_mkindex
|
|
||||||
auto_mkindex_old
|
|
||||||
auto_qualify
|
|
||||||
auto_reset
|
|
||||||
bell
|
|
||||||
binary
|
|
||||||
bind
|
|
||||||
bindtags
|
|
||||||
break
|
|
||||||
button
|
|
||||||
canvas
|
|
||||||
case
|
|
||||||
catch
|
|
||||||
cd
|
|
||||||
chan
|
|
||||||
checkbutton
|
|
||||||
clipboard
|
|
||||||
clock
|
|
||||||
close
|
|
||||||
concat
|
|
||||||
continue
|
|
||||||
destroy
|
|
||||||
dict
|
|
||||||
encoding
|
|
||||||
entry
|
|
||||||
eof
|
|
||||||
error
|
|
||||||
eval
|
|
||||||
event
|
|
||||||
exec
|
|
||||||
exit
|
|
||||||
expr
|
|
||||||
fblocked
|
|
||||||
fconfigure
|
|
||||||
fcopy
|
|
||||||
file
|
|
||||||
fileevent
|
|
||||||
flush
|
|
||||||
focus
|
|
||||||
font
|
|
||||||
for
|
|
||||||
foreach
|
|
||||||
format
|
|
||||||
frame
|
|
||||||
gets
|
|
||||||
glob
|
|
||||||
global
|
|
||||||
grab
|
|
||||||
grid
|
|
||||||
if
|
|
||||||
image
|
|
||||||
incr
|
|
||||||
info
|
|
||||||
interp
|
|
||||||
join
|
|
||||||
label
|
|
||||||
labelframe
|
|
||||||
lappend
|
|
||||||
lassign
|
|
||||||
lindex
|
|
||||||
linsert
|
|
||||||
list
|
|
||||||
listbox
|
|
||||||
llength
|
|
||||||
load
|
|
||||||
lower
|
|
||||||
lrange
|
|
||||||
lrepeat
|
|
||||||
lreplace
|
|
||||||
lreverse
|
|
||||||
lsearch
|
|
||||||
lset
|
|
||||||
lsort
|
|
||||||
menu
|
|
||||||
menubutton
|
|
||||||
message
|
|
||||||
namespace
|
|
||||||
open
|
|
||||||
option
|
|
||||||
pack
|
|
||||||
package
|
|
||||||
panedwindow
|
|
||||||
pid
|
|
||||||
pkg_mkIndex
|
|
||||||
place
|
|
||||||
proc
|
|
||||||
puts
|
|
||||||
pwd
|
|
||||||
radiobutton
|
|
||||||
raise
|
|
||||||
read
|
|
||||||
regexp
|
|
||||||
registry
|
|
||||||
regsub
|
|
||||||
rename
|
|
||||||
return
|
|
||||||
scale
|
|
||||||
scan
|
|
||||||
scrollbar
|
|
||||||
seek
|
|
||||||
selection
|
|
||||||
set
|
|
||||||
socket
|
|
||||||
source
|
|
||||||
spinbox
|
|
||||||
split
|
|
||||||
string
|
|
||||||
subst
|
|
||||||
switch
|
|
||||||
tclLog
|
|
||||||
tclPkgSetup
|
|
||||||
tclPkgUnknown
|
|
||||||
tcl_findLibrary
|
|
||||||
tell
|
|
||||||
text
|
|
||||||
time
|
|
||||||
tk
|
|
||||||
tk_chooseColor
|
|
||||||
tk_chooseDirectory
|
|
||||||
tk_getOpenFile
|
|
||||||
tk_getSaveFile
|
|
||||||
tk_menuSetFocus
|
|
||||||
tk_messageBox
|
|
||||||
tk_popup
|
|
||||||
tk_textCopy
|
|
||||||
tk_textCut
|
|
||||||
tk_textPaste
|
|
||||||
tkwait
|
|
||||||
toplevel
|
|
||||||
ttk::button
|
|
||||||
ttk::checkbutton
|
|
||||||
ttk::combobox
|
|
||||||
ttk::entry
|
|
||||||
ttk::focusFirst
|
|
||||||
ttk::frame
|
|
||||||
ttk::label
|
|
||||||
ttk::labelframe
|
|
||||||
ttk::menubutton
|
|
||||||
ttk::notebook
|
|
||||||
ttk::paned
|
|
||||||
ttk::panedwindow
|
|
||||||
ttk::progressbar
|
|
||||||
ttk::radiobutton
|
|
||||||
ttk::scale
|
|
||||||
ttk::scrollbar
|
|
||||||
ttk::separator
|
|
||||||
ttk::setTheme
|
|
||||||
ttk::sizegrip
|
|
||||||
ttk::style
|
|
||||||
ttk::takefocus
|
|
||||||
ttk::themes
|
|
||||||
ttk::treeview
|
|
||||||
trace
|
|
||||||
unknown
|
|
||||||
unload
|
|
||||||
unset
|
|
||||||
update
|
|
||||||
uplevel
|
|
||||||
upvar
|
|
||||||
variable
|
|
||||||
vwait
|
|
||||||
while
|
|
||||||
winfo
|
|
||||||
wm
|
|
|
@ -1,480 +0,0 @@
|
||||||
;;; auto-complete-config.el --- auto-complete additional configuations
|
|
||||||
|
|
||||||
;; Copyright (C) 2009, 2010 Tomohiro Matsuyama
|
|
||||||
|
|
||||||
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
|
|
||||||
;; Keywords: convenience
|
|
||||||
;; Version: 1.3
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(eval-when-compile
|
|
||||||
(require 'cl))
|
|
||||||
|
|
||||||
(require 'auto-complete)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Additional sources
|
|
||||||
|
|
||||||
;; imenu
|
|
||||||
|
|
||||||
(defvar ac-imenu-index nil)
|
|
||||||
|
|
||||||
(ac-clear-variable-every-10-minutes 'ac-imenu-index)
|
|
||||||
|
|
||||||
(defun ac-imenu-candidates ()
|
|
||||||
(loop with i = 0
|
|
||||||
with stack = (progn
|
|
||||||
(unless (local-variable-p 'ac-imenu-index)
|
|
||||||
(make-local-variable 'ac-imenu-index))
|
|
||||||
(or ac-imenu-index
|
|
||||||
(setq ac-imenu-index
|
|
||||||
(ignore-errors
|
|
||||||
(with-no-warnings
|
|
||||||
(imenu--make-index-alist))))))
|
|
||||||
with result
|
|
||||||
while (and stack (or (not (integerp ac-limit))
|
|
||||||
(< i ac-limit)))
|
|
||||||
for node = (pop stack)
|
|
||||||
if (consp node)
|
|
||||||
do
|
|
||||||
(let ((car (car node))
|
|
||||||
(cdr (cdr node)))
|
|
||||||
(if (consp cdr)
|
|
||||||
(mapc (lambda (child)
|
|
||||||
(push child stack))
|
|
||||||
cdr)
|
|
||||||
(when (and (stringp car)
|
|
||||||
(string-match (concat "^" (regexp-quote ac-prefix)) car))
|
|
||||||
;; Remove extra characters
|
|
||||||
(if (string-match "^.*\\(()\\|=\\|<>\\)$" car)
|
|
||||||
(setq car (substring car 0 (match-beginning 1))))
|
|
||||||
(push car result)
|
|
||||||
(incf i))))
|
|
||||||
finally return (nreverse result)))
|
|
||||||
|
|
||||||
(ac-define-source imenu
|
|
||||||
'((depends imenu)
|
|
||||||
(candidates . ac-imenu-candidates)
|
|
||||||
(symbol . "s")))
|
|
||||||
|
|
||||||
;; gtags
|
|
||||||
|
|
||||||
(defface ac-gtags-candidate-face
|
|
||||||
'((t (:background "lightgray" :foreground "navy")))
|
|
||||||
"Face for gtags candidate"
|
|
||||||
:group 'auto-complete)
|
|
||||||
|
|
||||||
(defface ac-gtags-selection-face
|
|
||||||
'((t (:background "navy" :foreground "white")))
|
|
||||||
"Face for the gtags selected candidate."
|
|
||||||
:group 'auto-complete)
|
|
||||||
|
|
||||||
(defun ac-gtags-candidate ()
|
|
||||||
(ignore-errors
|
|
||||||
(split-string (shell-command-to-string (format "global -ci %s" ac-prefix)) "\n")))
|
|
||||||
|
|
||||||
(ac-define-source gtags
|
|
||||||
'((candidates . ac-gtags-candidate)
|
|
||||||
(candidate-face . ac-gtags-candidate-face)
|
|
||||||
(selection-face . ac-gtags-selection-face)
|
|
||||||
(requires . 3)
|
|
||||||
(symbol . "s")))
|
|
||||||
|
|
||||||
;; yasnippet
|
|
||||||
|
|
||||||
(defface ac-yasnippet-candidate-face
|
|
||||||
'((t (:background "sandybrown" :foreground "black")))
|
|
||||||
"Face for yasnippet candidate."
|
|
||||||
:group 'auto-complete)
|
|
||||||
|
|
||||||
(defface ac-yasnippet-selection-face
|
|
||||||
'((t (:background "coral3" :foreground "white")))
|
|
||||||
"Face for the yasnippet selected candidate."
|
|
||||||
:group 'auto-complete)
|
|
||||||
|
|
||||||
(defun ac-yasnippet-table-hash (table)
|
|
||||||
(cond
|
|
||||||
((fboundp 'yas/snippet-table-hash)
|
|
||||||
(yas/snippet-table-hash table))
|
|
||||||
((fboundp 'yas/table-hash)
|
|
||||||
(yas/table-hash table))))
|
|
||||||
|
|
||||||
(defun ac-yasnippet-table-parent (table)
|
|
||||||
(cond
|
|
||||||
((fboundp 'yas/snippet-table-parent)
|
|
||||||
(yas/snippet-table-parent table))
|
|
||||||
((fboundp 'yas/table-parent)
|
|
||||||
(yas/table-parent table))))
|
|
||||||
|
|
||||||
(defun ac-yasnippet-candidate-1 (table)
|
|
||||||
(with-no-warnings
|
|
||||||
(let ((hashtab (ac-yasnippet-table-hash table))
|
|
||||||
(parent (ac-yasnippet-table-parent table))
|
|
||||||
candidates)
|
|
||||||
(maphash (lambda (key value)
|
|
||||||
(push key candidates))
|
|
||||||
hashtab)
|
|
||||||
(setq candidates (all-completions ac-prefix (nreverse candidates)))
|
|
||||||
(if parent
|
|
||||||
(setq candidates
|
|
||||||
(append candidates (ac-yasnippet-candidate-1 parent))))
|
|
||||||
candidates)))
|
|
||||||
|
|
||||||
(defun ac-yasnippet-candidates ()
|
|
||||||
(with-no-warnings
|
|
||||||
(if (fboundp 'yas/get-snippet-tables)
|
|
||||||
;; >0.6.0
|
|
||||||
(apply 'append (mapcar 'ac-yasnippet-candidate-1 (yas/get-snippet-tables major-mode)))
|
|
||||||
(let ((table
|
|
||||||
(if (fboundp 'yas/snippet-table)
|
|
||||||
;; <0.6.0
|
|
||||||
(yas/snippet-table major-mode)
|
|
||||||
;; 0.6.0
|
|
||||||
(yas/current-snippet-table))))
|
|
||||||
(if table
|
|
||||||
(ac-yasnippet-candidate-1 table))))))
|
|
||||||
|
|
||||||
(ac-define-source yasnippet
|
|
||||||
'((depends yasnippet)
|
|
||||||
(candidates . ac-yasnippet-candidates)
|
|
||||||
(action . yas/expand)
|
|
||||||
(candidate-face . ac-yasnippet-candidate-face)
|
|
||||||
(selection-face . ac-yasnippet-selection-face)
|
|
||||||
(symbol . "a")))
|
|
||||||
|
|
||||||
;; semantic
|
|
||||||
|
|
||||||
(defun ac-semantic-candidates (prefix)
|
|
||||||
(with-no-warnings
|
|
||||||
(delete "" ; semantic sometimes returns an empty string
|
|
||||||
(mapcar 'semantic-tag-name
|
|
||||||
(ignore-errors
|
|
||||||
(or (semantic-analyze-possible-completions
|
|
||||||
(semantic-analyze-current-context))
|
|
||||||
(senator-find-tag-for-completion prefix)))))))
|
|
||||||
|
|
||||||
(ac-define-source semantic
|
|
||||||
'((available . (or (require 'semantic-ia nil t)
|
|
||||||
(require 'semantic/ia nil t)))
|
|
||||||
(candidates . (ac-semantic-candidates ac-prefix))
|
|
||||||
(prefix . c-dot-ref)
|
|
||||||
(requires . 0)
|
|
||||||
(symbol . "m")))
|
|
||||||
|
|
||||||
(ac-define-source semantic-raw
|
|
||||||
'((available . (or (require 'semantic-ia nil t)
|
|
||||||
(require 'semantic/ia nil t)))
|
|
||||||
(candidates . (ac-semantic-candidates ac-prefix))
|
|
||||||
(symbol . "s")))
|
|
||||||
|
|
||||||
;; eclim
|
|
||||||
|
|
||||||
(defun ac-eclim-candidates ()
|
|
||||||
(with-no-warnings
|
|
||||||
(loop for c in (eclim/java-complete)
|
|
||||||
collect (nth 1 c))))
|
|
||||||
|
|
||||||
(ac-define-source eclim
|
|
||||||
'((candidates . ac-eclim-candidates)
|
|
||||||
(prefix . c-dot)
|
|
||||||
(requires . 0)
|
|
||||||
(symbol . "f")))
|
|
||||||
|
|
||||||
;; css
|
|
||||||
|
|
||||||
;; Copied from company-css.el
|
|
||||||
(defconst ac-css-property-alist
|
|
||||||
;; see http://www.w3.org/TR/CSS21/propidx.html
|
|
||||||
'(("azimuth" angle "left-side" "far-left" "left" "center-left" "center"
|
|
||||||
"center-right" "right" "far-right" "right-side" "behind" "leftwards"
|
|
||||||
"rightwards")
|
|
||||||
("background" background-color background-image background-repeat
|
|
||||||
background-attachment background-position)
|
|
||||||
("background-attachment" "scroll" "fixed")
|
|
||||||
("background-color" color "transparent")
|
|
||||||
("background-image" uri "none")
|
|
||||||
("background-position" percentage length "left" "center" "right" percentage
|
|
||||||
length "top" "center" "bottom" "left" "center" "right" "top" "center"
|
|
||||||
"bottom")
|
|
||||||
("background-repeat" "repeat" "repeat-x" "repeat-y" "no-repeat")
|
|
||||||
("border" border-width border-style border-color)
|
|
||||||
("border-bottom" border)
|
|
||||||
("border-bottom-color" border-color)
|
|
||||||
("border-bottom-style" border-style)
|
|
||||||
("border-bottom-width" border-width)
|
|
||||||
("border-collapse" "collapse" "separate")
|
|
||||||
("border-color" color "transparent")
|
|
||||||
("border-left" border)
|
|
||||||
("border-left-color" border-color)
|
|
||||||
("border-left-style" border-style)
|
|
||||||
("border-left-width" border-width)
|
|
||||||
("border-right" border)
|
|
||||||
("border-right-color" border-color)
|
|
||||||
("border-right-style" border-style)
|
|
||||||
("border-right-width" border-width)
|
|
||||||
("border-spacing" length length)
|
|
||||||
("border-style" border-style)
|
|
||||||
("border-top" border)
|
|
||||||
("border-top-color" border-color)
|
|
||||||
("border-top-style" border-style)
|
|
||||||
("border-top-width" border-width)
|
|
||||||
("border-width" border-width)
|
|
||||||
("bottom" length percentage "auto")
|
|
||||||
("caption-side" "top" "bottom")
|
|
||||||
("clear" "none" "left" "right" "both")
|
|
||||||
("clip" shape "auto")
|
|
||||||
("color" color)
|
|
||||||
("content" "normal" "none" string uri counter "attr()" "open-quote"
|
|
||||||
"close-quote" "no-open-quote" "no-close-quote")
|
|
||||||
("counter-increment" identifier integer "none")
|
|
||||||
("counter-reset" identifier integer "none")
|
|
||||||
("cue" cue-before cue-after)
|
|
||||||
("cue-after" uri "none")
|
|
||||||
("cue-before" uri "none")
|
|
||||||
("cursor" uri "*" "auto" "crosshair" "default" "pointer" "move" "e-resize"
|
|
||||||
"ne-resize" "nw-resize" "n-resize" "se-resize" "sw-resize" "s-resize"
|
|
||||||
"w-resize" "text" "wait" "help" "progress")
|
|
||||||
("direction" "ltr" "rtl")
|
|
||||||
("display" "inline" "block" "list-item" "run-in" "inline-block" "table"
|
|
||||||
"inline-table" "table-row-group" "table-header-group" "table-footer-group"
|
|
||||||
"table-row" "table-column-group" "table-column" "table-cell"
|
|
||||||
"table-caption" "none")
|
|
||||||
("elevation" angle "below" "level" "above" "higher" "lower")
|
|
||||||
("empty-cells" "show" "hide")
|
|
||||||
("float" "left" "right" "none")
|
|
||||||
("font" font-style font-variant font-weight font-size "/" line-height
|
|
||||||
font-family "caption" "icon" "menu" "message-box" "small-caption"
|
|
||||||
"status-bar")
|
|
||||||
("font-family" family-name generic-family)
|
|
||||||
("font-size" absolute-size relative-size length percentage)
|
|
||||||
("font-style" "normal" "italic" "oblique")
|
|
||||||
("font-variant" "normal" "small-caps")
|
|
||||||
("font-weight" "normal" "bold" "bolder" "lighter" "100" "200" "300" "400"
|
|
||||||
"500" "600" "700" "800" "900")
|
|
||||||
("height" length percentage "auto")
|
|
||||||
("left" length percentage "auto")
|
|
||||||
("letter-spacing" "normal" length)
|
|
||||||
("line-height" "normal" number length percentage)
|
|
||||||
("list-style" list-style-type list-style-position list-style-image)
|
|
||||||
("list-style-image" uri "none")
|
|
||||||
("list-style-position" "inside" "outside")
|
|
||||||
("list-style-type" "disc" "circle" "square" "decimal" "decimal-leading-zero"
|
|
||||||
"lower-roman" "upper-roman" "lower-greek" "lower-latin" "upper-latin"
|
|
||||||
"armenian" "georgian" "lower-alpha" "upper-alpha" "none")
|
|
||||||
("margin" margin-width)
|
|
||||||
("margin-bottom" margin-width)
|
|
||||||
("margin-left" margin-width)
|
|
||||||
("margin-right" margin-width)
|
|
||||||
("margin-top" margin-width)
|
|
||||||
("max-height" length percentage "none")
|
|
||||||
("max-width" length percentage "none")
|
|
||||||
("min-height" length percentage)
|
|
||||||
("min-width" length percentage)
|
|
||||||
("orphans" integer)
|
|
||||||
("outline" outline-color outline-style outline-width)
|
|
||||||
("outline-color" color "invert")
|
|
||||||
("outline-style" border-style)
|
|
||||||
("outline-width" border-width)
|
|
||||||
("overflow" "visible" "hidden" "scroll" "auto")
|
|
||||||
("padding" padding-width)
|
|
||||||
("padding-bottom" padding-width)
|
|
||||||
("padding-left" padding-width)
|
|
||||||
("padding-right" padding-width)
|
|
||||||
("padding-top" padding-width)
|
|
||||||
("page-break-after" "auto" "always" "avoid" "left" "right")
|
|
||||||
("page-break-before" "auto" "always" "avoid" "left" "right")
|
|
||||||
("page-break-inside" "avoid" "auto")
|
|
||||||
("pause" time percentage)
|
|
||||||
("pause-after" time percentage)
|
|
||||||
("pause-before" time percentage)
|
|
||||||
("pitch" frequency "x-low" "low" "medium" "high" "x-high")
|
|
||||||
("pitch-range" number)
|
|
||||||
("play-during" uri "mix" "repeat" "auto" "none")
|
|
||||||
("position" "static" "relative" "absolute" "fixed")
|
|
||||||
("quotes" string string "none")
|
|
||||||
("richness" number)
|
|
||||||
("right" length percentage "auto")
|
|
||||||
("speak" "normal" "none" "spell-out")
|
|
||||||
("speak-header" "once" "always")
|
|
||||||
("speak-numeral" "digits" "continuous")
|
|
||||||
("speak-punctuation" "code" "none")
|
|
||||||
("speech-rate" number "x-slow" "slow" "medium" "fast" "x-fast" "faster"
|
|
||||||
"slower")
|
|
||||||
("stress" number)
|
|
||||||
("table-layout" "auto" "fixed")
|
|
||||||
("text-align" "left" "right" "center" "justify")
|
|
||||||
("text-decoration" "none" "underline" "overline" "line-through" "blink")
|
|
||||||
("text-indent" length percentage)
|
|
||||||
("text-transform" "capitalize" "uppercase" "lowercase" "none")
|
|
||||||
("top" length percentage "auto")
|
|
||||||
("unicode-bidi" "normal" "embed" "bidi-override")
|
|
||||||
("vertical-align" "baseline" "sub" "super" "top" "text-top" "middle"
|
|
||||||
"bottom" "text-bottom" percentage length)
|
|
||||||
("visibility" "visible" "hidden" "collapse")
|
|
||||||
("voice-family" specific-voice generic-voice "*" specific-voice
|
|
||||||
generic-voice)
|
|
||||||
("volume" number percentage "silent" "x-soft" "soft" "medium" "loud"
|
|
||||||
"x-loud")
|
|
||||||
("white-space" "normal" "pre" "nowrap" "pre-wrap" "pre-line")
|
|
||||||
("widows" integer)
|
|
||||||
("width" length percentage "auto")
|
|
||||||
("word-spacing" "normal" length)
|
|
||||||
("z-index" "auto" integer))
|
|
||||||
"A list of CSS properties and their possible values.")
|
|
||||||
|
|
||||||
(defconst ac-css-value-classes
|
|
||||||
'((absolute-size "xx-small" "x-small" "small" "medium" "large" "x-large"
|
|
||||||
"xx-large")
|
|
||||||
(border-style "none" "hidden" "dotted" "dashed" "solid" "double" "groove"
|
|
||||||
"ridge" "inset" "outset")
|
|
||||||
(color "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon" "navy"
|
|
||||||
"olive" "orange" "purple" "red" "silver" "teal" "white" "yellow"
|
|
||||||
"rgb")
|
|
||||||
(counter "counter")
|
|
||||||
(family-name "Courier" "Helvetica" "Times")
|
|
||||||
(generic-family "serif" "sans-serif" "cursive" "fantasy" "monospace")
|
|
||||||
(generic-voice "male" "female" "child")
|
|
||||||
(margin-width "auto") ;; length percentage
|
|
||||||
(relative-size "larger" "smaller")
|
|
||||||
(shape "rect")
|
|
||||||
(uri "url"))
|
|
||||||
"A list of CSS property value classes and their contents.")
|
|
||||||
|
|
||||||
(defconst ac-css-pseudo-classes
|
|
||||||
'("active" "after" "before" "first" "first-child" "first-letter" "first-line"
|
|
||||||
"focus" "hover" "lang" "left" "link" "right" "visited")
|
|
||||||
"Identifiers for CSS pseudo-elements and pseudo-classes.")
|
|
||||||
|
|
||||||
(defvar ac-css-property nil
|
|
||||||
"Current editing property.")
|
|
||||||
|
|
||||||
(defun ac-css-prefix ()
|
|
||||||
(when (save-excursion (re-search-backward "\\_<\\(.+?\\)\\_>\\s *:.*\\=" nil t))
|
|
||||||
(setq ac-css-property (match-string 1))
|
|
||||||
(or (ac-prefix-symbol) (point))))
|
|
||||||
|
|
||||||
(defun ac-css-property-candidates ()
|
|
||||||
(or (loop with list = (assoc-default ac-css-property ac-css-property-alist)
|
|
||||||
with value
|
|
||||||
while (setq value (pop list))
|
|
||||||
if (symbolp value)
|
|
||||||
do (setq list
|
|
||||||
(append list
|
|
||||||
(or (assoc-default value ac-css-value-classes)
|
|
||||||
(assoc-default (symbol-name value) ac-css-property-alist))))
|
|
||||||
else collect value)
|
|
||||||
ac-css-pseudo-classes))
|
|
||||||
|
|
||||||
(defvar ac-source-css-property
|
|
||||||
'((candidates . ac-css-property-candidates)
|
|
||||||
(prefix . ac-css-prefix)
|
|
||||||
(requires . 0)))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Not maintained sources
|
|
||||||
|
|
||||||
;; ropemacs
|
|
||||||
|
|
||||||
(defvar ac-ropemacs-loaded nil)
|
|
||||||
(defun ac-ropemacs-require ()
|
|
||||||
(with-no-warnings
|
|
||||||
(unless ac-ropemacs-loaded
|
|
||||||
(pymacs-load "ropemacs" "rope-")
|
|
||||||
(if (boundp 'ropemacs-enable-autoimport)
|
|
||||||
(setq ropemacs-enable-autoimport t))
|
|
||||||
(setq ac-ropemacs-loaded t))))
|
|
||||||
|
|
||||||
(defun ac-ropemacs-setup ()
|
|
||||||
(ac-ropemacs-require)
|
|
||||||
;(setq ac-sources (append (list 'ac-source-ropemacs) ac-sources))
|
|
||||||
(setq ac-omni-completion-sources '(("\\." ac-source-ropemacs))))
|
|
||||||
|
|
||||||
(defun ac-ropemacs-initialize ()
|
|
||||||
(autoload 'pymacs-apply "pymacs")
|
|
||||||
(autoload 'pymacs-call "pymacs")
|
|
||||||
(autoload 'pymacs-eval "pymacs" nil t)
|
|
||||||
(autoload 'pymacs-exec "pymacs" nil t)
|
|
||||||
(autoload 'pymacs-load "pymacs" nil t)
|
|
||||||
(add-hook 'python-mode-hook 'ac-ropemacs-setup)
|
|
||||||
t)
|
|
||||||
|
|
||||||
(defvar ac-ropemacs-completions-cache nil)
|
|
||||||
(defvar ac-source-ropemacs
|
|
||||||
'((init
|
|
||||||
. (lambda ()
|
|
||||||
(setq ac-ropemacs-completions-cache
|
|
||||||
(mapcar
|
|
||||||
(lambda (completion)
|
|
||||||
(concat ac-prefix completion))
|
|
||||||
(ignore-errors
|
|
||||||
(rope-completions))))))
|
|
||||||
(candidates . ac-ropemacs-completions-cache)))
|
|
||||||
|
|
||||||
;; rcodetools
|
|
||||||
|
|
||||||
(defvar ac-source-rcodetools
|
|
||||||
'((init . (lambda ()
|
|
||||||
(require 'rcodetools)
|
|
||||||
(condition-case x
|
|
||||||
(save-excursion
|
|
||||||
(rct-exec-and-eval rct-complete-command-name "--completion-emacs-icicles"))
|
|
||||||
(error) (setq rct-method-completion-table nil))))
|
|
||||||
(candidates . (lambda ()
|
|
||||||
(all-completions
|
|
||||||
ac-prefix
|
|
||||||
(mapcar
|
|
||||||
(lambda (completion)
|
|
||||||
(replace-regexp-in-string "\t.*$" "" (car completion)))
|
|
||||||
rct-method-completion-table))))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Default settings
|
|
||||||
|
|
||||||
(defun ac-common-setup ()
|
|
||||||
(add-to-list 'ac-sources 'ac-source-filename))
|
|
||||||
|
|
||||||
(defun ac-emacs-lisp-mode-setup ()
|
|
||||||
(setq ac-sources (append '(ac-source-features ac-source-functions ac-source-yasnippet ac-source-variables ac-source-symbols) ac-sources)))
|
|
||||||
|
|
||||||
(defun ac-cc-mode-setup ()
|
|
||||||
(setq ac-sources (append '(ac-source-yasnippet ac-source-gtags) ac-sources)))
|
|
||||||
|
|
||||||
(defun ac-ruby-mode-setup ()
|
|
||||||
(make-local-variable 'ac-ignores)
|
|
||||||
(add-to-list 'ac-ignores "end"))
|
|
||||||
|
|
||||||
(defun ac-css-mode-setup ()
|
|
||||||
(setq ac-sources (append '(ac-source-css-property) ac-sources)))
|
|
||||||
|
|
||||||
(defun ac-config-default ()
|
|
||||||
(setq-default ac-sources '(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
|
|
||||||
(add-hook 'emacs-lisp-mode-hook 'ac-emacs-lisp-mode-setup)
|
|
||||||
(add-hook 'c-mode-common-hook 'ac-cc-mode-setup)
|
|
||||||
(add-hook 'ruby-mode-hook 'ac-ruby-mode-setup)
|
|
||||||
(add-hook 'css-mode-hook 'ac-css-mode-setup)
|
|
||||||
(add-hook 'auto-complete-mode-hook 'ac-common-setup)
|
|
||||||
(global-auto-complete-mode t))
|
|
||||||
|
|
||||||
(provide 'auto-complete-config)
|
|
||||||
;;; auto-complete-config.el ends here
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
1036
.emacs.d/autopair.el
1036
.emacs.d/autopair.el
File diff suppressed because it is too large
Load diff
|
@ -1,156 +0,0 @@
|
||||||
;;; batch-mode.el --- major mode for editing ESRI batch scrips
|
|
||||||
;;; Copyright (C) 2002, Agnar Renolen <agnar.renolen@emap.no>
|
|
||||||
;;; Modified (c) 2009, Matthew Fidler <matthew.fidler at gmail.com>
|
|
||||||
;;; Fixed indents (and labels)
|
|
||||||
|
|
||||||
;; batch-mode.el is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation; either version 2 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program; if not, write to the Free Software
|
|
||||||
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
;; This is version 1.0 of 21 August 2002.
|
|
||||||
|
|
||||||
;;; Comentary:
|
|
||||||
|
|
||||||
;; The batch-mode provides syntax hilighting and auto-indentation for
|
|
||||||
;; DOS batch files (.bat). and auto-idendation.
|
|
||||||
|
|
||||||
;; Agnar Renolen, <agnar.renolen@emap.no>
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(defgroup batch nil
|
|
||||||
"Major mode for editing batch code"
|
|
||||||
:prefix "batch-"
|
|
||||||
:group 'languages)
|
|
||||||
|
|
||||||
; (defvar batch-mode-hook nil
|
|
||||||
; "Hooks called when batch mode fires up."
|
|
||||||
; :type 'hook
|
|
||||||
; :group 'batch)
|
|
||||||
|
|
||||||
(defvar batch-mode-map nil
|
|
||||||
"Keymap used with batch code")
|
|
||||||
|
|
||||||
(defcustom batch-indent-level 4
|
|
||||||
"Amount by which batch subexpressions are indented."
|
|
||||||
:type 'integer
|
|
||||||
:group 'batch)
|
|
||||||
|
|
||||||
(defvar batch-font-lock-keywords
|
|
||||||
(eval-when-compile
|
|
||||||
(list
|
|
||||||
; since we can't specify batch comments through the syntax table,
|
|
||||||
; we have to specify it here, and override whatever is highlighted
|
|
||||||
'( "^[ \t]*rem\\>.*" (0 font-lock-comment-face t))
|
|
||||||
|
|
||||||
; since the argument to the echo command is a string, we format it
|
|
||||||
; as a string
|
|
||||||
'( "\\<echo\\>[ \t]*\\(.*\\)" (1 font-lock-string-face t))
|
|
||||||
|
|
||||||
; the argument of the goto statement is a label
|
|
||||||
'( "\\<goto\\>[ \t]*\\([a-zA-Z0-9_]+\\)" (1
|
|
||||||
font-lock-constant-face))
|
|
||||||
|
|
||||||
; the keywords of batch (which are not built-in commands)
|
|
||||||
(concat "\\<\\(cmdextversion\\|"
|
|
||||||
"d\\(efined\\|isableextensions\\|o\\)\\|"
|
|
||||||
"e\\(lse\\|n\\(ableextensions\\|dlocal\\)"
|
|
||||||
"\\|qu\\|rrorlevel\\|xist\\)\\|for\\|"
|
|
||||||
"goto\\|i[fn]\\|n\\(eq\\|ot\\)\\|setlocal\\)\\>")
|
|
||||||
|
|
||||||
; built-in DOS commands
|
|
||||||
(cons (concat "\\<\\(a\\(ssoc\\|t\\(\\|trib\\)\\)\\|break\\|"
|
|
||||||
"c\\(a\\(cls\\|ll\\)\\|d\\|h\\(cp\\|dir\\|k\\("
|
|
||||||
"dsk\\|ntfs\\)\\)\\|ls\\|md\\|o\\(lor\\|mp\\(\\|act\\)"
|
|
||||||
"\\|nvert\\|py\\)\\)\\|d\\(ate\\|el\\|i\\("
|
|
||||||
"r\\|skco\\(mp\\|py\\)\\)\\|oskey\\)\\|"
|
|
||||||
"e\\(cho\\|rase\\|xit\\)\\|"
|
|
||||||
"f\\(c\\|ind\\(\\|str\\)\\|for\\(\\|mot\\)\\|type\\)\\|"
|
|
||||||
"graftabl\\|help\\|label\\|"
|
|
||||||
"m\\(d\\|mkdir\\|o[dvr]e\\)\\|p\\(a\\(th\\|use\\)"
|
|
||||||
"\\|opd\\|r\\(int\\|opmt\\)\\|ushd\\)\\|"
|
|
||||||
"r\\(d\\|e\\(cover\\|n\\(\\|ame\\)\\|place\\)\\|mdir\\)\\|"
|
|
||||||
"s\\(et\\|hift\\|ort\\|tart\\|ubst\\)\\|"
|
|
||||||
"t\\(i\\(me\\|tle\\)\\|ree\\|ype\\)\\|"
|
|
||||||
"v\\(er\\(\\|ify\\)\\|ol\\)\\|xcopy\\)\\>")
|
|
||||||
'font-lock-builtin-face)
|
|
||||||
|
|
||||||
; variables are embeded in percent chars
|
|
||||||
'( "%[a-zA-Z0-9_]+%?" . font-lock-variable-name-face)
|
|
||||||
; labels are formatted as constants
|
|
||||||
'( ":[a-zA-Z0-9_]+" . font-lock-constant-face)
|
|
||||||
|
|
||||||
; command line switches are hilighted as type-face
|
|
||||||
'( "[-/][a-zA-Z0-9_]+" . font-lock-type-face)
|
|
||||||
|
|
||||||
; variables set should also be hilighted with variable-name-face
|
|
||||||
'( "\\<set\\>[ \t]*\\([a-zA-Z0-9_]+\\)" (1 font-lock-variable-name-face))
|
|
||||||
)))
|
|
||||||
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun batch-mode ()
|
|
||||||
"Major mode for editing batch scripts."
|
|
||||||
(interactive)
|
|
||||||
(kill-all-local-variables)
|
|
||||||
(setq major-mode 'batch-mode)
|
|
||||||
(setq mode-name "Avenue")
|
|
||||||
(set (make-local-variable 'indent-line-function) 'batch-indent-line)
|
|
||||||
(set (make-local-variable 'comment-start) "rem")
|
|
||||||
(set (make-local-variable 'comment-start-skip) "rem[ \t]*")
|
|
||||||
(set (make-local-variable 'font-lock-defaults)
|
|
||||||
'(batch-font-lock-keywords nil t nil))
|
|
||||||
(run-hooks 'batch-mode-hook))
|
|
||||||
|
|
||||||
(defun batch-indent-line ()
|
|
||||||
"Indent current line as batch script"
|
|
||||||
(let ((indent (batch-calculate-indent))
|
|
||||||
beg shift-amt
|
|
||||||
(old-pos (- (point-max) (point))))
|
|
||||||
(beginning-of-line)
|
|
||||||
(setq beg (point))
|
|
||||||
(skip-chars-forward " \t")
|
|
||||||
(if (looking-at ")")
|
|
||||||
(setq indent (max (- indent batch-indent-level))))
|
|
||||||
(message "prev indent: %d" indent)
|
|
||||||
(setq shift-amt (- indent (current-column)))
|
|
||||||
(if (not (zerop shift-amt))
|
|
||||||
(progn
|
|
||||||
(delete-region beg (point))
|
|
||||||
; ArcView replaces tabs with single spaces, so we only insert
|
|
||||||
; spaces to make indentation correct in ArcView.
|
|
||||||
(insert-char ? indent)
|
|
||||||
(if (> (- (point-max) old-pos) (point))
|
|
||||||
(goto-char (- (point-max) old-pos)))))
|
|
||||||
shift-amt))
|
|
||||||
|
|
||||||
(defun batch-calculate-indent ()
|
|
||||||
"Return appropriate indentation for the current line as batch code."
|
|
||||||
(save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
(current-indentation)
|
|
||||||
(if (bobp)
|
|
||||||
0
|
|
||||||
(if (re-search-backward "^[ \t]*[^ \t\n\r]" nil t)
|
|
||||||
(if (looking-at "[ \t]*\\()[ \t]*else\\|for\\|if\\)\\>[^(\n]*([^)\n]*")
|
|
||||||
(+ (current-indentation) batch-indent-level)
|
|
||||||
(if (looking-at "[ \t]*[^(]*)[ \t]*")
|
|
||||||
(- (current-indentation) batch-indent-level)
|
|
||||||
(current-indentation)))
|
|
||||||
0))))
|
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.bat\\'" . batch-mode))
|
|
||||||
|
|
||||||
(provide 'batch-mode)
|
|
||||||
|
|
||||||
;;; batch-mode.el ends here
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,255 +0,0 @@
|
||||||
;;; fuzzy.el --- Fuzzy matching utilities
|
|
||||||
|
|
||||||
;; Copyright (C) 2010 Tomohiro Matsuyama
|
|
||||||
|
|
||||||
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
|
|
||||||
;; Keywords: convenience
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(eval-when-compile
|
|
||||||
(require 'cl))
|
|
||||||
(require 'regexp-opt)
|
|
||||||
|
|
||||||
(defgroup fuzzy nil
|
|
||||||
"Fuzzy matching utilities."
|
|
||||||
:group 'convenience
|
|
||||||
:prefix "fuzzy-")
|
|
||||||
|
|
||||||
(defcustom fuzzy-accept-error-rate 0.10
|
|
||||||
"Error threshold."
|
|
||||||
:group 'fuzzy)
|
|
||||||
|
|
||||||
(defvar fuzzy-accept-length-difference 2)
|
|
||||||
|
|
||||||
(defvar fuzzy-regexp-some-char (format "\\w\\{0,%s\\}" fuzzy-accept-length-difference))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; Functions
|
|
||||||
|
|
||||||
(defun fuzzy-reverse-string (string)
|
|
||||||
(apply 'string (nreverse (append string nil))))
|
|
||||||
|
|
||||||
(defun fuzzy-regexp-compile (string)
|
|
||||||
(labels ((oddp (n) (eq (logand n 1) 1))
|
|
||||||
(evenp (n) (eq (logand n 1) 0))
|
|
||||||
(opt (n) (regexp-opt-charset (append (substring string
|
|
||||||
(max 0 (- n 1))
|
|
||||||
(min (length string) (+ n 2))) nil))))
|
|
||||||
(concat
|
|
||||||
"\\("
|
|
||||||
(loop for i below (length string)
|
|
||||||
for c = (if (evenp i) (opt i) fuzzy-regexp-some-char)
|
|
||||||
concat c)
|
|
||||||
"\\|"
|
|
||||||
(loop for i below (length string)
|
|
||||||
for c = (if (oddp i) (opt i) fuzzy-regexp-some-char)
|
|
||||||
concat c)
|
|
||||||
"\\)")))
|
|
||||||
|
|
||||||
(defalias 'fuzzy-edit-distance 'fuzzy-jaro-winkler-distance)
|
|
||||||
|
|
||||||
(defun fuzzy-jaro-winkler-distance (s1 s2)
|
|
||||||
"http://en.wikipedia.org/wiki/Jaro-Winkler_distance"
|
|
||||||
(let* ((l1 (length s1))
|
|
||||||
(l2 (length s2))
|
|
||||||
(r (max 1 (1- (/ (max l1 l2) 2))))
|
|
||||||
(m 0)
|
|
||||||
(tr 0)
|
|
||||||
(p 0)
|
|
||||||
cs1 cs2)
|
|
||||||
(loop with seen = (make-vector l2 nil)
|
|
||||||
for i below l1
|
|
||||||
for c1 = (aref s1 i) do
|
|
||||||
(loop for j from (max 0 (- i r)) below (min l2 (+ i r))
|
|
||||||
for c2 = (aref s2 j)
|
|
||||||
if (and (char-equal c1 c2)
|
|
||||||
(null (aref seen j))) do
|
|
||||||
(push c1 cs1)
|
|
||||||
(aset seen j c2)
|
|
||||||
(incf m)
|
|
||||||
and return nil)
|
|
||||||
finally
|
|
||||||
(setq cs1 (nreverse cs1)
|
|
||||||
cs2 (loop for i below l2
|
|
||||||
for c = (aref seen i)
|
|
||||||
if c collect c)))
|
|
||||||
(loop for c1 in cs1
|
|
||||||
for c2 in cs2
|
|
||||||
if (not (char-equal c1 c2)) do
|
|
||||||
(incf tr))
|
|
||||||
(loop for i below (min m 5)
|
|
||||||
for c1 across s1
|
|
||||||
for c2 across s2
|
|
||||||
while (char-equal c1 c2) do
|
|
||||||
(incf p))
|
|
||||||
(if (eq m 0)
|
|
||||||
0.0
|
|
||||||
(setq m (float m))
|
|
||||||
(let* ((dj (/ (+ (/ m l1) (/ m l2) (/ (- m (/ tr 2)) m)) 3))
|
|
||||||
(dw (+ dj (* p 0.1 (- 1 dj)))))
|
|
||||||
dw))))
|
|
||||||
|
|
||||||
;; this function should be compiled
|
|
||||||
(byte-compile 'fuzzy-jaro-winkler-distance)
|
|
||||||
|
|
||||||
(defun fuzzy-match (s1 s2 &optional function)
|
|
||||||
(or function (setq function 'fuzzy-edit-distance))
|
|
||||||
(and (<= (abs (- (length s1) (length s2)))
|
|
||||||
fuzzy-accept-length-difference)
|
|
||||||
(>= (funcall function s1 s2)
|
|
||||||
(- 1 fuzzy-accept-error-rate))))
|
|
||||||
|
|
||||||
(defun fuzzy-all-completions (string collection)
|
|
||||||
"all-completions family with fuzzy matching."
|
|
||||||
(loop with length = (length string)
|
|
||||||
for str in collection
|
|
||||||
for s = (substring str 0 (min (length str)
|
|
||||||
(+ length fuzzy-accept-length-difference)))
|
|
||||||
if (fuzzy-match string s)
|
|
||||||
collect str))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; Search and Incremental Search
|
|
||||||
|
|
||||||
(defvar fuzzy-search-cache nil)
|
|
||||||
(defvar fuzzy-search-cache-string nil)
|
|
||||||
|
|
||||||
(defun fuzzy-search-cache-activate ()
|
|
||||||
(setq fuzzy-search-cache (make-hash-table))
|
|
||||||
(setq fuzzy-search-cache-string nil))
|
|
||||||
|
|
||||||
(defun fuzzy-search-cache-deactive ()
|
|
||||||
(setq fuzzy-search-cache nil)
|
|
||||||
(setq fuzzy-search-cache-string nil))
|
|
||||||
|
|
||||||
(defun fuzzy-search-edit-distance (s1 s2)
|
|
||||||
(or (and fuzzy-search-cache
|
|
||||||
(cond
|
|
||||||
((null fuzzy-search-cache-string)
|
|
||||||
(setq fuzzy-search-cache-string s1)
|
|
||||||
nil)
|
|
||||||
((not (equal fuzzy-search-cache-string s1))
|
|
||||||
(setq fuzzy-search-cache-string s1)
|
|
||||||
(clrhash fuzzy-search-cache)
|
|
||||||
nil)
|
|
||||||
(t))
|
|
||||||
(gethash s2 fuzzy-search-cache))
|
|
||||||
(let ((d (fuzzy-edit-distance s1 s2)))
|
|
||||||
(if fuzzy-search-cache
|
|
||||||
(puthash s2 d fuzzy-search-cache))
|
|
||||||
d)))
|
|
||||||
|
|
||||||
(defun fuzzy-search-match (s1 s2)
|
|
||||||
(fuzzy-match s1 s2 'fuzzy-search-edit-distance))
|
|
||||||
|
|
||||||
(defun fuzzy-search-forward (string &optional bound noerror count)
|
|
||||||
(let* ((regexp (fuzzy-regexp-compile string))
|
|
||||||
match-data)
|
|
||||||
(save-excursion
|
|
||||||
(while (and (null match-data)
|
|
||||||
(re-search-forward regexp bound t))
|
|
||||||
(if (fuzzy-search-match string (match-string 1))
|
|
||||||
(setq match-data (match-data))
|
|
||||||
(goto-char (1+ (match-beginning 1))))))
|
|
||||||
(when match-data
|
|
||||||
(store-match-data match-data)
|
|
||||||
(goto-char (match-end 1)))))
|
|
||||||
|
|
||||||
(defun fuzzy-search-backward (string &optional bound noerror count)
|
|
||||||
(let* ((regexp (fuzzy-regexp-compile string))
|
|
||||||
match-data begin end)
|
|
||||||
(save-excursion
|
|
||||||
(while (and (null match-data)
|
|
||||||
(re-search-backward regexp bound t))
|
|
||||||
(setq begin (match-beginning 1)
|
|
||||||
end (match-end 1))
|
|
||||||
(store-match-data nil)
|
|
||||||
(goto-char (max (point-min) (- begin (* (length string) 2))))
|
|
||||||
(while (re-search-forward regexp end t)
|
|
||||||
(if (fuzzy-search-match string (match-string 1))
|
|
||||||
(setq match-data (match-data))
|
|
||||||
(goto-char (1+ (match-beginning 1)))))
|
|
||||||
(unless match-data
|
|
||||||
(goto-char begin)))
|
|
||||||
(if match-data
|
|
||||||
(progn
|
|
||||||
(store-match-data match-data)
|
|
||||||
(goto-char (match-beginning 1)))
|
|
||||||
(store-match-data nil)))))
|
|
||||||
|
|
||||||
(defvar fuzzy-isearch nil)
|
|
||||||
(defvar fuzzy-isearch-failed-count 0)
|
|
||||||
(defvar fuzzy-isearch-enabled 'on-failed)
|
|
||||||
(defvar fuzzy-isearch-original-search-fun nil)
|
|
||||||
(defvar fuzzy-isearch-prefix "[FUZZY] ")
|
|
||||||
|
|
||||||
(defun fuzzy-isearch-activate ()
|
|
||||||
(setq fuzzy-isearch t)
|
|
||||||
(setq fuzzy-isearch-failed-count 0)
|
|
||||||
(fuzzy-search-cache-activate))
|
|
||||||
|
|
||||||
(defun fuzzy-isearch-deactivate ()
|
|
||||||
(setq fuzzy-isearch nil)
|
|
||||||
(setq fuzzy-isearch-failed-count 0)
|
|
||||||
(fuzzy-search-cache-deactive))
|
|
||||||
|
|
||||||
(defun fuzzy-isearch ()
|
|
||||||
(cond (isearch-word
|
|
||||||
(if isearch-forward 'word-search-forward 'word-search-backward))
|
|
||||||
(isearch-regexp
|
|
||||||
(if isearch-forward 're-search-forward 're-search-backward))
|
|
||||||
((or fuzzy-isearch
|
|
||||||
(eq fuzzy-isearch-enabled 'always)
|
|
||||||
(and (eq fuzzy-isearch-enabled 'on-failed)
|
|
||||||
(null isearch-success)
|
|
||||||
isearch-wrapped
|
|
||||||
(> (setq fuzzy-isearch-failed-count (1+ fuzzy-isearch-failed-count))
|
|
||||||
1)))
|
|
||||||
(unless fuzzy-isearch
|
|
||||||
;(goto-char isearch-opoint)
|
|
||||||
(fuzzy-isearch-activate))
|
|
||||||
(if isearch-forward 'fuzzy-search-forward 'fuzzy-search-backward))
|
|
||||||
(t
|
|
||||||
(if isearch-forward 'search-forward 'search-backward))))
|
|
||||||
|
|
||||||
(defun fuzzy-isearch-end-hook ()
|
|
||||||
(fuzzy-isearch-deactivate))
|
|
||||||
|
|
||||||
(defun turn-on-fuzzy-isearch ()
|
|
||||||
(interactive)
|
|
||||||
(setq fuzzy-isearch-original-search-fun isearch-search-fun-function)
|
|
||||||
(setq isearch-search-fun-function 'fuzzy-isearch)
|
|
||||||
(add-hook 'isearch-mode-end-hook 'fuzzy-isearch-end-hook))
|
|
||||||
|
|
||||||
(defun turn-off-fuzzy-isearch ()
|
|
||||||
(interactive)
|
|
||||||
(setq isearch-search-fun-function fuzzy-isearch-original-search-fun)
|
|
||||||
(remove-hook 'isearch-mode-end-hook 'fuzzy-isearch-end-hook))
|
|
||||||
|
|
||||||
(defadvice isearch-message-prefix (after fuzzy-isearch-message-prefix activate)
|
|
||||||
(if fuzzy-isearch
|
|
||||||
(setq ad-return-value (concat fuzzy-isearch-prefix ad-return-value))
|
|
||||||
ad-return-value))
|
|
||||||
|
|
||||||
(provide 'fuzzy)
|
|
||||||
;;; fuzzy.el ends here
|
|
Binary file not shown.
4016
.emacs.d/ide-skel.el
4016
.emacs.d/ide-skel.el
File diff suppressed because it is too large
Load diff
|
@ -1,20 +0,0 @@
|
||||||
(load-file "~/.emacs.d/slash_theme.el")
|
|
||||||
(load-file "~/.emacs.d/slash_python.el")
|
|
||||||
(load-file "~/.emacs.d/slash_functions.el")
|
|
||||||
(autoload 'vala-mode
|
|
||||||
"~/.emacs.d/vala-mode.el" "A Major mode for editing Vala files" t)
|
|
||||||
(autoload 'csharp-mode
|
|
||||||
"~/.emacs.d/csharp-mode.el" "A Major mode for editing C# files" t)
|
|
||||||
(autoload 'javascript-mode
|
|
||||||
"~/.emacs.d/javascript.el" "A Major mode for editing JavaScript" t)
|
|
||||||
(autoload 'sqlplus
|
|
||||||
"~/.emacs.d/sqlplus.el" "A Major mode for communicating with Oracle" t)
|
|
||||||
(autoload 'batch-mode
|
|
||||||
"~/.emacs.d/batch-mode.el" "A Major mode for editing Batch files" t)
|
|
||||||
(autoload 'rainbow-mode
|
|
||||||
"~/.emacs.d/rainbow-mode.el" "A Minor mode for showing colors inline" t)
|
|
||||||
(load-file "~/.emacs.d/autopair.el")
|
|
||||||
(load-file "~/.emacs.d/auto-complete-config.el")
|
|
||||||
(require 'auto-complete-config)
|
|
||||||
(require 'tabbar)
|
|
||||||
(require 'ide-skel)
|
|
|
@ -1,707 +0,0 @@
|
||||||
;;; javascript.el --- Major mode for editing JavaScript source text
|
|
||||||
|
|
||||||
;; Copyright (C) 2006 Karl Landström
|
|
||||||
|
|
||||||
;; Author: Karl Landström <kland@comhem.se>
|
|
||||||
;; Maintainer: Karl Landström <kland@comhem.se>
|
|
||||||
;; Version: 2.0 Beta 8
|
|
||||||
;; Date: 2006-12-26
|
|
||||||
;; Keywords: languages, oop
|
|
||||||
|
|
||||||
;; This file is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
;; any later version.
|
|
||||||
|
|
||||||
;; This file is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with GNU Emacs; see the file COPYING. If not, write to
|
|
||||||
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
;; Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
;;
|
|
||||||
;; The main features of this JavaScript mode are syntactic
|
|
||||||
;; highlighting (enabled with `font-lock-mode' or
|
|
||||||
;; `global-font-lock-mode'), automatic indentation and filling of
|
|
||||||
;; comments.
|
|
||||||
;;
|
|
||||||
;; This package has (only) been tested with GNU Emacs 21.4 (the latest
|
|
||||||
;; stable release).
|
|
||||||
;;
|
|
||||||
;; Installation:
|
|
||||||
;;
|
|
||||||
;; Put this file in a directory where Emacs can find it (`C-h v
|
|
||||||
;; load-path' for more info). Then add the following lines to your
|
|
||||||
;; Emacs initialization file:
|
|
||||||
;;
|
|
||||||
;; (add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
|
|
||||||
;; (autoload 'javascript-mode "javascript" nil t)
|
|
||||||
;;
|
|
||||||
;; General Remarks:
|
|
||||||
;;
|
|
||||||
;; This mode assumes that block comments are not nested inside block
|
|
||||||
;; comments and that strings do not contain line breaks.
|
|
||||||
;;
|
|
||||||
;; Exported names start with "javascript-" whereas private names start
|
|
||||||
;; with "js-".
|
|
||||||
;;
|
|
||||||
;; Changes:
|
|
||||||
;;
|
|
||||||
;; See javascript.el.changelog.
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(require 'cc-mode)
|
|
||||||
(require 'font-lock)
|
|
||||||
(require 'newcomment)
|
|
||||||
|
|
||||||
(defgroup javascript nil
|
|
||||||
"Customization variables for `javascript-mode'."
|
|
||||||
:tag "JavaScript"
|
|
||||||
:group 'languages)
|
|
||||||
|
|
||||||
(defcustom javascript-indent-level 4
|
|
||||||
"Number of spaces for each indentation step."
|
|
||||||
:type 'integer
|
|
||||||
:group 'javascript)
|
|
||||||
|
|
||||||
(defcustom javascript-auto-indent-flag t
|
|
||||||
"Automatic indentation with punctuation characters. If non-nil, the
|
|
||||||
current line is indented when certain punctuations are inserted."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'javascript)
|
|
||||||
|
|
||||||
|
|
||||||
;; --- Keymap ---
|
|
||||||
|
|
||||||
(defvar javascript-mode-map nil
|
|
||||||
"Keymap used in JavaScript mode.")
|
|
||||||
|
|
||||||
(unless javascript-mode-map
|
|
||||||
(setq javascript-mode-map (make-sparse-keymap)))
|
|
||||||
|
|
||||||
(when javascript-auto-indent-flag
|
|
||||||
(mapc (lambda (key)
|
|
||||||
(define-key javascript-mode-map key 'javascript-insert-and-indent))
|
|
||||||
'("{" "}" "(" ")" ":" ";" ",")))
|
|
||||||
|
|
||||||
(defun javascript-insert-and-indent (key)
|
|
||||||
"Run command bound to key and indent current line. Runs the command
|
|
||||||
bound to KEY in the global keymap and indents the current line."
|
|
||||||
(interactive (list (this-command-keys)))
|
|
||||||
(call-interactively (lookup-key (current-global-map) key))
|
|
||||||
(indent-according-to-mode))
|
|
||||||
|
|
||||||
|
|
||||||
;; --- Syntax Table And Parsing ---
|
|
||||||
|
|
||||||
(defvar javascript-mode-syntax-table
|
|
||||||
(let ((table (make-syntax-table)))
|
|
||||||
(c-populate-syntax-table table)
|
|
||||||
|
|
||||||
;; The syntax class of underscore should really be `symbol' ("_")
|
|
||||||
;; but that makes matching of tokens much more complex as e.g.
|
|
||||||
;; "\\<xyz\\>" matches part of e.g. "_xyz" and "xyz_abc". Defines
|
|
||||||
;; it as word constituent for now.
|
|
||||||
(modify-syntax-entry ?_ "w" table)
|
|
||||||
|
|
||||||
table)
|
|
||||||
"Syntax table used in JavaScript mode.")
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-re-search-forward-inner (regexp &optional bound count)
|
|
||||||
"Auxiliary function for `js-re-search-forward'."
|
|
||||||
(let ((parse)
|
|
||||||
(saved-point (point-min)))
|
|
||||||
(while (> count 0)
|
|
||||||
(re-search-forward regexp bound)
|
|
||||||
(setq parse (parse-partial-sexp saved-point (point)))
|
|
||||||
(cond ((nth 3 parse)
|
|
||||||
(re-search-forward
|
|
||||||
(concat "\\([^\\]\\|^\\)" (string (nth 3 parse)))
|
|
||||||
(save-excursion (end-of-line) (point)) t))
|
|
||||||
((nth 7 parse)
|
|
||||||
(forward-line))
|
|
||||||
((or (nth 4 parse)
|
|
||||||
(and (eq (char-before) ?\/) (eq (char-after) ?\*)))
|
|
||||||
(re-search-forward "\\*/"))
|
|
||||||
(t
|
|
||||||
(setq count (1- count))))
|
|
||||||
(setq saved-point (point))))
|
|
||||||
(point))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-re-search-forward (regexp &optional bound noerror count)
|
|
||||||
"Search forward but ignore strings and comments. Invokes
|
|
||||||
`re-search-forward' but treats the buffer as if strings and
|
|
||||||
comments have been removed."
|
|
||||||
(let ((saved-point (point))
|
|
||||||
(search-expr
|
|
||||||
(cond ((null count)
|
|
||||||
'(js-re-search-forward-inner regexp bound 1))
|
|
||||||
((< count 0)
|
|
||||||
'(js-re-search-backward-inner regexp bound (- count)))
|
|
||||||
((> count 0)
|
|
||||||
'(js-re-search-forward-inner regexp bound count)))))
|
|
||||||
(condition-case err
|
|
||||||
(eval search-expr)
|
|
||||||
(search-failed
|
|
||||||
(goto-char saved-point)
|
|
||||||
(unless noerror
|
|
||||||
(error (error-message-string err)))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-re-search-backward-inner (regexp &optional bound count)
|
|
||||||
"Auxiliary function for `js-re-search-backward'."
|
|
||||||
(let ((parse)
|
|
||||||
(saved-point (point-min)))
|
|
||||||
(while (> count 0)
|
|
||||||
(re-search-backward regexp bound)
|
|
||||||
(when (and (> (point) (point-min))
|
|
||||||
(save-excursion (backward-char) (looking-at "/[/*]")))
|
|
||||||
(forward-char))
|
|
||||||
(setq parse (parse-partial-sexp saved-point (point)))
|
|
||||||
(cond ((nth 3 parse)
|
|
||||||
(re-search-backward
|
|
||||||
(concat "\\([^\\]\\|^\\)" (string (nth 3 parse)))
|
|
||||||
(save-excursion (beginning-of-line) (point)) t))
|
|
||||||
((nth 7 parse)
|
|
||||||
(goto-char (nth 8 parse)))
|
|
||||||
((or (nth 4 parse)
|
|
||||||
(and (eq (char-before) ?/) (eq (char-after) ?*)))
|
|
||||||
(re-search-backward "/\\*"))
|
|
||||||
(t
|
|
||||||
(setq count (1- count))))))
|
|
||||||
(point))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-re-search-backward (regexp &optional bound noerror count)
|
|
||||||
"Search backward but ignore strings and comments. Invokes
|
|
||||||
`re-search-backward' but treats the buffer as if strings and
|
|
||||||
comments have been removed."
|
|
||||||
(let ((saved-point (point))
|
|
||||||
(search-expr
|
|
||||||
(cond ((null count)
|
|
||||||
'(js-re-search-backward-inner regexp bound 1))
|
|
||||||
((< count 0)
|
|
||||||
'(js-re-search-forward-inner regexp bound (- count)))
|
|
||||||
((> count 0)
|
|
||||||
'(js-re-search-backward-inner regexp bound count)))))
|
|
||||||
(condition-case err
|
|
||||||
(eval search-expr)
|
|
||||||
(search-failed
|
|
||||||
(goto-char saved-point)
|
|
||||||
(unless noerror
|
|
||||||
(error (error-message-string err)))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-continued-var-decl-list-p ()
|
|
||||||
"Return non-nil if point is inside a continued variable declaration
|
|
||||||
list."
|
|
||||||
(interactive)
|
|
||||||
(let ((start (save-excursion (js-re-search-backward "\\<var\\>" nil t))))
|
|
||||||
(and start
|
|
||||||
(save-excursion (re-search-backward "\n" start t))
|
|
||||||
(not (save-excursion
|
|
||||||
(js-re-search-backward
|
|
||||||
";\\|[^, \t][ \t]*\\(/[/*]\\|$\\)" start t))))))
|
|
||||||
|
|
||||||
|
|
||||||
;; --- Font Lock ---
|
|
||||||
|
|
||||||
(defun js-inside-param-list-p ()
|
|
||||||
"Return non-nil if point is inside a function parameter list."
|
|
||||||
(condition-case err
|
|
||||||
(save-excursion
|
|
||||||
(up-list -1)
|
|
||||||
(and (looking-at "(")
|
|
||||||
(progn (backward-word 1)
|
|
||||||
(or (looking-at "function")
|
|
||||||
(progn (backward-word 1) (looking-at "function"))))))
|
|
||||||
(error nil)))
|
|
||||||
|
|
||||||
|
|
||||||
(defconst js-function-heading-1-re
|
|
||||||
"^[ \t]*function[ \t]+\\(\\w+\\)"
|
|
||||||
"Regular expression matching the start of a function header.")
|
|
||||||
|
|
||||||
(defconst js-function-heading-2-re
|
|
||||||
"^[ \t]*\\(\\w+\\)[ \t]*:[ \t]*function\\>"
|
|
||||||
"Regular expression matching the start of a function entry in
|
|
||||||
an associative array.")
|
|
||||||
|
|
||||||
(defconst js-keyword-re
|
|
||||||
(regexp-opt '("abstract" "break" "case" "catch" "class" "const"
|
|
||||||
"continue" "debugger" "default" "delete" "do" "else"
|
|
||||||
"enum" "export" "extends" "final" "finally" "for"
|
|
||||||
"function" "goto" "if" "implements" "import" "in"
|
|
||||||
"instanceof" "interface" "native" "new" "package"
|
|
||||||
"private" "protected" "public" "return" "static"
|
|
||||||
"super" "switch" "synchronized" "this" "throw"
|
|
||||||
"throws" "transient" "try" "typeof" "var" "void"
|
|
||||||
"volatile" "while" "with"
|
|
||||||
"let") 'words)
|
|
||||||
"Regular expression matching any JavaScript keyword.")
|
|
||||||
|
|
||||||
(defconst js-basic-type-re
|
|
||||||
(regexp-opt '("boolean" "byte" "char" "double" "float" "int" "long"
|
|
||||||
"short" "void") 'words)
|
|
||||||
"Regular expression matching any predefined type in JavaScript.")
|
|
||||||
|
|
||||||
(defconst js-constant-re
|
|
||||||
(regexp-opt '("false" "null" "true") 'words)
|
|
||||||
"Regular expression matching any future reserved words in JavaScript.")
|
|
||||||
|
|
||||||
|
|
||||||
(defconst js-font-lock-keywords-1
|
|
||||||
(list
|
|
||||||
"\\<import\\>"
|
|
||||||
(list js-function-heading-1-re 1 font-lock-function-name-face)
|
|
||||||
(list js-function-heading-2-re 1 font-lock-function-name-face)
|
|
||||||
(list "[=(][ \t]*\\(/.*?[^\\]/\\w*\\)" 1 font-lock-string-face))
|
|
||||||
"Level one font lock.")
|
|
||||||
|
|
||||||
(defconst js-font-lock-keywords-2
|
|
||||||
(append js-font-lock-keywords-1
|
|
||||||
(list (list js-keyword-re 1 font-lock-keyword-face)
|
|
||||||
(cons js-basic-type-re font-lock-type-face)
|
|
||||||
(cons js-constant-re font-lock-constant-face)))
|
|
||||||
"Level two font lock.")
|
|
||||||
|
|
||||||
|
|
||||||
;; Limitations with variable declarations: There seems to be no
|
|
||||||
;; sensible way to highlight variables occuring after an initialized
|
|
||||||
;; variable in a variable list. For instance, in
|
|
||||||
;;
|
|
||||||
;; var x, y = f(a, b), z
|
|
||||||
;;
|
|
||||||
;; z will not be highlighted.
|
|
||||||
|
|
||||||
(defconst js-font-lock-keywords-3
|
|
||||||
(append
|
|
||||||
js-font-lock-keywords-2
|
|
||||||
(list
|
|
||||||
|
|
||||||
;; variable declarations
|
|
||||||
(list
|
|
||||||
(concat "\\<\\(const\\|var\\)\\>\\|" js-basic-type-re)
|
|
||||||
(list "\\(\\w+\\)[ \t]*\\([=;].*\\|,\\|/[/*]\\|$\\)"
|
|
||||||
nil
|
|
||||||
nil
|
|
||||||
'(1 font-lock-variable-name-face)))
|
|
||||||
|
|
||||||
;; continued variable declaration list
|
|
||||||
(list
|
|
||||||
(concat "^[ \t]*\\w+[ \t]*\\([,;=]\\|/[/*]\\|$\\)")
|
|
||||||
(list "\\(\\w+\\)[ \t]*\\([=;].*\\|,\\|/[/*]\\|$\\)"
|
|
||||||
'(if (save-excursion (backward-char) (js-continued-var-decl-list-p))
|
|
||||||
(backward-word 1)
|
|
||||||
(end-of-line))
|
|
||||||
'(end-of-line)
|
|
||||||
'(1 font-lock-variable-name-face)))
|
|
||||||
|
|
||||||
;; formal parameters
|
|
||||||
(list
|
|
||||||
(concat "\\<function\\>\\([ \t]+\\w+\\)?[ \t]*([ \t]*\\w")
|
|
||||||
(list "\\(\\w+\\)\\([ \t]*).*\\)?"
|
|
||||||
'(backward-char)
|
|
||||||
'(end-of-line)
|
|
||||||
'(1 font-lock-variable-name-face)))
|
|
||||||
|
|
||||||
;; continued formal parameter list
|
|
||||||
(list
|
|
||||||
(concat "^[ \t]*\\w+[ \t]*[,)]")
|
|
||||||
(list "\\w+"
|
|
||||||
'(if (save-excursion (backward-char) (js-inside-param-list-p))
|
|
||||||
(backward-word 1)
|
|
||||||
(end-of-line))
|
|
||||||
'(end-of-line)
|
|
||||||
'(0 font-lock-variable-name-face)))))
|
|
||||||
"Level three font lock.")
|
|
||||||
|
|
||||||
(defconst js-font-lock-keywords
|
|
||||||
'(js-font-lock-keywords-3 js-font-lock-keywords-1 js-font-lock-keywords-2
|
|
||||||
js-font-lock-keywords-3)
|
|
||||||
"See `font-lock-keywords'.")
|
|
||||||
|
|
||||||
|
|
||||||
;; --- Indentation ---
|
|
||||||
|
|
||||||
(defconst js-possibly-braceless-keyword-re
|
|
||||||
(regexp-opt
|
|
||||||
'("catch" "do" "else" "finally" "for" "if" "try" "while" "with" "let")
|
|
||||||
'words)
|
|
||||||
"Regular expression matching keywords that are optionally
|
|
||||||
followed by an opening brace.")
|
|
||||||
|
|
||||||
(defconst js-indent-operator-re
|
|
||||||
(concat "[-+*/%<>=&^|?:.]\\([^-+*/]\\|$\\)\\|"
|
|
||||||
(regexp-opt '("in" "instanceof") 'words))
|
|
||||||
"Regular expression matching operators that affect indentation
|
|
||||||
of continued expressions.")
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-looking-at-operator-p ()
|
|
||||||
"Return non-nil if text after point is an operator (that is not
|
|
||||||
a comma)."
|
|
||||||
(save-match-data
|
|
||||||
(and (looking-at js-indent-operator-re)
|
|
||||||
(or (not (looking-at ":"))
|
|
||||||
(save-excursion
|
|
||||||
(and (js-re-search-backward "[?:{]\\|\\<case\\>" nil t)
|
|
||||||
(looking-at "?")))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-continued-expression-p ()
|
|
||||||
"Returns non-nil if the current line continues an expression."
|
|
||||||
(save-excursion
|
|
||||||
(back-to-indentation)
|
|
||||||
(or (js-looking-at-operator-p)
|
|
||||||
(and (js-re-search-backward "\n" nil t)
|
|
||||||
(progn
|
|
||||||
(skip-chars-backward " \t")
|
|
||||||
(backward-char)
|
|
||||||
(and (> (point) (point-min))
|
|
||||||
(save-excursion (backward-char) (not (looking-at "[/*]/")))
|
|
||||||
(js-looking-at-operator-p)
|
|
||||||
(and (progn (backward-char)
|
|
||||||
(not (looking-at "++\\|--\\|/[/*]"))))))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-end-of-do-while-loop-p ()
|
|
||||||
"Returns non-nil if word after point is `while' of a do-while
|
|
||||||
statement, else returns nil. A braceless do-while statement
|
|
||||||
spanning several lines requires that the start of the loop is
|
|
||||||
indented to the same column as the current line."
|
|
||||||
(interactive)
|
|
||||||
(save-excursion
|
|
||||||
(save-match-data
|
|
||||||
(when (looking-at "\\s-*\\<while\\>")
|
|
||||||
(if (save-excursion
|
|
||||||
(skip-chars-backward "[ \t\n]*}")
|
|
||||||
(looking-at "[ \t\n]*}"))
|
|
||||||
(save-excursion
|
|
||||||
(backward-list) (backward-word 1) (looking-at "\\<do\\>"))
|
|
||||||
(js-re-search-backward "\\<do\\>" (point-at-bol) t)
|
|
||||||
(or (looking-at "\\<do\\>")
|
|
||||||
(let ((saved-indent (current-indentation)))
|
|
||||||
(while (and (js-re-search-backward "^[ \t]*\\<" nil t)
|
|
||||||
(/= (current-indentation) saved-indent)))
|
|
||||||
(and (looking-at "[ \t]*\\<do\\>")
|
|
||||||
(not (js-re-search-forward
|
|
||||||
"\\<while\\>" (point-at-eol) t))
|
|
||||||
(= (current-indentation) saved-indent)))))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-ctrl-statement-indentation ()
|
|
||||||
"Returns the proper indentation of the current line if it
|
|
||||||
starts the body of a control statement without braces, else
|
|
||||||
returns nil."
|
|
||||||
(save-excursion
|
|
||||||
(back-to-indentation)
|
|
||||||
(when (save-excursion
|
|
||||||
(and (not (looking-at "[{]"))
|
|
||||||
(progn
|
|
||||||
(js-re-search-backward "[[:graph:]]" nil t)
|
|
||||||
(forward-char)
|
|
||||||
(when (= (char-before) ?\)) (backward-list))
|
|
||||||
(skip-syntax-backward " ")
|
|
||||||
(skip-syntax-backward "w")
|
|
||||||
(looking-at js-possibly-braceless-keyword-re))
|
|
||||||
(not (js-end-of-do-while-loop-p))))
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (match-beginning 0))
|
|
||||||
(+ (current-indentation) javascript-indent-level)))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-proper-indentation (parse-status)
|
|
||||||
"Return the proper indentation for the current line."
|
|
||||||
(save-excursion
|
|
||||||
(back-to-indentation)
|
|
||||||
(let ((ctrl-stmt-indent (js-ctrl-statement-indentation))
|
|
||||||
(same-indent-p (looking-at "[]})]\\|\\<case\\>\\|\\<default\\>"))
|
|
||||||
(continued-expr-p (js-continued-expression-p)))
|
|
||||||
(cond (ctrl-stmt-indent)
|
|
||||||
((js-continued-var-decl-list-p)
|
|
||||||
(js-re-search-backward "\\<var\\>" nil t)
|
|
||||||
(+ (current-indentation) javascript-indent-level))
|
|
||||||
((nth 1 parse-status)
|
|
||||||
(goto-char (nth 1 parse-status))
|
|
||||||
(if (looking-at "[({[][ \t]*\\(/[/*]\\|$\\)")
|
|
||||||
(progn
|
|
||||||
(skip-syntax-backward " ")
|
|
||||||
(when (= (char-before) ?\)) (backward-list))
|
|
||||||
(back-to-indentation)
|
|
||||||
(cond (same-indent-p
|
|
||||||
(current-column))
|
|
||||||
(continued-expr-p
|
|
||||||
(+ (current-column) (* 2 javascript-indent-level)))
|
|
||||||
(t
|
|
||||||
(+ (current-column) javascript-indent-level))))
|
|
||||||
(unless same-indent-p
|
|
||||||
(forward-char)
|
|
||||||
(skip-chars-forward " \t"))
|
|
||||||
(current-column)))
|
|
||||||
(continued-expr-p javascript-indent-level)
|
|
||||||
(t 0)))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun javascript-indent-line ()
|
|
||||||
"Indent the current line as JavaScript source text."
|
|
||||||
(interactive)
|
|
||||||
(let ((parse-status
|
|
||||||
(save-excursion (parse-partial-sexp (point-min) (point-at-bol))))
|
|
||||||
(offset (- (current-column) (current-indentation))))
|
|
||||||
(when (not (nth 8 parse-status))
|
|
||||||
(indent-line-to (js-proper-indentation parse-status))
|
|
||||||
(when (> offset 0) (forward-char offset)))))
|
|
||||||
|
|
||||||
|
|
||||||
;; --- Filling ---
|
|
||||||
|
|
||||||
;; FIXME: It should be possible to use the more sofisticated function
|
|
||||||
;; `c-fill-paragraph' in `cc-cmds.el' instead. However, just setting
|
|
||||||
;; `fill-paragraph-function' to `c-fill-paragraph' does not work;
|
|
||||||
;; inside `c-fill-paragraph', `fill-paragraph-function' evaluates to
|
|
||||||
;; nil!?
|
|
||||||
|
|
||||||
(defun js-backward-paragraph ()
|
|
||||||
"Move backward to start of paragraph. Postcondition: Point is at
|
|
||||||
beginning of buffer or the previous line contains only whitespace."
|
|
||||||
(forward-line -1)
|
|
||||||
(while (not (or (bobp) (looking-at "^[ \t]*$")))
|
|
||||||
(forward-line -1))
|
|
||||||
(when (not (bobp)) (forward-line 1)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-forward-paragraph ()
|
|
||||||
"Move forward to end of paragraph. Postcondition: Point is at
|
|
||||||
end of buffer or the next line contains only whitespace."
|
|
||||||
(forward-line 1)
|
|
||||||
(while (not (or (eobp) (looking-at "^[ \t]*$")))
|
|
||||||
(forward-line 1))
|
|
||||||
(when (not (eobp)) (backward-char 1)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-fill-block-comment-paragraph (parse-status justify)
|
|
||||||
"Fill current paragraph as a block comment. PARSE-STATUS is the
|
|
||||||
result of `parse-partial-regexp' from beginning of buffer to
|
|
||||||
point. JUSTIFY has the same meaning as in `fill-paragraph'."
|
|
||||||
(let ((offset (save-excursion
|
|
||||||
(goto-char (nth 8 parse-status)) (current-indentation))))
|
|
||||||
(save-excursion
|
|
||||||
(save-restriction
|
|
||||||
(narrow-to-region (save-excursion
|
|
||||||
(goto-char (nth 8 parse-status)) (point-at-bol))
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (nth 8 parse-status))
|
|
||||||
(re-search-forward "*/")))
|
|
||||||
(narrow-to-region (save-excursion
|
|
||||||
(js-backward-paragraph)
|
|
||||||
(when (looking-at "^[ \t]*$") (forward-line 1))
|
|
||||||
(point))
|
|
||||||
(save-excursion
|
|
||||||
(js-forward-paragraph)
|
|
||||||
(when (looking-at "^[ \t]*$") (backward-char))
|
|
||||||
(point)))
|
|
||||||
(goto-char (point-min))
|
|
||||||
(while (not (eobp))
|
|
||||||
(delete-horizontal-space)
|
|
||||||
(forward-line 1))
|
|
||||||
(let ((fill-column (- fill-column offset))
|
|
||||||
(fill-paragraph-function nil))
|
|
||||||
(fill-paragraph justify))
|
|
||||||
|
|
||||||
;; In Emacs 21.4 as opposed to CVS Emacs 22,
|
|
||||||
;; `fill-paragraph' seems toadd a newline at the end of the
|
|
||||||
;; paragraph. Remove it!
|
|
||||||
(goto-char (point-max))
|
|
||||||
(when (looking-at "^$") (backward-delete-char 1))
|
|
||||||
|
|
||||||
(goto-char (point-min))
|
|
||||||
(while (not (eobp))
|
|
||||||
(indent-to offset)
|
|
||||||
(forward-line 1))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-sline-comment-par-start ()
|
|
||||||
"Return point at the beginning of the line where the current
|
|
||||||
single-line comment paragraph starts."
|
|
||||||
(save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
(while (and (not (bobp))
|
|
||||||
(looking-at "^[ \t]*//[ \t]*[[:graph:]]"))
|
|
||||||
(forward-line -1))
|
|
||||||
(unless (bobp) (forward-line 1))
|
|
||||||
(point)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-sline-comment-par-end ()
|
|
||||||
"Return point at end of current single-line comment paragraph."
|
|
||||||
(save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
(while (and (not (eobp))
|
|
||||||
(looking-at "^[ \t]*//[ \t]*[[:graph:]]"))
|
|
||||||
(forward-line 1))
|
|
||||||
(unless (bobp) (backward-char))
|
|
||||||
(point)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-sline-comment-offset (line)
|
|
||||||
"Return the column at the start of the current single-line
|
|
||||||
comment paragraph."
|
|
||||||
(save-excursion
|
|
||||||
(goto-line line)
|
|
||||||
(re-search-forward "//" (point-at-eol))
|
|
||||||
(goto-char (match-beginning 0))
|
|
||||||
(current-column)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-sline-comment-text-offset (line)
|
|
||||||
"Return the column at the start of the text of the current
|
|
||||||
single-line comment paragraph."
|
|
||||||
(save-excursion
|
|
||||||
(goto-line line)
|
|
||||||
(re-search-forward "//[ \t]*" (point-at-eol))
|
|
||||||
(current-column)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-at-empty-sline-comment-p ()
|
|
||||||
"Return non-nil if inside an empty single-line comment."
|
|
||||||
(and (save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
(not (looking-at "^.*//.*[[:graph:]]")))
|
|
||||||
(save-excursion
|
|
||||||
(re-search-backward "//" (point-at-bol) t))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-fill-sline-comments (parse-status justify)
|
|
||||||
"Fill current paragraph as a sequence of single-line comments.
|
|
||||||
PARSE-STATUS is the result of `parse-partial-regexp' from
|
|
||||||
beginning of buffer to point. JUSTIFY has the same meaning as in
|
|
||||||
`fill-paragraph'."
|
|
||||||
(when (not (js-at-empty-sline-comment-p))
|
|
||||||
(let* ((start (js-sline-comment-par-start))
|
|
||||||
(start-line (1+ (count-lines (point-min) start)))
|
|
||||||
(end (js-sline-comment-par-end))
|
|
||||||
(offset (js-sline-comment-offset start-line))
|
|
||||||
(text-offset (js-sline-comment-text-offset start-line)))
|
|
||||||
(save-excursion
|
|
||||||
(save-restriction
|
|
||||||
(narrow-to-region start end)
|
|
||||||
(goto-char (point-min))
|
|
||||||
(while (re-search-forward "^[ \t]*//[ \t]*" nil t)
|
|
||||||
(replace-match "")
|
|
||||||
(forward-line 1))
|
|
||||||
(let ((fill-paragraph-function nil)
|
|
||||||
(fill-column (- fill-column text-offset)))
|
|
||||||
(fill-paragraph justify))
|
|
||||||
|
|
||||||
;; In Emacs 21.4 as opposed to CVS Emacs 22,
|
|
||||||
;; `fill-paragraph' seems toadd a newline at the end of the
|
|
||||||
;; paragraph. Remove it!
|
|
||||||
(goto-char (point-max))
|
|
||||||
(when (looking-at "^$") (backward-delete-char 1))
|
|
||||||
|
|
||||||
(goto-char (point-min))
|
|
||||||
(while (not (eobp))
|
|
||||||
(indent-to offset)
|
|
||||||
(insert "//")
|
|
||||||
(indent-to text-offset)
|
|
||||||
(forward-line 1)))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-trailing-comment-p (parse-status)
|
|
||||||
"Return non-nil if inside a trailing comment. PARSE-STATUS is
|
|
||||||
the result of `parse-partial-regexp' from beginning of buffer to
|
|
||||||
point."
|
|
||||||
(save-excursion
|
|
||||||
(when (nth 4 parse-status)
|
|
||||||
(goto-char (nth 8 parse-status))
|
|
||||||
(skip-chars-backward " \t")
|
|
||||||
(not (bolp)))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun js-block-comment-p (parse-status)
|
|
||||||
"Return non-nil if inside a block comment. PARSE-STATUS is the
|
|
||||||
result of `parse-partial-regexp' from beginning of buffer to
|
|
||||||
point."
|
|
||||||
(save-excursion
|
|
||||||
(save-match-data
|
|
||||||
(when (nth 4 parse-status)
|
|
||||||
(goto-char (nth 8 parse-status))
|
|
||||||
(looking-at "/\\*")))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun javascript-fill-paragraph (&optional justify)
|
|
||||||
"If inside a comment, fill the current comment paragraph.
|
|
||||||
Trailing comments are ignored."
|
|
||||||
(interactive)
|
|
||||||
(let ((parse-status (parse-partial-sexp (point-min) (point))))
|
|
||||||
(when (and (nth 4 parse-status)
|
|
||||||
(not (js-trailing-comment-p parse-status)))
|
|
||||||
(if (js-block-comment-p parse-status)
|
|
||||||
(js-fill-block-comment-paragraph parse-status justify)
|
|
||||||
(js-fill-sline-comments parse-status justify))))
|
|
||||||
t)
|
|
||||||
|
|
||||||
|
|
||||||
;; --- Imenu ---
|
|
||||||
|
|
||||||
(defconst js-imenu-generic-expression
|
|
||||||
(list
|
|
||||||
(list
|
|
||||||
nil
|
|
||||||
"function\\s-+\\(\\w+\\)\\s-*("
|
|
||||||
1))
|
|
||||||
"Regular expression matching top level procedures. Used by imenu.")
|
|
||||||
|
|
||||||
|
|
||||||
;; --- Main Function ---
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun javascript-mode ()
|
|
||||||
"Major mode for editing JavaScript source text.
|
|
||||||
|
|
||||||
Key bindings:
|
|
||||||
|
|
||||||
\\{javascript-mode-map}"
|
|
||||||
(interactive)
|
|
||||||
(kill-all-local-variables)
|
|
||||||
|
|
||||||
(use-local-map javascript-mode-map)
|
|
||||||
(set-syntax-table javascript-mode-syntax-table)
|
|
||||||
(set (make-local-variable 'indent-line-function) 'javascript-indent-line)
|
|
||||||
(set (make-local-variable 'font-lock-defaults) (list js-font-lock-keywords))
|
|
||||||
|
|
||||||
(set (make-local-variable 'parse-sexp-ignore-comments) t)
|
|
||||||
|
|
||||||
;; Comments
|
|
||||||
(setq comment-start "// ")
|
|
||||||
(setq comment-end "")
|
|
||||||
(set (make-local-variable 'fill-paragraph-function)
|
|
||||||
'javascript-fill-paragraph)
|
|
||||||
|
|
||||||
;; Make c-mark-function work
|
|
||||||
(setq c-nonsymbol-token-regexp "!=\\|%=\\|&[&=]\\|\\*[/=]\\|\\+[+=]\\|-[=-]\\|/[*/=]\\|<\\(?:<=\\|[<=]\\)\\|==\\|>\\(?:>\\(?:>=\\|[=>]\\)\\|[=>]\\)\\|\\^=\\||[=|]\\|[]!%&(-,./:-?[{-~^-]"
|
|
||||||
c-stmt-delim-chars "^;{}?:"
|
|
||||||
c-syntactic-ws-end "[ \n
\f/]"
|
|
||||||
c-syntactic-eol "\\(\\s \\|/\\*\\([^*\n
]\\|\\*[^/\n
]\\)*\\*/\\)*\\(\\(/\\*\\([^*\n
]\\|\\*[^/\n
]\\)*\\|\\\\\\)?$\\|//\\)")
|
|
||||||
|
|
||||||
;; Imenu
|
|
||||||
(setq imenu-case-fold-search nil)
|
|
||||||
(set (make-local-variable 'imenu-generic-expression)
|
|
||||||
js-imenu-generic-expression)
|
|
||||||
|
|
||||||
(setq major-mode 'javascript-mode)
|
|
||||||
(setq mode-name "JavaScript")
|
|
||||||
(run-hooks 'javascript-mode-hook))
|
|
||||||
|
|
||||||
|
|
||||||
(provide 'javascript-mode)
|
|
||||||
;;; javascript.el ends here
|
|
|
@ -1 +0,0 @@
|
||||||
(set-default-font "-xos4-terminus-medium-*-*-*-14-*-*-*-*-*-*-*")
|
|
1061
.emacs.d/popup.el
1061
.emacs.d/popup.el
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,29 +0,0 @@
|
||||||
;; function copied from dim-ports.al by Dimitri Fontaine
|
|
||||||
;; http://git.naquadah.org/?p=~dim/emacs.d.git;a=summary
|
|
||||||
(defun lsb-release (&optional property)
|
|
||||||
"Parse lsb-release output and return an alist, or the value for the given property"
|
|
||||||
(when (file-executable-p "/usr/bin/lsb_release")
|
|
||||||
(let* ((lsbr (shell-command-to-string "/usr/bin/lsb_release -a 2>/dev/null"))
|
|
||||||
(props (split-string lsbr "[:\n]" t))
|
|
||||||
(kv))
|
|
||||||
(while (>= (length props) 2)
|
|
||||||
;; Don't keep extra spaces. This way seems like the easy one in elisp.
|
|
||||||
(let ((key (mapconcat 'identity (split-string (car props)) " "))
|
|
||||||
(val (mapconcat 'identity (split-string (cadr props)) " ")))
|
|
||||||
(setq kv (add-to-list 'kv (cons key val)))
|
|
||||||
(setq props (cddr props))))
|
|
||||||
(if property
|
|
||||||
(cdr (assoc property (lsb-release)))
|
|
||||||
kv))))
|
|
||||||
|
|
||||||
;; function copied from dim-ports.al by Dimitri Fontaine
|
|
||||||
;; http://git.naquadah.org/?p=~dim/emacs.d.git;a=summary
|
|
||||||
(defmacro when-running-ubuntu (&rest body)
|
|
||||||
"eval body only when running under Ubuntu"
|
|
||||||
(when (equal (lsb-release "Distributor ID") "Ubuntu") ,@body))
|
|
||||||
|
|
||||||
;; function adapted from dim-ports.al by Dimitri Fontaine
|
|
||||||
;; http://git.naquadah.org/?p=~dim/emacs.d.git;a=summary
|
|
||||||
(defmacro when-running-fedora (&rest body)
|
|
||||||
"eval body only when running under Fedora"
|
|
||||||
(when (equal (lsb-release "Distributor ID") "Fedora") ,@body))
|
|
|
@ -1,207 +0,0 @@
|
||||||
;;; rainbow-mode.el --- prints color strings with colored background
|
|
||||||
|
|
||||||
;; Copyright (C) 2010 Julien Danjou
|
|
||||||
|
|
||||||
;; Author: Julien Danjou <julien@danjou.info>
|
|
||||||
;; Keywords: strings, faces
|
|
||||||
|
|
||||||
;; This file is NOT part of GNU Emacs.
|
|
||||||
|
|
||||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
;; This minor mode will add background to strings that matches color names.
|
|
||||||
;; i.e.
|
|
||||||
;; #0000ff
|
|
||||||
;; Will be printed in white with a blue background.
|
|
||||||
;;
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(eval-when-compile
|
|
||||||
(require 'cl))
|
|
||||||
|
|
||||||
(require 'regexp-opt)
|
|
||||||
(require 'faces)
|
|
||||||
|
|
||||||
(defgroup rainbow nil
|
|
||||||
"Show color strings with a background color."
|
|
||||||
:tag "Rainbow"
|
|
||||||
:group 'help)
|
|
||||||
|
|
||||||
;; Hexadecimal colors
|
|
||||||
(defvar rainbow-hexadecimal-colors-font-lock-keywords
|
|
||||||
'("#[0-9a-fA-F]\\{3\\}[0-9a-fA-F]\\{3\\}?"
|
|
||||||
(0 (rainbow-colorize-itself)))
|
|
||||||
"Font-lock keywords to add for hexadecimal colors.")
|
|
||||||
|
|
||||||
;; rgb() colors
|
|
||||||
(defvar rainbow-html-rgb-colors-font-lock-keywords
|
|
||||||
'(("rgb(\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*)"
|
|
||||||
(0 (rainbow-colorize-rgb)))
|
|
||||||
("rgba(\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*[0-9]\\{1,3\\}\s*%?\s*)"
|
|
||||||
(0 (rainbow-colorize-rgb))))
|
|
||||||
"Font-lock keywords to add for RGB colors.")
|
|
||||||
|
|
||||||
;; HTML colors name
|
|
||||||
(defvar rainbow-html-colors-font-lock-keywords nil
|
|
||||||
"Font-lock keywords to add for HTML colors.")
|
|
||||||
(make-variable-buffer-local 'rainbow-html-colors-font-lock-keywords)
|
|
||||||
|
|
||||||
(defcustom rainbow-html-colors-alist
|
|
||||||
'(("black" . "#000000")
|
|
||||||
("silver" . "#C0C0C0")
|
|
||||||
("gray" . "#808080")
|
|
||||||
("white" . "#FFFFFF")
|
|
||||||
("maroon" . "#800000")
|
|
||||||
("red" . "#FF0000")
|
|
||||||
("purple" . "#800080")
|
|
||||||
("fuchsia" . "#FF00FF")
|
|
||||||
("green" . "#008000")
|
|
||||||
("lime" . "#00FF00")
|
|
||||||
("olive" . "#808000")
|
|
||||||
("yellow" . "#FFFF00")
|
|
||||||
("navy" . "#000080")
|
|
||||||
("blue" . "#0000FF")
|
|
||||||
("teal" . "#008080")
|
|
||||||
("aqua" . "#00FFFF"))
|
|
||||||
"Alist of HTML colors.
|
|
||||||
Each entry should have the form (COLOR-NAME . HEXADECIMAL-COLOR)."
|
|
||||||
:group 'rainbow)
|
|
||||||
|
|
||||||
(defcustom rainbow-html-colors-major-mode-list
|
|
||||||
'(html-mode css-mode php-mode nxml-mode xml-mode)
|
|
||||||
"List of major mode where HTML colors are enabled when
|
|
||||||
`rainbow-html-colors' is set to auto."
|
|
||||||
:group 'rainbow)
|
|
||||||
|
|
||||||
(defcustom rainbow-html-colors 'auto
|
|
||||||
"When to enable HTML colors.
|
|
||||||
If set to t, the HTML colors will be enabled. If set to nil, the
|
|
||||||
HTML colors will not be enabled. If set to auto, the HTML colors
|
|
||||||
will be enabled if a major mode has been detected from the
|
|
||||||
`rainbow-html-colors-major-mode-list'."
|
|
||||||
:group 'rainbow)
|
|
||||||
|
|
||||||
;; X colors
|
|
||||||
(defvar rainbow-x-colors-font-lock-keywords
|
|
||||||
`(,(regexp-opt (x-defined-colors) 'words)
|
|
||||||
(0 (rainbow-colorize-itself)))
|
|
||||||
"Font-lock keywords to add for X colors.")
|
|
||||||
|
|
||||||
(defcustom rainbow-x-colors-major-mode-list
|
|
||||||
'(emacs-lisp-mode lisp-interaction-mode c-mode c++-mode java-mode)
|
|
||||||
"List of major mode where X colors are enabled when
|
|
||||||
`rainbow-x-colors' is set to auto."
|
|
||||||
:group 'rainbow)
|
|
||||||
|
|
||||||
(defcustom rainbow-x-colors 'auto
|
|
||||||
"When to enable X colors.
|
|
||||||
If set to t, the X colors will be enabled. If set to nil, the
|
|
||||||
X colors will not be enabled. If set to auto, the X colors
|
|
||||||
will be enabled if a major mode has been detected from the
|
|
||||||
`rainbow-x-colors-major-mode-list'."
|
|
||||||
:group 'rainbow)
|
|
||||||
|
|
||||||
;; Functions
|
|
||||||
(defun rainbow-colorize-match (color)
|
|
||||||
"Return a matched string propertized with a face whose
|
|
||||||
background is COLOR. The foreground is computed using
|
|
||||||
`rainbow-color-luminance', and is either white or black."
|
|
||||||
(put-text-property
|
|
||||||
(match-beginning 0) (match-end 0)
|
|
||||||
'face `((:foreground ,(if (> 128.0 (rainbow-x-color-luminance color))
|
|
||||||
"white" "black"))
|
|
||||||
(:background ,color))))
|
|
||||||
|
|
||||||
(defun rainbow-colorize-itself ()
|
|
||||||
"Colorize a match with itself."
|
|
||||||
(rainbow-colorize-match (match-string-no-properties 0)))
|
|
||||||
|
|
||||||
(defun rainbow-colorize-by-assoc (assoc-list)
|
|
||||||
"Colorize a match with its association from ASSOC-LIST."
|
|
||||||
(rainbow-colorize-match (cdr (assoc (match-string-no-properties 0) assoc-list))))
|
|
||||||
|
|
||||||
(defun rainbow-rgb-relative-to-absolute (number)
|
|
||||||
"Convert a relative NUMBER to absolute. If NUMBER is absolute, return NUMBER.
|
|
||||||
This will convert \"80 %\" to 204, \"100 %\" to 255 but \"123\" to \"123\""
|
|
||||||
(let ((string-length (- (length number) 1)))
|
|
||||||
;; Is this a number with %?
|
|
||||||
(if (eq (elt number string-length) ?%)
|
|
||||||
(/ (* (string-to-number (substring number 0 string-length)) 255) 100)
|
|
||||||
(string-to-number number))))
|
|
||||||
|
|
||||||
(defun rainbow-colorize-rgb ()
|
|
||||||
"Colorize a match with itself."
|
|
||||||
(let ((r (rainbow-rgb-relative-to-absolute (match-string-no-properties 1)))
|
|
||||||
(g (rainbow-rgb-relative-to-absolute (match-string-no-properties 2)))
|
|
||||||
(b (rainbow-rgb-relative-to-absolute (match-string-no-properties 3))))
|
|
||||||
(rainbow-colorize-match (format "#%02X%02X%02X" r g b))))
|
|
||||||
|
|
||||||
(defun rainbow-color-luminance (red green blue)
|
|
||||||
"Calculate the luminance of color composed of RED, BLUE and GREEN."
|
|
||||||
(floor (+ (* .2126 red) (* .7152 green) (* .0722 blue)) 256))
|
|
||||||
|
|
||||||
(defun rainbow-x-color-luminance (color)
|
|
||||||
"Calculate the luminance of a color string (e.g. \"#ffaa00\", \"blue\")."
|
|
||||||
(let* ((values (x-color-values color))
|
|
||||||
(r (car values))
|
|
||||||
(g (cadr values))
|
|
||||||
(b (caddr values)))
|
|
||||||
(rainbow-color-luminance r g b)))
|
|
||||||
|
|
||||||
(defun rainbow-turn-on ()
|
|
||||||
"Turn on raibow-mode."
|
|
||||||
(font-lock-add-keywords nil
|
|
||||||
(list rainbow-hexadecimal-colors-font-lock-keywords))
|
|
||||||
;; Activate X colors?
|
|
||||||
(when (or (eq rainbow-x-colors t)
|
|
||||||
(and (eq rainbow-x-colors 'auto)
|
|
||||||
(memq major-mode rainbow-x-colors-major-mode-list)))
|
|
||||||
(font-lock-add-keywords nil
|
|
||||||
(list rainbow-x-colors-font-lock-keywords)))
|
|
||||||
;; Activate HTML colors?
|
|
||||||
(when (or (eq rainbow-html-colors t)
|
|
||||||
(and (eq rainbow-html-colors 'auto)
|
|
||||||
(memq major-mode rainbow-html-colors-major-mode-list)))
|
|
||||||
(setq rainbow-html-colors-font-lock-keywords
|
|
||||||
`(,(regexp-opt (mapcar 'car rainbow-html-colors-alist) 'words)
|
|
||||||
(0 (rainbow-colorize-by-assoc rainbow-html-colors-alist))))
|
|
||||||
(font-lock-add-keywords nil
|
|
||||||
`(,rainbow-html-colors-font-lock-keywords
|
|
||||||
,@rainbow-html-rgb-colors-font-lock-keywords))))
|
|
||||||
|
|
||||||
(defun rainbow-turn-off ()
|
|
||||||
"Turn off rainbow-mode."
|
|
||||||
(font-lock-remove-keywords
|
|
||||||
nil
|
|
||||||
(list
|
|
||||||
rainbow-hexadecimal-colors-font-lock-keywords
|
|
||||||
rainbow-html-colors-font-lock-keywords
|
|
||||||
rainbow-x-colors-font-lock-keywords
|
|
||||||
rainbow-html-rgb-colors-font-lock-keywords)))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(define-minor-mode rainbow-mode
|
|
||||||
"Colorize strings that represent colors.
|
|
||||||
This will fontify with colors the string like \"#aabbcc\" or \"blue\""
|
|
||||||
:lighter " Rbow"
|
|
||||||
(progn
|
|
||||||
(if rainbow-mode
|
|
||||||
(rainbow-turn-on)
|
|
||||||
(rainbow-turn-off))
|
|
||||||
;; Turn on font lock
|
|
||||||
(font-lock-mode 1)))
|
|
||||||
|
|
||||||
(provide 'rainbow-mode)
|
|
|
@ -1,15 +0,0 @@
|
||||||
(if (not (intern-soft "cc-mode"))
|
|
||||||
(require 'cc-mode))
|
|
||||||
|
|
||||||
(global-set-key [(f9)] 'compile) ; make F9 call the compilation command
|
|
||||||
(setq compilation-window-height 8) ; make the compilation window smaller
|
|
||||||
|
|
||||||
;; Make compilation window disappear on succesful build
|
|
||||||
(setq compilation-finish-function
|
|
||||||
(lambda (buf str)
|
|
||||||
(if (string-match "exited abnormally" str)
|
|
||||||
;; there were errors
|
|
||||||
(message "compilation errors, press C-x ` to visit")
|
|
||||||
;; no errors, make the compilation window go away in 0.5 seconds
|
|
||||||
(run-at-time 0.5 nil 'delete-windows-on buf)
|
|
||||||
(message "NO COMPILATION ERRORS!"))))
|
|
|
@ -1,5 +0,0 @@
|
||||||
(defun what-face (pos)
|
|
||||||
(interactive "d")
|
|
||||||
(let ((face (or (get-char-property (point) 'read-face-name)
|
|
||||||
(get-char-property (point) 'face))))
|
|
||||||
(if face (message "Face: %s" face) (message "No face at %d" pos))))
|
|
|
@ -1,17 +0,0 @@
|
||||||
;; Pyflakes
|
|
||||||
(when (load "flymake" t)
|
|
||||||
(defun flymake-pyflakes-init ()
|
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
|
||||||
'flymake-create-temp-inplace))
|
|
||||||
(local-file (file-relative-name
|
|
||||||
temp-file
|
|
||||||
(file-name-directory buffer-file-name))))
|
|
||||||
(list "pyflakes" (list local-file))))
|
|
||||||
|
|
||||||
(add-to-list 'flymake-allowed-file-name-masks
|
|
||||||
'("\\.py\\'" flymake-pyflakes-init)))
|
|
||||||
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
|
||||||
|
|
||||||
;; Bind RET to py-newline-and-indent
|
|
||||||
(add-hook 'python-mode-hook '(lambda ()
|
|
||||||
(define-key python-mode-map "\C-m" 'newline-and-indent)))
|
|
|
@ -1,66 +0,0 @@
|
||||||
(add-to-list 'load-path "~/.emacs.d")
|
|
||||||
(require 'color-theme)
|
|
||||||
|
|
||||||
;; weirdness color-theme
|
|
||||||
(defun color-theme-weirdness ()
|
|
||||||
(interactive)
|
|
||||||
(color-theme-install
|
|
||||||
'(color-theme-weirdness
|
|
||||||
((background-color . "#000000")
|
|
||||||
(background-mode . dark)
|
|
||||||
(border-color . "#000000")
|
|
||||||
(cursor-color . "#FFFFFF")
|
|
||||||
(foreground-color . "#FFFFFF")
|
|
||||||
(mouse-color . "#000000"))
|
|
||||||
(org-level-1 ((t (:foreground "#5BFD5B" :weight normal))))
|
|
||||||
(org-level-2 ((t (:foreground "#379A37" :weight normal))))
|
|
||||||
(org-level-3 ((t (:foreground "#757575" :weight normal))))
|
|
||||||
(org-level-4 ((t (:foreground "#778899" :weight normal))))
|
|
||||||
(org-level-5 ((t (:foreground "#9898FF" :weight normal))))
|
|
||||||
(org-level-6 ((t (:foreground "#0000B0" :weight normal))))
|
|
||||||
(org-level-7 ((t (:foreground "#740091" :weight normal))))
|
|
||||||
(org-level-8 ((t (:foreground "#B275C1" :weight normal))))
|
|
||||||
(fringe ((t (:background "#000000"))))
|
|
||||||
(mode-line ((t (:foreground "#B3B3B3" :background "#43527A" :background "#000000" :box nil))))
|
|
||||||
(region ((t (:background "#3D3D3D"))))
|
|
||||||
(minibuffer-prompt ((t (:foreground "#72F3FF" :bold t))))
|
|
||||||
(flymake-warnline ((t (:background "#000060"))))
|
|
||||||
(flymake-errline ((t (:background "#600000"))))
|
|
||||||
(font-lock-builtin-face ((t (:foreground "#C436C4"))))
|
|
||||||
(font-lock-comment-face ((t (:foreground "#00AC00" :background "#004000" :bold t :box (:line-width 1 :color "#006000" :style nil)))))
|
|
||||||
(font-lock-comment-delimiter-face ((t (:inherit 'font-lock-comment-face))))
|
|
||||||
(font-lock-function-name-face ((t (:foreground "#0FFF28"))))
|
|
||||||
(font-lock-keyword-face ((t (:foreground "#4E61BB" :bold t))))
|
|
||||||
(font-lock-string-face ((t (:foreground "#E00900"))))
|
|
||||||
(font-lock-type-face ((t (:foreground "#8522DD"))))
|
|
||||||
(font-lock-variable-name-face ((t (:foreground "#18EFF2"))))
|
|
||||||
(font-lock-warning-face ((t (:foreground "#FF0000" :bold t)))))))
|
|
||||||
(provide 'color-theme-weirdness)
|
|
||||||
|
|
||||||
;; ryrobes color theme
|
|
||||||
(defun color-theme-vibrant-ink ()
|
|
||||||
(interactive)
|
|
||||||
(color-theme-install
|
|
||||||
'(color-theme-ryrobes
|
|
||||||
((background-color . "#000000")
|
|
||||||
(background-mode . dark)
|
|
||||||
(border-color . "#000000")
|
|
||||||
(cursor-color . "#FFFFFF")
|
|
||||||
(foreground-color . "#FFFFFF")
|
|
||||||
(mouse-color . "#FFFFFF"))
|
|
||||||
(font-lock-comment-face ((t (:foreground "#9933CC" :italic t))))
|
|
||||||
(font-lock-keyword-face ((t (:foreground "#FF6600"))))
|
|
||||||
(font-lock-type-face ((t (:foreground "#FFCC00"))))
|
|
||||||
(font-lock-string-face ((t (:foreground "#66FF00")))))))
|
|
||||||
(provide 'color-theme-vibrant-ink)
|
|
||||||
(provide 'color-theme-ryrobes)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
5151
.emacs.d/sqlplus.el
5151
.emacs.d/sqlplus.el
File diff suppressed because it is too large
Load diff
1932
.emacs.d/tabbar.el
1932
.emacs.d/tabbar.el
File diff suppressed because it is too large
Load diff
|
@ -1,22 +0,0 @@
|
||||||
(eval-when-compile
|
|
||||||
(require 'color-theme))
|
|
||||||
|
|
||||||
(defun color-theme-example ()
|
|
||||||
"Example theme. Carbon copy of color-theme-gnome contributed by Jonadab."
|
|
||||||
(interactive)
|
|
||||||
(color-theme-install
|
|
||||||
'(color-theme-example
|
|
||||||
((foreground-color . "wheat")
|
|
||||||
(background-color . "darkslategrey")
|
|
||||||
(background-mode . dark))
|
|
||||||
(default ((t (nil))))
|
|
||||||
(region ((t (:foreground "cyan" :background "dark cyan"))))
|
|
||||||
(underline ((t (:foreground "yellow" :underline t))))
|
|
||||||
(modeline ((t (:foreground "dark cyan" :background "wheat"))))
|
|
||||||
(modeline-buffer-id ((t (:foreground "dark cyan" :background "wheat"))))
|
|
||||||
(modeline-mousable ((t (:foreground "dark cyan" :background "wheat"))))
|
|
||||||
(modeline-mousable-minor-mode ((t (:foreground "dark cyan" :background "wheat"))))
|
|
||||||
(italic ((t (:foreground "dark red" :italic t))))
|
|
||||||
(bold-italic ((t (:foreground "dark red" :bold t :italic t))))
|
|
||||||
(font-lock-comment-face ((t (:foreground "Firebrick"))))
|
|
||||||
(bold ((t (:bold)))))))
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,20 +0,0 @@
|
||||||
;; -*- emacs-lisp -*-
|
|
||||||
;; Tramp connection history. Don't change this file.
|
|
||||||
;; You can delete it, forcing Tramp to reapply the checks.
|
|
||||||
|
|
||||||
((["scp" "slash" "192.168.1.90" nil]
|
|
||||||
("uname" "Linux 2.6.33.5-112.fc13.i686")
|
|
||||||
("test" "test")
|
|
||||||
("remote-path"
|
|
||||||
("/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin"))
|
|
||||||
("remote-shell" "/bin/sh")
|
|
||||||
("~" "/home/slash")
|
|
||||||
("file-exists" "test -e")
|
|
||||||
("stat" "\\stat")
|
|
||||||
("id" "/usr/bin/id")
|
|
||||||
("gid-integer" 500)
|
|
||||||
("local-encoding" base64-encode-region)
|
|
||||||
("local-decoding" base64-decode-region)
|
|
||||||
("remote-encoding" "base64")
|
|
||||||
("remote-decoding" "base64 -d")
|
|
||||||
("perl" "\\perl")))
|
|
|
@ -1,395 +0,0 @@
|
||||||
;;; vala-mode.el --- Vala mode derived mode
|
|
||||||
|
|
||||||
;; Author: 2005 Dylan R. E. Moonfire
|
|
||||||
;; 2008 Étienne BERSAC
|
|
||||||
;; Maintainer: Étienne BERSAC <bersace03@laposte.net>
|
|
||||||
;; Created: 2008 May the 4th
|
|
||||||
;; Modified: May 2008
|
|
||||||
;; Version: 0.1
|
|
||||||
;; Keywords: vala languages oop
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation; either version 2 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
;;
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
;;
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program; see the file COPYING. If not, write to
|
|
||||||
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
;; Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
;;
|
|
||||||
;; See http://live.gnome.org/Vala for details about Vala language.
|
|
||||||
;;
|
|
||||||
;; This is a separate mode to implement the Vala constructs and
|
|
||||||
;; font-locking. It is mostly the csharp-mode from
|
|
||||||
;; http://mfgames.com/linux/csharp-mode with vala specific keywords
|
|
||||||
;; and filename suffixes.
|
|
||||||
;;
|
|
||||||
;; Note: The interface used in this file requires CC Mode 5.30 or
|
|
||||||
;; later.
|
|
||||||
|
|
||||||
;;; .emacs (don't put in (require 'vala-mode))
|
|
||||||
;; (autoload 'vala-mode "vala-mode" "Major mode for editing Vala code." t)
|
|
||||||
;; (setq auto-mode-alist
|
|
||||||
;; (append '(("\\.vala$" . vala-mode)) auto-mode-alist))
|
|
||||||
|
|
||||||
;;; Versions:
|
|
||||||
;;
|
|
||||||
;; 0.1 : Initial version based on csharp-mode
|
|
||||||
;;
|
|
||||||
|
|
||||||
;; This is a copy of the function in cc-mode which is used to handle
|
|
||||||
;; the eval-when-compile which is needed during other times.
|
|
||||||
(defun c-filter-ops (ops opgroup-filter op-filter &optional xlate)
|
|
||||||
;; See cc-langs.el, a direct copy.
|
|
||||||
(unless (listp (car-safe ops))
|
|
||||||
(setq ops (list ops)))
|
|
||||||
(cond ((eq opgroup-filter t)
|
|
||||||
(setq opgroup-filter (lambda (opgroup) t)))
|
|
||||||
((not (functionp opgroup-filter))
|
|
||||||
(setq opgroup-filter `(lambda (opgroup)
|
|
||||||
(memq opgroup ',opgroup-filter)))))
|
|
||||||
(cond ((eq op-filter t)
|
|
||||||
(setq op-filter (lambda (op) t)))
|
|
||||||
((stringp op-filter)
|
|
||||||
(setq op-filter `(lambda (op)
|
|
||||||
(string-match ,op-filter op)))))
|
|
||||||
(unless xlate
|
|
||||||
(setq xlate 'identity))
|
|
||||||
(c-with-syntax-table (c-lang-const c-mode-syntax-table)
|
|
||||||
(delete-duplicates
|
|
||||||
(mapcan (lambda (opgroup)
|
|
||||||
(when (if (symbolp (car opgroup))
|
|
||||||
(when (funcall opgroup-filter (car opgroup))
|
|
||||||
(setq opgroup (cdr opgroup))
|
|
||||||
t)
|
|
||||||
t)
|
|
||||||
(mapcan (lambda (op)
|
|
||||||
(when (funcall op-filter op)
|
|
||||||
(let ((res (funcall xlate op)))
|
|
||||||
(if (listp res) res (list res)))))
|
|
||||||
opgroup)))
|
|
||||||
ops)
|
|
||||||
:test 'equal)))
|
|
||||||
|
|
||||||
;; This inserts the bulk of the code.
|
|
||||||
(require 'cc-mode)
|
|
||||||
|
|
||||||
;; These are only required at compile time to get the sources for the
|
|
||||||
;; language constants. (The cc-fonts require and the font-lock
|
|
||||||
;; related constants could additionally be put inside an
|
|
||||||
;; (eval-after-load "font-lock" ...) but then some trickery is
|
|
||||||
;; necessary to get them compiled.)
|
|
||||||
(eval-when-compile
|
|
||||||
(let ((load-path
|
|
||||||
(if (and (boundp 'byte-compile-dest-file)
|
|
||||||
(stringp byte-compile-dest-file))
|
|
||||||
(cons (file-name-directory byte-compile-dest-file) load-path)
|
|
||||||
load-path)))
|
|
||||||
(load "cc-mode" nil t)
|
|
||||||
(load "cc-fonts" nil t)
|
|
||||||
(load "cc-langs" nil t)))
|
|
||||||
|
|
||||||
(eval-and-compile
|
|
||||||
;; Make our mode known to the language constant system. Use Java
|
|
||||||
;; mode as the fallback for the constants we don't change here.
|
|
||||||
;; This needs to be done also at compile time since the language
|
|
||||||
;; constants are evaluated then.
|
|
||||||
(c-add-language 'vala-mode 'java-mode))
|
|
||||||
|
|
||||||
;; Java uses a series of regexes to change the font-lock for class
|
|
||||||
;; references. The problem comes in because Java uses Pascal (leading
|
|
||||||
;; space in names, SomeClass) for class and package names, but
|
|
||||||
;; Camel-casing (initial lowercase, upper case in words,
|
|
||||||
;; i.e. someVariable) for variables.
|
|
||||||
;;(error (byte-compile-dest-file))
|
|
||||||
;;(error (c-get-current-file))
|
|
||||||
(c-lang-defconst c-opt-after-id-concat-key
|
|
||||||
vala (if (c-lang-const c-opt-identifier-concat-key)
|
|
||||||
(c-lang-const c-symbol-start)))
|
|
||||||
|
|
||||||
(c-lang-defconst c-basic-matchers-before
|
|
||||||
vala `(
|
|
||||||
;;;; Font-lock the attributes by searching for the
|
|
||||||
;;;; appropriate regex and marking it as TODO.
|
|
||||||
;;,`(,(concat "\\(" vala-attribute-regex "\\)")
|
|
||||||
;; 0 font-lock-function-name-face)
|
|
||||||
|
|
||||||
;; Put a warning face on the opener of unclosed strings that
|
|
||||||
;; can't span lines. Later font
|
|
||||||
;; lock packages have a `font-lock-syntactic-face-function' for
|
|
||||||
;; this, but it doesn't give the control we want since any
|
|
||||||
;; fontification done inside the function will be
|
|
||||||
;; unconditionally overridden.
|
|
||||||
,(c-make-font-lock-search-function
|
|
||||||
;; Match a char before the string starter to make
|
|
||||||
;; `c-skip-comments-and-strings' work correctly.
|
|
||||||
(concat ".\\(" c-string-limit-regexp "\\)")
|
|
||||||
'((c-font-lock-invalid-string)))
|
|
||||||
|
|
||||||
;; Fontify keyword constants.
|
|
||||||
,@(when (c-lang-const c-constant-kwds)
|
|
||||||
(let ((re (c-make-keywords-re nil
|
|
||||||
(c-lang-const c-constant-kwds))))
|
|
||||||
`((eval . (list ,(concat "\\<\\(" re "\\)\\>")
|
|
||||||
1 c-constant-face-name)))))
|
|
||||||
|
|
||||||
;; Fontify all keywords except the primitive types.
|
|
||||||
,`(,(concat "\\<" (c-lang-const c-regular-keywords-regexp))
|
|
||||||
1 font-lock-keyword-face)
|
|
||||||
|
|
||||||
;; Fontify leading identifiers in fully
|
|
||||||
;; qualified names like "Foo.Bar".
|
|
||||||
,@(when (c-lang-const c-opt-identifier-concat-key)
|
|
||||||
`((,(byte-compile
|
|
||||||
`(lambda (limit)
|
|
||||||
(while (re-search-forward
|
|
||||||
,(concat "\\(\\<" ; 1
|
|
||||||
"\\(" (c-lang-const c-symbol-key)
|
|
||||||
"\\)" ; 2
|
|
||||||
"[ \t\n\r\f\v]*"
|
|
||||||
(c-lang-const
|
|
||||||
c-opt-identifier-concat-key)
|
|
||||||
"[ \t\n\r\f\v]*"
|
|
||||||
"\\)"
|
|
||||||
"\\("
|
|
||||||
(c-lang-const
|
|
||||||
c-opt-after-id-concat-key)
|
|
||||||
"\\)")
|
|
||||||
limit t)
|
|
||||||
(unless (progn
|
|
||||||
(goto-char (match-beginning 0))
|
|
||||||
(c-skip-comments-and-strings limit))
|
|
||||||
(or (get-text-property (match-beginning 2) 'face)
|
|
||||||
(c-put-font-lock-face (match-beginning 2)
|
|
||||||
(match-end 2)
|
|
||||||
c-reference-face-name))
|
|
||||||
(goto-char (match-end 1)))))))))
|
|
||||||
))
|
|
||||||
|
|
||||||
;; Vala does not allow a leading qualifier operator. It also doesn't
|
|
||||||
;; allow the ".*" construct of Java. So, we redo this regex without
|
|
||||||
;; the "\\|\\*" regex.
|
|
||||||
(c-lang-defconst c-identifier-key
|
|
||||||
vala (concat "\\(" (c-lang-const c-symbol-key) "\\)" ; 1
|
|
||||||
(concat "\\("
|
|
||||||
"[ \t\n\r\f\v]*"
|
|
||||||
(c-lang-const c-opt-identifier-concat-key)
|
|
||||||
"[ \t\n\r\f\v]*"
|
|
||||||
(concat "\\("
|
|
||||||
"\\(" (c-lang-const c-symbol-key) "\\)"
|
|
||||||
"\\)")
|
|
||||||
"\\)*")))
|
|
||||||
|
|
||||||
;; Vala has a few rules that are slightly different than Java for
|
|
||||||
;; operators. This also removed the Java's "super" and replaces it
|
|
||||||
;; with the Vala's "base".
|
|
||||||
(c-lang-defconst c-operators
|
|
||||||
vala `((prefix "base")))
|
|
||||||
|
|
||||||
;; Vala directives ?
|
|
||||||
;; (c-lang-defconst c-opt-cpp-prefix
|
|
||||||
;; csharp "^\\s *#.*")
|
|
||||||
|
|
||||||
|
|
||||||
;; Vala uses the following assignment operators
|
|
||||||
(c-lang-defconst c-assignment-operators
|
|
||||||
vala '("=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<="
|
|
||||||
"&=" "^=" "|=" "++" "--"))
|
|
||||||
|
|
||||||
;; This defines the primative types for Vala
|
|
||||||
(c-lang-defconst c-primitive-type-kwds
|
|
||||||
vala '("void" "char" "int" "float" "double" "string"))
|
|
||||||
|
|
||||||
;; The keywords that define that the following is a type, such as a
|
|
||||||
;; class definition.
|
|
||||||
(c-lang-defconst c-type-prefix-kwds
|
|
||||||
vala '("class" "interface" "struct" "enum" "signal"))
|
|
||||||
|
|
||||||
;; Type modifier keywords. They appear anywhere in types, but modifiy
|
|
||||||
;; instead create one.
|
|
||||||
(c-lang-defconst c-type-modifier-kwds
|
|
||||||
vala '("const"))
|
|
||||||
|
|
||||||
;; Structures that are similiar to classes.
|
|
||||||
(c-lang-defconst c-class-decl-kwds
|
|
||||||
vala '("class" "interface"))
|
|
||||||
|
|
||||||
;; The various modifiers used for class and method descriptions.
|
|
||||||
(c-lang-defconst c-modifier-kwds
|
|
||||||
vala '("public" "partial" "private" "const" "abstract"
|
|
||||||
"protected" "ref" "in" "out" "static" "virtual"
|
|
||||||
"override" "params" "internal" "weak" "owned"
|
|
||||||
"unowned"))
|
|
||||||
|
|
||||||
;; We don't use the protection level stuff because it breaks the
|
|
||||||
;; method indenting. Not sure why, though.
|
|
||||||
(c-lang-defconst c-protection-kwds
|
|
||||||
vala nil)
|
|
||||||
|
|
||||||
;; Define the keywords that can have something following after them.
|
|
||||||
(c-lang-defconst c-type-list-kwds
|
|
||||||
vala '("struct" "class" "interface" "is" "as"
|
|
||||||
"delegate" "event" "set" "get" "add" "remove"
|
|
||||||
"callback" "signal" "var" "default"))
|
|
||||||
|
|
||||||
;; This allows the classes after the : in the class declartion to be
|
|
||||||
;; fontified.
|
|
||||||
(c-lang-defconst c-typeless-decl-kwds
|
|
||||||
vala '(":"))
|
|
||||||
|
|
||||||
;; Sets up the enum to handle the list properly
|
|
||||||
(c-lang-defconst c-brace-list-decl-kwds
|
|
||||||
vala '("enum" "errordomain"))
|
|
||||||
|
|
||||||
;; We need to remove Java's package keyword
|
|
||||||
(c-lang-defconst c-ref-list-kwds
|
|
||||||
vala '("using" "namespace" "construct"))
|
|
||||||
|
|
||||||
;; Follow-on blocks that don't require a brace
|
|
||||||
(c-lang-defconst c-block-stmt-2-kwds
|
|
||||||
vala '("for" "if" "switch" "while" "catch" "foreach" "lock"))
|
|
||||||
|
|
||||||
;; Statements that break out of braces
|
|
||||||
(c-lang-defconst c-simple-stmt-kwds
|
|
||||||
vala '("return" "continue" "break" "throw"))
|
|
||||||
|
|
||||||
;; Statements that allow a label
|
|
||||||
;; TODO?
|
|
||||||
(c-lang-defconst c-before-label-kwds
|
|
||||||
vala nil)
|
|
||||||
|
|
||||||
;; Constant keywords
|
|
||||||
(c-lang-defconst c-constant-kwds
|
|
||||||
vala '("true" "false" "null"))
|
|
||||||
|
|
||||||
;; Keywords that start "primary expressions."
|
|
||||||
(c-lang-defconst c-primary-expr-kwds
|
|
||||||
vala '("this" "base"))
|
|
||||||
|
|
||||||
;; We need to treat namespace as an outer block to class indenting
|
|
||||||
;; works properly.
|
|
||||||
(c-lang-defconst c-other-block-decl-kwds
|
|
||||||
vala '("namespace"))
|
|
||||||
|
|
||||||
;; We need to include the "in" for the foreach
|
|
||||||
(c-lang-defconst c-other-kwds
|
|
||||||
vala '("in" "sizeof" "typeof"))
|
|
||||||
|
|
||||||
(require 'cc-awk)
|
|
||||||
|
|
||||||
(c-lang-defconst c-at-vsemi-p-fn
|
|
||||||
vala 'c-awk-at-vsemi-p)
|
|
||||||
|
|
||||||
|
|
||||||
(defcustom vala-font-lock-extra-types nil
|
|
||||||
"*List of extra types (aside from the type keywords) to recognize in Vala mode.
|
|
||||||
Each list item should be a regexp matching a single identifier.")
|
|
||||||
|
|
||||||
(defconst vala-font-lock-keywords-1 (c-lang-const c-matchers-1 vala)
|
|
||||||
"Minimal highlighting for Vala mode.")
|
|
||||||
|
|
||||||
(defconst vala-font-lock-keywords-2 (c-lang-const c-matchers-2 vala)
|
|
||||||
"Fast normal highlighting for Vala mode.")
|
|
||||||
|
|
||||||
(defconst vala-font-lock-keywords-3 (c-lang-const c-matchers-3 vala)
|
|
||||||
"Accurate normal highlighting for Vala mode.")
|
|
||||||
|
|
||||||
(defvar vala-font-lock-keywords vala-font-lock-keywords-3
|
|
||||||
"Default expressions to highlight in Vala mode.")
|
|
||||||
|
|
||||||
(defvar vala-mode-syntax-table
|
|
||||||
nil
|
|
||||||
"Syntax table used in vala-mode buffers.")
|
|
||||||
(or vala-mode-syntax-table
|
|
||||||
(setq vala-mode-syntax-table
|
|
||||||
(funcall (c-lang-const c-make-mode-syntax-table vala))))
|
|
||||||
|
|
||||||
(defvar vala-mode-abbrev-table nil
|
|
||||||
"Abbreviation table used in vala-mode buffers.")
|
|
||||||
(c-define-abbrev-table 'vala-mode-abbrev-table
|
|
||||||
;; Keywords that if they occur first on a line
|
|
||||||
;; might alter the syntactic context, and which
|
|
||||||
;; therefore should trig reindentation when
|
|
||||||
;; they are completed.
|
|
||||||
'(("else" "else" c-electric-continued-statement 0)
|
|
||||||
("while" "while" c-electric-continued-statement 0)
|
|
||||||
("catch" "catch" c-electric-continued-statement 0)
|
|
||||||
("finally" "finally" c-electric-continued-statement 0)))
|
|
||||||
|
|
||||||
(defvar vala-mode-map (let ((map (c-make-inherited-keymap)))
|
|
||||||
;; Add bindings which are only useful for Vala
|
|
||||||
map)
|
|
||||||
"Keymap used in vala-mode buffers.")
|
|
||||||
|
|
||||||
;;(easy-menu-define vala-menu vala-mode-map "Vala Mode Commands"
|
|
||||||
;; ;; Can use `vala' as the language for `c-mode-menu'
|
|
||||||
;; ;; since its definition covers any language. In
|
|
||||||
;; ;; this case the language is used to adapt to the
|
|
||||||
;; ;; nonexistence of a cpp pass and thus removing some
|
|
||||||
;; ;; irrelevant menu alternatives.
|
|
||||||
;; (cons "Vala" (c-lang-const c-mode-menu vala)))
|
|
||||||
|
|
||||||
;;; Autoload mode trigger
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.vala$" . vala-mode))
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.vapi$" . vala-mode))
|
|
||||||
|
|
||||||
;; Custom variables
|
|
||||||
(defcustom vala-mode-hook nil
|
|
||||||
"*Hook called by `vala-mode'."
|
|
||||||
:type 'hook
|
|
||||||
:group 'c)
|
|
||||||
|
|
||||||
;;; The entry point into the mode
|
|
||||||
;;;###autoload
|
|
||||||
(defun vala-mode ()
|
|
||||||
"Major mode for editing Vala code.
|
|
||||||
This is a simple example of a separate mode derived from CC Mode
|
|
||||||
to support a language with syntax similar to
|
|
||||||
C#/C/C++/ObjC/Java/IDL/Pike.
|
|
||||||
|
|
||||||
The hook `c-mode-common-hook' is run with no args at mode
|
|
||||||
initialization, then `vala-mode-hook'.
|
|
||||||
|
|
||||||
Key bindings:
|
|
||||||
\\{vala-mode-map}"
|
|
||||||
(interactive)
|
|
||||||
(kill-all-local-variables)
|
|
||||||
(c-initialize-cc-mode t)
|
|
||||||
(set-syntax-table vala-mode-syntax-table)
|
|
||||||
(setq major-mode 'vala-mode
|
|
||||||
mode-name "Vala"
|
|
||||||
local-abbrev-table vala-mode-abbrev-table
|
|
||||||
abbrev-mode t)
|
|
||||||
(use-local-map c-mode-map)
|
|
||||||
;; `c-init-language-vars' is a macro that is expanded at compile
|
|
||||||
;; time to a large `setq' with all the language variables and their
|
|
||||||
;; customized values for our language.
|
|
||||||
(c-init-language-vars vala-mode)
|
|
||||||
;; `c-common-init' initializes most of the components of a CC Mode
|
|
||||||
;; buffer, including setup of the mode menu, font-lock, etc.
|
|
||||||
;; There's also a lower level routine `c-basic-common-init' that
|
|
||||||
;; only makes the necessary initialization to get the syntactic
|
|
||||||
;; analysis and similar things working.
|
|
||||||
(c-common-init 'vala-mode)
|
|
||||||
;;(easy-menu-add vala-menu)
|
|
||||||
(c-set-style "linux")
|
|
||||||
(setq indent-tabs-mode t)
|
|
||||||
(setq c-basic-offset 4)
|
|
||||||
(setq tab-width 4)
|
|
||||||
(c-toggle-auto-newline -1)
|
|
||||||
(c-toggle-hungry-state -1)
|
|
||||||
(run-hooks 'c-mode-common-hook)
|
|
||||||
(run-hooks 'vala-mode-hook)
|
|
||||||
(c-update-modeline))
|
|
||||||
|
|
||||||
(provide 'vala-mode)
|
|
||||||
|
|
||||||
;;; vala-mode.el ends here
|
|
Loading…
Reference in a new issue