Merging
This commit is contained in:
commit
08a8da7f48
4
README
4
README
|
@ -31,3 +31,7 @@ under the term of GNU FDL.
|
||||||
Kuso IDE have these prequest softwares:
|
Kuso IDE have these prequest softwares:
|
||||||
|
|
||||||
* GNU Emacs
|
* GNU Emacs
|
||||||
|
|
||||||
|
3. Installation
|
||||||
|
===============
|
||||||
|
Just run install.sh in its directory
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
epylint "$1" 2>/dev/null
|
||||||
|
pyflakes "$1"
|
||||||
|
pep8 --ignore=E221,E701,E202 --repeat "$1"
|
||||||
|
true
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
(add-to-list 'load-path "~/.emacs.d/")
|
||||||
|
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
||||||
|
|
||||||
|
(require 'auto-complete-config)
|
||||||
|
;;(require 'auto-complete)
|
||||||
|
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
|
||||||
|
(ac-config-default)
|
||||||
|
|
||||||
|
(global-auto-complete-mode t)
|
||||||
|
(setq tramp-default-method "ssh")
|
||||||
|
|
||||||
|
(autoload 'python-mode "python-mode" "Python Mode." t)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
|
||||||
|
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
||||||
|
(require 'python-mode)
|
||||||
|
|
||||||
|
;; Enabling ropemacs
|
||||||
|
;;(require 'pymacs)
|
||||||
|
;;(pymacs-load "ropemacs" "rope-")
|
||||||
|
|
||||||
|
(setq ropemacs-enable-shortcuts nil)
|
||||||
|
(setq ropemacs-local-prefix "C-c C-p")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(require 'yasnippet)
|
||||||
|
(yas/initialize)
|
||||||
|
(yas/load-directory "~/.emacs.d/snippets")
|
||||||
|
|
||||||
|
(require 'color-theme)
|
||||||
|
(eval-after-load "color-theme"
|
||||||
|
'(progn
|
||||||
|
(color-theme-initialize)
|
||||||
|
(color-theme-arjen)
|
||||||
|
))
|
||||||
|
|
||||||
|
(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.
|
||||||
|
'(c-plugin nil)
|
||||||
|
;'(color-theme-selection "Arjen" nil (color-theme_seldefcustom))
|
||||||
|
'(developer-email "--EMAIL--")
|
||||||
|
'(developer-name "--FULLNAME--")
|
||||||
|
'(kuso-workspace "--WORKSPACE--")
|
||||||
|
'(face-font-family-alternatives (quote (("courier" "Monospace" "fixed") ("courier" "CMU Typewriter Text" "fixed") ("Sans Serif" "helv" "helvetica" "arial" "fixed") ("helv" "helvetica" "arial" "fixed"))))
|
||||||
|
'(inhibit-startup-screen t)
|
||||||
|
'(rng-nxml-auto-validate-flag nil))
|
||||||
|
(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.
|
||||||
|
'(font-lock-comment-face ((t (:foreground "orange red"))))
|
||||||
|
'(font-lock-keyword-face ((t (:foreground "DeepSkyBlue1")))))
|
||||||
|
|
||||||
|
(require 'flymake)
|
||||||
|
(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 "--ADDR--/pyemacs.sh" (list local-file))))
|
||||||
|
(add-to-list 'flymake-allowed-file-name-masks
|
||||||
|
'("\\.py$" flymake-pyflakes-init)))
|
||||||
|
;; flymake shortkeys
|
||||||
|
(global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line)
|
||||||
|
(global-set-key (kbd "\C-x p") 'flymake-goto-next-error)
|
||||||
|
(tool-bar-mode -1)
|
||||||
|
(scroll-bar-mode -1)
|
||||||
|
;;(require 'kuso-dpaste-mode)
|
||||||
|
(setq x-select-enable-clipboard t)
|
||||||
|
(column-number-mode t)
|
||||||
|
;; dabbrev configuration
|
||||||
|
(require 'ac-dabbrev)
|
||||||
|
(setq ac-sources
|
||||||
|
(list ac-source-dabbrev
|
||||||
|
))
|
||||||
|
(global-set-key (kbd "<backtab>") 'dabbrev-expand)
|
||||||
|
|
||||||
|
(load-file "--KUSOHOME--/kuso-ide.el")
|
||||||
|
(kuso-mode)
|
|
@ -0,0 +1,54 @@
|
||||||
|
;;-*-coding: emacs-mule;-*-
|
||||||
|
(define-abbrev-table 'Buffer-menu-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'comint-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'completion-list-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'django-html-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'django-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'emacs-lisp-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'fundamental-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'global-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'lisp-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'python-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'rst-mode-abbrev-table
|
||||||
|
'(
|
||||||
|
("con" ".. contents::
|
||||||
|
..
|
||||||
|
" nil 0)
|
||||||
|
("cont" "[...]" nil 0)
|
||||||
|
("contents" ".. contents::
|
||||||
|
..
|
||||||
|
" nil 0)
|
||||||
|
("seq" "
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
" nil 0)
|
||||||
|
("skip" "
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
" nil 0)
|
||||||
|
))
|
||||||
|
|
||||||
|
(define-abbrev-table 'snippet-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'special-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'text-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'vc-hg-incoming-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'vc-hg-log-view-mode-abbrev-table '())
|
||||||
|
|
||||||
|
(define-abbrev-table 'vc-hg-outgoing-mode-abbrev-table '())
|
||||||
|
|
|
@ -0,0 +1,125 @@
|
||||||
|
;;; ac-dabbrev.el --- auto-complete.el source for dabbrev
|
||||||
|
;; -*- Mode: Emacs-Lisp -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2009 by 101000code/101000LAB
|
||||||
|
|
||||||
|
;; 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; if not, write to the Free Software
|
||||||
|
;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
;; Version: 0.0.8
|
||||||
|
;; Author: k1LoW (Kenichirou Oyama), <k1lowxb [at] gmail [dot] com> <k1low [at] 101000lab [dot] org>
|
||||||
|
;; URL: http://code.101000lab.org, http://trac.codecheck.in
|
||||||
|
|
||||||
|
;;; Install
|
||||||
|
;; Put this file into load-path'ed directory, and byte compile it if
|
||||||
|
;; desired. And put the following expression into your ~/.emacs.
|
||||||
|
;;
|
||||||
|
;; (require 'ac-dabbrev)
|
||||||
|
;; (setq ac-sources
|
||||||
|
;; (list ac-source-dabbrev
|
||||||
|
;; ))
|
||||||
|
|
||||||
|
;;; Change Log
|
||||||
|
;; 0.0.8: fix parameter for auto-complete.el 1.0a
|
||||||
|
;; 0.0.7: fix parameter for auto-complete.el 0.3.0
|
||||||
|
;; 0.0.6: fix face for auto-complete.el 0.2.0
|
||||||
|
;; 0.0.5: add face.
|
||||||
|
;; 0.0.4: new valiable:ac-dabbrev-reset-char. this valiable is suga idea. this valiable reset count when this valiable have insert char.
|
||||||
|
;; new valiable:ac-dabbrev-reset-always. reset count when ac-candidates is nil and this valiable non-nil.
|
||||||
|
;; -.-.-: document typo fix.
|
||||||
|
;; 0.0.3: new valiable:ac-dabbrev-sort. sort expansions.
|
||||||
|
;; 0.0.2: new variable:ac-dabbrev-all-min-count. this valiable is anything-dabbrev-expand.el idea.
|
||||||
|
;; 0.0.1: ac-dabbrev.el 0.0.1 released.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(eval-when-compile (require 'cl))
|
||||||
|
(require 'auto-complete)
|
||||||
|
(require 'dabbrev)
|
||||||
|
|
||||||
|
(defvar ac-dabbrev-all-min-count 4)
|
||||||
|
|
||||||
|
(defvar ac-dabbrev-trigger-commands '(self-insert-command delete-backward-char)
|
||||||
|
"Increment count when this valiable is last-command")
|
||||||
|
|
||||||
|
(defvar ac-dabbrev-reset-char nil
|
||||||
|
"Reset count when this valiable have insert char.") ;(setq ac-dabbrev-reset-char '("-"))
|
||||||
|
|
||||||
|
(defvar ac-dabbrev-reset-always nil
|
||||||
|
"Non-nil means reset count when candidates is 0.")
|
||||||
|
|
||||||
|
(defvar ac-dabbrev-sort nil)
|
||||||
|
|
||||||
|
(defun ac-dabbrev-find-limit-expansions (abbrev limit ignore-case)
|
||||||
|
"Return a list of limit expansions of ABBREV.
|
||||||
|
If IGNORE-CASE is non-nil, accept matches which differ in case."
|
||||||
|
(let ((all-expansions nil) (i 0)
|
||||||
|
expansion)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while
|
||||||
|
(and (< i limit)
|
||||||
|
(setq expansion (dabbrev--find-expansion abbrev -1 ignore-case)))
|
||||||
|
(setq all-expansions (cons expansion all-expansions))
|
||||||
|
(setq i (+ i 1)))
|
||||||
|
(if ac-dabbrev-sort
|
||||||
|
(sort all-expansions (lambda (s1 s2) (if (< (length s1) (length s2)) t nil)))
|
||||||
|
all-expansions))))
|
||||||
|
|
||||||
|
(defun ac-dabbrev-get-limit-candidates (abbrev &optional all)
|
||||||
|
(let ((dabbrev-check-other-buffers all))
|
||||||
|
(dabbrev--reset-global-variables)
|
||||||
|
(ac-dabbrev-find-limit-expansions abbrev ac-candidate-max nil)))
|
||||||
|
|
||||||
|
(lexical-let ((count 1))
|
||||||
|
(defun ac-dabbrev-set-count ()
|
||||||
|
(setq command-char last-command-char)
|
||||||
|
(if (memq last-command ac-dabbrev-trigger-commands)
|
||||||
|
(incf count)
|
||||||
|
(setq count 1))
|
||||||
|
(if (and ac-dabbrev-reset-always
|
||||||
|
(not ac-candidates))
|
||||||
|
(setq count 1))
|
||||||
|
(loop for char in ac-dabbrev-reset-char
|
||||||
|
do (if (char-equal last-command-char (string-to-char char))
|
||||||
|
(setq count 1)))
|
||||||
|
count))
|
||||||
|
|
||||||
|
(defun ac-dabbrev-get-candidates (abbrev)
|
||||||
|
(if (>= (ac-dabbrev-set-count) ac-dabbrev-all-min-count)
|
||||||
|
(ac-dabbrev-get-limit-candidates abbrev t)
|
||||||
|
(ac-dabbrev-get-limit-candidates abbrev nil)))
|
||||||
|
|
||||||
|
(defvar ac-source-dabbrev
|
||||||
|
'((candidates
|
||||||
|
. (lambda () (all-completions ac-target (ac-dabbrev-get-candidates ac-target))))
|
||||||
|
(candidate-face . ac-dabbrev-menu-face)
|
||||||
|
(selection-face . ac-dabbrev-selection-face))
|
||||||
|
"Source for dabbrev")
|
||||||
|
|
||||||
|
(defface ac-dabbrev-menu-face
|
||||||
|
'((t (:background "lightgray" :foreground "blue")))
|
||||||
|
"Face for dabbrev candidate menu."
|
||||||
|
:group 'auto-complete)
|
||||||
|
|
||||||
|
(defface ac-dabbrev-selection-face
|
||||||
|
'((t (:background "blue" :foreground "white")))
|
||||||
|
"Face for the dabbrev selected candidate."
|
||||||
|
:group 'auto-complete)
|
||||||
|
|
||||||
|
;; mode provide
|
||||||
|
(provide 'ac-dabbrev)
|
||||||
|
|
||||||
|
;;; end
|
||||||
|
;;; ac-dabbrev.el ends here
|
|
@ -0,0 +1,74 @@
|
||||||
|
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
|
|
@ -0,0 +1,37 @@
|
||||||
|
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
|
|
@ -0,0 +1,475 @@
|
||||||
|
*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
|
|
@ -0,0 +1,747 @@
|
||||||
|
!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
|
|
@ -0,0 +1,50 @@
|
||||||
|
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
|
|
@ -0,0 +1,148 @@
|
||||||
|
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
|
|
@ -0,0 +1,62 @@
|
||||||
|
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
|
|
@ -0,0 +1,104 @@
|
||||||
|
__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
|
|
@ -0,0 +1,181 @@
|
||||||
|
$!
|
||||||
|
$"
|
||||||
|
$$
|
||||||
|
$&
|
||||||
|
$'
|
||||||
|
$*
|
||||||
|
$+
|
||||||
|
$,
|
||||||
|
$-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
|
|
@ -0,0 +1,216 @@
|
||||||
|
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!
|
|
@ -0,0 +1,172 @@
|
||||||
|
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
|
|
@ -0,0 +1,483 @@
|
||||||
|
;;; 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.1
|
||||||
|
|
||||||
|
;; 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 seen = nil
|
||||||
|
with value
|
||||||
|
while (setq value (pop list))
|
||||||
|
if (symbolp value)
|
||||||
|
do (unless (memq value seen)
|
||||||
|
(push value seen)
|
||||||
|
(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.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,30 @@
|
||||||
|
; Shalgham - conditional configuration for emacs
|
||||||
|
; Copyright (C) 2010 Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
;
|
||||||
|
; 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
|
||||||
|
; 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/>.
|
||||||
|
|
||||||
|
(defun load-suitable-configuration ()
|
||||||
|
"Load the suitable configuration file for current opend file."
|
||||||
|
(interactive)
|
||||||
|
(let (arg)
|
||||||
|
(setq filename (buffer-file-name ()))
|
||||||
|
(message "debug >>>> %s" filename)
|
||||||
|
(t)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(setq find-file-hook
|
||||||
|
'((load-suitable-configuration ())
|
||||||
|
)
|
||||||
|
)
|
|
@ -0,0 +1,251 @@
|
||||||
|
;;; dropdown-list.el --- Drop-down menu interface
|
||||||
|
;;
|
||||||
|
;; Filename: dropdown-list.el
|
||||||
|
;; Description: Drop-down menu interface
|
||||||
|
;; Author: Jaeyoun Chung [jay.chung@gmail.com]
|
||||||
|
;; Maintainer:
|
||||||
|
;; Copyright (C) 2008 Jaeyoun Chung
|
||||||
|
;; Created: Sun Mar 16 11:20:45 2008 (Pacific Daylight Time)
|
||||||
|
;; Version:
|
||||||
|
;; Last-Updated: Sun Mar 16 12:19:49 2008 (Pacific Daylight Time)
|
||||||
|
;; By: dradams
|
||||||
|
;; Update #: 43
|
||||||
|
;; URL: http://www.emacswiki.org/cgi-bin/wiki/dropdown-list.el
|
||||||
|
;; Keywords: convenience menu
|
||||||
|
;; Compatibility: GNU Emacs 21.x, GNU Emacs 22.x
|
||||||
|
;;
|
||||||
|
;; Features that might be required by this library:
|
||||||
|
;;
|
||||||
|
;; `cl'.
|
||||||
|
;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;
|
||||||
|
;;; Commentary:
|
||||||
|
;;
|
||||||
|
;; According to Jaeyoun Chung, "overlay code stolen from company-mode.el."
|
||||||
|
;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;
|
||||||
|
;;; Change log:
|
||||||
|
;;
|
||||||
|
;; 2008/03/16 dadams
|
||||||
|
;; Clean-up - e.g. use char-to-string for control chars removed by email posting.
|
||||||
|
;; Moved example usage code (define-key*, command-selector) inside the library.
|
||||||
|
;; Require cl.el at byte-compile time.
|
||||||
|
;; Added GPL statement.
|
||||||
|
;; 2008/01/06 Jaeyoun Chung
|
||||||
|
;; Posted to gnu-emacs-sources@gnu.org at 9:10 p.m.
|
||||||
|
;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;
|
||||||
|
;; 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, 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., 51 Franklin Street, Fifth
|
||||||
|
;; Floor, Boston, MA 02110-1301, USA.
|
||||||
|
;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(eval-when-compile (require 'cl)) ;; decf, fourth, incf, loop, mapcar*
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(defface dropdown-list-face
|
||||||
|
'((t :inherit default :background "lightyellow" :foreground "black"))
|
||||||
|
"*Bla." :group 'dropdown-list)
|
||||||
|
|
||||||
|
(defface dropdown-list-selection-face
|
||||||
|
'((t :inherit dropdown-list-face :background "purple"))
|
||||||
|
"*Bla." :group 'dropdown-list)
|
||||||
|
|
||||||
|
(defvar dropdown-list-overlays nil)
|
||||||
|
|
||||||
|
(defun dropdown-list-hide ()
|
||||||
|
(while dropdown-list-overlays
|
||||||
|
(delete-overlay (pop dropdown-list-overlays))))
|
||||||
|
|
||||||
|
(defun dropdown-list-put-overlay (beg end &optional prop value prop2 value2)
|
||||||
|
(let ((ov (make-overlay beg end)))
|
||||||
|
(overlay-put ov 'window t)
|
||||||
|
(when prop
|
||||||
|
(overlay-put ov prop value)
|
||||||
|
(when prop2 (overlay-put ov prop2 value2)))
|
||||||
|
ov))
|
||||||
|
|
||||||
|
(defun dropdown-list-line (start replacement &optional no-insert)
|
||||||
|
;; start might be in the middle of a tab, which means we need to hide the
|
||||||
|
;; tab and add spaces
|
||||||
|
(let ((end (+ start (length replacement)))
|
||||||
|
beg-point end-point
|
||||||
|
before-string after-string)
|
||||||
|
(goto-char (point-at-eol))
|
||||||
|
(if (< (current-column) start)
|
||||||
|
(progn (setq before-string (make-string (- start (current-column)) ? ))
|
||||||
|
(setq beg-point (point)))
|
||||||
|
(goto-char (point-at-bol)) ;; Emacs bug, move-to-column is wrong otherwise
|
||||||
|
(move-to-column start)
|
||||||
|
(setq beg-point (point))
|
||||||
|
(when (> (current-column) start)
|
||||||
|
(goto-char (1- (point)))
|
||||||
|
(setq beg-point (point))
|
||||||
|
(setq before-string (make-string (- start (current-column)) ? ))))
|
||||||
|
(move-to-column end)
|
||||||
|
(setq end-point (point))
|
||||||
|
(let ((end-offset (- (current-column) end)))
|
||||||
|
(when (> end-offset 0) (setq after-string (make-string end-offset ?b))))
|
||||||
|
(when no-insert
|
||||||
|
;; prevent inheriting of faces
|
||||||
|
(setq before-string (when before-string (propertize before-string 'face 'default)))
|
||||||
|
(setq after-string (when after-string (propertize after-string 'face 'default))))
|
||||||
|
(let ((string (concat before-string replacement after-string)))
|
||||||
|
(if no-insert
|
||||||
|
string
|
||||||
|
(push (dropdown-list-put-overlay beg-point end-point 'invisible t
|
||||||
|
'after-string string)
|
||||||
|
dropdown-list-overlays)))))
|
||||||
|
|
||||||
|
(defun dropdown-list-start-column (display-width)
|
||||||
|
(let ((column (mod (current-column) (window-width)))
|
||||||
|
(width (window-width)))
|
||||||
|
(cond ((<= (+ column display-width) width) column)
|
||||||
|
((> column display-width) (- column display-width))
|
||||||
|
((>= width display-width) (- width display-width))
|
||||||
|
(t nil))))
|
||||||
|
|
||||||
|
(defun dropdown-list-move-to-start-line (candidate-count)
|
||||||
|
(decf candidate-count)
|
||||||
|
(let ((above-line-count (save-excursion (- (vertical-motion (- candidate-count)))))
|
||||||
|
(below-line-count (save-excursion (vertical-motion candidate-count))))
|
||||||
|
(cond ((= below-line-count candidate-count)
|
||||||
|
t)
|
||||||
|
((= above-line-count candidate-count)
|
||||||
|
(vertical-motion (- candidate-count))
|
||||||
|
t)
|
||||||
|
((>= (+ below-line-count above-line-count) candidate-count)
|
||||||
|
(vertical-motion (- (- candidate-count below-line-count)))
|
||||||
|
t)
|
||||||
|
(t nil))))
|
||||||
|
|
||||||
|
(defun dropdown-list-at-point (candidates &optional selidx)
|
||||||
|
(dropdown-list-hide)
|
||||||
|
(let* ((lengths (mapcar #'length candidates))
|
||||||
|
(max-length (apply #'max lengths))
|
||||||
|
(start (dropdown-list-start-column (+ max-length 3)))
|
||||||
|
(i -1)
|
||||||
|
(candidates (mapcar* (lambda (candidate length)
|
||||||
|
(let ((diff (- max-length length)))
|
||||||
|
(propertize
|
||||||
|
(concat (if (> diff 0)
|
||||||
|
(concat candidate (make-string diff ? ))
|
||||||
|
(substring candidate 0 max-length))
|
||||||
|
(format "%3d" (+ 2 i)))
|
||||||
|
'face (if (eql (incf i) selidx)
|
||||||
|
'dropdown-list-selection-face
|
||||||
|
'dropdown-list-face))))
|
||||||
|
candidates
|
||||||
|
lengths)))
|
||||||
|
(save-excursion
|
||||||
|
(and start
|
||||||
|
(dropdown-list-move-to-start-line (length candidates))
|
||||||
|
(loop initially (vertical-motion 0)
|
||||||
|
for candidate in candidates
|
||||||
|
do (dropdown-list-line (+ (current-column) start) candidate)
|
||||||
|
while (/= (vertical-motion 1) 0)
|
||||||
|
finally return t)))))
|
||||||
|
|
||||||
|
(defun dropdown-list (candidates)
|
||||||
|
(let ((selection)
|
||||||
|
(temp-buffer))
|
||||||
|
(save-window-excursion
|
||||||
|
(unwind-protect
|
||||||
|
(let ((candidate-count (length candidates))
|
||||||
|
done key (selidx 0))
|
||||||
|
(while (not done)
|
||||||
|
(unless (dropdown-list-at-point candidates selidx)
|
||||||
|
(switch-to-buffer (setq temp-buffer (get-buffer-create "*selection*"))
|
||||||
|
'norecord)
|
||||||
|
(delete-other-windows)
|
||||||
|
(delete-region (point-min) (point-max))
|
||||||
|
(insert (make-string (length candidates) ?\n))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(dropdown-list-at-point candidates selidx))
|
||||||
|
(setq key (read-key-sequence ""))
|
||||||
|
(cond ((and (stringp key)
|
||||||
|
(>= (aref key 0) ?1)
|
||||||
|
(<= (aref key 0) (+ ?0 (min 9 candidate-count))))
|
||||||
|
(setq selection (- (aref key 0) ?1)
|
||||||
|
done t))
|
||||||
|
((member key `(,(char-to-string ?\C-p) [up] "p"))
|
||||||
|
(setq selidx (mod (+ candidate-count (1- (or selidx 0)))
|
||||||
|
candidate-count)))
|
||||||
|
((member key `(,(char-to-string ?\C-n) [down] "n"))
|
||||||
|
(setq selidx (mod (1+ (or selidx -1)) candidate-count)))
|
||||||
|
((member key `(,(char-to-string ?\f))))
|
||||||
|
((member key `(,(char-to-string ?\r) [return]))
|
||||||
|
(setq selection selidx
|
||||||
|
done t))
|
||||||
|
(t (setq done t)))))
|
||||||
|
(dropdown-list-hide)
|
||||||
|
(and temp-buffer (kill-buffer temp-buffer)))
|
||||||
|
;; (when selection
|
||||||
|
;; (message "your selection => %d: %s" selection (nth selection candidates))
|
||||||
|
;; (sit-for 1))
|
||||||
|
selection)))
|
||||||
|
|
||||||
|
(defun define-key* (keymap key command)
|
||||||
|
"Add COMMAND to the multiple-command binding of KEY in KEYMAP.
|
||||||
|
Use multiple times to bind different COMMANDs to the same KEY."
|
||||||
|
(define-key keymap key (combine-command command (lookup-key keymap key))))
|
||||||
|
|
||||||
|
(defun combine-command (command defs)
|
||||||
|
"$$$$$ FIXME - no doc string"
|
||||||
|
(cond ((null defs) command)
|
||||||
|
((and (listp defs)
|
||||||
|
(eq 'lambda (car defs))
|
||||||
|
(= (length defs) 4)
|
||||||
|
(listp (fourth defs))
|
||||||
|
(eq 'command-selector (car (fourth defs))))
|
||||||
|
(unless (member `',command (cdr (fourth defs)))
|
||||||
|
(setcdr (fourth defs) (nconc (cdr (fourth defs)) `(',command))))
|
||||||
|
defs)
|
||||||
|
(t
|
||||||
|
`(lambda () (interactive) (command-selector ',defs ',command)))))
|
||||||
|
|
||||||
|
(defvar command-selector-last-command nil "$$$$$ FIXME - no doc string")
|
||||||
|
|
||||||
|
(defun command-selector (&rest candidates)
|
||||||
|
"$$$$$ FIXME - no doc string"
|
||||||
|
(if (and (eq last-command this-command) command-selector-last-command)
|
||||||
|
(call-interactively command-selector-last-command)
|
||||||
|
(let* ((candidate-strings
|
||||||
|
(mapcar (lambda (candidate)
|
||||||
|
(format "%s" (if (symbolp candidate)
|
||||||
|
candidate
|
||||||
|
(let ((s (format "%s" candidate)))
|
||||||
|
(if (>= (length s) 7)
|
||||||
|
(concat (substring s 0 7) "...")
|
||||||
|
s)))))
|
||||||
|
candidates))
|
||||||
|
(selection (dropdown-list candidate-strings)))
|
||||||
|
(when selection
|
||||||
|
(let ((cmd (nth selection candidates)))
|
||||||
|
(call-interactively cmd)
|
||||||
|
(setq command-selector-last-command cmd))))))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(provide 'dropdown-list)
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; dropdown-list.el ends here
|
|
@ -0,0 +1,4 @@
|
||||||
|
;; EDE project cache file.
|
||||||
|
;; This contains a list of projects you have visited.
|
||||||
|
(
|
||||||
|
)
|
|
@ -0,0 +1,110 @@
|
||||||
|
;;; expander.el --- Text expander interface
|
||||||
|
|
||||||
|
;; Copyright (C) 2009 Tomohiro Matsuyama
|
||||||
|
|
||||||
|
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
|
||||||
|
;; Keywords: lisp
|
||||||
|
|
||||||
|
;; 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))
|
||||||
|
|
||||||
|
(defface expander-face
|
||||||
|
'((t (:background "darkblue" :foreground "white")))
|
||||||
|
"Default face for expander.")
|
||||||
|
|
||||||
|
(defstruct expander
|
||||||
|
face overlay marker)
|
||||||
|
|
||||||
|
(defun* expander-create (&optional (face 'expander-face))
|
||||||
|
(make-expander :face face
|
||||||
|
:marker (make-marker)))
|
||||||
|
|
||||||
|
(defun expander-delete (expander)
|
||||||
|
(when (expander-live-p expander)
|
||||||
|
(expander-hide expander)
|
||||||
|
(delete-overlay (expander-overlay expander))
|
||||||
|
(setf (expander-overlay expander))))
|
||||||
|
|
||||||
|
(defun expander-live-p (expander)
|
||||||
|
(and expander (expander-overlay expander) t))
|
||||||
|
|
||||||
|
(defun expander-show (expander point string)
|
||||||
|
(save-excursion
|
||||||
|
(let ((overlay (expander-overlay expander))
|
||||||
|
(width 0)
|
||||||
|
(string-width (string-width string))
|
||||||
|
(original-string string))
|
||||||
|
;; Calculate string space to show completion
|
||||||
|
(goto-char point)
|
||||||
|
(while (and (not (eolp))
|
||||||
|
(< width string-width))
|
||||||
|
(incf width (char-width (char-after)))
|
||||||
|
(forward-char))
|
||||||
|
|
||||||
|
;; Show completion
|
||||||
|
(goto-char point)
|
||||||
|
(cond
|
||||||
|
((= width 0)
|
||||||
|
(set-marker (expander-marker expander) point)
|
||||||
|
(let ((buffer-undo-list t))
|
||||||
|
(insert " "))
|
||||||
|
(setq width 1))
|
||||||
|
((<= width string-width)
|
||||||
|
;; No space to show
|
||||||
|
;; Do nothing
|
||||||
|
)
|
||||||
|
((> width string-width)
|
||||||
|
;; Need to fill space
|
||||||
|
(setq string (concat string (make-string (- width string-width) ? )))))
|
||||||
|
(setq string (propertize string 'face (expander-face expander)))
|
||||||
|
(if overlay
|
||||||
|
(progn
|
||||||
|
(move-overlay overlay point (+ point width))
|
||||||
|
(overlay-put overlay 'invisible nil))
|
||||||
|
(setq overlay (make-overlay point (+ point width)))
|
||||||
|
(setf (expander-overlay expander) overlay)
|
||||||
|
(overlay-put overlay 'priority 9999))
|
||||||
|
(overlay-put overlay 'display (substring string 0 1))
|
||||||
|
;; TODO no width but char
|
||||||
|
(overlay-put overlay 'after-string (substring string 1))
|
||||||
|
(overlay-put overlay 'string original-string))))
|
||||||
|
|
||||||
|
(defun expander-hide (expander)
|
||||||
|
(let ((overlay (expander-overlay expander))
|
||||||
|
(marker (expander-marker expander))
|
||||||
|
(buffer-undo-list t))
|
||||||
|
(when overlay
|
||||||
|
(when (marker-position marker)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char marker)
|
||||||
|
(delete-char 1)
|
||||||
|
(set-marker marker nil)))
|
||||||
|
(move-overlay overlay (point-min) (point-min))
|
||||||
|
(overlay-put overlay 'invisible t)
|
||||||
|
(overlay-put overlay 'display nil)
|
||||||
|
(overlay-put overlay 'after-string nil))))
|
||||||
|
|
||||||
|
(defun expander-string (expander)
|
||||||
|
(overlay-get (expander-overlay expander) 'string))
|
||||||
|
|
||||||
|
(provide 'expander)
|
||||||
|
;;; expander.el ends here
|
|
@ -0,0 +1,255 @@
|
||||||
|
;;; 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.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,361 @@
|
||||||
|
;;; pulldown.el --- Visual pulldown menu interface
|
||||||
|
|
||||||
|
;; Copyright (C) 2009 Tomohiro Matsuyama
|
||||||
|
|
||||||
|
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
|
||||||
|
;; Keywords: lisp
|
||||||
|
;; Version: 0.1
|
||||||
|
|
||||||
|
;; 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))
|
||||||
|
|
||||||
|
(defgroup pulldown nil
|
||||||
|
"Visual pulldown menu interface"
|
||||||
|
:group 'lisp
|
||||||
|
:prefix "pulldown-")
|
||||||
|
|
||||||
|
(defface pulldown-default-face
|
||||||
|
'((t (:background "lightgray" :foreground "black" :underline "darkgray")))
|
||||||
|
"Face for pulldown menu."
|
||||||
|
:group 'pulldown)
|
||||||
|
|
||||||
|
(defface pulldown-default-selection-face
|
||||||
|
'((t (:background "steelblue" :foreground "white")))
|
||||||
|
"Face for selection."
|
||||||
|
:group 'pulldown)
|
||||||
|
|
||||||
|
(defstruct pulldown
|
||||||
|
point row column width height direction overlays
|
||||||
|
newline-added
|
||||||
|
face selection-face
|
||||||
|
cursor offset scroll-top list)
|
||||||
|
|
||||||
|
(defun pulldown-x-to-string (x)
|
||||||
|
"Convert anything to string effeciently."
|
||||||
|
(typecase x
|
||||||
|
(string x)
|
||||||
|
(symbol (symbol-name x))
|
||||||
|
(integer (number-to-string x))
|
||||||
|
(float (number-to-string x))
|
||||||
|
(t (format "%s" x))))
|
||||||
|
|
||||||
|
(defun pulldown-goto-line (line)
|
||||||
|
"Goto `LINE' regarding of narrowing."
|
||||||
|
(goto-char (point-min))
|
||||||
|
(forward-line (1- line)))
|
||||||
|
|
||||||
|
(defun pulldown-current-physical-column ()
|
||||||
|
"Current physical column. (not logical column)"
|
||||||
|
(car (posn-col-row (posn-at-point))))
|
||||||
|
|
||||||
|
(defun pulldown-last-line-of-buffer ()
|
||||||
|
"Return non-nil if at last line of buffer."
|
||||||
|
(save-excursion (/= (forward-line) 0)))
|
||||||
|
|
||||||
|
(defun pulldown-item-propertize (item &rest properties)
|
||||||
|
(if (stringp item)
|
||||||
|
(apply 'propertize item properties)
|
||||||
|
item))
|
||||||
|
|
||||||
|
(defun pulldown-item-property (item property)
|
||||||
|
(if (stringp item)
|
||||||
|
(get-text-property 0 property item)))
|
||||||
|
|
||||||
|
(defun pulldown-set-list (menu list)
|
||||||
|
"Set menu list."
|
||||||
|
(setf (pulldown-list menu) list
|
||||||
|
(pulldown-offset menu) (if (> (pulldown-direction menu) 0)
|
||||||
|
0
|
||||||
|
(max (- (pulldown-height menu) (length list)) 0))))
|
||||||
|
|
||||||
|
(defun pulldown-line-overlay (menu line)
|
||||||
|
"Return a overlay of `MENU' at `LINE'."
|
||||||
|
(aref (pulldown-overlays menu) line))
|
||||||
|
|
||||||
|
(defun pulldown-hide-line (menu line)
|
||||||
|
"Hide `LINE' in `MENU'."
|
||||||
|
(let ((overlay (pulldown-line-overlay menu line)))
|
||||||
|
(overlay-put overlay 'invisible nil)
|
||||||
|
(overlay-put overlay 'after-string nil)))
|
||||||
|
|
||||||
|
(defun pulldown-show-line (menu line)
|
||||||
|
"Show `LINE' in `MENU'."
|
||||||
|
(overlay-put (pulldown-line-overlay menu line) 'invisible t))
|
||||||
|
|
||||||
|
(defun pulldown-set-line-item (menu line item &optional face)
|
||||||
|
"Set list of `LINE' in `MENU'."
|
||||||
|
(let ((overlay (pulldown-line-overlay menu line)))
|
||||||
|
(overlay-put overlay 'real-item item)
|
||||||
|
(overlay-put overlay
|
||||||
|
'after-string
|
||||||
|
(concat (overlay-get overlay 'prefix)
|
||||||
|
(propertize (pulldown-create-line-string menu item) 'face face)
|
||||||
|
(overlay-get overlay 'postfix)))))
|
||||||
|
|
||||||
|
(defun pulldown-create-line-string (menu item)
|
||||||
|
"Create string for showing `ITEM' in `MENU'."
|
||||||
|
(loop with string = (pulldown-x-to-string item)
|
||||||
|
with width = 0
|
||||||
|
with menu-width = (pulldown-width menu)
|
||||||
|
for length from 0
|
||||||
|
for c in (append string nil)
|
||||||
|
while (<= (incf width (char-width c)) menu-width)
|
||||||
|
finally return
|
||||||
|
(let ((string-width (string-width (if (< length (length string))
|
||||||
|
(substring string 0 length)
|
||||||
|
string))))
|
||||||
|
(if (< string-width menu-width)
|
||||||
|
;; Padding
|
||||||
|
(concat string (make-string (- menu-width string-width) ? ))
|
||||||
|
string))))
|
||||||
|
|
||||||
|
(defun pulldown-hide (menu)
|
||||||
|
"Hide `MENU'."
|
||||||
|
(dotimes (i (pulldown-height menu))
|
||||||
|
(pulldown-hide-line menu i)))
|
||||||
|
|
||||||
|
(defun pulldown-draw (menu)
|
||||||
|
"Draw `MENU'."
|
||||||
|
(loop with height = (pulldown-height menu)
|
||||||
|
with list = (pulldown-list menu)
|
||||||
|
with cursor = (pulldown-cursor menu)
|
||||||
|
with scroll-top = (pulldown-scroll-top menu)
|
||||||
|
with offset = (pulldown-offset menu)
|
||||||
|
for o from offset
|
||||||
|
for i from scroll-top
|
||||||
|
for item in (nthcdr scroll-top list)
|
||||||
|
while (< o height)
|
||||||
|
|
||||||
|
do
|
||||||
|
;; Show line and set item to the line
|
||||||
|
(pulldown-show-line menu o)
|
||||||
|
(pulldown-set-line-item
|
||||||
|
menu o item
|
||||||
|
(if (= i cursor)
|
||||||
|
(or (pulldown-item-property item 'selection-face) (pulldown-selection-face menu))
|
||||||
|
(or (pulldown-item-property item 'menu-face) (pulldown-face menu))))
|
||||||
|
|
||||||
|
finally
|
||||||
|
;; Hide remaining lines
|
||||||
|
(if (> (pulldown-direction menu) 0)
|
||||||
|
(while (< o height)
|
||||||
|
(pulldown-hide-line menu o)
|
||||||
|
(incf o))
|
||||||
|
(dotimes (o offset)
|
||||||
|
(pulldown-hide-line menu o)))))
|
||||||
|
|
||||||
|
(defun pulldown-next (menu)
|
||||||
|
"Select next item."
|
||||||
|
(let ((height (pulldown-height menu))
|
||||||
|
(cursor (1+ (pulldown-cursor menu)))
|
||||||
|
(scroll-top (pulldown-scroll-top menu))
|
||||||
|
(length (length (pulldown-list menu))))
|
||||||
|
(cond
|
||||||
|
((>= cursor length)
|
||||||
|
;; Back to first page
|
||||||
|
(setq cursor 0
|
||||||
|
scroll-top 0))
|
||||||
|
((= cursor (+ scroll-top height))
|
||||||
|
;; Go to next page
|
||||||
|
(setq scroll-top (min (1+ scroll-top) (max (- length height) 0)))))
|
||||||
|
(setf (pulldown-cursor menu) cursor
|
||||||
|
(pulldown-scroll-top menu) scroll-top)
|
||||||
|
(pulldown-draw menu)))
|
||||||
|
|
||||||
|
(defun pulldown-previous (menu)
|
||||||
|
"Select previous item."
|
||||||
|
(let ((height (pulldown-height menu))
|
||||||
|
(cursor (1- (pulldown-cursor menu)))
|
||||||
|
(scroll-top (pulldown-scroll-top menu))
|
||||||
|
(length (length (pulldown-list menu))))
|
||||||
|
(cond
|
||||||
|
((< cursor 0)
|
||||||
|
;; Go to last page
|
||||||
|
(setq cursor (1- length)
|
||||||
|
scroll-top (max (- length height) 0)))
|
||||||
|
((= cursor (1- scroll-top))
|
||||||
|
;; Go to previous page
|
||||||
|
(decf scroll-top)))
|
||||||
|
(setf (pulldown-cursor menu) cursor
|
||||||
|
(pulldown-scroll-top menu) scroll-top)
|
||||||
|
(pulldown-draw menu)))
|
||||||
|
|
||||||
|
(defun* pulldown-create (point width height
|
||||||
|
&key
|
||||||
|
(face 'pulldown-default-face)
|
||||||
|
(selection-face 'pulldown-default-selection-face))
|
||||||
|
"Create pulldown menu."
|
||||||
|
(save-excursion
|
||||||
|
(goto-char point)
|
||||||
|
(let* ((row (line-number-at-pos))
|
||||||
|
(column (pulldown-current-physical-column))
|
||||||
|
(overlays (make-vector height nil))
|
||||||
|
(window (selected-window))
|
||||||
|
(window-start (window-start))
|
||||||
|
(window-hscroll (window-hscroll))
|
||||||
|
(window-width (window-width))
|
||||||
|
(right (+ column width))
|
||||||
|
(direction (if (and (> row height)
|
||||||
|
(> height (- (max 1 (- (window-height)
|
||||||
|
(if mode-line-format 1 0)
|
||||||
|
(if header-line-format 1 0)))
|
||||||
|
(count-lines window-start (point)))))
|
||||||
|
-1
|
||||||
|
1))
|
||||||
|
(newline-added (save-excursion
|
||||||
|
(goto-char (point-max))
|
||||||
|
(unless (bolp)
|
||||||
|
(newline)
|
||||||
|
t)))
|
||||||
|
current-column)
|
||||||
|
(if (and (> right window-width)
|
||||||
|
(>= right width)
|
||||||
|
(>= column width))
|
||||||
|
(decf column width))
|
||||||
|
(dotimes (i height)
|
||||||
|
(let (overlay begin w (prefix "") (postfix ""))
|
||||||
|
(if (>= emacs-major-version 23)
|
||||||
|
(vertical-motion (cons column direction))
|
||||||
|
(vertical-motion direction)
|
||||||
|
(move-to-column (+ (current-column) column)))
|
||||||
|
(setq current-column (pulldown-current-physical-column))
|
||||||
|
|
||||||
|
(when (> current-column column)
|
||||||
|
(backward-char)
|
||||||
|
(setq current-column (pulldown-current-physical-column)))
|
||||||
|
(when (< current-column column)
|
||||||
|
;; Extend short buffer lines by menu prefix (line of spaces)
|
||||||
|
(setq prefix (make-string (+ (if (= current-column 0)
|
||||||
|
(- window-hscroll (current-column))
|
||||||
|
0)
|
||||||
|
(- column current-column))
|
||||||
|
? )))
|
||||||
|
|
||||||
|
(setq begin (point))
|
||||||
|
(setq w (+ width (length prefix)))
|
||||||
|
(while (and (not (eolp)) (> w 0))
|
||||||
|
(decf w (char-width (char-after)))
|
||||||
|
(forward-char))
|
||||||
|
(if (< w 0)
|
||||||
|
(setq postfix (make-string (- w) ? )))
|
||||||
|
(if (pulldown-last-line-of-buffer)
|
||||||
|
(setq postfix (concat postfix "\n")))
|
||||||
|
|
||||||
|
(setq overlay (make-overlay begin (point)))
|
||||||
|
(overlay-put overlay 'window window)
|
||||||
|
(overlay-put overlay 'prefix prefix)
|
||||||
|
(overlay-put overlay 'postfix postfix)
|
||||||
|
(overlay-put overlay 'width width)
|
||||||
|
(aset overlays
|
||||||
|
(if (> direction 0) i (- height i 1))
|
||||||
|
overlay)))
|
||||||
|
(loop for p from 100
|
||||||
|
for overlay in (nreverse (append overlays nil))
|
||||||
|
do (overlay-put overlay 'priority p))
|
||||||
|
(make-pulldown :point point
|
||||||
|
:row row
|
||||||
|
:column column
|
||||||
|
:width width
|
||||||
|
:height height
|
||||||
|
:direction direction
|
||||||
|
:newline-added newline-added
|
||||||
|
:face face
|
||||||
|
:selection-face selection-face
|
||||||
|
:cursor 0
|
||||||
|
:scroll-top 0
|
||||||
|
:list '()
|
||||||
|
:overlays overlays))))
|
||||||
|
|
||||||
|
(defun pulldown-delete (menu)
|
||||||
|
(mapcar 'delete-overlay (pulldown-overlays menu))
|
||||||
|
(setf (pulldown-overlays menu) nil)
|
||||||
|
(if (pulldown-newline-added menu)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char (point-max))
|
||||||
|
(if (and (bolp) (eolp))
|
||||||
|
(delete-char -1)))))
|
||||||
|
|
||||||
|
(defun pulldown-live-p (menu)
|
||||||
|
(and menu (pulldown-overlays menu) t))
|
||||||
|
|
||||||
|
(defun pulldown-preferred-width (list)
|
||||||
|
"Return preferred width of pulldown menu to show `LIST' beautifully."
|
||||||
|
(loop for item in list
|
||||||
|
maximize (string-width (pulldown-x-to-string item)) into width
|
||||||
|
finally return (* (ceiling (/ (or width 0) 10.0)) 10)))
|
||||||
|
|
||||||
|
(defun pulldown-lookup-key-by-event (function event)
|
||||||
|
(or (funcall function (vector event))
|
||||||
|
(if (symbolp event)
|
||||||
|
(let ((mask (get event 'event-symbol-element-mask)))
|
||||||
|
(if mask
|
||||||
|
(funcall function (vector (logior (or (get (car mask) 'ascii-character) 0)
|
||||||
|
(cadr mask)))))))))
|
||||||
|
|
||||||
|
(defun* pulldown-event-loop (menu keymap fallback &optional message &aux event binding)
|
||||||
|
(unwind-protect
|
||||||
|
(block nil
|
||||||
|
(while (and (pulldown-live-p menu)
|
||||||
|
(setq event (progn (clear-this-command-keys) (read-event message))))
|
||||||
|
(if (eq event 'Quit)
|
||||||
|
(return nil))
|
||||||
|
(setq binding (pulldown-lookup-key-by-event (lambda (key) (lookup-key keymap key)) event))
|
||||||
|
(cond
|
||||||
|
((eq binding 'pulldown-select)
|
||||||
|
(return (nth (pulldown-cursor menu) (pulldown-list menu))))
|
||||||
|
((eq binding 'pulldown-next)
|
||||||
|
(pulldown-next menu))
|
||||||
|
((eq binding 'pulldown-previous)
|
||||||
|
(pulldown-previous menu))
|
||||||
|
(binding
|
||||||
|
(call-interactively binding))
|
||||||
|
(t
|
||||||
|
(funcall fallback event (pulldown-lookup-key-by-event (lambda (key) (key-binding key)) event))))))
|
||||||
|
(pulldown-delete menu)))
|
||||||
|
|
||||||
|
(defun pulldown-default-fallback (event default))
|
||||||
|
|
||||||
|
(defun* pulldown-menu (list
|
||||||
|
&key
|
||||||
|
(width (pulldown-preferred-width list))
|
||||||
|
(height 10)
|
||||||
|
(keymap pulldown-keymap)
|
||||||
|
(fallback 'pulldown-default-fallback)
|
||||||
|
message
|
||||||
|
&aux menu event)
|
||||||
|
(setq menu (pulldown-create (point) width height))
|
||||||
|
(pulldown-set-list menu list)
|
||||||
|
(pulldown-draw menu)
|
||||||
|
(pulldown-event-loop menu keymap fallback message))
|
||||||
|
|
||||||
|
(defvar pulldown-keymap
|
||||||
|
(let ((map (make-sparse-keymap)))
|
||||||
|
(define-key map "\r" 'pulldown-select)
|
||||||
|
|
||||||
|
(define-key map "\C-n" 'pulldown-next)
|
||||||
|
(define-key map "\C-p" 'pulldown-previous)
|
||||||
|
(define-key map [down] 'pulldown-next)
|
||||||
|
(define-key map [up] 'pulldown-previous)
|
||||||
|
map))
|
||||||
|
|
||||||
|
(provide 'pulldown)
|
||||||
|
;;; pulldown.el ends here
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
||||||
|
#name : v.begin(), v.end()
|
||||||
|
# --
|
||||||
|
${1:v}.begin(), $1.end
|
|
@ -0,0 +1,8 @@
|
||||||
|
#name : class ... { ... }
|
||||||
|
# --
|
||||||
|
class ${1:Name}
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
${1:$(yas/substr text "[^: ]*")}($2);
|
||||||
|
virtual ~${1:$(yas/substr text "[^: ]*")}();
|
||||||
|
};
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : namespace ...
|
||||||
|
# --
|
||||||
|
namespace
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : template <typename ...>
|
||||||
|
# --
|
||||||
|
template <typename ${T}>
|
|
@ -0,0 +1,4 @@
|
||||||
|
#name : using namespace ...
|
||||||
|
# --
|
||||||
|
using namespace ${std};
|
||||||
|
$0
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : FILE *fp = fopen(..., ...);
|
||||||
|
# --
|
||||||
|
FILE *${fp} = fopen(${"file"}, "${r}");
|
|
@ -0,0 +1,6 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name : printf
|
||||||
|
# contributor : joaotavora
|
||||||
|
# --
|
||||||
|
printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);")
|
||||||
|
}$2${1:$(if (string-match "%" text) "\);" "")}
|
|
@ -0,0 +1,7 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : private attribute ....;
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $3
|
||||||
|
/// </summary>
|
||||||
|
private $1 $2;
|
|
@ -0,0 +1,21 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : private attribute ....; public property ... ... { ... }
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $3
|
||||||
|
/// </summary>
|
||||||
|
private $1 $2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// $4
|
||||||
|
/// </summary>
|
||||||
|
/// <value>$5</value>
|
||||||
|
public $1 $2
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
return this.$2;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.$2 = value;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : private _attribute ....; public Property ... ... { ... }
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $3
|
||||||
|
/// </summary>
|
||||||
|
private $1 ${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ${3:Description}
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>$1</c></value>
|
||||||
|
public ${1:Type} ${2:Name}
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
return this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")};
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")} = value;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : class ... { ... }
|
||||||
|
# --
|
||||||
|
${5:public} class ${1:Name}
|
||||||
|
{
|
||||||
|
#region Ctor & Destructor
|
||||||
|
/// <summary>
|
||||||
|
/// ${3:Standard Constructor}
|
||||||
|
/// </summary>
|
||||||
|
public $1($2)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ${4:Default Destructor}
|
||||||
|
/// </summary>
|
||||||
|
public ~$1()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : /// <summary> ... </summary>
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $1
|
||||||
|
/// </summary>
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : /// <param name="..."> ... </param>
|
||||||
|
# --
|
||||||
|
/// <param name="$1">$2</param>
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : /// <param name="..."> ... </param>
|
||||||
|
# --
|
||||||
|
/// <returns>$1</returns>
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : /// <exception cref="..."> ... </exception>
|
||||||
|
# --
|
||||||
|
/// <exception cref="$1">$2</exception>
|
|
@ -0,0 +1,10 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : public void Method { ... }
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// ${5:Description}
|
||||||
|
/// </summary>${2:$(if (string= (upcase text) "VOID") "" (format "%s%s%s" "\n/// <returns><c>" text "</c></returns>"))}
|
||||||
|
${1:public} ${2:void} ${3:MethodName}($4)
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : namespace .. { ... }
|
||||||
|
# --
|
||||||
|
namespace $1
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : property ... ... { ... }
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $5
|
||||||
|
/// </summary>
|
||||||
|
/// <value>$6</value>
|
||||||
|
$1 $2 $3
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
return this.$4;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.$4 = value;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : #region ... #endregion
|
||||||
|
# --
|
||||||
|
#region $1
|
||||||
|
$0
|
||||||
|
#endregion
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : using ...;
|
||||||
|
# --
|
||||||
|
using $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : using System;
|
||||||
|
# --
|
||||||
|
using System;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : using System....;
|
||||||
|
# --
|
||||||
|
using System.$1;
|
|
@ -0,0 +1,6 @@
|
||||||
|
#name : do { ... } while (...)
|
||||||
|
# --
|
||||||
|
do
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
} while (${1:condition});
|
|
@ -0,0 +1,6 @@
|
||||||
|
#name : for (...; ...; ...) { ... }
|
||||||
|
# --
|
||||||
|
for (${1:int i = 0}; ${2:i < N}; ${3:++i})
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#name : if (...) { ... }
|
||||||
|
# --
|
||||||
|
if (${1:condition})
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : #include "..."
|
||||||
|
# --
|
||||||
|
#include "$1"
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : #include <...>
|
||||||
|
# --
|
||||||
|
#include <$1>
|
|
@ -0,0 +1,7 @@
|
||||||
|
#name: int main(argc, argv) { ... }
|
||||||
|
# --
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
#name : foo { ... } ; setFoo { ... }
|
||||||
|
# --
|
||||||
|
- (${1:id})${2:foo}
|
||||||
|
{
|
||||||
|
return $2;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)set${2:$(capitalize text)}:($1)aValue
|
||||||
|
{
|
||||||
|
[$2 autorelease];
|
||||||
|
$2 = [aValue retain];
|
||||||
|
}
|
||||||
|
$0
|
|
@ -0,0 +1,8 @@
|
||||||
|
#name : #ifndef XXX; #define XXX; #endif
|
||||||
|
# --
|
||||||
|
#ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_}
|
||||||
|
#define $1
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
#endif /* $1 */
|
|
@ -0,0 +1,6 @@
|
||||||
|
#name : struct ... { ... }
|
||||||
|
# --
|
||||||
|
struct ${1:name}
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
};
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : background-color: ...
|
||||||
|
# --
|
||||||
|
background-color: #${1:DDD};
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : background-image: ...
|
||||||
|
# --
|
||||||
|
background-image: url($1);
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : border size style color
|
||||||
|
# --
|
||||||
|
border: ${1:1px} ${2:solid} #${3:999};
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : clear: ...
|
||||||
|
# --
|
||||||
|
clear: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : display: block
|
||||||
|
# --
|
||||||
|
display: block;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : display: inline
|
||||||
|
# --
|
||||||
|
display: inline;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : display: none
|
||||||
|
# --
|
||||||
|
display: none;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : font-family: ...
|
||||||
|
# --
|
||||||
|
font-family: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : font-size: ...
|
||||||
|
# --
|
||||||
|
font-size: ${12px};
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : margin-bottom: ...
|
||||||
|
# --
|
||||||
|
margin-bottom: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : margin-left: ...
|
||||||
|
# --
|
||||||
|
margin-left: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : margin: ...
|
||||||
|
# --
|
||||||
|
margin: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : margin top right bottom left
|
||||||
|
# --
|
||||||
|
margin: ${top} ${right} ${bottom} ${left};
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : margin-right: ...
|
||||||
|
# --
|
||||||
|
margin-right: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : margin-top: ...
|
||||||
|
# --
|
||||||
|
margin-top: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : padding-bottom: ...
|
||||||
|
# --
|
||||||
|
padding-bottom: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : padding-left: ...
|
||||||
|
# --
|
||||||
|
padding-left: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : padding: ...
|
||||||
|
# --
|
||||||
|
padding: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : padding: top right bottom left
|
||||||
|
# --
|
||||||
|
padding: ${top} ${right} ${bottom} ${left};
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : padding-right: ...
|
||||||
|
# --
|
||||||
|
padding-right: $1;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#contributor : rejeep <johan.rejeep@gmail.com>
|
||||||
|
#name : padding-top: ...
|
||||||
|
# --
|
||||||
|
padding-top: $1;
|
|
@ -0,0 +1,11 @@
|
||||||
|
TITLE: Emacs Idiom Template Set. Version 1. 2009-02-22
|
||||||
|
|
||||||
|
DESCRIPTION: Some useful templates for emacs lisp. This template set is based on useful elisp idioms on common tasks.
|
||||||
|
|
||||||
|
LICENSING: GPL version 3.
|
||||||
|
|
||||||
|
AUTHOR: Xah Lee
|
||||||
|
|
||||||
|
Home Page: latest version at:
|
||||||
|
• Emacs Lisp Idiom Templates
|
||||||
|
http://xahlee.org/emacs/elisp_idiom_templates.html
|
|
@ -0,0 +1,11 @@
|
||||||
|
#name : function template
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
(defun $1 ()
|
||||||
|
"thisandthat."
|
||||||
|
(interactive)
|
||||||
|
(let (var1)
|
||||||
|
(setq var1 some)
|
||||||
|
$0
|
||||||
|
)
|
||||||
|
)
|
|
@ -0,0 +1,16 @@
|
||||||
|
#name : process marked files in dired
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
;; idiom for processing a list of files in dired's marked files
|
||||||
|
|
||||||
|
;; suppose myProcessFile is your function that takes a file path
|
||||||
|
;; and do some processing on the file
|
||||||
|
|
||||||
|
(defun dired-myProcessFile ()
|
||||||
|
"apply myProcessFile function to marked files in dired."
|
||||||
|
(interactive)
|
||||||
|
(require 'dired)
|
||||||
|
(mapc 'myProcessFile (dired-get-marked-files))
|
||||||
|
)
|
||||||
|
|
||||||
|
;; to use it, type M-x dired-myProcessFile
|
|
@ -0,0 +1,17 @@
|
||||||
|
#name : a function that process a file
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
(defun doThisFile (fpath)
|
||||||
|
"Process the file at path FPATH ..."
|
||||||
|
(let ()
|
||||||
|
;; create temp buffer without undo record or font lock. (more efficient)
|
||||||
|
;; first space in temp buff name is necessary
|
||||||
|
(set-buffer (get-buffer-create " myTemp"))
|
||||||
|
(insert-file-contents fpath nil nil nil t)
|
||||||
|
|
||||||
|
;; process it ...
|
||||||
|
;; (goto-char 0) ; move to begining of file's content (in case it was open)
|
||||||
|
;; ... do something here
|
||||||
|
;; (write-file fpath) ;; write back to the file
|
||||||
|
|
||||||
|
(kill-buffer " myTemp")))
|
|
@ -0,0 +1,17 @@
|
||||||
|
#name : read lines of a file
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
(defun read-lines (filePath)
|
||||||
|
"Return a list of lines in FILEPATH."
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert-file-contents filePath)
|
||||||
|
(split-string
|
||||||
|
(buffer-string) "\n" t)) )
|
||||||
|
|
||||||
|
;; process all lines
|
||||||
|
(mapc
|
||||||
|
(lambda (aLine)
|
||||||
|
(message aLine) ; do your stuff here
|
||||||
|
)
|
||||||
|
(read-lines "inputFilePath")
|
||||||
|
)
|
|
@ -0,0 +1,17 @@
|
||||||
|
#name : find and replace on region
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
(defun replace-html-chars-region (start end)
|
||||||
|
"Replace “<” to “<” and other chars in HTML.
|
||||||
|
This works on the current region."
|
||||||
|
(interactive "r")
|
||||||
|
(save-restriction
|
||||||
|
(narrow-to-region start end)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while (search-forward "&" nil t) (replace-match "&" nil t))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while (search-forward "<" nil t) (replace-match "<" nil t))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while (search-forward ">" nil t) (replace-match ">" nil t))
|
||||||
|
)
|
||||||
|
)
|
|
@ -0,0 +1,4 @@
|
||||||
|
#name : grab buffer substring
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
(setq $0 (buffer-substring-no-properties myStartPos myEndPos))
|
|
@ -0,0 +1,4 @@
|
||||||
|
#name : grab word under cursor
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
(setq $0 (thing-at-point 'symbol))
|
|
@ -0,0 +1,6 @@
|
||||||
|
#name : traversing a directory
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
;; apply a function to all files in a dir
|
||||||
|
(require 'find-lisp)
|
||||||
|
(mapc 'my-process-file (find-lisp-find-files "~/myweb/" "\\.html$"))
|
|
@ -0,0 +1,27 @@
|
||||||
|
#name : Command that works on region or word
|
||||||
|
#contributor : Xah Lee
|
||||||
|
# --
|
||||||
|
;; example of a command that works on current word or text selection
|
||||||
|
(defun down-case-word-or-region ()
|
||||||
|
"Lower case the current word or text selection."
|
||||||
|
(interactive)
|
||||||
|
(let (pos1 pos2 meat)
|
||||||
|
(if (and transient-mark-mode mark-active)
|
||||||
|
(setq pos1 (region-beginning)
|
||||||
|
pos2 (region-end))
|
||||||
|
(setq pos1 (car (bounds-of-thing-at-point 'symbol))
|
||||||
|
pos2 (cdr (bounds-of-thing-at-point 'symbol))))
|
||||||
|
|
||||||
|
; now, pos1 and pos2 are the starting and ending positions
|
||||||
|
; of the current word, or current text selection if exists
|
||||||
|
|
||||||
|
;; put your code here.
|
||||||
|
$0
|
||||||
|
;; Some example of things you might want to do
|
||||||
|
(downcase-region pos1 pos2) ; example of a func that takes region as args
|
||||||
|
(setq meat (buffer-substring-no-properties pos1 pos2)) ; grab the text.
|
||||||
|
(delete-region pos1 pos2) ; get rid of it
|
||||||
|
(insert "newText") ; insert your new text
|
||||||
|
|
||||||
|
)
|
||||||
|
)
|
|
@ -0,0 +1,3 @@
|
||||||
|
#name : (user's email)
|
||||||
|
# --
|
||||||
|
`(replace-regexp-in-string "@" "@NOSPAM." user-mail-address)`
|
|
@ -0,0 +1,4 @@
|
||||||
|
#name : after ... ->
|
||||||
|
# --
|
||||||
|
after
|
||||||
|
$1 -> $0
|
|
@ -0,0 +1,5 @@
|
||||||
|
#name : begin ... end
|
||||||
|
# --
|
||||||
|
begin
|
||||||
|
$0
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
#name : -behaviour(...).
|
||||||
|
# --
|
||||||
|
-behaviour(${1:gen_server}).
|
||||||
|
$0
|
|
@ -0,0 +1,5 @@
|
||||||
|
#name : case ... of ... end
|
||||||
|
# --
|
||||||
|
case $1 of
|
||||||
|
$0
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
#name : -compile(...).
|
||||||
|
# --
|
||||||
|
-compile([${1:export_all}]).
|
||||||
|
$0
|
|
@ -0,0 +1,4 @@
|
||||||
|
#name : -define(...,...).
|
||||||
|
# --
|
||||||
|
-define($1,$2).
|
||||||
|
$0
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue