Merge branch 'master' of git.barakmich.com:barak/dotfiles
|
|
@ -30,3 +30,6 @@ if [ -n "$BASH_VERSION" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Added by ~/.emacs.d/install.sh
|
||||
export PATH=$HOME/.cask/bin:$PATH
|
||||
|
|
|
|||
17
.emacs.d/Cask
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(source gnu)
|
||||
(source melpa)
|
||||
(source marmalade)
|
||||
(source org)
|
||||
|
||||
(depends-on "ack-and-a-half")
|
||||
(depends-on "cask")
|
||||
(depends-on "elpy")
|
||||
(depends-on "evil")
|
||||
(depends-on "exec-path-from-shell")
|
||||
(depends-on "flx-ido")
|
||||
(depends-on "flycheck")
|
||||
(depends-on "magit")
|
||||
(depends-on "pallet")
|
||||
(depends-on "projectile")
|
||||
(depends-on "yasnippet")
|
||||
(depends-on "zenburn-theme")
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
VERSION=`perl -ne 'print $$1 if /;; Version: (.*)/' auto-complete.el`
|
||||
PACKAGE=auto-complete-${VERSION}
|
||||
|
||||
byte-compile:
|
||||
emacs -Q -L . -batch -f batch-byte-compile *.el
|
||||
|
||||
install:
|
||||
emacs -Q -L . -batch -l etc/install ${DIR}
|
||||
|
||||
clean:
|
||||
rm -f *.elc
|
||||
rm -f doc/*.html
|
||||
rm -rf ${PACKAGE}
|
||||
rm -f ${PACKAGE}.zip ${PACKAGE}.tar.bz2
|
||||
|
||||
package: clean
|
||||
mkdir ${PACKAGE}
|
||||
cp -r *.el Makefile README.txt TODO.txt doc etc dict ${PACKAGE}
|
||||
|
||||
tar.bz2: package
|
||||
tar cjf ${PACKAGE}.tar.bz2 ${PACKAGE}
|
||||
|
||||
zip: package
|
||||
zip -r ${PACKAGE}.zip ${PACKAGE}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Auto Complete Mode
|
||||
==================
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
* http://cx4a.org/software/auto-complete/
|
||||
* doc/index.txt
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Auto Complete Mode is distributed under the term of GPLv3. And its documentations under doc directory is distributed under the term of GFDL.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
- etags, ctags
|
||||
- emacswiki
|
||||
- test facility
|
||||
- support composed chars
|
||||
- minibuffer completion
|
||||
- performance issue (cache issue)
|
||||
- asynchronous processing
|
||||
- kanji henkan support
|
||||
- create menu if needed
|
||||
- quick help positioning on tabs (bug)
|
||||
|
|
@ -1,480 +0,0 @@
|
|||
;;; auto-complete-config.el --- auto-complete additional configuations
|
||||
|
||||
;; Copyright (C) 2009, 2010 Tomohiro Matsuyama
|
||||
|
||||
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
|
||||
;; Keywords: convenience
|
||||
;; Version: 1.3
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
|
||||
(require 'auto-complete)
|
||||
|
||||
|
||||
|
||||
;;;; Additional sources
|
||||
|
||||
;; imenu
|
||||
|
||||
(defvar ac-imenu-index nil)
|
||||
|
||||
(ac-clear-variable-every-10-minutes 'ac-imenu-index)
|
||||
|
||||
(defun ac-imenu-candidates ()
|
||||
(loop with i = 0
|
||||
with stack = (progn
|
||||
(unless (local-variable-p 'ac-imenu-index)
|
||||
(make-local-variable 'ac-imenu-index))
|
||||
(or ac-imenu-index
|
||||
(setq ac-imenu-index
|
||||
(ignore-errors
|
||||
(with-no-warnings
|
||||
(imenu--make-index-alist))))))
|
||||
with result
|
||||
while (and stack (or (not (integerp ac-limit))
|
||||
(< i ac-limit)))
|
||||
for node = (pop stack)
|
||||
if (consp node)
|
||||
do
|
||||
(let ((car (car node))
|
||||
(cdr (cdr node)))
|
||||
(if (consp cdr)
|
||||
(mapc (lambda (child)
|
||||
(push child stack))
|
||||
cdr)
|
||||
(when (and (stringp car)
|
||||
(string-match (concat "^" (regexp-quote ac-prefix)) car))
|
||||
;; Remove extra characters
|
||||
(if (string-match "^.*\\(()\\|=\\|<>\\)$" car)
|
||||
(setq car (substring car 0 (match-beginning 1))))
|
||||
(push car result)
|
||||
(incf i))))
|
||||
finally return (nreverse result)))
|
||||
|
||||
(ac-define-source imenu
|
||||
'((depends imenu)
|
||||
(candidates . ac-imenu-candidates)
|
||||
(symbol . "s")))
|
||||
|
||||
;; gtags
|
||||
|
||||
(defface ac-gtags-candidate-face
|
||||
'((t (:background "lightgray" :foreground "navy")))
|
||||
"Face for gtags candidate"
|
||||
:group 'auto-complete)
|
||||
|
||||
(defface ac-gtags-selection-face
|
||||
'((t (:background "navy" :foreground "white")))
|
||||
"Face for the gtags selected candidate."
|
||||
:group 'auto-complete)
|
||||
|
||||
(defun ac-gtags-candidate ()
|
||||
(ignore-errors
|
||||
(split-string (shell-command-to-string (format "global -ci %s" ac-prefix)) "\n")))
|
||||
|
||||
(ac-define-source gtags
|
||||
'((candidates . ac-gtags-candidate)
|
||||
(candidate-face . ac-gtags-candidate-face)
|
||||
(selection-face . ac-gtags-selection-face)
|
||||
(requires . 3)
|
||||
(symbol . "s")))
|
||||
|
||||
;; yasnippet
|
||||
|
||||
(defface ac-yasnippet-candidate-face
|
||||
'((t (:background "sandybrown" :foreground "black")))
|
||||
"Face for yasnippet candidate."
|
||||
:group 'auto-complete)
|
||||
|
||||
(defface ac-yasnippet-selection-face
|
||||
'((t (:background "coral3" :foreground "white")))
|
||||
"Face for the yasnippet selected candidate."
|
||||
:group 'auto-complete)
|
||||
|
||||
(defun ac-yasnippet-table-hash (table)
|
||||
(cond
|
||||
((fboundp 'yas/snippet-table-hash)
|
||||
(yas/snippet-table-hash table))
|
||||
((fboundp 'yas/table-hash)
|
||||
(yas/table-hash table))))
|
||||
|
||||
(defun ac-yasnippet-table-parent (table)
|
||||
(cond
|
||||
((fboundp 'yas/snippet-table-parent)
|
||||
(yas/snippet-table-parent table))
|
||||
((fboundp 'yas/table-parent)
|
||||
(yas/table-parent table))))
|
||||
|
||||
(defun ac-yasnippet-candidate-1 (table)
|
||||
(with-no-warnings
|
||||
(let ((hashtab (ac-yasnippet-table-hash table))
|
||||
(parent (ac-yasnippet-table-parent table))
|
||||
candidates)
|
||||
(maphash (lambda (key value)
|
||||
(push key candidates))
|
||||
hashtab)
|
||||
(setq candidates (all-completions ac-prefix (nreverse candidates)))
|
||||
(if parent
|
||||
(setq candidates
|
||||
(append candidates (ac-yasnippet-candidate-1 parent))))
|
||||
candidates)))
|
||||
|
||||
(defun ac-yasnippet-candidates ()
|
||||
(with-no-warnings
|
||||
(if (fboundp 'yas/get-snippet-tables)
|
||||
;; >0.6.0
|
||||
(apply 'append (mapcar 'ac-yasnippet-candidate-1 (yas/get-snippet-tables major-mode)))
|
||||
(let ((table
|
||||
(if (fboundp 'yas/snippet-table)
|
||||
;; <0.6.0
|
||||
(yas/snippet-table major-mode)
|
||||
;; 0.6.0
|
||||
(yas/current-snippet-table))))
|
||||
(if table
|
||||
(ac-yasnippet-candidate-1 table))))))
|
||||
|
||||
(ac-define-source yasnippet
|
||||
'((depends yasnippet)
|
||||
(candidates . ac-yasnippet-candidates)
|
||||
(action . yas/expand)
|
||||
(candidate-face . ac-yasnippet-candidate-face)
|
||||
(selection-face . ac-yasnippet-selection-face)
|
||||
(symbol . "a")))
|
||||
|
||||
;; semantic
|
||||
|
||||
(defun ac-semantic-candidates (prefix)
|
||||
(with-no-warnings
|
||||
(delete "" ; semantic sometimes returns an empty string
|
||||
(mapcar 'semantic-tag-name
|
||||
(ignore-errors
|
||||
(or (semantic-analyze-possible-completions
|
||||
(semantic-analyze-current-context))
|
||||
(senator-find-tag-for-completion prefix)))))))
|
||||
|
||||
(ac-define-source semantic
|
||||
'((available . (or (require 'semantic-ia nil t)
|
||||
(require 'semantic/ia nil t)))
|
||||
(candidates . (ac-semantic-candidates ac-prefix))
|
||||
(prefix . c-dot-ref)
|
||||
(requires . 0)
|
||||
(symbol . "m")))
|
||||
|
||||
(ac-define-source semantic-raw
|
||||
'((available . (or (require 'semantic-ia nil t)
|
||||
(require 'semantic/ia nil t)))
|
||||
(candidates . (ac-semantic-candidates ac-prefix))
|
||||
(symbol . "s")))
|
||||
|
||||
;; eclim
|
||||
|
||||
(defun ac-eclim-candidates ()
|
||||
(with-no-warnings
|
||||
(loop for c in (eclim/java-complete)
|
||||
collect (nth 1 c))))
|
||||
|
||||
(ac-define-source eclim
|
||||
'((candidates . ac-eclim-candidates)
|
||||
(prefix . c-dot)
|
||||
(requires . 0)
|
||||
(symbol . "f")))
|
||||
|
||||
;; css
|
||||
|
||||
;; Copied from company-css.el
|
||||
(defconst ac-css-property-alist
|
||||
;; see http://www.w3.org/TR/CSS21/propidx.html
|
||||
'(("azimuth" angle "left-side" "far-left" "left" "center-left" "center"
|
||||
"center-right" "right" "far-right" "right-side" "behind" "leftwards"
|
||||
"rightwards")
|
||||
("background" background-color background-image background-repeat
|
||||
background-attachment background-position)
|
||||
("background-attachment" "scroll" "fixed")
|
||||
("background-color" color "transparent")
|
||||
("background-image" uri "none")
|
||||
("background-position" percentage length "left" "center" "right" percentage
|
||||
length "top" "center" "bottom" "left" "center" "right" "top" "center"
|
||||
"bottom")
|
||||
("background-repeat" "repeat" "repeat-x" "repeat-y" "no-repeat")
|
||||
("border" border-width border-style border-color)
|
||||
("border-bottom" border)
|
||||
("border-bottom-color" border-color)
|
||||
("border-bottom-style" border-style)
|
||||
("border-bottom-width" border-width)
|
||||
("border-collapse" "collapse" "separate")
|
||||
("border-color" color "transparent")
|
||||
("border-left" border)
|
||||
("border-left-color" border-color)
|
||||
("border-left-style" border-style)
|
||||
("border-left-width" border-width)
|
||||
("border-right" border)
|
||||
("border-right-color" border-color)
|
||||
("border-right-style" border-style)
|
||||
("border-right-width" border-width)
|
||||
("border-spacing" length length)
|
||||
("border-style" border-style)
|
||||
("border-top" border)
|
||||
("border-top-color" border-color)
|
||||
("border-top-style" border-style)
|
||||
("border-top-width" border-width)
|
||||
("border-width" border-width)
|
||||
("bottom" length percentage "auto")
|
||||
("caption-side" "top" "bottom")
|
||||
("clear" "none" "left" "right" "both")
|
||||
("clip" shape "auto")
|
||||
("color" color)
|
||||
("content" "normal" "none" string uri counter "attr()" "open-quote"
|
||||
"close-quote" "no-open-quote" "no-close-quote")
|
||||
("counter-increment" identifier integer "none")
|
||||
("counter-reset" identifier integer "none")
|
||||
("cue" cue-before cue-after)
|
||||
("cue-after" uri "none")
|
||||
("cue-before" uri "none")
|
||||
("cursor" uri "*" "auto" "crosshair" "default" "pointer" "move" "e-resize"
|
||||
"ne-resize" "nw-resize" "n-resize" "se-resize" "sw-resize" "s-resize"
|
||||
"w-resize" "text" "wait" "help" "progress")
|
||||
("direction" "ltr" "rtl")
|
||||
("display" "inline" "block" "list-item" "run-in" "inline-block" "table"
|
||||
"inline-table" "table-row-group" "table-header-group" "table-footer-group"
|
||||
"table-row" "table-column-group" "table-column" "table-cell"
|
||||
"table-caption" "none")
|
||||
("elevation" angle "below" "level" "above" "higher" "lower")
|
||||
("empty-cells" "show" "hide")
|
||||
("float" "left" "right" "none")
|
||||
("font" font-style font-variant font-weight font-size "/" line-height
|
||||
font-family "caption" "icon" "menu" "message-box" "small-caption"
|
||||
"status-bar")
|
||||
("font-family" family-name generic-family)
|
||||
("font-size" absolute-size relative-size length percentage)
|
||||
("font-style" "normal" "italic" "oblique")
|
||||
("font-variant" "normal" "small-caps")
|
||||
("font-weight" "normal" "bold" "bolder" "lighter" "100" "200" "300" "400"
|
||||
"500" "600" "700" "800" "900")
|
||||
("height" length percentage "auto")
|
||||
("left" length percentage "auto")
|
||||
("letter-spacing" "normal" length)
|
||||
("line-height" "normal" number length percentage)
|
||||
("list-style" list-style-type list-style-position list-style-image)
|
||||
("list-style-image" uri "none")
|
||||
("list-style-position" "inside" "outside")
|
||||
("list-style-type" "disc" "circle" "square" "decimal" "decimal-leading-zero"
|
||||
"lower-roman" "upper-roman" "lower-greek" "lower-latin" "upper-latin"
|
||||
"armenian" "georgian" "lower-alpha" "upper-alpha" "none")
|
||||
("margin" margin-width)
|
||||
("margin-bottom" margin-width)
|
||||
("margin-left" margin-width)
|
||||
("margin-right" margin-width)
|
||||
("margin-top" margin-width)
|
||||
("max-height" length percentage "none")
|
||||
("max-width" length percentage "none")
|
||||
("min-height" length percentage)
|
||||
("min-width" length percentage)
|
||||
("orphans" integer)
|
||||
("outline" outline-color outline-style outline-width)
|
||||
("outline-color" color "invert")
|
||||
("outline-style" border-style)
|
||||
("outline-width" border-width)
|
||||
("overflow" "visible" "hidden" "scroll" "auto")
|
||||
("padding" padding-width)
|
||||
("padding-bottom" padding-width)
|
||||
("padding-left" padding-width)
|
||||
("padding-right" padding-width)
|
||||
("padding-top" padding-width)
|
||||
("page-break-after" "auto" "always" "avoid" "left" "right")
|
||||
("page-break-before" "auto" "always" "avoid" "left" "right")
|
||||
("page-break-inside" "avoid" "auto")
|
||||
("pause" time percentage)
|
||||
("pause-after" time percentage)
|
||||
("pause-before" time percentage)
|
||||
("pitch" frequency "x-low" "low" "medium" "high" "x-high")
|
||||
("pitch-range" number)
|
||||
("play-during" uri "mix" "repeat" "auto" "none")
|
||||
("position" "static" "relative" "absolute" "fixed")
|
||||
("quotes" string string "none")
|
||||
("richness" number)
|
||||
("right" length percentage "auto")
|
||||
("speak" "normal" "none" "spell-out")
|
||||
("speak-header" "once" "always")
|
||||
("speak-numeral" "digits" "continuous")
|
||||
("speak-punctuation" "code" "none")
|
||||
("speech-rate" number "x-slow" "slow" "medium" "fast" "x-fast" "faster"
|
||||
"slower")
|
||||
("stress" number)
|
||||
("table-layout" "auto" "fixed")
|
||||
("text-align" "left" "right" "center" "justify")
|
||||
("text-decoration" "none" "underline" "overline" "line-through" "blink")
|
||||
("text-indent" length percentage)
|
||||
("text-transform" "capitalize" "uppercase" "lowercase" "none")
|
||||
("top" length percentage "auto")
|
||||
("unicode-bidi" "normal" "embed" "bidi-override")
|
||||
("vertical-align" "baseline" "sub" "super" "top" "text-top" "middle"
|
||||
"bottom" "text-bottom" percentage length)
|
||||
("visibility" "visible" "hidden" "collapse")
|
||||
("voice-family" specific-voice generic-voice "*" specific-voice
|
||||
generic-voice)
|
||||
("volume" number percentage "silent" "x-soft" "soft" "medium" "loud"
|
||||
"x-loud")
|
||||
("white-space" "normal" "pre" "nowrap" "pre-wrap" "pre-line")
|
||||
("widows" integer)
|
||||
("width" length percentage "auto")
|
||||
("word-spacing" "normal" length)
|
||||
("z-index" "auto" integer))
|
||||
"A list of CSS properties and their possible values.")
|
||||
|
||||
(defconst ac-css-value-classes
|
||||
'((absolute-size "xx-small" "x-small" "small" "medium" "large" "x-large"
|
||||
"xx-large")
|
||||
(border-style "none" "hidden" "dotted" "dashed" "solid" "double" "groove"
|
||||
"ridge" "inset" "outset")
|
||||
(color "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon" "navy"
|
||||
"olive" "orange" "purple" "red" "silver" "teal" "white" "yellow"
|
||||
"rgb")
|
||||
(counter "counter")
|
||||
(family-name "Courier" "Helvetica" "Times")
|
||||
(generic-family "serif" "sans-serif" "cursive" "fantasy" "monospace")
|
||||
(generic-voice "male" "female" "child")
|
||||
(margin-width "auto") ;; length percentage
|
||||
(relative-size "larger" "smaller")
|
||||
(shape "rect")
|
||||
(uri "url"))
|
||||
"A list of CSS property value classes and their contents.")
|
||||
|
||||
(defconst ac-css-pseudo-classes
|
||||
'("active" "after" "before" "first" "first-child" "first-letter" "first-line"
|
||||
"focus" "hover" "lang" "left" "link" "right" "visited")
|
||||
"Identifiers for CSS pseudo-elements and pseudo-classes.")
|
||||
|
||||
(defvar ac-css-property nil
|
||||
"Current editing property.")
|
||||
|
||||
(defun ac-css-prefix ()
|
||||
(when (save-excursion (re-search-backward "\\_<\\(.+?\\)\\_>\\s *:.*\\=" nil t))
|
||||
(setq ac-css-property (match-string 1))
|
||||
(or (ac-prefix-symbol) (point))))
|
||||
|
||||
(defun ac-css-property-candidates ()
|
||||
(or (loop with list = (assoc-default ac-css-property ac-css-property-alist)
|
||||
with value
|
||||
while (setq value (pop list))
|
||||
if (symbolp value)
|
||||
do (setq list
|
||||
(append list
|
||||
(or (assoc-default value ac-css-value-classes)
|
||||
(assoc-default (symbol-name value) ac-css-property-alist))))
|
||||
else collect value)
|
||||
ac-css-pseudo-classes))
|
||||
|
||||
(defvar ac-source-css-property
|
||||
'((candidates . ac-css-property-candidates)
|
||||
(prefix . ac-css-prefix)
|
||||
(requires . 0)))
|
||||
|
||||
|
||||
|
||||
;;;; Not maintained sources
|
||||
|
||||
;; ropemacs
|
||||
|
||||
(defvar ac-ropemacs-loaded nil)
|
||||
(defun ac-ropemacs-require ()
|
||||
(with-no-warnings
|
||||
(unless ac-ropemacs-loaded
|
||||
(pymacs-load "ropemacs" "rope-")
|
||||
(if (boundp 'ropemacs-enable-autoimport)
|
||||
(setq ropemacs-enable-autoimport t))
|
||||
(setq ac-ropemacs-loaded t))))
|
||||
|
||||
(defun ac-ropemacs-setup ()
|
||||
(ac-ropemacs-require)
|
||||
;(setq ac-sources (append (list 'ac-source-ropemacs) ac-sources))
|
||||
(setq ac-omni-completion-sources '(("\\." ac-source-ropemacs))))
|
||||
|
||||
(defun ac-ropemacs-initialize ()
|
||||
(autoload 'pymacs-apply "pymacs")
|
||||
(autoload 'pymacs-call "pymacs")
|
||||
(autoload 'pymacs-eval "pymacs" nil t)
|
||||
(autoload 'pymacs-exec "pymacs" nil t)
|
||||
(autoload 'pymacs-load "pymacs" nil t)
|
||||
(add-hook 'python-mode-hook 'ac-ropemacs-setup)
|
||||
t)
|
||||
|
||||
(defvar ac-ropemacs-completions-cache nil)
|
||||
(defvar ac-source-ropemacs
|
||||
'((init
|
||||
. (lambda ()
|
||||
(setq ac-ropemacs-completions-cache
|
||||
(mapcar
|
||||
(lambda (completion)
|
||||
(concat ac-prefix completion))
|
||||
(ignore-errors
|
||||
(rope-completions))))))
|
||||
(candidates . ac-ropemacs-completions-cache)))
|
||||
|
||||
;; rcodetools
|
||||
|
||||
(defvar ac-source-rcodetools
|
||||
'((init . (lambda ()
|
||||
(require 'rcodetools)
|
||||
(condition-case x
|
||||
(save-excursion
|
||||
(rct-exec-and-eval rct-complete-command-name "--completion-emacs-icicles"))
|
||||
(error) (setq rct-method-completion-table nil))))
|
||||
(candidates . (lambda ()
|
||||
(all-completions
|
||||
ac-prefix
|
||||
(mapcar
|
||||
(lambda (completion)
|
||||
(replace-regexp-in-string "\t.*$" "" (car completion)))
|
||||
rct-method-completion-table))))))
|
||||
|
||||
|
||||
|
||||
;;;; Default settings
|
||||
|
||||
(defun ac-common-setup ()
|
||||
(add-to-list 'ac-sources 'ac-source-filename))
|
||||
|
||||
(defun ac-emacs-lisp-mode-setup ()
|
||||
(setq ac-sources (append '(ac-source-features ac-source-functions ac-source-yasnippet ac-source-variables ac-source-symbols) ac-sources)))
|
||||
|
||||
(defun ac-cc-mode-setup ()
|
||||
(setq ac-sources (append '(ac-source-yasnippet ac-source-gtags) ac-sources)))
|
||||
|
||||
(defun ac-ruby-mode-setup ()
|
||||
(make-local-variable 'ac-ignores)
|
||||
(add-to-list 'ac-ignores "end"))
|
||||
|
||||
(defun ac-css-mode-setup ()
|
||||
(setq ac-sources (append '(ac-source-css-property) ac-sources)))
|
||||
|
||||
(defun ac-config-default ()
|
||||
(setq-default ac-sources '(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
|
||||
(add-hook 'emacs-lisp-mode-hook 'ac-emacs-lisp-mode-setup)
|
||||
(add-hook 'c-mode-common-hook 'ac-cc-mode-setup)
|
||||
(add-hook 'ruby-mode-hook 'ac-ruby-mode-setup)
|
||||
(add-hook 'css-mode-hook 'ac-css-mode-setup)
|
||||
(add-hook 'auto-complete-mode-hook 'ac-common-setup)
|
||||
(global-auto-complete-mode t))
|
||||
|
||||
(provide 'auto-complete-config)
|
||||
;;; auto-complete-config.el ends here
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
and
|
||||
and_eq
|
||||
asm
|
||||
auto
|
||||
bitand
|
||||
bitor
|
||||
bool
|
||||
break
|
||||
case
|
||||
catch
|
||||
char
|
||||
class
|
||||
compl
|
||||
const
|
||||
const_cast
|
||||
continue
|
||||
default
|
||||
delete
|
||||
do
|
||||
double
|
||||
dynamic_cast
|
||||
else
|
||||
enum
|
||||
explicit
|
||||
export
|
||||
extern
|
||||
false
|
||||
float
|
||||
for
|
||||
friend
|
||||
goto
|
||||
if
|
||||
inline
|
||||
int
|
||||
long
|
||||
mutable
|
||||
namespace
|
||||
new
|
||||
not
|
||||
not_eq
|
||||
operator
|
||||
or
|
||||
or_eq
|
||||
private
|
||||
protected
|
||||
public
|
||||
register
|
||||
reinterpret_cast
|
||||
return
|
||||
short
|
||||
signed
|
||||
sizeof
|
||||
static
|
||||
static_cast
|
||||
struct
|
||||
switch
|
||||
template
|
||||
this
|
||||
throw
|
||||
true
|
||||
try
|
||||
typedef
|
||||
typeid
|
||||
typename
|
||||
union
|
||||
unsigned
|
||||
using
|
||||
virtual
|
||||
void
|
||||
volatile
|
||||
wchar_t
|
||||
while
|
||||
xor
|
||||
xor_eq
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
auto
|
||||
_Bool
|
||||
break
|
||||
case
|
||||
char
|
||||
_Complex
|
||||
const
|
||||
continue
|
||||
default
|
||||
do
|
||||
double
|
||||
else
|
||||
enum
|
||||
extern
|
||||
float
|
||||
for
|
||||
goto
|
||||
if
|
||||
_Imaginary
|
||||
inline
|
||||
int
|
||||
long
|
||||
register
|
||||
restrict
|
||||
return
|
||||
short
|
||||
signed
|
||||
sizeof
|
||||
static
|
||||
struct
|
||||
switch
|
||||
typedef
|
||||
union
|
||||
unsigned
|
||||
void
|
||||
volatile
|
||||
while
|
||||
|
|
@ -1,475 +0,0 @@
|
|||
*agent*
|
||||
*clojure-version*
|
||||
*command-line-args*
|
||||
*compile-files*
|
||||
*compile-path*
|
||||
*err*
|
||||
*file*
|
||||
*flush-on-newline*
|
||||
*in*
|
||||
*ns*
|
||||
*out*
|
||||
*print-dup*
|
||||
*print-length*
|
||||
*print-level*
|
||||
*print-meta*
|
||||
*print-readably*
|
||||
*read-eval*
|
||||
*warn-on-reflection*
|
||||
accessor
|
||||
aclone
|
||||
add-classpath
|
||||
add-watch
|
||||
agent
|
||||
agent-error
|
||||
agent-errors
|
||||
aget
|
||||
alength
|
||||
alias
|
||||
all-ns
|
||||
alter
|
||||
alter-meta!
|
||||
alter-var-root
|
||||
amap
|
||||
ancestors
|
||||
and
|
||||
apply
|
||||
areduce
|
||||
array-map
|
||||
aset
|
||||
aset-boolean
|
||||
aset-byte
|
||||
aset-char
|
||||
aset-double
|
||||
aset-float
|
||||
aset-int
|
||||
aset-long
|
||||
aset-short
|
||||
assert
|
||||
assoc
|
||||
assoc!
|
||||
assoc-in
|
||||
associative?
|
||||
atom
|
||||
await
|
||||
await-for
|
||||
bases
|
||||
bean
|
||||
bigdec
|
||||
bigint
|
||||
binding
|
||||
bit-and
|
||||
bit-and-not
|
||||
bit-clear
|
||||
bit-flip
|
||||
bit-not
|
||||
bit-or
|
||||
bit-set
|
||||
bit-shift-left
|
||||
bit-shift-right
|
||||
bit-test
|
||||
bit-xor
|
||||
boolean
|
||||
boolean-array
|
||||
booleans
|
||||
bound-fn
|
||||
bound-fn*
|
||||
butlast
|
||||
byte
|
||||
byte-array
|
||||
bytes
|
||||
case
|
||||
cast
|
||||
char
|
||||
char-array
|
||||
char-escape-string
|
||||
char-name-string
|
||||
char?
|
||||
chars
|
||||
class
|
||||
class?
|
||||
clear-agent-errors
|
||||
clojure-version
|
||||
coll?
|
||||
comment
|
||||
commute
|
||||
comp
|
||||
comparator
|
||||
compare
|
||||
compare-and-set!
|
||||
compile
|
||||
complement
|
||||
concat
|
||||
cond
|
||||
condp
|
||||
conj
|
||||
conj!
|
||||
cons
|
||||
constantly
|
||||
construct-proxy
|
||||
contains?
|
||||
count
|
||||
counted?
|
||||
create-ns
|
||||
create-struct
|
||||
cycle
|
||||
dec
|
||||
decimal?
|
||||
declare
|
||||
definline
|
||||
defmacro
|
||||
defmethod
|
||||
defmulti
|
||||
defn
|
||||
defn-
|
||||
defonce
|
||||
defprotocol
|
||||
defstruct
|
||||
deftype
|
||||
delay
|
||||
delay?
|
||||
deliver
|
||||
deref
|
||||
derive
|
||||
descendants
|
||||
disj
|
||||
disj!
|
||||
dissoc
|
||||
dissoc!
|
||||
distinct
|
||||
distinct?
|
||||
doall
|
||||
doc
|
||||
dorun
|
||||
doseq
|
||||
dosync
|
||||
dotimes
|
||||
doto
|
||||
double
|
||||
double-array
|
||||
doubles
|
||||
drop
|
||||
drop-last
|
||||
drop-while
|
||||
dtype
|
||||
empty
|
||||
empty?
|
||||
ensure
|
||||
enumeration-seq
|
||||
error-handler
|
||||
error-mode
|
||||
eval
|
||||
even?
|
||||
every?
|
||||
extend
|
||||
extend-class
|
||||
extend-protocol
|
||||
extend-type
|
||||
extenders
|
||||
extends?
|
||||
false?
|
||||
ffirst
|
||||
file-seq
|
||||
filter
|
||||
find
|
||||
find-doc
|
||||
find-ns
|
||||
find-var
|
||||
first
|
||||
float
|
||||
float-array
|
||||
float?
|
||||
floats
|
||||
flush
|
||||
fn
|
||||
fn?
|
||||
fnext
|
||||
for
|
||||
force
|
||||
format
|
||||
future
|
||||
future-call
|
||||
future-cancel
|
||||
future-cancelled?
|
||||
future-done?
|
||||
future?
|
||||
gen-class
|
||||
gen-interface
|
||||
gensym
|
||||
get
|
||||
get-in
|
||||
get-method
|
||||
get-proxy-class
|
||||
get-thread-bindings
|
||||
get-validator
|
||||
hash
|
||||
hash-map
|
||||
hash-set
|
||||
identical?
|
||||
identity
|
||||
if-let
|
||||
if-not
|
||||
ifn?
|
||||
import
|
||||
in-ns
|
||||
inc
|
||||
init-proxy
|
||||
instance?
|
||||
int
|
||||
int-array
|
||||
integer?
|
||||
interleave
|
||||
intern
|
||||
interpose
|
||||
into
|
||||
into-array
|
||||
ints
|
||||
io!
|
||||
isa?
|
||||
iterate
|
||||
iterator-seq
|
||||
juxt
|
||||
key
|
||||
keys
|
||||
keyword
|
||||
keyword?
|
||||
last
|
||||
lazy-cat
|
||||
lazy-seq
|
||||
let
|
||||
letfn
|
||||
line-seq
|
||||
list
|
||||
list*
|
||||
list?
|
||||
load
|
||||
load-file
|
||||
load-reader
|
||||
load-string
|
||||
loaded-libs
|
||||
locking
|
||||
long
|
||||
long-array
|
||||
longs
|
||||
loop
|
||||
macroexpand
|
||||
macroexpand-1
|
||||
make-array
|
||||
make-hierarchy
|
||||
map
|
||||
map?
|
||||
mapcat
|
||||
max
|
||||
max-key
|
||||
memfn
|
||||
memoize
|
||||
merge
|
||||
merge-with
|
||||
meta
|
||||
methods
|
||||
min
|
||||
min-key
|
||||
mod
|
||||
name
|
||||
namespace
|
||||
neg?
|
||||
newline
|
||||
next
|
||||
nfirst
|
||||
nil?
|
||||
nnext
|
||||
not
|
||||
not-any?
|
||||
not-empty
|
||||
not-every?
|
||||
not=
|
||||
ns
|
||||
ns-aliases
|
||||
ns-imports
|
||||
ns-interns
|
||||
ns-map
|
||||
ns-name
|
||||
ns-publics
|
||||
ns-refers
|
||||
ns-resolve
|
||||
ns-unalias
|
||||
ns-unmap
|
||||
nth
|
||||
nthnext
|
||||
num
|
||||
number?
|
||||
object-array
|
||||
odd?
|
||||
or
|
||||
parents
|
||||
partial
|
||||
partition
|
||||
pcalls
|
||||
peek
|
||||
persistent!
|
||||
pmap
|
||||
pop
|
||||
pop!
|
||||
pop-thread-bindings
|
||||
pos?
|
||||
pr
|
||||
pr-str
|
||||
prefer-method
|
||||
prefers
|
||||
print
|
||||
print-namespace-doc
|
||||
print-str
|
||||
printf
|
||||
println
|
||||
println-str
|
||||
prn
|
||||
prn-str
|
||||
promise
|
||||
proxy
|
||||
proxy-mappings
|
||||
proxy-super
|
||||
push-thread-bindings
|
||||
pvalues
|
||||
quot
|
||||
rand
|
||||
rand-int
|
||||
range
|
||||
ratio?
|
||||
rationalize
|
||||
re-find
|
||||
re-groups
|
||||
re-matcher
|
||||
re-matches
|
||||
re-pattern
|
||||
re-seq
|
||||
read
|
||||
read-line
|
||||
read-string
|
||||
reduce
|
||||
ref
|
||||
ref-history-count
|
||||
ref-max-history
|
||||
ref-min-history
|
||||
ref-set
|
||||
refer
|
||||
refer-clojure
|
||||
reify
|
||||
release-pending-sends
|
||||
rem
|
||||
remove
|
||||
remove-method
|
||||
remove-ns
|
||||
remove-watch
|
||||
repeat
|
||||
repeatedly
|
||||
replace
|
||||
replicate
|
||||
require
|
||||
reset!
|
||||
reset-meta!
|
||||
resolve
|
||||
rest
|
||||
restart-agent
|
||||
resultset-seq
|
||||
reverse
|
||||
reversible?
|
||||
rseq
|
||||
rsubseq
|
||||
satisfies?
|
||||
second
|
||||
select-keys
|
||||
send
|
||||
send-off
|
||||
seq
|
||||
seq?
|
||||
seque
|
||||
sequence
|
||||
sequential?
|
||||
set
|
||||
set-error-handler!
|
||||
set-error-mode!
|
||||
set-validator!
|
||||
set?
|
||||
short
|
||||
short-array
|
||||
shorts
|
||||
shutdown-agents
|
||||
slurp
|
||||
some
|
||||
sort
|
||||
sort-by
|
||||
sorted-map
|
||||
sorted-map-by
|
||||
sorted-set
|
||||
sorted-set-by
|
||||
sorted?
|
||||
special-form-anchor
|
||||
special-symbol?
|
||||
split-at
|
||||
split-with
|
||||
str
|
||||
stream?
|
||||
string?
|
||||
struct
|
||||
struct-map
|
||||
subs
|
||||
subseq
|
||||
subvec
|
||||
supers
|
||||
swap!
|
||||
symbol
|
||||
symbol?
|
||||
sync
|
||||
syntax-symbol-anchor
|
||||
take
|
||||
take-last
|
||||
take-nth
|
||||
take-while
|
||||
test
|
||||
the-ns
|
||||
time
|
||||
to-array
|
||||
to-array-2d
|
||||
trampoline
|
||||
transient
|
||||
tree-seq
|
||||
true?
|
||||
type
|
||||
unchecked-add
|
||||
unchecked-dec
|
||||
unchecked-divide
|
||||
unchecked-inc
|
||||
unchecked-multiply
|
||||
unchecked-negate
|
||||
unchecked-remainder
|
||||
unchecked-subtract
|
||||
underive
|
||||
update-in
|
||||
update-proxy
|
||||
use
|
||||
val
|
||||
vals
|
||||
var-get
|
||||
var-set
|
||||
var?
|
||||
vary-meta
|
||||
vec
|
||||
vector
|
||||
vector-of
|
||||
vector?
|
||||
when
|
||||
when-first
|
||||
when-let
|
||||
when-not
|
||||
while
|
||||
with-bindings
|
||||
with-bindings*
|
||||
with-in-str
|
||||
with-local-vars
|
||||
with-meta
|
||||
with-open
|
||||
with-out-str
|
||||
with-precision
|
||||
xml-seq
|
||||
zero?
|
||||
zipmap
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
abstract
|
||||
assert
|
||||
boolean
|
||||
break
|
||||
byte
|
||||
case
|
||||
catch
|
||||
char
|
||||
class
|
||||
const
|
||||
continue
|
||||
default
|
||||
do
|
||||
double
|
||||
else
|
||||
enum
|
||||
extends
|
||||
final
|
||||
finally
|
||||
float
|
||||
for
|
||||
goto
|
||||
if
|
||||
implements
|
||||
import
|
||||
instanceof
|
||||
int
|
||||
interface
|
||||
long
|
||||
native
|
||||
new
|
||||
package
|
||||
private
|
||||
protected
|
||||
public
|
||||
return
|
||||
short
|
||||
static
|
||||
strictfp
|
||||
super
|
||||
switch
|
||||
synchronized
|
||||
this
|
||||
throw
|
||||
throws
|
||||
transient
|
||||
try
|
||||
void
|
||||
volatile
|
||||
while
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
Anchor
|
||||
Area
|
||||
Array
|
||||
Boolean
|
||||
Button
|
||||
Checkbox
|
||||
Date
|
||||
Document
|
||||
Element
|
||||
FileUpload
|
||||
Form
|
||||
Frame
|
||||
Function
|
||||
Hidden
|
||||
History
|
||||
Image
|
||||
Infinity
|
||||
JavaArray
|
||||
JavaClass
|
||||
JavaObject
|
||||
JavaPackage
|
||||
Link
|
||||
Location
|
||||
Math
|
||||
MimeType
|
||||
NaN
|
||||
Navigator
|
||||
Number
|
||||
Object
|
||||
Option
|
||||
Packages
|
||||
Password
|
||||
Plugin
|
||||
Radio
|
||||
RegExp
|
||||
Reset
|
||||
Select
|
||||
String
|
||||
Submit
|
||||
Text
|
||||
Textarea
|
||||
Window
|
||||
alert
|
||||
arguments
|
||||
assign
|
||||
blur
|
||||
break
|
||||
callee
|
||||
caller
|
||||
captureEvents
|
||||
case
|
||||
clearInterval
|
||||
clearTimeout
|
||||
close
|
||||
closed
|
||||
comment
|
||||
confirm
|
||||
constructor
|
||||
continue
|
||||
default
|
||||
defaultStatus
|
||||
delete
|
||||
do
|
||||
document
|
||||
else
|
||||
escape
|
||||
eval
|
||||
export
|
||||
find
|
||||
focus
|
||||
for
|
||||
frames
|
||||
function
|
||||
getClass
|
||||
history
|
||||
home
|
||||
if
|
||||
import
|
||||
in
|
||||
innerHeight
|
||||
innerWidth
|
||||
isFinite
|
||||
isNan
|
||||
java
|
||||
label
|
||||
length
|
||||
location
|
||||
locationbar
|
||||
menubar
|
||||
moveBy
|
||||
moveTo
|
||||
name
|
||||
navigate
|
||||
navigator
|
||||
netscape
|
||||
new
|
||||
onBlur
|
||||
onError
|
||||
onFocus
|
||||
onLoad
|
||||
onUnload
|
||||
open
|
||||
opener
|
||||
outerHeight
|
||||
outerWidth
|
||||
pageXoffset
|
||||
pageYoffset
|
||||
parent
|
||||
parseFloat
|
||||
parseInt
|
||||
personalbar
|
||||
print
|
||||
prompt
|
||||
prototype
|
||||
ref
|
||||
releaseEvents
|
||||
resizeBy
|
||||
resizeTo
|
||||
return
|
||||
routeEvent
|
||||
scroll
|
||||
scrollBy
|
||||
scrollTo
|
||||
scrollbars
|
||||
self
|
||||
setInterval
|
||||
setTimeout
|
||||
status
|
||||
statusbar
|
||||
stop
|
||||
sun
|
||||
switch
|
||||
taint
|
||||
this
|
||||
toString
|
||||
toolbar
|
||||
top
|
||||
typeof
|
||||
unescape
|
||||
untaint
|
||||
unwatch
|
||||
valueOf
|
||||
var
|
||||
void
|
||||
watch
|
||||
while
|
||||
window
|
||||
with
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
and
|
||||
array
|
||||
as
|
||||
break
|
||||
case
|
||||
catch
|
||||
cfunction
|
||||
class
|
||||
clone
|
||||
const
|
||||
continue
|
||||
declare
|
||||
default
|
||||
die
|
||||
do
|
||||
echo
|
||||
else
|
||||
elseif
|
||||
empty
|
||||
enddeclare
|
||||
endfor
|
||||
endforeach
|
||||
endif
|
||||
endswitch
|
||||
endwhile
|
||||
eval
|
||||
exit
|
||||
extends
|
||||
final
|
||||
for
|
||||
foreach
|
||||
function
|
||||
global
|
||||
goto
|
||||
if
|
||||
implements
|
||||
include
|
||||
include_once
|
||||
instanceof
|
||||
interface
|
||||
isset
|
||||
list
|
||||
namespace
|
||||
new
|
||||
old_function
|
||||
or
|
||||
print
|
||||
private
|
||||
protected
|
||||
public
|
||||
require
|
||||
require_once
|
||||
return
|
||||
static
|
||||
switch
|
||||
throw
|
||||
try
|
||||
unset
|
||||
use
|
||||
var
|
||||
while
|
||||
xor
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
__import__
|
||||
abs
|
||||
and
|
||||
any
|
||||
apply
|
||||
as
|
||||
assert
|
||||
basestring
|
||||
bin
|
||||
bool
|
||||
break
|
||||
buffer
|
||||
class
|
||||
cmp
|
||||
coerce
|
||||
complex
|
||||
continue
|
||||
def
|
||||
del
|
||||
delattr
|
||||
dict
|
||||
dir
|
||||
divmod
|
||||
elif
|
||||
else
|
||||
enumerate
|
||||
eval
|
||||
except
|
||||
exec
|
||||
execfile
|
||||
file
|
||||
filter
|
||||
finally
|
||||
float
|
||||
for
|
||||
format
|
||||
from
|
||||
frozenset
|
||||
getattr
|
||||
global
|
||||
globals
|
||||
hasattr
|
||||
hash
|
||||
help
|
||||
hex
|
||||
id
|
||||
if
|
||||
import
|
||||
in
|
||||
input
|
||||
int
|
||||
intern
|
||||
is
|
||||
isinstance
|
||||
issubclass
|
||||
iter
|
||||
lambda
|
||||
len
|
||||
list
|
||||
locals
|
||||
long
|
||||
map
|
||||
max
|
||||
min
|
||||
next
|
||||
not
|
||||
object
|
||||
oct
|
||||
open
|
||||
or
|
||||
ord
|
||||
pass
|
||||
pow
|
||||
print
|
||||
print
|
||||
property
|
||||
raise
|
||||
range
|
||||
raw_input
|
||||
reduce
|
||||
reload
|
||||
repr
|
||||
return
|
||||
reversed
|
||||
round
|
||||
set
|
||||
setattr
|
||||
slice
|
||||
sorted
|
||||
staticmethod
|
||||
str
|
||||
sum
|
||||
super
|
||||
try
|
||||
tuple
|
||||
type
|
||||
unichr
|
||||
unicode
|
||||
vars
|
||||
while
|
||||
with
|
||||
xrange
|
||||
yield
|
||||
zip
|
||||
|
|
@ -1,181 +0,0 @@
|
|||
$!
|
||||
$"
|
||||
$$
|
||||
$&
|
||||
$'
|
||||
$*
|
||||
$+
|
||||
$,
|
||||
$-0
|
||||
$-F
|
||||
$-I
|
||||
$-K
|
||||
$-a
|
||||
$-d
|
||||
$-i
|
||||
$-l
|
||||
$-p
|
||||
$-v
|
||||
$-w
|
||||
$.
|
||||
$/
|
||||
$0
|
||||
$1
|
||||
$10
|
||||
$11
|
||||
$2
|
||||
$3
|
||||
$4
|
||||
$5
|
||||
$6
|
||||
$7
|
||||
$8
|
||||
$9
|
||||
$:
|
||||
$;
|
||||
$<
|
||||
$=
|
||||
$>
|
||||
$?
|
||||
$@
|
||||
$DEBUG
|
||||
$FILENAME
|
||||
$KCODE
|
||||
$LOADED_FEATURES
|
||||
$LOAD_PATH
|
||||
$PROGRAM_NAME
|
||||
$SAFE
|
||||
$VERBOSE
|
||||
$\
|
||||
$_
|
||||
$`
|
||||
$deferr
|
||||
$defout
|
||||
$stderr
|
||||
$stdin
|
||||
$stdout
|
||||
$~
|
||||
ARGF
|
||||
ARGV
|
||||
Array
|
||||
BEGIN
|
||||
DATA
|
||||
END
|
||||
ENV
|
||||
FALSE
|
||||
Float
|
||||
Integer
|
||||
NIL
|
||||
PLATFORM
|
||||
RELEASE_DATE
|
||||
RUBY_COPYRIGHT
|
||||
RUBY_DESCRIPTION
|
||||
RUBY_PATCHLEVEL
|
||||
RUBY_PLATFORM
|
||||
RUBY_RELEASE_DATE
|
||||
RUBY_VERSION
|
||||
SCRIPT_LINES__
|
||||
STDERR
|
||||
STDIN
|
||||
STDOUT
|
||||
String
|
||||
TOPLEVEL_BINDING
|
||||
TRUE
|
||||
VERSION
|
||||
__method__
|
||||
`
|
||||
abort
|
||||
alias
|
||||
and
|
||||
at_exit
|
||||
autoload
|
||||
autoload?
|
||||
begin
|
||||
binding
|
||||
block_given
|
||||
break
|
||||
callcc
|
||||
caller
|
||||
case
|
||||
catch
|
||||
chomp
|
||||
chomp!
|
||||
chop
|
||||
chop
|
||||
class
|
||||
def
|
||||
defined?
|
||||
do
|
||||
else
|
||||
elsif
|
||||
end
|
||||
ensure
|
||||
eval
|
||||
exec
|
||||
exit
|
||||
exit!
|
||||
fail
|
||||
false
|
||||
for
|
||||
fork
|
||||
format
|
||||
getc
|
||||
gets
|
||||
global_variables
|
||||
gsub
|
||||
gsub!
|
||||
if
|
||||
in
|
||||
iterator?
|
||||
lambda
|
||||
load
|
||||
local_varaibles
|
||||
loop
|
||||
module
|
||||
next
|
||||
nil
|
||||
not
|
||||
open
|
||||
or
|
||||
p
|
||||
printf
|
||||
proc
|
||||
putc
|
||||
puts
|
||||
raise
|
||||
rand
|
||||
readline
|
||||
readlines
|
||||
redo
|
||||
require
|
||||
require_relative
|
||||
rescue
|
||||
retry
|
||||
return
|
||||
scan
|
||||
select
|
||||
self
|
||||
set_trace_func
|
||||
sleep
|
||||
split
|
||||
sprintf
|
||||
srand
|
||||
sub
|
||||
sub!
|
||||
super
|
||||
syscall
|
||||
system
|
||||
test
|
||||
then
|
||||
throw
|
||||
trace_var
|
||||
trap
|
||||
true
|
||||
undef
|
||||
unless
|
||||
until
|
||||
untrace_var
|
||||
warn
|
||||
when
|
||||
while
|
||||
yield
|
||||
|
|
@ -1,216 +0,0 @@
|
|||
case-lambda
|
||||
call/cc
|
||||
class
|
||||
define-class
|
||||
exit-handler
|
||||
field
|
||||
import
|
||||
inherit
|
||||
init-field
|
||||
interface
|
||||
let*-values
|
||||
let-values
|
||||
let/ec
|
||||
mixin
|
||||
opt-lambda
|
||||
override
|
||||
protect
|
||||
provide
|
||||
public
|
||||
rename
|
||||
require
|
||||
require-for-syntax
|
||||
syntax
|
||||
syntax-case
|
||||
syntax-error
|
||||
unit/sig
|
||||
unless
|
||||
when
|
||||
with-syntax
|
||||
and
|
||||
begin
|
||||
call-with-current-continuation
|
||||
call-with-input-file
|
||||
call-with-output-file
|
||||
case
|
||||
cond
|
||||
define
|
||||
define-syntax
|
||||
delay
|
||||
do
|
||||
dynamic-wind
|
||||
else
|
||||
for-each
|
||||
if
|
||||
lambda
|
||||
let
|
||||
let*
|
||||
let-syntax
|
||||
letrec
|
||||
letrec-syntax
|
||||
map
|
||||
or
|
||||
syntax-rules
|
||||
abs
|
||||
acos
|
||||
angle
|
||||
append
|
||||
apply
|
||||
asin
|
||||
assoc
|
||||
assq
|
||||
assv
|
||||
atan
|
||||
boolean?
|
||||
caar
|
||||
cadr
|
||||
call-with-input-file
|
||||
call-with-output-file
|
||||
call-with-values
|
||||
car
|
||||
cdddar
|
||||
cddddr
|
||||
cdr
|
||||
ceiling
|
||||
char->integer
|
||||
char-alphabetic?
|
||||
char-ci<=?
|
||||
char-ci<?
|
||||
char-ci=?
|
||||
char-ci>=?
|
||||
char-ci>?
|
||||
char-downcase
|
||||
char-lower-case?
|
||||
char-numeric?
|
||||
char-ready?
|
||||
char-upcase
|
||||
char-upper-case?
|
||||
char-whitespace?
|
||||
char<=?
|
||||
char<?
|
||||
char=?
|
||||
char>=?
|
||||
char>?
|
||||
char?
|
||||
close-input-port
|
||||
close-output-port
|
||||
complex?
|
||||
cons
|
||||
cos
|
||||
current-input-port
|
||||
current-output-port
|
||||
denominator
|
||||
display
|
||||
eof-object?
|
||||
eq?
|
||||
equal?
|
||||
eqv?
|
||||
eval
|
||||
even?
|
||||
exact->inexact
|
||||
exact?
|
||||
exp
|
||||
expt
|
||||
#f
|
||||
floor
|
||||
force
|
||||
gcd
|
||||
imag-part
|
||||
inexact->exact
|
||||
inexact?
|
||||
input-port?
|
||||
integer->char
|
||||
integer?
|
||||
interaction-environment
|
||||
lcm
|
||||
length
|
||||
list
|
||||
list->string
|
||||
list->vector
|
||||
list-ref
|
||||
list-tail
|
||||
list?
|
||||
load
|
||||
log
|
||||
magnitude
|
||||
make-polar
|
||||
make-rectangular
|
||||
make-string
|
||||
make-vector
|
||||
max
|
||||
member
|
||||
memq
|
||||
memv
|
||||
min
|
||||
modulo
|
||||
negative?
|
||||
newline
|
||||
not
|
||||
null-environment
|
||||
null?
|
||||
number->string
|
||||
number?
|
||||
numerator
|
||||
odd?
|
||||
open-input-file
|
||||
open-output-file
|
||||
output-port?
|
||||
pair?
|
||||
peek-char
|
||||
port?
|
||||
positive?
|
||||
procedure?
|
||||
quasiquote
|
||||
quote
|
||||
quotient
|
||||
rational?
|
||||
rationalize
|
||||
read
|
||||
read-char
|
||||
real-part
|
||||
real?
|
||||
remainder
|
||||
reverse
|
||||
round
|
||||
scheme-report-environment
|
||||
set!
|
||||
set-car!
|
||||
set-cdr!
|
||||
sin
|
||||
sqrt
|
||||
string
|
||||
string->list
|
||||
string->number
|
||||
string->symbol
|
||||
string-append
|
||||
string-ci<=?
|
||||
string-ci<?
|
||||
string-ci=?
|
||||
string-ci>=?
|
||||
string-ci>?
|
||||
string-copy
|
||||
string-fill!
|
||||
string-length
|
||||
string-ref
|
||||
string-set!
|
||||
string<=?
|
||||
string<?
|
||||
string=?
|
||||
string>=?
|
||||
string>?
|
||||
string?
|
||||
substring
|
||||
symbol->string
|
||||
symbol?
|
||||
#t
|
||||
tan
|
||||
transcript-off
|
||||
transcript-on
|
||||
truncate
|
||||
values
|
||||
vector
|
||||
vector->list
|
||||
vector-fill!
|
||||
vector-length
|
||||
vector-ref
|
||||
vector-set!
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
after
|
||||
append
|
||||
apply
|
||||
array
|
||||
auto_execok
|
||||
auto_import
|
||||
auto_load
|
||||
auto_load_index
|
||||
auto_mkindex
|
||||
auto_mkindex_old
|
||||
auto_qualify
|
||||
auto_reset
|
||||
bell
|
||||
binary
|
||||
bind
|
||||
bindtags
|
||||
break
|
||||
button
|
||||
canvas
|
||||
case
|
||||
catch
|
||||
cd
|
||||
chan
|
||||
checkbutton
|
||||
clipboard
|
||||
clock
|
||||
close
|
||||
concat
|
||||
continue
|
||||
destroy
|
||||
dict
|
||||
encoding
|
||||
entry
|
||||
eof
|
||||
error
|
||||
eval
|
||||
event
|
||||
exec
|
||||
exit
|
||||
expr
|
||||
fblocked
|
||||
fconfigure
|
||||
fcopy
|
||||
file
|
||||
fileevent
|
||||
flush
|
||||
focus
|
||||
font
|
||||
for
|
||||
foreach
|
||||
format
|
||||
frame
|
||||
gets
|
||||
glob
|
||||
global
|
||||
grab
|
||||
grid
|
||||
if
|
||||
image
|
||||
incr
|
||||
info
|
||||
interp
|
||||
join
|
||||
label
|
||||
labelframe
|
||||
lappend
|
||||
lassign
|
||||
lindex
|
||||
linsert
|
||||
list
|
||||
listbox
|
||||
llength
|
||||
load
|
||||
lower
|
||||
lrange
|
||||
lrepeat
|
||||
lreplace
|
||||
lreverse
|
||||
lsearch
|
||||
lset
|
||||
lsort
|
||||
menu
|
||||
menubutton
|
||||
message
|
||||
namespace
|
||||
open
|
||||
option
|
||||
pack
|
||||
package
|
||||
panedwindow
|
||||
pid
|
||||
pkg_mkIndex
|
||||
place
|
||||
proc
|
||||
puts
|
||||
pwd
|
||||
radiobutton
|
||||
raise
|
||||
read
|
||||
regexp
|
||||
registry
|
||||
regsub
|
||||
rename
|
||||
return
|
||||
scale
|
||||
scan
|
||||
scrollbar
|
||||
seek
|
||||
selection
|
||||
set
|
||||
socket
|
||||
source
|
||||
spinbox
|
||||
split
|
||||
string
|
||||
subst
|
||||
switch
|
||||
tclLog
|
||||
tclPkgSetup
|
||||
tclPkgUnknown
|
||||
tcl_findLibrary
|
||||
tell
|
||||
text
|
||||
time
|
||||
tk
|
||||
tk_chooseColor
|
||||
tk_chooseDirectory
|
||||
tk_getOpenFile
|
||||
tk_getSaveFile
|
||||
tk_menuSetFocus
|
||||
tk_messageBox
|
||||
tk_popup
|
||||
tk_textCopy
|
||||
tk_textCut
|
||||
tk_textPaste
|
||||
tkwait
|
||||
toplevel
|
||||
ttk::button
|
||||
ttk::checkbutton
|
||||
ttk::combobox
|
||||
ttk::entry
|
||||
ttk::focusFirst
|
||||
ttk::frame
|
||||
ttk::label
|
||||
ttk::labelframe
|
||||
ttk::menubutton
|
||||
ttk::notebook
|
||||
ttk::paned
|
||||
ttk::panedwindow
|
||||
ttk::progressbar
|
||||
ttk::radiobutton
|
||||
ttk::scale
|
||||
ttk::scrollbar
|
||||
ttk::separator
|
||||
ttk::setTheme
|
||||
ttk::sizegrip
|
||||
ttk::style
|
||||
ttk::takefocus
|
||||
ttk::themes
|
||||
ttk::treeview
|
||||
trace
|
||||
unknown
|
||||
unload
|
||||
unset
|
||||
update
|
||||
uplevel
|
||||
upvar
|
||||
variable
|
||||
vwait
|
||||
while
|
||||
winfo
|
||||
wm
|
||||
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
|
@ -1,96 +0,0 @@
|
|||
Title: Auto Complete Mode - 変更点
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode 変更点
|
||||
=========================
|
||||
|
||||
[Index](index.ja.txt)
|
||||
|
||||
\[[English](changes.txt)]
|
||||
|
||||
[ユーザーマニュアル](manual.ja.txt)も参照してください。
|
||||
|
||||
v1.3の変更点 {#Changes_v1.3}
|
||||
------------
|
||||
|
||||
v1.3の主な変更点は次のようになります。
|
||||
|
||||
### 新しいオプション ### {#New_Options_v1.3}
|
||||
|
||||
* [`ac-disable-faces`](manual.ja.txt#ac-disable-faces)
|
||||
* [`ac-show-menu-immediately-on-auto-complete`](manual.ja.txt#ac-show-menu-immediately-on-auto-complete)
|
||||
* [`ac-expand-on-auto-complete`](manual.ja.txt#ac-expand-on-auto-complete)
|
||||
* [`ac-use-menu-map`](manual.ja.txt#ac-use-menu-map)
|
||||
|
||||
### 新しい情報源 ### {#New_Sources_v1.3}
|
||||
|
||||
* [`ac-source-semantic-raw`](manual.ja.txt#ac-source-semantic-raw)
|
||||
* [`ac-source-css-property`](manual.ja.txt#ac-source-css-property)
|
||||
|
||||
### 新しい情報源のプロパティ ### {#New_Source_Properties_v1.3}
|
||||
|
||||
* [`summary`](manual.ja.txt#summary)
|
||||
* [`available`](manual.ja.txt#available)
|
||||
|
||||
### 新しい辞書 ### {#New_Dictionaries_v1.3}
|
||||
|
||||
* tcl-mode
|
||||
* scheme-mode
|
||||
|
||||
### 変更された挙動 ### {#Changed_Behaviors_v1.3}
|
||||
|
||||
* 補完候補の長さを考慮したスコアリング(文字列長でソート)
|
||||
|
||||
### 修正されたバグ ### {#Fixed_Bugs_v1.3}
|
||||
|
||||
* Emacs 22.1でのエラー
|
||||
* `flyspell-mode`との衝突(`M-x flyspell-workaround`で解決)
|
||||
|
||||
### その他 ### {#Others_v1.3}
|
||||
|
||||
* 単語収集の速度を改善 (#18)
|
||||
* [pos-tip.el](manual.ja.txt#.E3.83.98.E3.83.AB.E3.83.97.E3.82.92.E7.B6.BA.E9.BA.97.E3.81.AB.E8.A1.A8.E7.A4.BA.E3.81.99.E3.82.8B)との協調
|
||||
* Yasnippet 0.61のサポート
|
||||
* 多くのバグ修正
|
||||
|
||||
v1.2の変更点 {#Changes_v1.2}
|
||||
------------
|
||||
|
||||
v1.0からv1.2の主な変更点は次のようになります。
|
||||
|
||||
### 新機能 ### {#New_Features_v1.2}
|
||||
|
||||
* [曖昧マッチによる補完](manual.ja.txt#.E6.9B.96.E6.98.A7.E3.83.9E.E3.83.83.E3.83.81.E3.81.AB.E3.82.88.E3.82.8B.E8.A3.9C.E5.AE.8C)
|
||||
* [辞書による補完](manual.ja.txt#.E8.BE.9E.E6.9B.B8.E3.81.AB.E3.82.88.E3.82.8B.E8.A3.9C.E5.AE.8C)
|
||||
* [補完候補の絞り込み](manual.ja.txt#.E8.A3.9C.E5.AE.8C.E5.80.99.E8.A3.9C.E3.81.AE.E7.B5.9E.E3.82.8A.E8.BE.BC.E3.81.BF)
|
||||
* [補完推測機能](manual.ja.txt#.E8.A3.9C.E5.AE.8C.E6.8E.A8.E6.B8.AC.E6.A9.9F.E8.83.BD)
|
||||
* [トリガーキー](manual.ja.txt#.E3.83.88.E3.83.AA.E3.82.AC.E3.83.BC.E3.82.AD.E3.83.BC)
|
||||
* [ヘルプ](manual.ja.txt#.E3.83.98.E3.83.AB.E3.83.97)
|
||||
|
||||
### 新しいコマンド ### {#New_Commands_v1.2}
|
||||
|
||||
* [`auto-complete`](manual.ja.txt#auto-complete.E3.82.B3.E3.83.9E.E3.83.B3.E3.83.89)
|
||||
|
||||
### 新しいオプション ### {#New_Options_v1.2}
|
||||
|
||||
* [`ac-delay`](manual.ja.txt#ac-delay)
|
||||
* [`ac-auto-show-menu`](manual.ja.txt#ac-auto-show-menu)
|
||||
* [`ac-use-fuzzy`](manual.ja.txt#ac-use-fuzzy)
|
||||
* [`ac-use-comphist`](manual.ja.txt#ac-use-comphist)
|
||||
* [`ac-ignores`](manual.ja.txt#ac-ignores)
|
||||
* [`ac-ignore-case`](manual.ja.txt#ac-ignore-case)
|
||||
* [`ac-mode-map`](manual.ja.txt#ac-mode-map)
|
||||
|
||||
### 新しい情報源 ### {#New_Sources_v1.2}
|
||||
|
||||
* [`ac-source-dictionary`](manual.ja.txt#ac-source-dictionary)
|
||||
|
||||
### 変更された挙動 ### {#Changed_Behaviors_v1.2}
|
||||
|
||||
* 補完の開始が遅延されるようになりました ([`ac-delay`](manual.ja.txt#ac-delay))
|
||||
* 補完メニューの表示が遅延されるようになりました ([`ac-auto-show-menu`](manual.ja.txt#ac-auto-show-menu))
|
||||
|
||||
### その他 ### {#Others_v1.2}
|
||||
|
||||
* 多くのバグ修正
|
||||
* パフォーマンスの改善
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
Title: Auto Complete Mode - Changes
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode Changes
|
||||
==========================
|
||||
|
||||
[Index](index.txt)
|
||||
|
||||
\[[Japanese](changes.ja.txt)]
|
||||
|
||||
See also [documentation](manual.txt).
|
||||
|
||||
v1.3 Changes {#Changes_v1.3}
|
||||
------------
|
||||
|
||||
Major changes in v1.3.
|
||||
|
||||
### New Options ### {#New_Options_v1.3}
|
||||
|
||||
* [`ac-disable-faces`](manual.txt#ac-disable-faces)
|
||||
* [`ac-show-menu-immediately-on-auto-complete`](manual.txt#ac-show-menu-immediately-on-auto-complete)
|
||||
* [`ac-expand-on-auto-complete`](manual.txt#ac-expand-on-auto-complete)
|
||||
* [`ac-use-menu-map`](manual.txt#ac-use-menu-map)
|
||||
|
||||
### New Sources ### {#New_Sources_v1.3}
|
||||
|
||||
* [`ac-source-semantic-raw`](manual.txt#ac-source-semantic-raw)
|
||||
* [`ac-source-css-property`](manual.txt#ac-source-css-property)
|
||||
|
||||
### New Source Properties ### {#New_Source_Properties_v1.3}
|
||||
|
||||
* [`summary`](manual.txt#summary)
|
||||
* [`available`](manual.txt#available)
|
||||
|
||||
### New Dictionaries ### {#New_Dictionaries_v1.3}
|
||||
|
||||
* tcl-mode
|
||||
* scheme-mode
|
||||
|
||||
### Changed Behaviors ### {#Changed_Behaviors_v1.3}
|
||||
|
||||
* Scoring regarding to candidate length (sort by length)
|
||||
|
||||
### Fixed Bugs ### {#Fixed_Bugs_v1.3}
|
||||
|
||||
* Error on Emacs 22.1
|
||||
* `flyspell-mode` confliction (`M-x flyspell-workaround`)
|
||||
|
||||
### Others ### {#Others_v1.3}
|
||||
|
||||
* Improved word completion performance (#18)
|
||||
* Cooperate with [pos-tip.el](manual.txt#Show_help_beautifully)
|
||||
* Yasnippet 0.61 support
|
||||
* Fix many bugs
|
||||
|
||||
v1.2 Changes {#Changes_v1.2}
|
||||
------------
|
||||
|
||||
Major changes in v1.2 since v1.0.
|
||||
|
||||
### New Features ### {#New_Features_v1.2}
|
||||
|
||||
* [Completion by Fuzzy Matching](manual.txt#Completion_by_Fuzzy_Matching)
|
||||
* [Completion by Dictionary](manual.txt#Completion_by_Dictionary)
|
||||
* [Incremental Filtering](manual.txt#Filtering_Completion_Candidates)
|
||||
* [Intelligent Candidate Suggestion](manual.txt#Candidate_Suggestion)
|
||||
* [Trigger Key](manual.txt#Trigger_Key)
|
||||
* [Help](manual.txt#Help)
|
||||
|
||||
### New Commands ### {#New_Commands_v1.2}
|
||||
|
||||
* [`auto-complete`](manual.txt#auto-complete_command)
|
||||
|
||||
### New Options ### {#New_Options_v1.2}
|
||||
|
||||
* [`ac-delay`](manual.txt#ac-delay)
|
||||
* [`ac-auto-show-menu`](manual.txt#ac-auto-show-menu)
|
||||
* [`ac-use-fuzzy`](manual.txt#ac-use-fuzzy)
|
||||
* [`ac-use-comphist`](manual.txt#ac-use-comphist)
|
||||
* [`ac-ignores`](manual.txt#ac-ignores)
|
||||
* [`ac-ignore-case`](manual.txt#ac-ignore-case)
|
||||
* [`ac-mode-map`](manual.txt#ac-mode-map)
|
||||
|
||||
### New Sources ### {#New_Sources_v1.2}
|
||||
|
||||
* [`ac-source-dictionary`](manual.txt#ac-source-dictionary)
|
||||
|
||||
### Changed Behaviors ### {#Changed_Behaviors_v1.2}
|
||||
|
||||
* Completion is now delayed to start ([`ac-delay`](manual.txt#ac-delay))
|
||||
* Completion menu is now delayed to show ([`ac-auto-show-menu`](manual.txt#ac-auto-show-menu))
|
||||
|
||||
### Others ### {#Others_v1.2}
|
||||
|
||||
* Fix many bugs
|
||||
* Improve performance
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
Title: Auto Complete Mode - Demo
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode Demo
|
||||
=======================
|
||||
|
||||
[Index](index.txt)
|
||||
|
||||
[YouTube mirror](http://www.youtube.com/watch?v=rGVVnDxwJYE)
|
||||
|
||||
<video src="ac-demo.ogv" controls="true" width="720" height="672" />
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
Title: Auto Complete Mode - GNU Emacsのための最も賢い自動補完機能
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode
|
||||
==================
|
||||
|
||||
*[GNU Emacs][]のための最も賢い自動補完機能*
|
||||
|
||||
\[[English](index.txt)]
|
||||
|
||||
* * * *
|
||||
|
||||
{toc}
|
||||
|
||||
* * * *
|
||||
|
||||
Auto Complete Modeとは
|
||||
----------------------
|
||||
|
||||
Auto Complete Modeは[GNU Emacs][]のための最も賢い自動補完機能です。従来の使いづらい補完インターフェースを一新し、ユーザーがより本質的な作業に集中できる環境を提供します。
|
||||
|
||||
特徴
|
||||
----
|
||||
|
||||
* 視覚的な操作感
|
||||
* 統計的手法による補完オーバーヘッドの削減
|
||||
* 拡張性
|
||||
|
||||
スクリーンショット
|
||||
------------------
|
||||
|
||||
  
|
||||
|
||||
デモ
|
||||
----
|
||||
|
||||
* [YouTube](http://www.youtube.com/watch?v=rGVVnDxwJYE)
|
||||
* [Ogg Theora with video tag](demo.txt)
|
||||
|
||||
ダウンロード
|
||||
------------
|
||||
|
||||
### 最新安定板 (v1.3) ### {#Latest_Stable}
|
||||
|
||||
[v1.3の変更点](changes.ja.txt#Changes_v1.3)
|
||||
|
||||
* [auto-complete-1.3.tar.bz2](http://cx4a.org/pub/auto-complete/auto-complete-1.3.tar.bz2)
|
||||
* [auto-complete-1.3.tar.zip](http://cx4a.org/pub/auto-complete/auto-complete-1.3.zip)
|
||||
|
||||
### v1.2 ###
|
||||
|
||||
[v1.2の変更点](changes.ja.txt#Changes_v1.2)
|
||||
|
||||
* [auto-complete-1.2.tar.bz2](http://cx4a.org/pub/auto-complete/auto-complete-1.2.tar.bz2)
|
||||
* [auto-complete-1.2.tar.zip](http://cx4a.org/pub/auto-complete/auto-complete-1.2.zip)
|
||||
|
||||
ユーザーマニュアル
|
||||
------------------
|
||||
|
||||
[Auto Complete Modeユーザーマニュアル](manual.ja.txt)
|
||||
|
||||
利用者の声
|
||||
----------
|
||||
|
||||
利用者の声をぜひお聞かせください。あなたの名前(匿名希望可)とコメントをそえて[tomo@cx4a.org](mailto: tomo@cx4a.org)までメールでお願いします。どんなコメントでも歓迎です。
|
||||
|
||||
ソースコード
|
||||
------------
|
||||
|
||||
ソースコードは以下のGitリポジトリから取得できます。
|
||||
|
||||
* <http://cx4a.org/repo/auto-complete.git>
|
||||
* <http://github.com/m2ym/auto-complete> (GitHubミラー)
|
||||
|
||||
バグレポート
|
||||
------------
|
||||
|
||||
[Auto Complete Modeのバグトラッキングシステム](http://cx4a.org/redmine/projects/auto-complete-mode)に新しいチケットを登録してください。
|
||||
|
||||
ライセンス
|
||||
----------
|
||||
|
||||
このソフトウェアは[GPLv3][]のもとで配布されます。
|
||||
|
||||
[GNU Emacs]: http://www.gnu.org/software/emacs/
|
||||
[GPLv3]: http://gplv3.fsf.org/
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
Title: Auto Complete Mode - The most intelligent auto-completion extension for GNU Emacs
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode
|
||||
==================
|
||||
|
||||
*The most intelligent auto-completion extension for [GNU Emacs][]*
|
||||
|
||||
\[[Japanese](index.ja.txt)]
|
||||
|
||||
* * * *
|
||||
|
||||
{toc}
|
||||
|
||||
* * * *
|
||||
|
||||
What is Auto Complete Mode?
|
||||
---------------------------
|
||||
|
||||
Auto Complete Mode is the most intelligent auto-completion extension for [GNU Emacs][]. Auto Complete Mode renews an old completion interface and provides an environment that makes users could be more concentrate on their own works.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* Visual interface
|
||||
* Reduce overhead of completion by using statistic method
|
||||
* Extensibility
|
||||
|
||||
Screenshots
|
||||
-----------
|
||||
|
||||
  
|
||||
|
||||
Demo
|
||||
----
|
||||
|
||||
* [YouTube](http://www.youtube.com/watch?v=rGVVnDxwJYE)
|
||||
* [Ogg Theora with video tag](demo.txt)
|
||||
|
||||
Downloads
|
||||
---------
|
||||
|
||||
### Latest Stable (v1.3) ### {#Latest_Stable}
|
||||
|
||||
[Changes v1.3](changes.txt#Changes_v1.3)
|
||||
|
||||
* [auto-complete-1.3.tar.bz2](/pub/auto-complete/auto-complete-1.3.tar.bz2)
|
||||
* [auto-complete-1.3.zip](/pub/auto-complete/auto-complete-1.3.zip)
|
||||
|
||||
### v1.2 ###
|
||||
|
||||
[Changes v1.2](changes.txt#Changes_v1.2)
|
||||
|
||||
* [auto-complete-1.2.tar.bz2](/pub/auto-complete/auto-complete-1.2.tar.bz2)
|
||||
* [auto-complete-1.2.zip](/pub/auto-complete/auto-complete-1.2.zip)
|
||||
|
||||
User Manual
|
||||
-----------
|
||||
|
||||
[Auto Complete Mode User Manual](manual.txt)
|
||||
|
||||
User's Voice
|
||||
------------
|
||||
|
||||
Please send me a comment with your name (or anonymous) to [tomo@cx4a.org](mailto: tomo@cx4a.org) if you like it. Any comments are welcome.
|
||||
|
||||
Source Code
|
||||
-----------
|
||||
|
||||
Git repositories are available:
|
||||
|
||||
* <http://cx4a.org/repo/auto-complete.git>
|
||||
* <http://github.com/m2ym/auto-complete> (GitHub mirror)
|
||||
|
||||
Reporting Bugs
|
||||
--------------
|
||||
|
||||
Visit [Auto Complete Mode Bug Tracking System](http://cx4a.org/redmine/projects/auto-complete-mode) and create a new ticket.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This software is distributed under the term of [GPLv3][]+.
|
||||
|
||||
[GNU Emacs]: http://www.gnu.org/software/emacs/
|
||||
[GPLv3]: http://gplv3.fsf.org/
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
body {
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 0.5em 2em;
|
||||
padding: 0.5em;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
table {
|
||||
margin-left: 1em;
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: white;
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
(require 'cl)
|
||||
|
||||
(when (or (not (featurep 'auto-complete))
|
||||
(yes-or-no-p "You are trying to upgrade auto-complete within an existed Emacs which has loaded its older version.
|
||||
It causes sometimes errors or installation fault. Are you sure? "))
|
||||
(let* ((basedir (file-name-directory (directory-file-name (file-name-directory load-file-name))))
|
||||
(default-dir "~/.emacs.d/")
|
||||
(todir (or (car command-line-args-left)
|
||||
(read-file-name "Install to: " default-dir default-dir)))
|
||||
(basedictdir (concat basedir "/dict"))
|
||||
(todictdir (concat todir "/ac-dict")))
|
||||
(cond
|
||||
((not (file-directory-p basedir))
|
||||
(error "Base directory is not found"))
|
||||
((or (eq (length todir) 0)
|
||||
(not (file-directory-p todir)))
|
||||
(error "To directory is empty or not found"))
|
||||
(t
|
||||
(message "Installing to %s from %s" todir basedir)
|
||||
(add-to-list 'load-path basedir)
|
||||
(make-directory todictdir t)
|
||||
(loop for file in (directory-files basedir t "^.*\\.el$")
|
||||
do (byte-compile-file file))
|
||||
(loop for file in (directory-files basedir t "^.*\\.elc?$")
|
||||
do (copy-file file todir t))
|
||||
(loop for file in (directory-files basedictdir t "^[^\\.]")
|
||||
do (copy-file file todictdir t))
|
||||
|
||||
(let ((msg (concat "Successfully installed!
|
||||
|
||||
Add the following code to your .emacs:
|
||||
|
||||
"
|
||||
(if (and (not (member (expand-file-name todir) load-path))
|
||||
(not (member (concat (expand-file-name todir) "/") load-path)))
|
||||
(format "(add-to-list 'load-path \"%s\")\n" todir)
|
||||
"")
|
||||
"(require 'auto-complete-config)\n"
|
||||
(format "(add-to-list 'ac-dictionary-directories \"%s\")\n" todictdir)
|
||||
"(ac-config-default)\n")))
|
||||
(if noninteractive
|
||||
(princ-list msg)
|
||||
(switch-to-buffer "*Installation Result*")
|
||||
(erase-buffer)
|
||||
(insert msg)))))))
|
||||
|
|
@ -1,202 +0,0 @@
|
|||
-*- org -*-
|
||||
|
||||
* How to test
|
||||
You can read this testcase document by following some rules.
|
||||
|
||||
- (Code) is a code you should evaluate for testing the fixture.
|
||||
- (Expect) is a expected result of your test.
|
||||
If no (Expect) is given, it means Emacs doesn't display any errors.
|
||||
- (Assume) is a code you should evaluate before test.
|
||||
|
||||
If no sources you should use are not given in each fixture, we assumes that
|
||||
you use following sources.
|
||||
|
||||
Code:
|
||||
(defvar ac-source-test
|
||||
'((candidates list "Foo" "FooBar" "Bar" "Baz" "LongLongLine")))
|
||||
(defvar ac-source-action-test
|
||||
'((candidates list "Action1" "Action2")
|
||||
(action . (lambda () (message "Done!")))))
|
||||
(setq ac-sources '(ac-source-test ac-source-action-test))
|
||||
|
||||
* Setup
|
||||
|
||||
** Load auto-complete
|
||||
Code:
|
||||
(require 'auto-complete)
|
||||
(require 'auto-complete-config)
|
||||
|
||||
** Enable/disable auto-complete by M-x auto-complete-mode
|
||||
|
||||
** Use global-auto-complete-mode
|
||||
Code:
|
||||
(global-auto-complete-mode t)
|
||||
|
||||
Expect:
|
||||
No errors. auto-complete-mode will be enabled automatically.
|
||||
|
||||
* Auto-completion
|
||||
|
||||
** Type some string at *scratch* buffer
|
||||
Expect:
|
||||
Menu contains words in the current buffer.
|
||||
|
||||
** Type some string at right of the window
|
||||
Expect:
|
||||
Menu will be shown in right-to-left direction without any window scrolling.
|
||||
|
||||
** Continue to type some string above case
|
||||
Expect:
|
||||
Menu will never be disrupted.
|
||||
|
||||
** Type some string at the right of window with truncate-lines enabled
|
||||
Assume:
|
||||
(setq truncate-lines t)
|
||||
|
||||
** Type some string at the bottom of window
|
||||
Expect:
|
||||
Menu will be shown in bottom-to-top direction without any window scrolling.
|
||||
|
||||
** Delete a character at the word
|
||||
Expect:
|
||||
Completion will be started.
|
||||
|
||||
** Type some string so that a menu overlaps the end of buffer that doesn't have newline at the end
|
||||
Expect:
|
||||
Menu will be shown correctly.
|
||||
Newline at the end is not seen.
|
||||
|
||||
** Type some string with ac-auto-start nil
|
||||
Assume:
|
||||
(setq ac-auto-start nil)
|
||||
|
||||
Expect:
|
||||
Completion will never be started automatically.
|
||||
|
||||
** Type some string with ac-auto-start t
|
||||
Assume:
|
||||
(setq ac-auto-start t)
|
||||
|
||||
Expect:
|
||||
Completion will be started automatically if possible.
|
||||
|
||||
** Type 1 character with ac-auto-start 2
|
||||
Assume:
|
||||
(setq ac-auto-start 2)
|
||||
|
||||
Expect:
|
||||
Completion will never be started automatically.
|
||||
|
||||
** Type 2 characters with ac-auto-start 2
|
||||
Assume:
|
||||
(setq ac-auto-start 2)
|
||||
|
||||
Expect:
|
||||
Completion will be started automatically if possible.
|
||||
|
||||
** Type F
|
||||
Expect:
|
||||
Menu contains "Foo" and "FooBar" as candidates.
|
||||
Inline completion appears and it contains "oo" as common-part.
|
||||
|
||||
** Type TAB while completion with ac-dwim disabled
|
||||
Assume:
|
||||
(setq ac-dwim nil)
|
||||
|
||||
Expect:
|
||||
(a) If there is common-part of candidates, auto-complete expands it.
|
||||
(b) If the prefix equals to the first of candidates, auto-complete selects next candidate.
|
||||
(c) Othewise, auto-complete expands selected candidate.
|
||||
|
||||
** Type TAB while completion with ac-dwim enabled
|
||||
Assume:
|
||||
(setq ac-dwim t)
|
||||
|
||||
Expect:
|
||||
(a) If there is common-part of candidates, auto-complete expands it.
|
||||
(b) If only one candidate remains, or if it is done after selecting be ac-previous/ac-next,
|
||||
auto-complete simulates ac-complete.
|
||||
- If its candidate has an action, the action will be invoked. ("Action1" and "Action2" have an action)
|
||||
- Expand its candidate.
|
||||
(c) If the prefix equals to the first of candidates, auto-complete selects next candidate.
|
||||
(d) Othewise, auto-complete expands selected candidate.
|
||||
|
||||
** Type RET while completion
|
||||
Expect:
|
||||
Completion will be done for selected candidate.
|
||||
If its candidate has an action, the action will be invoked.
|
||||
Use "Action" for the prefix for test.
|
||||
|
||||
* Configuration
|
||||
|
||||
** Change menu height
|
||||
Code:
|
||||
(setq ac-menu-height 20)
|
||||
|
||||
Expect:
|
||||
Up to 20 candidates will be shown in a menu.
|
||||
|
||||
** Use trigger key facility
|
||||
Code:
|
||||
(ac-set-trigger-key "TAB")
|
||||
|
||||
Expect:
|
||||
Now you can use TAB for auto-completion.
|
||||
It is enabled only when
|
||||
(a) After insertion/deletion command
|
||||
(b) With prefix (C-u TAB)
|
||||
Otherwise, it behaves as default.
|
||||
Generally, it is used with ac-auto-start disabled.
|
||||
|
||||
** Use ac-mode-map
|
||||
Code:
|
||||
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
|
||||
|
||||
Expect:
|
||||
Now you can start auto-complete with typing M-TAB anywhere.
|
||||
|
||||
** Change default ac-sources
|
||||
Code:
|
||||
(setq-default ac-sources '(ac-source-words-in-all-buffer))
|
||||
|
||||
Expect:
|
||||
Now default ac-sources has been changed for newly opened buffers.
|
||||
|
||||
* Builtin sources
|
||||
|
||||
** ac-source-words-in-buffer
|
||||
Expect:
|
||||
Candidates will be words in the current buffer.
|
||||
|
||||
** ac-source-words-in-all-buffer
|
||||
Expect:
|
||||
Candidates will be words in all buffer.
|
||||
|
||||
** ac-source-words-in-same-mode-buffers
|
||||
Expect:
|
||||
Candidates will be words for buffers which major-mode same to
|
||||
the current buffer's one.
|
||||
|
||||
** ac-source-symbols
|
||||
Expect:
|
||||
Candidates will be all Emacs Lisp symbols.
|
||||
|
||||
** ac-source-abbrev
|
||||
Expect:
|
||||
Candidates will be abbreviations of local-abbrev-table and global-abbrev-table.
|
||||
|
||||
** ac-source-files-in-current-dir
|
||||
Expect:
|
||||
Candidates will be files contained by the current directory (default-directory).
|
||||
|
||||
** ac-source-filename
|
||||
Expect:
|
||||
Candidates will be absolute/relative file name.
|
||||
This source will be executed when the prefix seems to be file name.
|
||||
That is, the prefix contains slash (/) and a string between first to
|
||||
last flash is a valid directory.
|
||||
When ac-complete, this continues to complete if the prefix is a valid directory.
|
||||
|
||||
** ac-source-imenu
|
||||
Expect:
|
||||
Candidates will be a node of imenu tree.
|
||||
|
|
@ -1,255 +0,0 @@
|
|||
;;; fuzzy.el --- Fuzzy matching utilities
|
||||
|
||||
;; Copyright (C) 2010 Tomohiro Matsuyama
|
||||
|
||||
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
(require 'regexp-opt)
|
||||
|
||||
(defgroup fuzzy nil
|
||||
"Fuzzy matching utilities."
|
||||
:group 'convenience
|
||||
:prefix "fuzzy-")
|
||||
|
||||
(defcustom fuzzy-accept-error-rate 0.10
|
||||
"Error threshold."
|
||||
:group 'fuzzy)
|
||||
|
||||
(defvar fuzzy-accept-length-difference 2)
|
||||
|
||||
(defvar fuzzy-regexp-some-char (format "\\w\\{0,%s\\}" fuzzy-accept-length-difference))
|
||||
|
||||
|
||||
|
||||
;;; Functions
|
||||
|
||||
(defun fuzzy-reverse-string (string)
|
||||
(apply 'string (nreverse (append string nil))))
|
||||
|
||||
(defun fuzzy-regexp-compile (string)
|
||||
(labels ((oddp (n) (eq (logand n 1) 1))
|
||||
(evenp (n) (eq (logand n 1) 0))
|
||||
(opt (n) (regexp-opt-charset (append (substring string
|
||||
(max 0 (- n 1))
|
||||
(min (length string) (+ n 2))) nil))))
|
||||
(concat
|
||||
"\\("
|
||||
(loop for i below (length string)
|
||||
for c = (if (evenp i) (opt i) fuzzy-regexp-some-char)
|
||||
concat c)
|
||||
"\\|"
|
||||
(loop for i below (length string)
|
||||
for c = (if (oddp i) (opt i) fuzzy-regexp-some-char)
|
||||
concat c)
|
||||
"\\)")))
|
||||
|
||||
(defalias 'fuzzy-edit-distance 'fuzzy-jaro-winkler-distance)
|
||||
|
||||
(defun fuzzy-jaro-winkler-distance (s1 s2)
|
||||
"http://en.wikipedia.org/wiki/Jaro-Winkler_distance"
|
||||
(let* ((l1 (length s1))
|
||||
(l2 (length s2))
|
||||
(r (max 1 (1- (/ (max l1 l2) 2))))
|
||||
(m 0)
|
||||
(tr 0)
|
||||
(p 0)
|
||||
cs1 cs2)
|
||||
(loop with seen = (make-vector l2 nil)
|
||||
for i below l1
|
||||
for c1 = (aref s1 i) do
|
||||
(loop for j from (max 0 (- i r)) below (min l2 (+ i r))
|
||||
for c2 = (aref s2 j)
|
||||
if (and (char-equal c1 c2)
|
||||
(null (aref seen j))) do
|
||||
(push c1 cs1)
|
||||
(aset seen j c2)
|
||||
(incf m)
|
||||
and return nil)
|
||||
finally
|
||||
(setq cs1 (nreverse cs1)
|
||||
cs2 (loop for i below l2
|
||||
for c = (aref seen i)
|
||||
if c collect c)))
|
||||
(loop for c1 in cs1
|
||||
for c2 in cs2
|
||||
if (not (char-equal c1 c2)) do
|
||||
(incf tr))
|
||||
(loop for i below (min m 5)
|
||||
for c1 across s1
|
||||
for c2 across s2
|
||||
while (char-equal c1 c2) do
|
||||
(incf p))
|
||||
(if (eq m 0)
|
||||
0.0
|
||||
(setq m (float m))
|
||||
(let* ((dj (/ (+ (/ m l1) (/ m l2) (/ (- m (/ tr 2)) m)) 3))
|
||||
(dw (+ dj (* p 0.1 (- 1 dj)))))
|
||||
dw))))
|
||||
|
||||
;; this function should be compiled
|
||||
(byte-compile 'fuzzy-jaro-winkler-distance)
|
||||
|
||||
(defun fuzzy-match (s1 s2 &optional function)
|
||||
(or function (setq function 'fuzzy-edit-distance))
|
||||
(and (<= (abs (- (length s1) (length s2)))
|
||||
fuzzy-accept-length-difference)
|
||||
(>= (funcall function s1 s2)
|
||||
(- 1 fuzzy-accept-error-rate))))
|
||||
|
||||
(defun fuzzy-all-completions (string collection)
|
||||
"all-completions family with fuzzy matching."
|
||||
(loop with length = (length string)
|
||||
for str in collection
|
||||
for s = (substring str 0 (min (length str)
|
||||
(+ length fuzzy-accept-length-difference)))
|
||||
if (fuzzy-match string s)
|
||||
collect str))
|
||||
|
||||
|
||||
|
||||
;;; Search and Incremental Search
|
||||
|
||||
(defvar fuzzy-search-cache nil)
|
||||
(defvar fuzzy-search-cache-string nil)
|
||||
|
||||
(defun fuzzy-search-cache-activate ()
|
||||
(setq fuzzy-search-cache (make-hash-table))
|
||||
(setq fuzzy-search-cache-string nil))
|
||||
|
||||
(defun fuzzy-search-cache-deactive ()
|
||||
(setq fuzzy-search-cache nil)
|
||||
(setq fuzzy-search-cache-string nil))
|
||||
|
||||
(defun fuzzy-search-edit-distance (s1 s2)
|
||||
(or (and fuzzy-search-cache
|
||||
(cond
|
||||
((null fuzzy-search-cache-string)
|
||||
(setq fuzzy-search-cache-string s1)
|
||||
nil)
|
||||
((not (equal fuzzy-search-cache-string s1))
|
||||
(setq fuzzy-search-cache-string s1)
|
||||
(clrhash fuzzy-search-cache)
|
||||
nil)
|
||||
(t))
|
||||
(gethash s2 fuzzy-search-cache))
|
||||
(let ((d (fuzzy-edit-distance s1 s2)))
|
||||
(if fuzzy-search-cache
|
||||
(puthash s2 d fuzzy-search-cache))
|
||||
d)))
|
||||
|
||||
(defun fuzzy-search-match (s1 s2)
|
||||
(fuzzy-match s1 s2 'fuzzy-search-edit-distance))
|
||||
|
||||
(defun fuzzy-search-forward (string &optional bound noerror count)
|
||||
(let* ((regexp (fuzzy-regexp-compile string))
|
||||
match-data)
|
||||
(save-excursion
|
||||
(while (and (null match-data)
|
||||
(re-search-forward regexp bound t))
|
||||
(if (fuzzy-search-match string (match-string 1))
|
||||
(setq match-data (match-data))
|
||||
(goto-char (1+ (match-beginning 1))))))
|
||||
(when match-data
|
||||
(store-match-data match-data)
|
||||
(goto-char (match-end 1)))))
|
||||
|
||||
(defun fuzzy-search-backward (string &optional bound noerror count)
|
||||
(let* ((regexp (fuzzy-regexp-compile string))
|
||||
match-data begin end)
|
||||
(save-excursion
|
||||
(while (and (null match-data)
|
||||
(re-search-backward regexp bound t))
|
||||
(setq begin (match-beginning 1)
|
||||
end (match-end 1))
|
||||
(store-match-data nil)
|
||||
(goto-char (max (point-min) (- begin (* (length string) 2))))
|
||||
(while (re-search-forward regexp end t)
|
||||
(if (fuzzy-search-match string (match-string 1))
|
||||
(setq match-data (match-data))
|
||||
(goto-char (1+ (match-beginning 1)))))
|
||||
(unless match-data
|
||||
(goto-char begin)))
|
||||
(if match-data
|
||||
(progn
|
||||
(store-match-data match-data)
|
||||
(goto-char (match-beginning 1)))
|
||||
(store-match-data nil)))))
|
||||
|
||||
(defvar fuzzy-isearch nil)
|
||||
(defvar fuzzy-isearch-failed-count 0)
|
||||
(defvar fuzzy-isearch-enabled 'on-failed)
|
||||
(defvar fuzzy-isearch-original-search-fun nil)
|
||||
(defvar fuzzy-isearch-prefix "[FUZZY] ")
|
||||
|
||||
(defun fuzzy-isearch-activate ()
|
||||
(setq fuzzy-isearch t)
|
||||
(setq fuzzy-isearch-failed-count 0)
|
||||
(fuzzy-search-cache-activate))
|
||||
|
||||
(defun fuzzy-isearch-deactivate ()
|
||||
(setq fuzzy-isearch nil)
|
||||
(setq fuzzy-isearch-failed-count 0)
|
||||
(fuzzy-search-cache-deactive))
|
||||
|
||||
(defun fuzzy-isearch ()
|
||||
(cond (isearch-word
|
||||
(if isearch-forward 'word-search-forward 'word-search-backward))
|
||||
(isearch-regexp
|
||||
(if isearch-forward 're-search-forward 're-search-backward))
|
||||
((or fuzzy-isearch
|
||||
(eq fuzzy-isearch-enabled 'always)
|
||||
(and (eq fuzzy-isearch-enabled 'on-failed)
|
||||
(null isearch-success)
|
||||
isearch-wrapped
|
||||
(> (setq fuzzy-isearch-failed-count (1+ fuzzy-isearch-failed-count))
|
||||
1)))
|
||||
(unless fuzzy-isearch
|
||||
;(goto-char isearch-opoint)
|
||||
(fuzzy-isearch-activate))
|
||||
(if isearch-forward 'fuzzy-search-forward 'fuzzy-search-backward))
|
||||
(t
|
||||
(if isearch-forward 'search-forward 'search-backward))))
|
||||
|
||||
(defun fuzzy-isearch-end-hook ()
|
||||
(fuzzy-isearch-deactivate))
|
||||
|
||||
(defun turn-on-fuzzy-isearch ()
|
||||
(interactive)
|
||||
(setq fuzzy-isearch-original-search-fun isearch-search-fun-function)
|
||||
(setq isearch-search-fun-function 'fuzzy-isearch)
|
||||
(add-hook 'isearch-mode-end-hook 'fuzzy-isearch-end-hook))
|
||||
|
||||
(defun turn-off-fuzzy-isearch ()
|
||||
(interactive)
|
||||
(setq isearch-search-fun-function fuzzy-isearch-original-search-fun)
|
||||
(remove-hook 'isearch-mode-end-hook 'fuzzy-isearch-end-hook))
|
||||
|
||||
(defadvice isearch-message-prefix (after fuzzy-isearch-message-prefix activate)
|
||||
(if fuzzy-isearch
|
||||
(setq ad-return-value (concat fuzzy-isearch-prefix ad-return-value))
|
||||
ad-return-value))
|
||||
|
||||
(provide 'fuzzy)
|
||||
;;; fuzzy.el ends here
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
;;; -*-emacs-lisp-*-
|
||||
|
||||
;; Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
(defvar generated-autoload-file)
|
||||
(defvar command-line-args-left)
|
||||
(defun color-theme-generate-autoloads ()
|
||||
(interactive)
|
||||
(require 'autoload)
|
||||
(setq generated-autoload-file (car command-line-args-left))
|
||||
(setq command-line-args-left (cdr command-line-args-left))
|
||||
(batch-update-autoloads))
|
||||
|
||||
(provide 'color-theme-autoloads)
|
||||
;;; Generated autoloads follow (made by autoload.el).
|
||||
|
||||
;;;### (autoloads nil nil ("themes/color-theme-example.el" "themes/color-theme-library.el")
|
||||
;;;;;; (19535 4173 130526))
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (color-theme-initialize color-theme-submit color-theme-install
|
||||
;;;;;; color-theme-compare color-theme-make-snapshot color-theme-analyze-defun
|
||||
;;;;;; color-theme-print color-theme-install-at-point-for-current-frame
|
||||
;;;;;; color-theme-install-at-mouse color-theme-describe color-theme-select)
|
||||
;;;;;; "color-theme" "color-theme.el" (17529 41105))
|
||||
;;; Generated autoloads from color-theme.el
|
||||
|
||||
(autoload (quote color-theme-select) "color-theme" "\
|
||||
Displays a special buffer for selecting and installing a color theme.
|
||||
With optional prefix ARG, this buffer will include color theme libraries
|
||||
as well. A color theme library is in itself not complete, it must be
|
||||
used as part of another color theme to be useful. Thus, color theme
|
||||
libraries are mainly useful for color theme authors.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(autoload (quote color-theme-describe) "color-theme" "\
|
||||
Describe color theme listed at point.
|
||||
This shows the documentation of the value of text-property color-theme
|
||||
at point. The text-property color-theme should be a color theme
|
||||
function. See `color-themes'.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload (quote color-theme-install-at-mouse) "color-theme" "\
|
||||
Install color theme clicked upon using the mouse.
|
||||
First argument EVENT is used to set point. Then
|
||||
`color-theme-install-at-point' is called.
|
||||
|
||||
\(fn EVENT)" t nil)
|
||||
|
||||
(autoload (quote color-theme-install-at-point-for-current-frame) "color-theme" "\
|
||||
Install color theme at point for current frame only.
|
||||
Binds `color-theme-is-global' to nil and calls
|
||||
`color-theme-install-at-point'.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload (quote color-theme-print) "color-theme" "\
|
||||
Print the current color theme function.
|
||||
|
||||
You can contribute this function to <URL:news:gnu.emacs.sources> or
|
||||
paste it into your .emacs file and call it. That should recreate all
|
||||
the settings necessary for your color theme.
|
||||
|
||||
Example:
|
||||
|
||||
(require 'color-theme)
|
||||
(defun my-color-theme ()
|
||||
\"Color theme by Alex Schroeder, created 2000-05-17.\"
|
||||
(interactive)
|
||||
(color-theme-install
|
||||
'(...
|
||||
...
|
||||
...)))
|
||||
(my-color-theme)
|
||||
|
||||
If you want to use a specific color theme function, you can call the
|
||||
color theme function in your .emacs directly.
|
||||
|
||||
Example:
|
||||
|
||||
(require 'color-theme)
|
||||
(color-theme-gnome2)
|
||||
|
||||
\(fn &optional BUF)" t nil)
|
||||
|
||||
(autoload (quote color-theme-analyze-defun) "color-theme" "\
|
||||
Once you have a color-theme printed, check for missing faces.
|
||||
This is used by maintainers who receive a color-theme submission
|
||||
and want to make sure it follows the guidelines by the color-theme
|
||||
author.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload (quote color-theme-make-snapshot) "color-theme" "\
|
||||
Return the definition of the current color-theme.
|
||||
The function returned will recreate the color-theme in use at the moment.
|
||||
|
||||
\(fn)" nil nil)
|
||||
|
||||
(autoload (quote color-theme-compare) "color-theme" "\
|
||||
Compare two color themes.
|
||||
This will print the differences between installing THEME-A and
|
||||
installing THEME-B. Note that the order is important: If a face is
|
||||
defined in THEME-A and not in THEME-B, then this will not show up as a
|
||||
difference, because there is no reset before installing THEME-B. If a
|
||||
face is defined in THEME-B and not in THEME-A, then this will show up as
|
||||
a difference.
|
||||
|
||||
\(fn THEME-A THEME-B)" t nil)
|
||||
|
||||
(autoload (quote color-theme-install) "color-theme" "\
|
||||
Install a color theme defined by frame parameters, variables and faces.
|
||||
|
||||
The theme is installed for all present and future frames; any missing
|
||||
faces are created. See `color-theme-install-faces'.
|
||||
|
||||
THEME is a color theme definition. See below for more information.
|
||||
|
||||
If you want to install a color theme from your .emacs, use the output
|
||||
generated by `color-theme-print'. This produces color theme function
|
||||
which you can copy to your .emacs.
|
||||
|
||||
A color theme definition is a list:
|
||||
\([FUNCTION] FRAME-PARAMETERS VARIABLE-SETTINGS FACE-DEFINITIONS)
|
||||
|
||||
FUNCTION is the color theme function which called `color-theme-install'.
|
||||
This is no longer used. There was a time when this package supported
|
||||
automatic factoring of color themes. This has been abandoned.
|
||||
|
||||
FRAME-PARAMETERS is an alist of frame parameters. These are installed
|
||||
with `color-theme-install-frame-params'. These are installed last such
|
||||
that any changes to the default face can be changed by the frame
|
||||
parameters.
|
||||
|
||||
VARIABLE-DEFINITIONS is an alist of variable settings. These are
|
||||
installed with `color-theme-install-variables'.
|
||||
|
||||
FACE-DEFINITIONS is an alist of face definitions. These are installed
|
||||
with `color-theme-install-faces'.
|
||||
|
||||
If `color-theme-is-cumulative' is nil, a color theme will undo face and
|
||||
frame-parameter settings of previous color themes.
|
||||
|
||||
\(fn THEME)" nil nil)
|
||||
|
||||
(autoload (quote color-theme-submit) "color-theme" "\
|
||||
Submit your color-theme to the maintainer.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload (quote color-theme-initialize) "color-theme" "\
|
||||
Initialize the color theme package by loading color-theme-libraries.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
;;;***
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
-- Comments are coloured brightly and stand out clearly.
|
||||
|
||||
import qualified Foo as F hiding (toto)
|
||||
import qualified Foo hiding (toto)
|
||||
import qualified Foo as F (toto)
|
||||
import Foo as F hiding (toto)
|
||||
import Foo hiding (toto)
|
||||
import Foo as F (toto)
|
||||
|
||||
hiding = 1
|
||||
qualified = 3
|
||||
as = 2
|
||||
|
||||
repeat :: a -> [a]
|
||||
repeat xs = xs where xs = x:xs -- Keywords are also bright.
|
||||
|
||||
head :: [a] -> a
|
||||
head (x:_) = x
|
||||
head [] = error "PreludeList.head: empty list" -- Strings are coloured softly.
|
||||
|
||||
data Maybe a = Nothing | Just a -- Type constructors, data
|
||||
deriving (Eq, Ord, Read, Show) -- constructors, class names
|
||||
-- and module names are coloured
|
||||
-- closer to ordinary code.
|
||||
|
||||
recognize +++ infix :: Operator Declarations
|
||||
as `well` as = This Form
|
||||
(+) and this one = as well
|
||||
|
||||
instance Show Toto where
|
||||
fun1 arg1 = foo -- FIXME: `fun1' should be highlighted.
|
||||
|
||||
constStr = "hello \
|
||||
\asdgfasgf\
|
||||
\asf"
|
||||
|
||||
{-
|
||||
map :: (a -> b) -> [a] -> [b] -- Commenting out large sections of
|
||||
map f [] = [] -- code can be misleading. Coloured
|
||||
map f (x:xs) = f x : map f xs -- comments reveal unused definitions.
|
||||
-}
|
||||
|
||||
-- Note: the least significant bit is the first element of the list
|
||||
bdigits :: Int -> [Int]
|
||||
bdigits 0 = [0]
|
||||
bdigits 1 = [1]
|
||||
bdigits n | n>1 = n `mod` 2 :
|
||||
|
||||
-- arch-tag: a0d08cc2-4a81-4139-93bc-b3c6be0b5fb2
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
;;; haskell-c.el --- Major mode for *.hsc files
|
||||
|
||||
;; Copyright (C) 2007 Stefan Monnier
|
||||
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; This file is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs; see the file COPYING. If not, write to
|
||||
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
;; Boston, MA 02110-1301, USA.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'haskell-mode)
|
||||
(require 'haskell-font-lock)
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.hsc\\'" . haskell-c-mode))
|
||||
|
||||
(defvar haskell-c-font-lock-keywords
|
||||
`(("^#[ \t]*[[:alnum:]]+" (0 font-lock-preprocessor-face))
|
||||
,@haskell-font-lock-symbols))
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode haskell-c-mode haskell-mode "Haskell-C"
|
||||
"Major mode for Haskell FFI files."
|
||||
(set (make-local-variable 'font-lock-keywords)
|
||||
(cons 'haskell-c-font-lock-keywords
|
||||
(cdr font-lock-keywords))))
|
||||
|
||||
(provide 'haskell-c)
|
||||
;; arch-tag: 51294c41-29f0-4599-9ce8-47fe2e7d3fd5
|
||||
;;; haskell-c.el ends here
|
||||
|
|
@ -1,183 +0,0 @@
|
|||
;;; haskell-cabal.el --- Support for Cabal packages
|
||||
|
||||
;; Copyright (C) 2007, 2008 Stefan Monnier
|
||||
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; This file is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs; see the file COPYING. If not, write to
|
||||
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
;; Boston, MA 02110-1301, USA.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Todo:
|
||||
|
||||
;; - distinguish continued lines from indented lines.
|
||||
;; - indent-line-function.
|
||||
;; - outline-minor-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; (defun haskell-cabal-extract-fields-from-doc ()
|
||||
;; (require 'xml)
|
||||
;; (require 'cl)
|
||||
;; (let ((section (completing-read
|
||||
;; "Section: "
|
||||
;; '("general-fields" "library" "executable" "buildinfo"))))
|
||||
;; (goto-char (point-min))
|
||||
;; (search-forward (concat "<sect3 id=\"" section "\">")))
|
||||
;; (let* ((xml (xml-parse-region
|
||||
;; (progn (search-forward "<variablelist>") (match-beginning 0))
|
||||
;; (progn (search-forward "</variablelist>") (point))))
|
||||
;; (varlist (remove-if-not 'consp (cddar xml)))
|
||||
;; (syms (mapcar (lambda (entry) (caddr (assq 'literal (assq 'term entry))))
|
||||
;; varlist))
|
||||
;; (fields (mapcar (lambda (sym) (substring-no-properties sym 0 -1)) syms)))
|
||||
;; fields))
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
|
||||
(defconst haskell-cabal-general-fields
|
||||
;; Extracted with (haskell-cabal-extract-fields-from-doc "general-fields")
|
||||
'("name" "version" "cabal-version" "license" "license-file" "copyright"
|
||||
"author" "maintainer" "stability" "homepage" "package-url" "synopsis"
|
||||
"description" "category" "tested-with" "build-depends" "data-files"
|
||||
"extra-source-files" "extra-tmp-files"))
|
||||
|
||||
(defconst haskell-cabal-library-fields
|
||||
;; Extracted with (haskell-cabal-extract-fields-from-doc "library")
|
||||
'("exposed-modules"))
|
||||
|
||||
(defconst haskell-cabal-executable-fields
|
||||
;; Extracted with (haskell-cabal-extract-fields-from-doc "executable")
|
||||
'("executable" "main-is"))
|
||||
|
||||
(defconst haskell-cabal-buildinfo-fields
|
||||
;; Extracted with (haskell-cabal-extract-fields-from-doc "buildinfo")
|
||||
'("buildable" "other-modules" "hs-source-dirs" "extensions" "ghc-options"
|
||||
"ghc-prof-options" "hugs-options" "nhc-options" "includes"
|
||||
"install-includes" "include-dirs" "c-sources" "extra-libraries"
|
||||
"extra-lib-dirs" "cc-options" "ld-options" "frameworks"))
|
||||
|
||||
(defvar haskell-cabal-mode-syntax-table
|
||||
(let ((st (make-syntax-table)))
|
||||
;; The comment syntax can't be described simply in syntax-table.
|
||||
;; We could use font-lock-syntactic-keywords, but is it worth it?
|
||||
;; (modify-syntax-entry ?- ". 12" st)
|
||||
(modify-syntax-entry ?\n ">" st)
|
||||
st))
|
||||
|
||||
(defvar haskell-cabal-font-lock-keywords
|
||||
;; The comment syntax can't be described simply in syntax-table.
|
||||
;; We could use font-lock-syntactic-keywords, but is it worth it?
|
||||
'(("^[ \t]*--.*" . font-lock-comment-face)
|
||||
("^ *\\([^ \t:]+\\):" (1 font-lock-keyword-face))
|
||||
("^\\(Library\\)[ \t]*\\({\\|$\\)" (1 font-lock-keyword-face))
|
||||
("^\\(Executable\\)[ \t]+\\([^\n \t]*\\)"
|
||||
(1 font-lock-keyword-face) (2 font-lock-function-name-face))
|
||||
("^\\(Flag\\)[ \t]+\\([^\n \t]*\\)"
|
||||
(1 font-lock-keyword-face) (2 font-lock-constant-face))
|
||||
("^ *\\(if\\)[ \t]+.*\\({\\|$\\)" (1 font-lock-keyword-face))
|
||||
("^ *\\(}[ \t]*\\)?\\(else\\)[ \t]*\\({\\|$\\)"
|
||||
(2 font-lock-keyword-face))))
|
||||
|
||||
(defvar haskell-cabal-buffers nil
|
||||
"List of Cabal buffers.")
|
||||
|
||||
;; (defsubst* inferior-haskell-string-prefix-p (str1 str2)
|
||||
;; "Return non-nil if STR1 is a prefix of STR2"
|
||||
;; (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
|
||||
|
||||
(defun haskell-cabal-find-file ()
|
||||
"Return a buffer visiting the cabal file of the current directory, or nil."
|
||||
(catch 'found
|
||||
;; ;; First look for it in haskell-cabal-buffers.
|
||||
;; (dolist (buf haskell-cabal-buffers)
|
||||
;; (if (inferior-haskell-string-prefix-p
|
||||
;; (with-current-buffer buf default-directory) default-directory)
|
||||
;; (throw 'found buf)))
|
||||
;; Then look up the directory hierarchy.
|
||||
(let ((user (nth 2 (file-attributes default-directory)))
|
||||
;; Abbreviate, so as to stop when we cross ~/.
|
||||
(root (abbreviate-file-name default-directory))
|
||||
files)
|
||||
(while (and root (equal user (nth 2 (file-attributes root))))
|
||||
(if (setq files (directory-files root 'full "\\.cabal\\'"))
|
||||
;; Avoid the .cabal directory.
|
||||
(dolist (file files (throw 'found nil))
|
||||
(unless (file-directory-p file)
|
||||
(throw 'found (find-file-noselect file))))
|
||||
(if (equal root
|
||||
(setq root (file-name-directory
|
||||
(directory-file-name root))))
|
||||
(setq root nil))))
|
||||
nil)))
|
||||
|
||||
(autoload 'derived-mode-p "derived") ; Emacs 21
|
||||
|
||||
(defun haskell-cabal-buffers-clean (&optional buffer)
|
||||
(let ((bufs ()))
|
||||
(dolist (buf haskell-cabal-buffers)
|
||||
(if (and (buffer-live-p buf) (not (eq buf buffer))
|
||||
(with-current-buffer buf (derived-mode-p 'haskell-cabal-mode)))
|
||||
(push buf bufs)))
|
||||
(setq haskell-cabal-buffers bufs)))
|
||||
|
||||
(defun haskell-cabal-unregister-buffer ()
|
||||
(haskell-cabal-buffers-clean (current-buffer)))
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.cabal\\'" . haskell-cabal-mode))
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode haskell-cabal-mode fundamental-mode "Haskell-Cabal"
|
||||
"Major mode for Cabal package description files."
|
||||
(set (make-local-variable 'font-lock-defaults)
|
||||
'(haskell-cabal-font-lock-keywords t t nil nil))
|
||||
(add-to-list 'haskell-cabal-buffers (current-buffer))
|
||||
(add-hook 'change-major-mode-hook 'haskell-cabal-unregister-buffer nil 'local)
|
||||
(add-hook 'kill-buffer-hook 'haskell-cabal-unregister-buffer nil 'local)
|
||||
(set (make-local-variable 'comment-start) "-- ")
|
||||
(set (make-local-variable 'comment-start-skip) "\\(^[ \t]*\\)--[ \t]*")
|
||||
(set (make-local-variable 'comment-end) "")
|
||||
(set (make-local-variable 'comment-end-skip) "[ ]*\\(\\s>\\|\n\\)")
|
||||
)
|
||||
|
||||
(defun haskell-cabal-get-setting (name)
|
||||
(save-excursion
|
||||
(let ((case-fold-search t))
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward
|
||||
(concat "^" (regexp-quote name)
|
||||
":[ \t]*\\(.*\\(\n[ \t]+[ \t\n].*\\)*\\)")
|
||||
nil t)
|
||||
(let ((val (match-string 1))
|
||||
(start 1))
|
||||
(when (match-end 2) ;Multiple lines.
|
||||
;; The documentation is not very precise about what to do about
|
||||
;; the \n and the indentation: are they part of the value or
|
||||
;; the encoding? I take the point of view that \n is part of
|
||||
;; the value (so that values can span multiple lines as well),
|
||||
;; and that only the first char in the indentation is part of
|
||||
;; the encoding, the rest is part of the value (otherwise, lines
|
||||
;; in the value cannot start with spaces or tabs).
|
||||
(while (string-match "^[ \t]\\(?:\\.$\\)?" val start)
|
||||
(setq start (1+ (match-beginning 0)))
|
||||
(setq val (replace-match "" t t val))))
|
||||
val)))))
|
||||
|
||||
(provide 'haskell-cabal)
|
||||
|
||||
;; arch-tag: d455f920-5e4d-42b6-a2c7-4a7e84a05c29
|
||||
;;; haskell-cabal.el ends here
|
||||
|
|
@ -1,334 +0,0 @@
|
|||
;;; haskell-ghci.el --- A GHCi interaction mode
|
||||
|
||||
;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001 Chris Webb
|
||||
;; Copyright (C) 1998, 1999 Guy Lapalme
|
||||
|
||||
;; Keywords: inferior mode, GHCi interaction mode, Haskell
|
||||
|
||||
;;; This file is not part of GNU Emacs.
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; This file is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Purpose:
|
||||
;;
|
||||
;; To send a Haskell buffer to another buffer running a GHCi
|
||||
;; interpreter.
|
||||
;;
|
||||
;; This mode is derived from version 1.1 of Guy Lapalme's
|
||||
;; haskell-hugs.el, which can be obtained from:
|
||||
;;
|
||||
;; http://www.iro.umontreal.ca/~lapalme/Hugs-interaction.html
|
||||
;;
|
||||
;; This in turn was adapted from Chris Van Humbeeck's hugs-mode.el,
|
||||
;; which can be obtained from:
|
||||
;;
|
||||
;; http://www-i2.informatik.rwth-aachen.de/Forschung/FP/Haskell/hugs-mode.el
|
||||
;;
|
||||
;;
|
||||
;; Installation:
|
||||
;;
|
||||
;; To use with Moss and Thorn's haskell-mode.el
|
||||
;;
|
||||
;; http://www.haskell.org/haskell-mode
|
||||
;;
|
||||
;; add this to .emacs:
|
||||
;;
|
||||
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
|
||||
;;
|
||||
;;
|
||||
;; Customisation:
|
||||
;;
|
||||
;; The name of the GHCi interpreter is in haskell-ghci-program-name.
|
||||
;;
|
||||
;; Arguments can be sent to the GHCi interpreter when it is started by
|
||||
;; setting haskell-ghci-program-args (empty by default) to a list of
|
||||
;; string args to pass it. This value can be set interactively by
|
||||
;; calling C-c C-s with an argument (i.e. C-u C-c C-s).
|
||||
;;
|
||||
;; `haskell-ghci-hook' is invoked in the *ghci* buffer once GHCi is
|
||||
;; started.
|
||||
;;
|
||||
;; All functions/variables start with `turn-{on,off}-haskell-ghci' or
|
||||
;; `haskell-ghci-'.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defgroup haskell-ghci nil
|
||||
"Major mode for interacting with an inferior GHCi session."
|
||||
:group 'haskell
|
||||
:prefix "haskell-ghci-")
|
||||
|
||||
(defun turn-on-haskell-ghci ()
|
||||
"Turn on Haskell interaction mode with a GHCi interpreter running in an
|
||||
another Emacs buffer named *ghci*.
|
||||
Maps the following commands in the haskell keymap:
|
||||
\\<haskell-mode-map>\\[haskell-ghci-start-process] to create the GHCi buffer and start a GHCi process in it.
|
||||
\\[haskell-ghci-load-file] to save the current buffer and load it by sending the :load command to GHCi.
|
||||
\\[haskell-ghci-reload-file] to send the :reload command to GHCi without saving the buffer.
|
||||
\\[haskell-ghci-show-ghci-buffer] to show the GHCi buffer and go to it."
|
||||
(local-set-key "\C-c\C-s" 'haskell-ghci-start-process)
|
||||
(local-set-key "\C-c\C-l" 'haskell-ghci-load-file)
|
||||
(local-set-key "\C-c\C-r" 'haskell-ghci-reload-file)
|
||||
(local-set-key "\C-c\C-n" 'haskell-ghci-locate-next-error)
|
||||
(local-set-key "\C-c\C-b" 'haskell-ghci-show-ghci-buffer))
|
||||
|
||||
(defun turn-off-haskell-ghci ()
|
||||
"Turn off Haskell interaction mode with a GHCi interpreter within a buffer."
|
||||
(local-unset-key "\C-c\C-s")
|
||||
(local-unset-key "\C-c\C-l")
|
||||
(local-unset-key "\C-c\C-r")
|
||||
(local-unset-key "\C-c\C-b"))
|
||||
|
||||
(define-derived-mode haskell-ghci-mode comint-mode "Haskell GHCi"
|
||||
"Major mode for interacting with an inferior GHCi session.
|
||||
|
||||
The commands available from within a Haskell script are:
|
||||
\\<haskell-mode-map>\\[haskell-ghci-start-process] to create the GHCi buffer and start a GHCi process in it.
|
||||
\\[haskell-ghci-load-file] to save the current buffer and load it by sending the :load command to GHCi.
|
||||
\\[haskell-ghci-reload-file] to send the :reload command to GHCi without saving the buffer.
|
||||
\\[haskell-ghci-show-ghci-buffer] to show the GHCi buffer and go to it.
|
||||
|
||||
\\<haskell-ghci-mode-map>Commands:
|
||||
\\[comint-send-input] after end of GHCi output sends line as input to GHCi.
|
||||
\\[comint-send-input] before end of GHCI output copies rest of line and sends it to GHCI as input.
|
||||
\\[comint-kill-input] and \\[backward-kill-word] are kill commands, imitating normal Unix input editing.
|
||||
\\[comint-interrupt-subjob] interrupts the comint or its current subjob if any.
|
||||
\\[comint-stop-subjob] stops, likewise. \\[comint-quit-subjob] sends quit signal.")
|
||||
|
||||
|
||||
;; GHCi interface:
|
||||
|
||||
(require 'comint)
|
||||
(require 'shell)
|
||||
|
||||
(defvar haskell-ghci-process nil
|
||||
"The active GHCi subprocess corresponding to current buffer.")
|
||||
|
||||
(defvar haskell-ghci-process-buffer nil
|
||||
"*Buffer used for communication with GHCi subprocess for current buffer.")
|
||||
|
||||
(defcustom haskell-ghci-program-name "ghci"
|
||||
"*The name of the GHCi interpreter program."
|
||||
:type 'string
|
||||
:group 'haskell-ghci)
|
||||
|
||||
(defcustom haskell-ghci-program-args nil
|
||||
"*A list of string args to pass when starting the GHCi interpreter."
|
||||
:type '(repeat string)
|
||||
:group 'haskell-ghci)
|
||||
|
||||
(defvar haskell-ghci-load-end nil
|
||||
"Position of the end of the last load command.")
|
||||
|
||||
(defvar haskell-ghci-error-pos nil
|
||||
"Position of the end of the last load command.")
|
||||
|
||||
(defvar haskell-ghci-send-end nil
|
||||
"Position of the end of the last send command.")
|
||||
|
||||
(defun haskell-ghci-start-process (arg)
|
||||
"Start a GHCi process and invoke `haskell-ghci-hook' if not nil.
|
||||
Prompt for a list of args if called with an argument."
|
||||
(interactive "P")
|
||||
(if arg
|
||||
;; XXX [CDW] Fix to use more natural 'string' version of the
|
||||
;; XXX arguments rather than a sexp.
|
||||
(setq haskell-ghci-program-args
|
||||
(read-minibuffer (format "List of args for %s:"
|
||||
haskell-ghci-program-name)
|
||||
(prin1-to-string haskell-ghci-program-args))))
|
||||
|
||||
;; Start the GHCi process in a new comint buffer.
|
||||
(message "Starting GHCi process `%s'." haskell-ghci-program-name)
|
||||
(setq haskell-ghci-process-buffer
|
||||
(apply 'make-comint
|
||||
"ghci" haskell-ghci-program-name nil
|
||||
haskell-ghci-program-args))
|
||||
(setq haskell-ghci-process
|
||||
(get-buffer-process haskell-ghci-process-buffer))
|
||||
|
||||
;; Select GHCi buffer temporarily.
|
||||
(set-buffer haskell-ghci-process-buffer)
|
||||
(haskell-ghci-mode)
|
||||
(make-local-variable 'shell-cd-regexp)
|
||||
(make-local-variable 'shell-dirtrackp)
|
||||
|
||||
;; Track directory changes using the `:cd' command.
|
||||
(setq shell-cd-regexp ":cd")
|
||||
(setq shell-dirtrackp t)
|
||||
(add-hook 'comint-input-filter-functions 'shell-directory-tracker nil 'local)
|
||||
|
||||
;; GHCi prompt should be of the form `ModuleName> '.
|
||||
(setq comint-prompt-regexp
|
||||
"^\\*?[[:upper:]][\\._[:alnum:]]*\\( \\*?[[:upper:]][\\._[:alnum:]]*\\)*> ")
|
||||
|
||||
;; History syntax of comint conflicts with Haskell, e.g. !!, so better
|
||||
;; turn it off.
|
||||
(setq comint-input-autoexpand nil)
|
||||
(setq comint-process-echoes nil)
|
||||
(run-hooks 'haskell-ghci-hook)
|
||||
|
||||
;; Clear message area.
|
||||
(message ""))
|
||||
|
||||
(defun haskell-ghci-wait-for-output ()
|
||||
"Wait until output arrives and go to the last input."
|
||||
(while (progn
|
||||
(goto-char comint-last-input-end)
|
||||
(not (re-search-forward comint-prompt-regexp nil t)))
|
||||
(accept-process-output haskell-ghci-process)))
|
||||
|
||||
(defun haskell-ghci-send (&rest string)
|
||||
"Send `haskell-ghci-process' the arguments (one or more strings).
|
||||
A newline is sent after the strings and they are inserted into the
|
||||
current buffer after the last output."
|
||||
(haskell-ghci-wait-for-output) ; wait for prompt
|
||||
(goto-char (point-max)) ; position for this input
|
||||
(apply 'insert string)
|
||||
(comint-send-input)
|
||||
(setq haskell-ghci-send-end (marker-position comint-last-input-end)))
|
||||
|
||||
(defun haskell-ghci-go (load-command cd)
|
||||
"Save the current buffer and load its file into the GHCi process.
|
||||
The first argument LOAD-COMMAND specifies how the file should be
|
||||
loaded: as a new file (\":load \") or as a reload (\":reload \").
|
||||
|
||||
If the second argument CD is non-nil, change directory in the GHCi
|
||||
process to the current buffer's directory before loading the file.
|
||||
|
||||
If the variable `haskell-ghci-command' is set then its value will be
|
||||
sent to the GHCi process after the load command. This can be used for a
|
||||
top-level expression to evaluate."
|
||||
(hack-local-variables) ; in case they've changed
|
||||
(save-buffer)
|
||||
(let ((file (if (string-equal load-command ":load ")
|
||||
(concat "\"" buffer-file-name "\"")
|
||||
""))
|
||||
(dir (expand-file-name default-directory))
|
||||
(cmd (and (boundp 'haskell-ghci-command)
|
||||
haskell-ghci-command
|
||||
(if (stringp haskell-ghci-command)
|
||||
haskell-ghci-command
|
||||
(symbol-name haskell-ghci-command)))))
|
||||
(if (and haskell-ghci-process-buffer
|
||||
(eq (process-status haskell-ghci-process) 'run))
|
||||
;; Ensure the GHCi buffer is selected.
|
||||
(set-buffer haskell-ghci-process-buffer)
|
||||
;; Start Haskell-GHCi process.
|
||||
(haskell-ghci-start-process nil))
|
||||
|
||||
(if cd (haskell-ghci-send (concat ":cd " dir)))
|
||||
;; Wait until output arrives and go to the last input.
|
||||
(haskell-ghci-wait-for-output)
|
||||
(haskell-ghci-send load-command file)
|
||||
;; Error message search starts from last load command.
|
||||
(setq haskell-ghci-load-end (marker-position comint-last-input-end))
|
||||
(setq haskell-ghci-error-pos haskell-ghci-load-end)
|
||||
(if cmd (haskell-ghci-send cmd))
|
||||
;; Wait until output arrives and go to the last input.
|
||||
(haskell-ghci-wait-for-output)))
|
||||
|
||||
(defun haskell-ghci-load-file (cd)
|
||||
"Save a ghci buffer file and load its file.
|
||||
If CD (prefix argument if interactive) is non-nil, change directory in
|
||||
the GHCi process to the current buffer's directory before loading the
|
||||
file. If there is an error, set the cursor at the error line otherwise
|
||||
show the *ghci* buffer."
|
||||
(interactive "P")
|
||||
(haskell-ghci-gen-load-file ":load " cd))
|
||||
|
||||
(defun haskell-ghci-reload-file (cd)
|
||||
"Save a ghci buffer file and load its file.
|
||||
If CD (prefix argument if interactive) is non-nil, change the GHCi
|
||||
process to the current buffer's directory before loading the file.
|
||||
If there is an error, set the cursor at the error line otherwise show
|
||||
the *ghci* buffer."
|
||||
(interactive "P")
|
||||
(haskell-ghci-gen-load-file ":reload " cd))
|
||||
|
||||
(defun haskell-ghci-gen-load-file (cmd cd)
|
||||
"Save a ghci buffer file and load its file or reload depending on CMD.
|
||||
If CD is non-nil, change the process to the current buffer's directory
|
||||
before loading the file. If there is an error, set the cursor at the
|
||||
error line otherwise show the *ghci* buffer."
|
||||
|
||||
;; Execute (re)load command.
|
||||
(save-excursion (haskell-ghci-go cmd cd))
|
||||
|
||||
;; Show *ghci* buffer.
|
||||
(pop-to-buffer haskell-ghci-process-buffer)
|
||||
(goto-char haskell-ghci-load-end)
|
||||
|
||||
;; Did we finish loading without error?
|
||||
(if (re-search-forward
|
||||
"^Ok, modules loaded" nil t)
|
||||
(progn (goto-char (point-max))
|
||||
(recenter 2)
|
||||
(message "There were no errors."))
|
||||
|
||||
;; Something went wrong. If possible, be helpful and pinpoint the
|
||||
;; first error in the file whilst leaving the error visible in the
|
||||
;; *ghci* buffer.
|
||||
(goto-char haskell-ghci-load-end)
|
||||
(haskell-ghci-locate-next-error)))
|
||||
|
||||
|
||||
(defun haskell-ghci-locate-next-error ()
|
||||
"Go to the next error shown in the *ghci* buffer."
|
||||
(interactive)
|
||||
(if (buffer-live-p haskell-ghci-process-buffer)
|
||||
(progn (pop-to-buffer haskell-ghci-process-buffer)
|
||||
(goto-char haskell-ghci-error-pos)
|
||||
(if (re-search-forward
|
||||
"^[^\/]*\\([^:\n]+\\):\\([0-9]+\\)" nil t)
|
||||
(let ((efile (buffer-substring (match-beginning 1)
|
||||
(match-end 1)))
|
||||
(eline (string-to-int
|
||||
(buffer-substring (match-beginning 2)
|
||||
(match-end 2)))))
|
||||
|
||||
(recenter 2)
|
||||
(setq haskell-ghci-error-pos (point))
|
||||
(message "GHCi error on line %d of %s."
|
||||
eline (file-name-nondirectory efile))
|
||||
(if (file-exists-p efile)
|
||||
(progn (find-file-other-window efile)
|
||||
(goto-line eline)
|
||||
(recenter))))
|
||||
|
||||
;; We got an error without a file and line number, so put the
|
||||
;; point at end of the *ghci* buffer ready to deal with it.
|
||||
(goto-char (point-max))
|
||||
(recenter -2)
|
||||
(message "No more errors found.")))
|
||||
(message "No *ghci* buffer found.")))
|
||||
|
||||
(defun haskell-ghci-show-ghci-buffer ()
|
||||
"Go to the *ghci* buffer."
|
||||
(interactive)
|
||||
(if (or (not haskell-ghci-process-buffer)
|
||||
(not (buffer-live-p haskell-ghci-process-buffer)))
|
||||
(haskell-ghci-start-process nil))
|
||||
(pop-to-buffer haskell-ghci-process-buffer))
|
||||
|
||||
(provide 'haskell-ghci)
|
||||
|
||||
;; arch-tag: f0bade4b-288d-4329-9791-98c1e24167ac
|
||||
;;; haskell-ghci.el ends here
|
||||
|
|
@ -1,316 +0,0 @@
|
|||
;;; haskell-hugs.el --- simplistic interaction mode with a
|
||||
|
||||
;; Copyright 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
;; Copyright 1998, 1999 Guy Lapalme
|
||||
|
||||
;; Hugs interpreter for Haskell developped by
|
||||
;; The University of Nottingham and Yale University, 1994-1997.
|
||||
;; Web: http://www.haskell.org/hugs.
|
||||
;; In standard Emacs terminology, this would be called
|
||||
;; inferior-hugs-mode
|
||||
|
||||
;; Keywords: Hugs inferior mode, Hugs interaction mode
|
||||
;; URL: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/CONTRIB/haskell-modes/emacs/haskell-hugs.el?rev=HEAD
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; This file is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Purpose:
|
||||
;;
|
||||
;; To send a Haskell buffer to another buffer running a Hugs interpreter
|
||||
;; The functions are adapted from the Hugs Mode developed by
|
||||
;; Chris Van Humbeeck <chris.vanhumbeeck@cs.kuleuven.ac.be>
|
||||
;; which used to be available at:
|
||||
;; http://www-i2.informatik.rwth-aachen.de/Forschung/FP/Haskell/hugs-mode.el
|
||||
;;
|
||||
;; Installation:
|
||||
;;
|
||||
;; To use with the Haskell mode of
|
||||
;; Moss&Thorn <http://www.haskell.org/haskell-mode>
|
||||
;; add this to .emacs:
|
||||
;;
|
||||
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-hugs)
|
||||
;;
|
||||
;; Customisation:
|
||||
;; The name of the hugs interpreter is in variable
|
||||
;; haskell-hugs-program-name
|
||||
;; Arguments can be sent to the Hugs interpreter when it is called
|
||||
;; by setting the value of the variable
|
||||
;; haskell-hugs-program-args
|
||||
;; which by default contains '("+.") so that the progress of the
|
||||
;; interpreter is visible without any "^H" in the *hugs* Emacs buffer.
|
||||
;;
|
||||
;; This value can be interactively by calling C-cC-s with an
|
||||
;; argument.
|
||||
;;
|
||||
;; If the command does not seem to respond, see the
|
||||
;; content of the `comint-prompt-regexp' variable
|
||||
;; to check that it waits for the appropriate Hugs prompt
|
||||
;; the current value is appropriate for Hugs 1.3 and 1.4
|
||||
;;
|
||||
;;
|
||||
;; `haskell-hugs-hook' is invoked in the *hugs* once it is started.
|
||||
;;
|
||||
;;; All functions/variables start with
|
||||
;;; `(turn-(on/off)-)haskell-hugs' or `haskell-hugs-'.
|
||||
|
||||
(defgroup haskell-hugs nil
|
||||
"Major mode for interacting with an inferior Hugs session."
|
||||
:group 'haskell
|
||||
:prefix "haskell-hugs-")
|
||||
|
||||
(defun turn-on-haskell-hugs ()
|
||||
"Turn on Haskell interaction mode with a Hugs interpreter running in an
|
||||
another Emacs buffer named *hugs*.
|
||||
Maps the followind commands in the haskell keymap.
|
||||
\\[haskell-hugs-load-file]
|
||||
to save the current buffer and load it by sending the :load command
|
||||
to Hugs.
|
||||
\\[haskell-hugs-reload-file]
|
||||
to send the :reload command to Hugs without saving the buffer.
|
||||
\\[haskell-hugs-show-hugs-buffer]
|
||||
to show the Hugs buffer and go to it."
|
||||
(local-set-key "\C-c\C-s" 'haskell-hugs-start-process)
|
||||
(local-set-key "\C-c\C-l" 'haskell-hugs-load-file)
|
||||
(local-set-key "\C-c\C-r" 'haskell-hugs-reload-file)
|
||||
(local-set-key "\C-c\C-b" 'haskell-hugs-show-hugs-buffer))
|
||||
|
||||
(defun turn-off-haskell-hugs ()
|
||||
"Turn off Haskell interaction mode with a Hugs interpreter within a buffer."
|
||||
(local-unset-key "\C-c\C-s")
|
||||
(local-unset-key "\C-c\C-l")
|
||||
(local-unset-key "\C-c\C-r")
|
||||
(local-unset-key "\C-c\C-b"))
|
||||
|
||||
(define-derived-mode haskell-hugs-mode comint-mode "Haskell Hugs"
|
||||
;; called by haskell-hugs-start-process,
|
||||
;; itself called by haskell-hugs-load-file
|
||||
;; only when the file is loaded the first time
|
||||
"Major mode for interacting with an inferior Hugs session.
|
||||
|
||||
The commands available from within a Haskell script are:
|
||||
\\<haskell-mode-map>\\[haskell-hugs-load-file]
|
||||
to save the current buffer and load it by sending the :load command
|
||||
to Hugs.
|
||||
\\[haskell-hugs-reload-file]
|
||||
to send the :reload command to Hugs without saving the buffer.
|
||||
\\[haskell-hugs-show-hugs-buffer]
|
||||
to show the Hugs buffer and go to it.
|
||||
|
||||
\\<haskell-hugs-mode-map>
|
||||
Commands:
|
||||
Return at end of buffer sends line as input.
|
||||
Return not at end copies rest of line to end and sends it.
|
||||
\\[comint-kill-input] and \\[backward-kill-word] are kill commands,
|
||||
imitating normal Unix input editing.
|
||||
\\[comint-interrupt-subjob] interrupts the comint or its current
|
||||
subjob if any.
|
||||
\\[comint-stop-subjob] stops, likewise.
|
||||
\\[comint-quit-subjob] sends quit signal."
|
||||
)
|
||||
|
||||
;; Hugs-interface
|
||||
|
||||
(require 'comint)
|
||||
(require 'shell)
|
||||
|
||||
(defvar haskell-hugs-process nil
|
||||
"The active Hugs subprocess corresponding to current buffer.")
|
||||
|
||||
(defvar haskell-hugs-process-buffer nil
|
||||
"*Buffer used for communication with Hugs subprocess for current buffer.")
|
||||
|
||||
(defcustom haskell-hugs-program-name "hugs"
|
||||
"*The name of the command to start the Hugs interpreter."
|
||||
:type 'string
|
||||
:group 'haskell-hugs)
|
||||
|
||||
(defcustom haskell-hugs-program-args '("+.")
|
||||
"*A list of string args to send to the hugs process."
|
||||
:type '(repeat string)
|
||||
:group 'haskell-hugs)
|
||||
|
||||
(defvar haskell-hugs-load-end nil
|
||||
"Position of the end of the last load command.")
|
||||
|
||||
(defvar haskell-hugs-send-end nil
|
||||
"Position of the end of the last send command.")
|
||||
|
||||
(defalias 'run-hugs 'haskell-hugs-start-process)
|
||||
|
||||
(defun haskell-hugs-start-process (arg)
|
||||
"Start a Hugs process and invokes `haskell-hugs-hook' if not nil.
|
||||
Prompts for a list of args if called with an argument."
|
||||
(interactive "P")
|
||||
(message "Starting `hugs-process' %s" haskell-hugs-program-name)
|
||||
(if arg
|
||||
(setq haskell-hugs-program-args
|
||||
(read-minibuffer "List of args for Hugs:"
|
||||
(prin1-to-string haskell-hugs-program-args))))
|
||||
(setq haskell-hugs-process-buffer
|
||||
(apply 'make-comint
|
||||
"hugs" haskell-hugs-program-name nil
|
||||
haskell-hugs-program-args))
|
||||
(setq haskell-hugs-process
|
||||
(get-buffer-process haskell-hugs-process-buffer))
|
||||
;; Select Hugs buffer temporarily
|
||||
(set-buffer haskell-hugs-process-buffer)
|
||||
(haskell-hugs-mode)
|
||||
(make-local-variable 'shell-cd-regexp)
|
||||
(make-local-variable 'shell-dirtrackp)
|
||||
(setq shell-cd-regexp ":cd")
|
||||
(setq shell-dirtrackp t)
|
||||
(add-hook 'comint-input-filter-functions 'shell-directory-tracker nil 'local)
|
||||
; ? or module name in Hugs 1.4
|
||||
(setq comint-prompt-regexp "^\? \\|^[[:upper:]][_[:alnum:]\.]*> ")
|
||||
;; comint's history syntax conflicts with Hugs syntax, eg. !!
|
||||
(setq comint-input-autoexpand nil)
|
||||
(run-hooks 'haskell-hugs-hook)
|
||||
(message "")
|
||||
)
|
||||
|
||||
(defun haskell-hugs-wait-for-output ()
|
||||
"Wait until output arrives and go to the last input."
|
||||
(while (progn
|
||||
(goto-char comint-last-input-end)
|
||||
(and
|
||||
(not (re-search-forward comint-prompt-regexp nil t))
|
||||
(accept-process-output haskell-hugs-process)))))
|
||||
|
||||
(defun haskell-hugs-send (&rest string)
|
||||
"Send `haskell-hugs-process' the arguments (one or more strings).
|
||||
A newline is sent after the strings and they are inserted into the
|
||||
current buffer after the last output."
|
||||
;; Wait until output arrives and go to the last input.
|
||||
(haskell-hugs-wait-for-output)
|
||||
;; Position for this input.
|
||||
(goto-char (point-max))
|
||||
(apply 'insert string)
|
||||
(comint-send-input)
|
||||
(setq haskell-hugs-send-end (marker-position comint-last-input-end)))
|
||||
|
||||
(defun haskell-hugs-go (load-command cd)
|
||||
"Save the current buffer and load its file into the Hugs process.
|
||||
The first argument LOAD-COMMAND specifies how the file should be
|
||||
loaded: as a new file (\":load \") or as a reload (\":reload \").
|
||||
|
||||
If the second argument CD is non-nil, change the Haskell-Hugs process to the
|
||||
current buffer's directory before loading the file.
|
||||
|
||||
If the variable `haskell-hugs-command' is set then its value will be sent to
|
||||
the Hugs process after the load command. This can be used for a
|
||||
top-level expression to evaluate."
|
||||
(hack-local-variables) ;; In case they've changed
|
||||
(save-buffer)
|
||||
(let ((file (if (string-equal load-command ":load ")
|
||||
(concat "\"" buffer-file-name "\"")
|
||||
""))
|
||||
(dir (expand-file-name default-directory))
|
||||
(cmd (and (boundp 'haskell-hugs-command)
|
||||
haskell-hugs-command
|
||||
(if (stringp haskell-hugs-command)
|
||||
haskell-hugs-command
|
||||
(symbol-name haskell-hugs-command)))))
|
||||
(if (and haskell-hugs-process-buffer
|
||||
(eq (process-status haskell-hugs-process) 'run))
|
||||
;; Ensure the Hugs buffer is selected.
|
||||
(set-buffer haskell-hugs-process-buffer)
|
||||
;; Start Haskell-Hugs process.
|
||||
(haskell-hugs-start-process nil))
|
||||
|
||||
(if cd (haskell-hugs-send (concat ":cd " dir)))
|
||||
;; Wait until output arrives and go to the last input.
|
||||
(haskell-hugs-wait-for-output)
|
||||
(haskell-hugs-send load-command file)
|
||||
;; Error message search starts from last load command.
|
||||
(setq haskell-hugs-load-end (marker-position comint-last-input-end))
|
||||
(if cmd (haskell-hugs-send cmd))
|
||||
;; Wait until output arrives and go to the last input.
|
||||
(haskell-hugs-wait-for-output)))
|
||||
|
||||
(defun haskell-hugs-load-file (cd)
|
||||
"Save a hugs buffer file and load its file.
|
||||
If CD (prefix argument if interactive) is non-nil, change the Hugs
|
||||
process to the current buffer's directory before loading the file.
|
||||
If there is an error, set the cursor at the error line otherwise show
|
||||
the Hugs buffer."
|
||||
(interactive "P")
|
||||
(haskell-hugs-gen-load-file ":load " cd)
|
||||
)
|
||||
|
||||
(defun haskell-hugs-reload-file (cd)
|
||||
"Save a hugs buffer file and load its file.
|
||||
If CD (prefix argument if interactive) is non-nil, change the Hugs
|
||||
process to the current buffer's directory before loading the file.
|
||||
If there is an error, set the cursor at the error line otherwise show
|
||||
the Hugs buffer."
|
||||
(interactive "P")
|
||||
(haskell-hugs-gen-load-file ":reload " cd)
|
||||
)
|
||||
|
||||
(defun haskell-hugs-gen-load-file (cmd cd)
|
||||
"Save a hugs buffer file and load its file or reload depending on CMD.
|
||||
If CD is non-nil, change the process to the current buffer's directory
|
||||
before loading the file. If there is an error, set the cursor at the
|
||||
error line otherwise show the Hugs buffer."
|
||||
(save-excursion (haskell-hugs-go cmd cd))
|
||||
;; Ensure the Hugs buffer is selected.
|
||||
(set-buffer haskell-hugs-process-buffer)
|
||||
;; Error message search starts from last load command.
|
||||
(goto-char haskell-hugs-load-end)
|
||||
(if (re-search-forward
|
||||
"^ERROR \"\\([^ ]*\\)\"\\( (line \\([0-9]*\\))\\|\\)" nil t)
|
||||
(let ((efile (buffer-substring (match-beginning 1)
|
||||
(match-end 1)))
|
||||
(eline (if (match-beginning 3)
|
||||
(string-to-int (buffer-substring (match-beginning 3)
|
||||
(match-end 3)))))
|
||||
(emesg (buffer-substring (1+ (point))
|
||||
(save-excursion (end-of-line) (point)))))
|
||||
(pop-to-buffer haskell-hugs-process-buffer) ; show *hugs* buffer
|
||||
(goto-char (point-max))
|
||||
(recenter)
|
||||
(message "Hugs error %s %s"
|
||||
(file-name-nondirectory efile) emesg)
|
||||
(if (file-exists-p efile)
|
||||
(progn (find-file-other-window efile)
|
||||
(if eline (goto-line eline))
|
||||
(recenter)))
|
||||
)
|
||||
(pop-to-buffer haskell-hugs-process-buffer) ; show *hugs* buffer
|
||||
(goto-char (point-max))
|
||||
(message "There were no errors.")
|
||||
(recenter 2) ; show only the end...
|
||||
)
|
||||
)
|
||||
|
||||
(defun haskell-hugs-show-hugs-buffer ()
|
||||
"Goes to the Hugs buffer."
|
||||
(interactive)
|
||||
(if (or (not haskell-hugs-process-buffer)
|
||||
(not (buffer-live-p haskell-hugs-process-buffer)))
|
||||
(haskell-hugs-start-process nil))
|
||||
(pop-to-buffer haskell-hugs-process-buffer)
|
||||
)
|
||||
|
||||
(provide 'haskell-hugs)
|
||||
|
||||
;; arch-tag: c2a621e9-d743-4361-a459-983fbf1d4589
|
||||
;;; haskell-hugs.el ends here
|
||||
|
|
@ -1,154 +0,0 @@
|
|||
;;; haskell-simple-indent.el --- Simple indentation module for Haskell Mode
|
||||
|
||||
;; Copyright (C) 1998 Heribert Schuetz, Graeme E Moss
|
||||
|
||||
;; Authors:
|
||||
;; 1998 Heribert Schuetz <Heribert.Schuetz@informatik.uni-muenchen.de> and
|
||||
;; Graeme E Moss <gem@cs.york.ac.uk>
|
||||
;; Keywords: indentation files Haskell
|
||||
;; Version: 1.0
|
||||
;; URL: http://www.cs.york.ac.uk/~gem/haskell-mode/simple-indent.html
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; This file is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Purpose:
|
||||
;;
|
||||
;; To support simple indentation of Haskell scripts.
|
||||
;;
|
||||
;;
|
||||
;; Installation:
|
||||
;;
|
||||
;; To bind TAB to the indentation command for all Haskell buffers, add
|
||||
;; this to .emacs:
|
||||
;;
|
||||
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
|
||||
;;
|
||||
;; Otherwise, call `turn-on-haskell-simple-indent'.
|
||||
;;
|
||||
;;
|
||||
;; Customisation:
|
||||
;;
|
||||
;; None supported.
|
||||
;;
|
||||
;;
|
||||
;; History:
|
||||
;;
|
||||
;; If you have any problems or suggestions, after consulting the list
|
||||
;; below, email gem@cs.york.ac.uk quoting the version of you are
|
||||
;; using, the version of Emacs you are using, and a small example of
|
||||
;; the problem or suggestion.
|
||||
;;
|
||||
;; Version 1.0:
|
||||
;; Brought over from Haskell mode v1.1.
|
||||
;;
|
||||
;; Present Limitations/Future Work (contributions are most welcome!):
|
||||
;;
|
||||
;; (None so far.)
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; All functions/variables start with
|
||||
;; `(turn-(on/off)-)haskell-simple-indent'.
|
||||
|
||||
;; Version.
|
||||
(defconst haskell-simple-indent-version "1.2"
|
||||
"`haskell-simple-indent' version number.")
|
||||
(defun haskell-simple-indent-version ()
|
||||
"Echo the current version of `haskell-simple-indent' in the minibuffer."
|
||||
(interactive)
|
||||
(message "Using haskell-simple-indent version %s"
|
||||
haskell-simple-indent-version))
|
||||
|
||||
;; Partly stolen from `indent-relative' in indent.el:
|
||||
(defun haskell-simple-indent ()
|
||||
"Space out to under next visible indent point.
|
||||
Indent points are positions of non-whitespace following whitespace in
|
||||
lines preceeding point. A position is visible if it is to the left of
|
||||
the first non-whitespace of every nonblank line between the position and
|
||||
the current line. If there is no visible indent point beyond the current
|
||||
column, `tab-to-tab-stop' is done instead."
|
||||
(interactive)
|
||||
(let* ((start-column (current-column))
|
||||
(invisible-from nil) ; `nil' means infinity here
|
||||
(indent
|
||||
(catch 'haskell-simple-indent-break
|
||||
(save-excursion
|
||||
(while (progn (beginning-of-line)
|
||||
(not (bobp)))
|
||||
(forward-line -1)
|
||||
(if (not (looking-at "[ \t]*\n"))
|
||||
(let ((this-indentation (current-indentation)))
|
||||
(if (or (not invisible-from)
|
||||
(< this-indentation invisible-from))
|
||||
(if (> this-indentation start-column)
|
||||
(setq invisible-from this-indentation)
|
||||
(let ((end (line-beginning-position 2)))
|
||||
(move-to-column start-column)
|
||||
;; Is start-column inside a tab on this line?
|
||||
(if (> (current-column) start-column)
|
||||
(backward-char 1))
|
||||
(or (looking-at "[ \t]")
|
||||
(skip-chars-forward "^ \t" end))
|
||||
(skip-chars-forward " \t" end)
|
||||
(let ((col (current-column)))
|
||||
(throw 'haskell-simple-indent-break
|
||||
(if (or (= (point) end)
|
||||
(and invisible-from
|
||||
(> col invisible-from)))
|
||||
invisible-from
|
||||
col)))))))))))))
|
||||
(if indent
|
||||
(let ((opoint (point-marker)))
|
||||
(indent-line-to indent)
|
||||
(if (> opoint (point))
|
||||
(goto-char opoint))
|
||||
(set-marker opoint nil))
|
||||
(tab-to-tab-stop))))
|
||||
|
||||
(defvar haskell-simple-indent-old)
|
||||
|
||||
;; The main functions.
|
||||
(defun turn-on-haskell-simple-indent ()
|
||||
"Set `indent-line-function' to a simple indentation function.
|
||||
TAB will now move the cursor to the next indent point in the previous
|
||||
nonblank line. An indent point is a non-whitespace character following
|
||||
whitespace.
|
||||
|
||||
Runs `haskell-simple-indent-hook'.
|
||||
|
||||
Use `haskell-simple-indent-version' to find out what version this is."
|
||||
(set (make-local-variable 'haskell-simple-indent-old) indent-line-function)
|
||||
(set (make-local-variable 'indent-line-function) 'haskell-simple-indent)
|
||||
(run-hooks 'haskell-simple-indent-hook))
|
||||
|
||||
(defun turn-off-haskell-simple-indent ()
|
||||
"Return `indent-line-function' to original value.
|
||||
I.e. the value before `turn-on-haskell-simple-indent' was called."
|
||||
(when (local-variable-p 'haskell-simple-indent-old)
|
||||
(setq indent-line-function haskell-simple-indent-old)
|
||||
(kill-local-variable 'haskell-simple-indent-old)))
|
||||
|
||||
;; Provide ourselves:
|
||||
|
||||
(provide 'haskell-simple-indent)
|
||||
|
||||
;; arch-tag: 18a08122-723b-485e-b958-e1cf8218b816
|
||||
;;; haskell-simple-indent.el ends here
|
||||
|
|
@ -1,277 +0,0 @@
|
|||
|
||||
;;;### (autoloads (haskell-c-mode) "haskell-c" "haskell-c.el" (18170
|
||||
;;;;;; 47169))
|
||||
;;; Generated autoloads from haskell-c.el
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.hsc\\'" . haskell-c-mode))
|
||||
|
||||
(autoload 'haskell-c-mode "haskell-c" "\
|
||||
Major mode for Haskell FFI files.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (haskell-cabal-mode) "haskell-cabal" "haskell-cabal.el"
|
||||
;;;;;; (19222 37798))
|
||||
;;; Generated autoloads from haskell-cabal.el
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.cabal\\'" . haskell-cabal-mode))
|
||||
|
||||
(autoload 'haskell-cabal-mode "haskell-cabal" "\
|
||||
Major mode for Cabal package description files.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (haskell-decl-scan-mode) "haskell-decl-scan" "haskell-decl-scan.el"
|
||||
;;;;;; (19222 37798))
|
||||
;;; Generated autoloads from haskell-decl-scan.el
|
||||
|
||||
(autoload 'haskell-decl-scan-mode "haskell-decl-scan" "\
|
||||
Minor mode for declaration scanning for Haskell mode.
|
||||
Top-level declarations are scanned and listed in the menu item \"Declarations\".
|
||||
Selecting an item from this menu will take point to the start of the
|
||||
declaration.
|
||||
|
||||
\\[haskell-ds-forward-decl] and \\[haskell-ds-backward-decl] move forward and backward to the start of a declaration.
|
||||
|
||||
Under XEmacs, the following keys are also defined:
|
||||
|
||||
\\[fume-list-functions] lists the declarations of the current buffer,
|
||||
\\[fume-prompt-function-goto] prompts for a declaration to move to, and
|
||||
\\[fume-mouse-function-goto] moves to the declaration whose name is at point.
|
||||
|
||||
This may link with `haskell-doc' (only for Emacs currently).
|
||||
|
||||
For non-literate and LaTeX-style literate scripts, we assume the
|
||||
common convention that top-level declarations start at the first
|
||||
column. For Bird-style literate scripts, we assume the common
|
||||
convention that top-level declarations start at the third column,
|
||||
ie. after \"> \".
|
||||
|
||||
Anything in `font-lock-comment-face' is not considered for a
|
||||
declaration. Therefore, using Haskell font locking with comments
|
||||
coloured in `font-lock-comment-face' improves declaration scanning.
|
||||
|
||||
To turn on declaration scanning for all Haskell buffers, add this to
|
||||
.emacs:
|
||||
|
||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
|
||||
|
||||
To turn declaration scanning on for the current buffer, call
|
||||
`turn-on-haskell-decl-scan'.
|
||||
|
||||
Literate Haskell scripts are supported: If the value of
|
||||
`haskell-literate' (automatically set by the Haskell mode of
|
||||
Moss&Thorn) is `bird', a Bird-style literate script is assumed. If it
|
||||
is nil or `tex', a non-literate or LaTeX-style literate script is
|
||||
assumed, respectively.
|
||||
|
||||
Invokes `haskell-decl-scan-mode-hook'.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (haskell-doc-show-type haskell-doc-mode) "haskell-doc"
|
||||
;;;;;; "haskell-doc.el" (19222 37798))
|
||||
;;; Generated autoloads from haskell-doc.el
|
||||
|
||||
(autoload 'haskell-doc-mode "haskell-doc" "\
|
||||
Enter `haskell-doc-mode' for showing fct types in the echo area.
|
||||
See variable docstring.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(defalias 'turn-on-haskell-doc-mode 'haskell-doc-mode)
|
||||
|
||||
(autoload 'haskell-doc-show-type "haskell-doc" "\
|
||||
Show the type of the function near point.
|
||||
For the function under point, show the type in the echo area.
|
||||
This information is extracted from the `haskell-doc-prelude-types' alist
|
||||
of prelude functions and their types, or from the local functions in the
|
||||
current buffer.
|
||||
|
||||
\(fn &optional SYM)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (haskell-indent-mode) "haskell-indent" "haskell-indent.el"
|
||||
;;;;;; (19222 37798))
|
||||
;;; Generated autoloads from haskell-indent.el
|
||||
|
||||
(autoload 'haskell-indent-mode "haskell-indent" "\
|
||||
``Intelligent'' Haskell indentation mode.
|
||||
This deals with the layout rule of Haskell.
|
||||
\\[haskell-indent-cycle] starts the cycle which proposes new
|
||||
possibilities as long as the TAB key is pressed. Any other key
|
||||
or mouse click terminates the cycle and is interpreted except for
|
||||
RET which merely exits the cycle.
|
||||
Other special keys are:
|
||||
\\[haskell-indent-insert-equal]
|
||||
inserts an =
|
||||
\\[haskell-indent-insert-guard]
|
||||
inserts an |
|
||||
\\[haskell-indent-insert-otherwise]
|
||||
inserts an | otherwise =
|
||||
these functions also align the guards and rhs of the current definition
|
||||
\\[haskell-indent-insert-where]
|
||||
inserts a where keyword
|
||||
\\[haskell-indent-align-guards-and-rhs]
|
||||
aligns the guards and rhs of the region
|
||||
\\[haskell-indent-put-region-in-literate]
|
||||
makes the region a piece of literate code in a literate script
|
||||
|
||||
Invokes `haskell-indent-hook' if not nil.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (haskell-indentation-mode) "haskell-indentation"
|
||||
;;;;;; "haskell-indentation.el" (19222 37798))
|
||||
;;; Generated autoloads from haskell-indentation.el
|
||||
|
||||
(autoload 'haskell-indentation-mode "haskell-indentation" "\
|
||||
Haskell indentation mode that deals with the layout rule.
|
||||
It rebinds RET, DEL and BACKSPACE, so that indentations can be
|
||||
set and deleted as if they were real tabs. It supports
|
||||
autofill-mode.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (haskell-hayoo haskell-hoogle literate-haskell-mode
|
||||
;;;;;; haskell-mode) "haskell-mode" "haskell-mode.el" (19222 37798))
|
||||
;;; Generated autoloads from haskell-mode.el
|
||||
|
||||
(add-to-list 'load-path (or (file-name-directory load-file-name) (car load-path)))
|
||||
|
||||
(autoload 'haskell-mode "haskell-mode" "\
|
||||
Major mode for editing Haskell programs.
|
||||
Blank lines separate paragraphs, comments start with `-- '.
|
||||
\\<haskell-mode-map>
|
||||
Literate scripts are supported via `literate-haskell-mode'.
|
||||
The variable `haskell-literate' indicates the style of the script in the
|
||||
current buffer. See the documentation on this variable for more details.
|
||||
|
||||
Modules can hook in via `haskell-mode-hook'. The following modules
|
||||
are supported with an `autoload' command:
|
||||
|
||||
`haskell-decl-scan', Graeme E Moss
|
||||
Scans top-level declarations, and places them in a menu.
|
||||
|
||||
`haskell-doc', Hans-Wolfgang Loidl
|
||||
Echoes types of functions or syntax of keywords when the cursor is idle.
|
||||
|
||||
`haskell-indentation', Kristof Bastiaensen
|
||||
Intelligent semi-automatic indentation Mk2
|
||||
|
||||
`haskell-indent', Guy Lapalme
|
||||
Intelligent semi-automatic indentation.
|
||||
|
||||
`haskell-simple-indent', Graeme E Moss and Heribert Schuetz
|
||||
Simple indentation.
|
||||
|
||||
Module X is activated using the command `turn-on-X'. For example,
|
||||
`haskell-indent' is activated using `turn-on-haskell-indent'.
|
||||
For more information on a module, see the help for its `X-mode'
|
||||
function. Some modules can be deactivated using `turn-off-X'. (Note
|
||||
that `haskell-doc' is irregular in using `turn-(on/off)-haskell-doc-mode'.)
|
||||
|
||||
Use `haskell-version' to find out what version this is.
|
||||
|
||||
Invokes `haskell-mode-hook'.
|
||||
|
||||
\(fn)" t nil)
|
||||
|
||||
(autoload 'literate-haskell-mode "haskell-mode" "\
|
||||
As `haskell-mode' but for literate scripts.
|
||||
|
||||
\(fn)" t nil)
|
||||
(add-to-list 'auto-mode-alist '("\\.\\(?:[gh]s\\|hi\\)\\'" . haskell-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.l[gh]s\\'" . literate-haskell-mode))
|
||||
(add-to-list 'interpreter-mode-alist '("runghc" . haskell-mode))
|
||||
(add-to-list 'interpreter-mode-alist '("runhaskell" . haskell-mode))
|
||||
|
||||
(autoload 'haskell-hoogle "haskell-mode" "\
|
||||
Do a Hoogle search for QUERY.
|
||||
|
||||
\(fn QUERY)" t nil)
|
||||
|
||||
(defalias 'hoogle 'haskell-hoogle)
|
||||
|
||||
(autoload 'haskell-hayoo "haskell-mode" "\
|
||||
Do a Hayoo search for QUERY.
|
||||
|
||||
\(fn QUERY)" t nil)
|
||||
|
||||
(defalias 'hayoo 'haskell-hayoo)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (inferior-haskell-find-haddock inferior-haskell-find-definition
|
||||
;;;;;; inferior-haskell-info inferior-haskell-type inferior-haskell-load-file
|
||||
;;;;;; switch-to-haskell) "inf-haskell" "inf-haskell.el" (19222
|
||||
;;;;;; 37798))
|
||||
;;; Generated autoloads from inf-haskell.el
|
||||
|
||||
(defalias 'run-haskell 'switch-to-haskell)
|
||||
|
||||
(autoload 'switch-to-haskell "inf-haskell" "\
|
||||
Show the inferior-haskell buffer. Start the process if needed.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(autoload 'inferior-haskell-load-file "inf-haskell" "\
|
||||
Pass the current buffer's file to the inferior haskell process.
|
||||
If prefix arg \\[universal-argument] is given, just reload the previous file.
|
||||
|
||||
\(fn &optional RELOAD)" t nil)
|
||||
|
||||
(autoload 'inferior-haskell-type "inf-haskell" "\
|
||||
Query the haskell process for the type of the given expression.
|
||||
If optional argument `insert-value' is non-nil, insert the type above point
|
||||
in the buffer. This can be done interactively with the \\[universal-argument] prefix.
|
||||
The returned info is cached for reuse by `haskell-doc-mode'.
|
||||
|
||||
\(fn EXPR &optional INSERT-VALUE)" t nil)
|
||||
|
||||
(autoload 'inferior-haskell-info "inf-haskell" "\
|
||||
Query the haskell process for the info of the given expression.
|
||||
|
||||
\(fn SYM)" t nil)
|
||||
|
||||
(autoload 'inferior-haskell-find-definition "inf-haskell" "\
|
||||
Attempt to locate and jump to the definition of the given expression.
|
||||
|
||||
\(fn SYM)" t nil)
|
||||
|
||||
(autoload 'inferior-haskell-find-haddock "inf-haskell" "\
|
||||
Find and open the Haddock documentation of SYM.
|
||||
Make sure to load the file into GHCi or Hugs first by using C-c C-l.
|
||||
Only works for functions in a package installed with ghc-pkg, or
|
||||
whatever the value of `haskell-package-manager-name' is.
|
||||
|
||||
This function needs to find which package a given module belongs
|
||||
to. In order to do this, it computes a module-to-package lookup
|
||||
alist, which is expensive to compute (it takes upwards of five
|
||||
seconds with more than about thirty installed packages). As a
|
||||
result, we cache it across sessions using the cache file
|
||||
referenced by `inferior-haskell-module-alist-file'. We test to
|
||||
see if this is newer than `haskell-package-conf-file' every time
|
||||
we load it.
|
||||
|
||||
\(fn SYM)" t nil)
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil nil ("haskell-font-lock.el" "haskell-ghci.el"
|
||||
;;;;;; "haskell-hugs.el" "haskell-simple-indent.el" "test.el") (19222
|
||||
;;;;;; 37817 315467))
|
||||
|
||||
;;;***
|
||||
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
-------------------------------------------------------------------------
|
||||
-- Comments with allcaps `FIXME' indicate places where the indentation --
|
||||
-- fails to find the correct indentation, whereas comments with --
|
||||
-- lowercase `fixme' indicate places where impossible indentations --
|
||||
-- are uselessly proposed. --
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
-- | Fill-paragraph should avoid inserting an | on the following lines.
|
||||
|
||||
-- | However, indented comments should still be indented. For great justice.
|
||||
|
||||
-- * Foo bar bazFoo bar bazFoo bar bazFoo bar bazFoo bar bazFoo bar baz
|
||||
|
||||
{- Here's
|
||||
a more complex comment. Of doom. There is, indeed, great doom here. #-}
|
||||
|
||||
-- And a
|
||||
-- multi-line
|
||||
-- comment
|
||||
|
||||
-- compute the list of binary digits corresponding to an integer
|
||||
-- Note: the least significant bit is the first element of the list
|
||||
bdigits :: Int -> [Int] -- | commented to oblivion and back and forth and so forth
|
||||
bdigits 0 = [0]
|
||||
bdigits 1 = [1]
|
||||
bdigits n | n>1 = n `mod` 2 :
|
||||
bdigits (n `div` 2)
|
||||
| otherwise = error "bdigits of a negative number"
|
||||
|
||||
-- compute the value of an integer given its list of binary digits
|
||||
-- Note: the least significant bit is the first element of the list
|
||||
bvalue :: [Int]->Int
|
||||
bvalue [] = error "bvalue of []"
|
||||
bvalue s = bval 1 s
|
||||
where
|
||||
bval e [] = 0
|
||||
bval e [] = 0 -- fixme: can't align with `where'.
|
||||
bval e (b:bs) | b==0 || b=="dd of " = b*e + bval (2*e) bs
|
||||
| otherwise = error "ill digit" -- Spurious 3rd step.
|
||||
foo
|
||||
|
||||
-- fixme: tab on the line above should insert `bvalue' at some point.
|
||||
|
||||
{- text
|
||||
indentation
|
||||
inside comments
|
||||
-}
|
||||
toto a = ( hello
|
||||
, there -- indentation of leading , and ;
|
||||
-- indentation of this comment.
|
||||
, my friends )
|
||||
|
||||
lili x = do let ofs x = 1
|
||||
print x
|
||||
|
||||
titi b =
|
||||
let -- fixme: can't indent at column 0
|
||||
x = let toto = 1
|
||||
tata = 2 -- fixme: can't indent lower than `toto'.
|
||||
in
|
||||
toto in
|
||||
do expr1
|
||||
{- text
|
||||
- indentation
|
||||
- inside comments
|
||||
-}
|
||||
let foo s = let fro = 1
|
||||
fri = 2 -- fixme: can't indent lower than `fro'.
|
||||
in
|
||||
hello
|
||||
foo2 = bar2 -- fixme: can't align with arg `s' in foo.
|
||||
foo1 = bar2 -- fixme: Can't be column 0.
|
||||
expr2
|
||||
|
||||
tata c =
|
||||
let bar = case foo -- fixme: can't be col 0.
|
||||
of 1 -> blabla
|
||||
2 -> blibli -- fixme: only one possible indentation here.
|
||||
bar = case foo of
|
||||
_ -> blabla
|
||||
bar' = case foo
|
||||
of _ -> blabla
|
||||
toto -> plulu
|
||||
|
||||
turlu d = if test
|
||||
then
|
||||
ifturl
|
||||
else
|
||||
adfaf
|
||||
|
||||
turlu d = if test then
|
||||
ifturl
|
||||
else
|
||||
sg
|
||||
|
||||
turly fg = toto
|
||||
where
|
||||
hello = 2
|
||||
|
||||
|
||||
-- test from John Goerzen
|
||||
|
||||
x myVariableThing = case myVariablething of
|
||||
Just z -> z
|
||||
Nothing -> 0 -- fixme: "spurious" additional indents.
|
||||
|
||||
foo = let x = 1 in toto
|
||||
titi -- FIXME
|
||||
|
||||
foo = let foo x y = toto
|
||||
where
|
||||
toto = 2
|
||||
|
||||
instance Show Toto where
|
||||
foo x 4 = 50
|
||||
|
||||
data Toto = Foo
|
||||
| Bar
|
||||
deriving (Show) -- FIXME
|
||||
|
||||
foo = let toto x = do let bar = 2
|
||||
return 1
|
||||
in 3
|
||||
|
||||
eval env (Llambda x e) = -- FIXME: sole indentation is self???
|
||||
Vfun (\v -> eval (\y -> if (x == y) then v else env y) -- FIXME
|
||||
e) -- FIXME
|
||||
|
||||
foo = case findprop attr props of
|
||||
Just x -> x
|
||||
|
||||
data T = T { granularity :: (Int, Int, Int, Int) -- FIXME: self indentation?
|
||||
, items :: Map (Int, Int, Int, Int) [Item] }
|
||||
|
||||
foo = case foo of
|
||||
[] ->
|
||||
case bar of
|
||||
[] ->
|
||||
return ()
|
||||
(x:xs) -> -- FIXME
|
||||
|
||||
bar = do toto
|
||||
if titi
|
||||
then tutu -- FIXME
|
||||
else tata -- FIXME
|
||||
|
||||
insert :: Ord a => a -> b -> TreeMap a b -> TreeMap a b
|
||||
insert x v Empty = Node 0 x v Empty Empty
|
||||
insert x v (Node d x' v' t1 t2)
|
||||
| x == x' = Node d x v t1 t2
|
||||
| x < x' = Node ? x' v' (insert x v t1 Empty) t2
|
||||
| -- FIXME: wrong indent *if at EOB*
|
||||
|
||||
|
||||
tinsertb x v (Node x' v' d1 t1 d2 t2)
|
||||
| x == x' = (1 + max d1 d2, Node x v d1 t1 d2 t2)
|
||||
| x < x' =
|
||||
case () of
|
||||
_ | d1' <= d2 + 1 => (1 + max d1' d2, Node x' v' d1' t1' d2 t2)
|
||||
-- d1' == d2 + 2: Need to rotate to rebalance. FIXME CRASH
|
||||
else let (Node x'' v'' d1'' t1'' d2'' t2'') = t1'
|
||||
|
||||
test = if True then
|
||||
toto
|
||||
else if False then
|
||||
tata -- FIXME
|
||||
else -- FIXME
|
||||
titi
|
||||
|
||||
-- arch-tag: de0069e3-c0a0-495c-b441-d4ff6e0509b1
|
||||
|
|
@ -1,157 +0,0 @@
|
|||
;;; highlight-parentheses.el --- highlight surrounding parentheses
|
||||
;;
|
||||
;; Copyright (C) 2007, 2009 Nikolaj Schumacher
|
||||
;;
|
||||
;; Author: Nikolaj Schumacher <bugs * nschum de>
|
||||
;; Version: 1.0.1
|
||||
;; Keywords: faces, matching
|
||||
;; URL: http://nschum.de/src/emacs/highlight-parentheses/
|
||||
;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x
|
||||
;;
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
;;
|
||||
;; 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, see <http://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Add the following to your .emacs file:
|
||||
;; (require 'highlight-parentheses)
|
||||
;;
|
||||
;; Enable `highlight-parentheses-mode'.
|
||||
;;
|
||||
;;; Change Log:
|
||||
;;
|
||||
;; 2009-03-19 (1.0.1)
|
||||
;; Added setter for color variables.
|
||||
;;
|
||||
;; 2007-07-30 (1.0)
|
||||
;; Added background highlighting and faces.
|
||||
;;
|
||||
;; 2007-05-15 (0.9.1)
|
||||
;; Support for defcustom.
|
||||
;;
|
||||
;; 2007-04-26 (0.9)
|
||||
;; Initial Release.
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
|
||||
(defgroup highlight-parentheses nil
|
||||
"Highlight surrounding parentheses"
|
||||
:group 'faces
|
||||
:group 'matching)
|
||||
|
||||
(defun hl-paren-set (variable value)
|
||||
(set variable value)
|
||||
(when (fboundp 'hl-paren-color-update)
|
||||
(hl-paren-color-update)))
|
||||
|
||||
(defcustom hl-paren-colors
|
||||
'("firebrick1" "IndianRed1" "IndianRed3" "IndianRed4")
|
||||
"*List of colors for the highlighted parentheses.
|
||||
The list starts with the the inside parentheses and moves outwards."
|
||||
:type '(repeat color)
|
||||
:set 'hl-paren-set
|
||||
:group 'highlight-parentheses)
|
||||
|
||||
(defcustom hl-paren-background-colors nil
|
||||
"*List of colors for the background highlighted parentheses.
|
||||
The list starts with the the inside parentheses and moves outwards."
|
||||
:type '(repeat color)
|
||||
:set 'hl-paren-set
|
||||
:group 'highlight-parentheses)
|
||||
|
||||
(defface hl-paren-face nil
|
||||
"*Face used for highlighting parentheses.
|
||||
Color attributes might be overriden by `hl-paren-colors' and
|
||||
`hl-paren-background-colors'."
|
||||
:group 'highlight-parentheses)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defvar hl-paren-overlays nil
|
||||
"This buffers currently active overlays.")
|
||||
(make-variable-buffer-local 'hl-paren-overlays)
|
||||
|
||||
(defvar hl-paren-last-point 0
|
||||
"The last point for which parentheses were highlighted.
|
||||
This is used to prevent analyzing the same context over and over.")
|
||||
(make-variable-buffer-local 'hl-paren-last-point)
|
||||
|
||||
(defun hl-paren-highlight ()
|
||||
"Highlight the parentheses around point."
|
||||
(unless (= (point) hl-paren-last-point)
|
||||
(setq hl-paren-last-point (point))
|
||||
(let ((overlays hl-paren-overlays)
|
||||
pos1 pos2
|
||||
(pos (point)))
|
||||
(save-excursion
|
||||
(condition-case err
|
||||
(while (and (setq pos1 (cadr (syntax-ppss pos1)))
|
||||
(cddr overlays))
|
||||
(move-overlay (pop overlays) pos1 (1+ pos1))
|
||||
(when (setq pos2 (scan-sexps pos1 1))
|
||||
(move-overlay (pop overlays) (1- pos2) pos2)
|
||||
))
|
||||
(error nil))
|
||||
(goto-char pos))
|
||||
(dolist (ov overlays)
|
||||
(move-overlay ov 1 1)))))
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode highlight-parentheses-mode
|
||||
"Minor mode to highlight the surrounding parentheses."
|
||||
nil " hl-p" nil
|
||||
(if highlight-parentheses-mode
|
||||
(progn
|
||||
(hl-paren-create-overlays)
|
||||
(add-hook 'post-command-hook 'hl-paren-highlight nil t))
|
||||
(mapc 'delete-overlay hl-paren-overlays)
|
||||
(kill-local-variable 'hl-paren-overlays)
|
||||
(kill-local-variable 'hl-paren-point)
|
||||
(remove-hook 'post-command-hook 'hl-paren-highlight t)))
|
||||
|
||||
;;; overlays ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun hl-paren-create-overlays ()
|
||||
(let ((fg hl-paren-colors)
|
||||
(bg hl-paren-background-colors)
|
||||
attributes)
|
||||
(while (or fg bg)
|
||||
(setq attributes (face-attr-construct 'hl-paren-face))
|
||||
(when (car fg)
|
||||
(setq attributes (plist-put attributes :foreground (car fg))))
|
||||
(pop fg)
|
||||
(when (car bg)
|
||||
(setq attributes (plist-put attributes :background (car bg))))
|
||||
(pop bg)
|
||||
(dotimes (i 2) ;; front and back
|
||||
(push (make-overlay 0 0) hl-paren-overlays)
|
||||
(overlay-put (car hl-paren-overlays) 'face attributes)))
|
||||
(setq hl-paren-overlays (nreverse hl-paren-overlays))))
|
||||
|
||||
(defun hl-paren-color-update ()
|
||||
(dolist (buffer (buffer-list))
|
||||
(with-current-buffer buffer
|
||||
(when hl-paren-overlays
|
||||
(mapc 'delete-overlay hl-paren-overlays)
|
||||
(setq hl-paren-overlays nil)
|
||||
(hl-paren-create-overlays)
|
||||
(let ((hl-paren-last-point -1)) ;; force update
|
||||
(hl-paren-highlight))))))
|
||||
|
||||
(provide 'highlight-parentheses)
|
||||
|
||||
;;; highlight-parentheses.el ends here
|
||||
|
|
@ -1,308 +0,0 @@
|
|||
;;; highlight-symbol.el --- automatic and manual symbol highlighting
|
||||
;;
|
||||
;; Copyright (C) 2007-2009 Nikolaj Schumacher
|
||||
;;
|
||||
;; Author: Nikolaj Schumacher <bugs * nschum de>
|
||||
;; Version: 1.1
|
||||
;; Keywords: faces, matching
|
||||
;; URL: http://nschum.de/src/emacs/highlight-symbol/
|
||||
;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x
|
||||
;;
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
;;
|
||||
;; 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, see <http://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Add the following to your .emacs file:
|
||||
;; (require 'highlight-symbol)
|
||||
;; (global-set-key [(control f3)] 'highlight-symbol-at-point)
|
||||
;; (global-set-key [f3] 'highlight-symbol-next)
|
||||
;; (global-set-key [(shift f3)] 'highlight-symbol-prev)
|
||||
;; (global-set-key [(meta f3)] 'highlight-symbol-prev)))
|
||||
;; (global-set-key [(control meta f3)] 'highlight-symbol-query-replace)
|
||||
;;
|
||||
;; Use `highlight-symbol-at-point' to toggle highlighting of the symbol at
|
||||
;; point throughout the current buffer. Use `highlight-symbol-mode' to keep the
|
||||
;; symbol at point highlighted.
|
||||
;;
|
||||
;; The functions `highlight-symbol-next', `highlight-symbol-prev',
|
||||
;; `highlight-symbol-next-in-defun' and `highlight-symbol-prev-in-defun' allow
|
||||
;; for cycling through the locations of any symbol at point.
|
||||
;; When `highlight-symbol-on-navigation-p' is set, highlighting is triggered
|
||||
;; regardless of `highlight-symbol-idle-delay'.
|
||||
;;
|
||||
;; `highlight-symbol-query-replace' can be used to replace the symbol.
|
||||
;;
|
||||
;;; Change Log:
|
||||
;;
|
||||
;; 2009-04-13 (1.1)
|
||||
;; Added `highlight-symbol-query-replace'.
|
||||
;;
|
||||
;; 2009-03-19 (1.0.5)
|
||||
;; Fixed `highlight-symbol-idle-delay' void variable message.
|
||||
;; Fixed color repetition bug. (thanks to Hugo Schmitt)
|
||||
;;
|
||||
;; 2008-05-02 (1.0.4)
|
||||
;; Added `highlight-symbol-on-navigation-p' option.
|
||||
;;
|
||||
;; 2008-02-26 (1.0.3)
|
||||
;; Added `highlight-symbol-remove-all'.
|
||||
;;
|
||||
;; 2007-09-06 (1.0.2)
|
||||
;; Fixed highlighting with delay set to 0. (thanks to Stefan Persson)
|
||||
;;
|
||||
;; 2007-09-05 (1.0.1)
|
||||
;; Fixed completely broken temporary highlighting.
|
||||
;;
|
||||
;; 2007-07-30 (1.0)
|
||||
;; Keep temp highlight while jumping.
|
||||
;; Replaced `highlight-symbol-faces' with `highlight-symbol-colors'.
|
||||
;; Fixed dependency and Emacs 21 bug. (thanks to Gregor Gorjanc)
|
||||
;; Prevent calling `highlight-symbol-at-point' on nil.
|
||||
;;
|
||||
;; 2007-04-20 (0.9.1)
|
||||
;; Fixed bug in `highlight-symbol-jump'. (thanks to Per Nordlöw)
|
||||
;;
|
||||
;; 2007-04-06 (0.9)
|
||||
;; Initial release.
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(require 'thingatpt)
|
||||
(require 'hi-lock)
|
||||
(eval-when-compile (require 'cl))
|
||||
|
||||
(push "^No symbol at point$" debug-ignored-errors)
|
||||
|
||||
(defgroup highlight-symbol nil
|
||||
"Automatic and manual symbols highlighting"
|
||||
:group 'faces
|
||||
:group 'matching)
|
||||
|
||||
(defface highlight-symbol-face
|
||||
'((((class color) (background dark))
|
||||
(:background "gray30"))
|
||||
(((class color) (background light))
|
||||
(:background "gray90")))
|
||||
"*Face used by `highlight-symbol-mode'."
|
||||
:group 'highlight-symbol)
|
||||
|
||||
(defvar highlight-symbol-timer nil)
|
||||
|
||||
(defun highlight-symbol-update-timer (value)
|
||||
(when highlight-symbol-timer
|
||||
(cancel-timer highlight-symbol-timer))
|
||||
(setq highlight-symbol-timer
|
||||
(and value (/= value 0)
|
||||
(run-with-idle-timer value t 'highlight-symbol-temp-highlight))))
|
||||
|
||||
(defvar highlight-symbol-mode nil)
|
||||
|
||||
(defun highlight-symbol-set (symbol value)
|
||||
(when symbol (set symbol value))
|
||||
(when highlight-symbol-mode
|
||||
(highlight-symbol-update-timer value)))
|
||||
|
||||
(defcustom highlight-symbol-idle-delay 1.5
|
||||
"*Number of seconds of idle time before highlighting the current symbol.
|
||||
If this variable is set to 0, no idle time is required.
|
||||
Changing this does not take effect until `highlight-symbol-mode' has been
|
||||
disabled for all buffers."
|
||||
:type 'number
|
||||
:set 'highlight-symbol-set
|
||||
:group 'highlight-symbol)
|
||||
|
||||
(defcustom highlight-symbol-colors
|
||||
'("yellow" "DeepPink" "cyan" "MediumPurple1" "SpringGreen1"
|
||||
"DarkOrange" "HotPink1" "RoyalBlue1" "OliveDrab")
|
||||
"*Colors used by `highlight-symbol-at-point'.
|
||||
highlighting the symbols will use these colors in order."
|
||||
:type '(repeat color)
|
||||
:group 'highlight-symbol)
|
||||
|
||||
(defcustom highlight-symbol-on-navigation-p nil
|
||||
"*Wether or not to temporary highlight the symbol when using
|
||||
`highlight-symbol-jump' family of functions."
|
||||
:type 'boolean
|
||||
:group 'highlight-symbol)
|
||||
|
||||
(defvar highlight-symbol-color-index 0)
|
||||
(make-variable-buffer-local 'highlight-symbol-color-index)
|
||||
|
||||
(defvar highlight-symbol nil)
|
||||
(make-variable-buffer-local 'highlight-symbol)
|
||||
|
||||
(defvar highlight-symbol-list nil)
|
||||
(make-variable-buffer-local 'highlight-symbol-list)
|
||||
|
||||
(defconst highlight-symbol-border-pattern
|
||||
(if (>= emacs-major-version 22) '("\\_<" . "\\_>") '("\\<" . "\\>")))
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode highlight-symbol-mode
|
||||
"Minor mode that highlights the symbol under point throughout the buffer.
|
||||
Highlighting takes place after `highlight-symbol-idle-delay'."
|
||||
nil " hl-s" nil
|
||||
(if highlight-symbol-mode
|
||||
;; on
|
||||
(let ((hi-lock-archaic-interface-message-used t))
|
||||
(unless hi-lock-mode (hi-lock-mode 1))
|
||||
(highlight-symbol-update-timer highlight-symbol-idle-delay)
|
||||
(add-hook 'post-command-hook 'highlight-symbol-mode-post-command nil t))
|
||||
;; off
|
||||
(remove-hook 'post-command-hook 'highlight-symbol-mode-post-command t)
|
||||
(highlight-symbol-mode-remove-temp)
|
||||
(kill-local-variable 'highlight-symbol)))
|
||||
|
||||
;;;###autoload
|
||||
(defun highlight-symbol-at-point ()
|
||||
"Toggle highlighting of the symbol at point.
|
||||
This highlights or unhighlights the symbol at point using the first
|
||||
element in of `highlight-symbol-faces'."
|
||||
(interactive)
|
||||
(let ((symbol (highlight-symbol-get-symbol)))
|
||||
(unless symbol (error "No symbol at point"))
|
||||
(unless hi-lock-mode (hi-lock-mode 1))
|
||||
(if (member symbol highlight-symbol-list)
|
||||
;; remove
|
||||
(progn
|
||||
(setq highlight-symbol-list (delete symbol highlight-symbol-list))
|
||||
(hi-lock-unface-buffer symbol))
|
||||
;; add
|
||||
(when (equal symbol highlight-symbol)
|
||||
(highlight-symbol-mode-remove-temp))
|
||||
(let ((color (nth highlight-symbol-color-index
|
||||
highlight-symbol-colors)))
|
||||
(if color ;; wrap
|
||||
(incf highlight-symbol-color-index)
|
||||
(setq highlight-symbol-color-index 1
|
||||
color (car highlight-symbol-colors)))
|
||||
(setq color `((background-color . ,color)
|
||||
(foreground-color . "black")))
|
||||
;; highlight
|
||||
(with-no-warnings
|
||||
(if (< emacs-major-version 22)
|
||||
(hi-lock-set-pattern `(,symbol (0 (quote ,color) t)))
|
||||
(hi-lock-set-pattern symbol color)))
|
||||
(push symbol highlight-symbol-list)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun highlight-symbol-remove-all ()
|
||||
"Remove symbol highlighting in buffer."
|
||||
(interactive)
|
||||
(mapc 'hi-lock-unface-buffer highlight-symbol-list)
|
||||
(setq highlight-symbol-list nil))
|
||||
|
||||
;;;###autoload
|
||||
(defun highlight-symbol-next ()
|
||||
"Jump to the next location of the symbol at point within the function."
|
||||
(interactive)
|
||||
(highlight-symbol-jump 1))
|
||||
|
||||
;;;###autoload
|
||||
(defun highlight-symbol-prev ()
|
||||
"Jump to the previous location of the symbol at point within the function."
|
||||
(interactive)
|
||||
(highlight-symbol-jump -1))
|
||||
|
||||
;;;###autoload
|
||||
(defun highlight-symbol-next-in-defun ()
|
||||
"Jump to the next location of the symbol at point within the defun."
|
||||
(interactive)
|
||||
(save-restriction
|
||||
(narrow-to-defun)
|
||||
(highlight-symbol-jump 1)))
|
||||
|
||||
;;;###autoload
|
||||
(defun highlight-symbol-prev-in-defun ()
|
||||
"Jump to the previous location of the symbol at point within the defun."
|
||||
(interactive)
|
||||
(save-restriction
|
||||
(narrow-to-defun)
|
||||
(highlight-symbol-jump -1)))
|
||||
|
||||
;;;###autoload
|
||||
(defun highlight-symbol-query-replace (replacement)
|
||||
"*Replace the symbol at point."
|
||||
(interactive (let ((symbol (or (thing-at-point 'symbol)
|
||||
(error "No symbol at point"))))
|
||||
(highlight-symbol-temp-highlight)
|
||||
(set query-replace-to-history-variable
|
||||
(cons (substring-no-properties symbol)
|
||||
(eval query-replace-to-history-variable)))
|
||||
(list
|
||||
(read-from-minibuffer "Replacement: " nil nil nil
|
||||
query-replace-to-history-variable))))
|
||||
(goto-char (beginning-of-thing 'symbol))
|
||||
(query-replace-regexp (highlight-symbol-get-symbol) replacement))
|
||||
|
||||
(defun highlight-symbol-get-symbol ()
|
||||
"Return a regular expression dandifying the symbol at point."
|
||||
(let ((symbol (thing-at-point 'symbol)))
|
||||
(when symbol (concat (car highlight-symbol-border-pattern)
|
||||
(regexp-quote symbol)
|
||||
(cdr highlight-symbol-border-pattern)))))
|
||||
|
||||
(defun highlight-symbol-temp-highlight ()
|
||||
"Highlight the current symbol until a command is executed."
|
||||
(when highlight-symbol-mode
|
||||
(let ((symbol (highlight-symbol-get-symbol)))
|
||||
(unless (or (equal symbol highlight-symbol)
|
||||
(member symbol highlight-symbol-list))
|
||||
(highlight-symbol-mode-remove-temp)
|
||||
(when symbol
|
||||
(setq highlight-symbol symbol)
|
||||
(hi-lock-set-pattern symbol 'highlight-symbol-face))))))
|
||||
|
||||
(defun highlight-symbol-mode-remove-temp ()
|
||||
"Remove the temporary symbol highlighting."
|
||||
(when highlight-symbol
|
||||
(hi-lock-unface-buffer highlight-symbol)
|
||||
(setq highlight-symbol nil)))
|
||||
|
||||
(defun highlight-symbol-mode-post-command ()
|
||||
"After a command, change the temporary highlighting.
|
||||
Remove the temporary symbol highlighting and, unless a timeout is specified,
|
||||
create the new one."
|
||||
(if (eq this-command 'highlight-symbol-jump)
|
||||
(when highlight-symbol-on-navigation-p
|
||||
(highlight-symbol-temp-highlight))
|
||||
(if (eql highlight-symbol-idle-delay 0)
|
||||
(highlight-symbol-temp-highlight)
|
||||
(highlight-symbol-mode-remove-temp))))
|
||||
|
||||
(defun highlight-symbol-jump (dir)
|
||||
"Jump to the next or previous occurence of the symbol at point.
|
||||
DIR has to be 1 or -1."
|
||||
(let ((symbol (highlight-symbol-get-symbol)))
|
||||
(if symbol
|
||||
(let* ((case-fold-search nil)
|
||||
(bounds (bounds-of-thing-at-point 'symbol))
|
||||
(offset (- (point) (if (< 0 dir) (cdr bounds) (car bounds)))))
|
||||
(unless (eq last-command 'highlight-symbol-jump)
|
||||
(push-mark))
|
||||
;; move a little, so we don't find the same instance again
|
||||
(goto-char (- (point) offset))
|
||||
(let ((target (re-search-forward symbol nil t dir)))
|
||||
(unless target
|
||||
(goto-char (if (< 0 dir) (point-min) (point-max)))
|
||||
(setq target (re-search-forward symbol nil nil dir)))
|
||||
(goto-char (+ target offset)))
|
||||
(setq this-command 'highlight-symbol-jump))
|
||||
(error "No symbol at point"))))
|
||||
|
||||
(provide 'highlight-symbol)
|
||||
|
||||
;;; highlight-symbol.el ends here
|
||||
263
.emacs.d/init.el
|
|
@ -1,111 +1,31 @@
|
|||
;; /This/ file (~init.el~) that you are reading
|
||||
;; should be in this folder
|
||||
(add-to-list 'load-path "~/.emacs.d/")
|
||||
|
||||
(if (< emacs-major-version 23)
|
||||
(defun characterp (obj)
|
||||
(and (char-or-string-p obj) (not (stringp obj)))))
|
||||
|
||||
(add-to-list 'load-path "~/.emacs.d")
|
||||
(add-to-list 'load-path "~/.emacs.d/auto-complete")
|
||||
(add-to-list 'load-path "~/.emacs.d/icicles")
|
||||
(add-to-list 'load-path "~/.emacs.d/tabbar")
|
||||
(add-to-list 'load-path "~/.emacs.d/evil")
|
||||
|
||||
(require 'package)
|
||||
(when (< emacs-major-version 24)
|
||||
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "http://melpa.milkbox.net/packages/") t)
|
||||
(package-initialize)
|
||||
|
||||
(defun characterp (obj)
|
||||
(and (char-or-string-p obj) (not (stringp obj)))))
|
||||
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
(require 'icicles)
|
||||
(icy-mode 1)
|
||||
;; Package Manager
|
||||
;; See ~Cask~ file for its configuration
|
||||
;; https://github.com/cask/cask
|
||||
(require 'cask "~/.cask/cask.el")
|
||||
(cask-initialize)
|
||||
|
||||
; Requires
|
||||
;(require 'vimpulse)
|
||||
(require 'evil)
|
||||
(require 'color-theme)
|
||||
(require 'color-theme-autoloads)
|
||||
(require 'tabbar)
|
||||
;(require 'highlight-symbol)
|
||||
(require 'auto-complete-config)
|
||||
(require 'cl)
|
||||
(evil-mode 1)
|
||||
;(eval-after-load 'flymake '(require 'flymake-cursor))
|
||||
(require 'tree-mode)
|
||||
(require 'windata)
|
||||
(require 'dirtree)
|
||||
(require 'flycheck)
|
||||
;; Keeps ~Cask~ file in sync with the packages
|
||||
;; that you install/uninstall via ~M-x list-packages~
|
||||
;; https://github.com/rdallasgray/pallet
|
||||
(require 'pallet)
|
||||
|
||||
;; Root directory
|
||||
(setq root-dir (file-name-directory
|
||||
(or (buffer-file-name) load-file-name)))
|
||||
|
||||
;; Hack to get *Messages* in viper-mode.
|
||||
;; ;; (must be done after loading viper)
|
||||
;; ;; Futzing with fundamental-mode doesn't seem to help.
|
||||
;; (save-excursion
|
||||
;; (set-buffer "*Messages*")
|
||||
;; (viper-change-state-to-vi))
|
||||
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
|
||||
|
||||
|
||||
(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete/dict")
|
||||
(ac-config-default)
|
||||
(setq ac-dwim t)
|
||||
(setq ac-expand-on-auto-complete nil)
|
||||
(setq ac-use-fuzzy t)
|
||||
;(setq viper-search-wrap-around t)
|
||||
;(setq viper-no-multiple-ESC t)
|
||||
;(setq viper-translate-all-ESC-keysequences nil)
|
||||
;(setq viper-always t)
|
||||
;(setq viper-vi-style-in-minibuffer nil)
|
||||
(setq-default indent-tabs-mode nil)
|
||||
;(define-key ac-completing-map "\t" 'ac-fuzzy-complete)
|
||||
;(define-key ac-completing-map "\r" nil)
|
||||
(define-key ac-completing-map (kbd "<escape>") 'ac-stop)
|
||||
|
||||
|
||||
; This is the other Vim-mode. Maybe should delete this..
|
||||
;
|
||||
;(add-to-list 'load-path "~/.emacs.d/vim-mode")
|
||||
;(require 'vim)
|
||||
;(vim-mode 1)
|
||||
|
||||
; Tabbar settings (Simple groups)
|
||||
(defun tabbar-buffer-groups ()
|
||||
"Return the list of group names the current buffer belongs to.
|
||||
This function is a custom function for tabbar-mode's tabbar-buffer-groups.
|
||||
This function group all buffers into 3 groups:
|
||||
Those Dired, those user buffer, and those emacs buffer.
|
||||
Emacs buffer are those starting with “*”."
|
||||
(list
|
||||
(cond
|
||||
((string-equal "*" (substring (buffer-name) 0 1))
|
||||
"Emacs Buffer"
|
||||
)
|
||||
((eq major-mode 'dired-mode)
|
||||
"Dired"
|
||||
)
|
||||
(t
|
||||
"User Buffer"
|
||||
)
|
||||
))) ;; from Xah Lee
|
||||
(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)
|
||||
|
||||
(tabbar-mode)
|
||||
|
||||
;(add-to-list 'ex-token-alist '("ls" (list-buffers)))
|
||||
;(add-to-list 'ex-token-alist '("mx" (icicle-execute-extended-command)))
|
||||
;(vimpulse-map "gn" 'tabbar-forward-tab)
|
||||
;(vimpulse-map "gp" 'tabbar-backward-tab)
|
||||
;(vimpulse-map "gw" 'vimpulse-search-forward-for-symbol-at-point)
|
||||
;(vimpulse-map "gK" 'kill-buffer-and-window)
|
||||
;(vimpulse-map "gc" 'kill-buffer-and-window)
|
||||
;(define-key viper-insert-global-user-map "\C-d" 'delete-char))
|
||||
(define-key evil-normal-state-map "gn" 'tabbar-forward-tab)
|
||||
(define-key evil-normal-state-map "gp" 'tabbar-backward-tab)
|
||||
(define-key evil-normal-state-map "gc" 'kill-buffer-and-window)
|
||||
|
||||
(add-hook 'window-setup-hook 'delete-other-windows)
|
||||
|
||||
; Basic frame defaults
|
||||
;; Don't show startup screen
|
||||
(let ((background-color "#2F2F2F")
|
||||
(foreground-color "LightGrey")
|
||||
(fname "Inconsolata-13")
|
||||
|
|
@ -121,61 +41,104 @@
|
|||
(add-to-list 'default-frame-alist (cons 'height fheight))
|
||||
(add-to-list 'default-frame-alist (cons 'width fwidth))
|
||||
)
|
||||
(custom-set-variables '(inhibit-startup-screen t))
|
||||
(custom-set-faces)
|
||||
; Run color-theme
|
||||
(color-theme-initialize)
|
||||
(color-theme-barak)
|
||||
(color-theme-barak-extras)
|
||||
(setq font-lock-maximum-decoration 3)
|
||||
(setq inhibit-startup-screen t)
|
||||
|
||||
(load "~/.emacs.d/haskell-mode/haskell-site-file")
|
||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
|
||||
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
|
||||
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
|
||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
|
||||
;; Show keystrokes
|
||||
(setq echo-keystrokes 0.02)
|
||||
|
||||
(require 'highlight-parentheses)
|
||||
;; Path
|
||||
(require 'exec-path-from-shell)
|
||||
(when (memq window-system '(mac ns))
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
(setq hl-paren-colors
|
||||
'(;"#8f8f8f" ; this comes from Zenburn
|
||||
; and I guess I'll try to make the far-outer parens look like this
|
||||
"orange1" "yellow1" "greenyellow" "green1"
|
||||
"springgreen1" "cyan1" "slateblue1" "magenta1" "purple"))
|
||||
;; Evil!
|
||||
(require 'evil)
|
||||
(evil-mode 1)
|
||||
(setq evil-default-cursor t)
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook (lambda () (highlight-parentheses-mode)))
|
||||
;; Git
|
||||
(require 'magit)
|
||||
(eval-after-load 'magit
|
||||
(progn '(global-set-key (kbd "C-x g") 'magit-status)))
|
||||
|
||||
;(defadvice viper-maybe-checkout (around viper-svn-checkin-fix activate)
|
||||
;"Advise viper-maybe-checkout to ignore svn files."
|
||||
;(let ((file (expand-file-name (buffer-file-name buf))))
|
||||
;(when (and (featurep 'vc-hooks)
|
||||
;(not (memq (vc-backend file) '(nil SVN))))
|
||||
;ad-do-it)))
|
||||
;; flx-ido completion system, recommended by Projectile
|
||||
(require 'flx-ido)
|
||||
(flx-ido-mode 1)
|
||||
;; change it if you have a fast processor.
|
||||
(setq flx-ido-threshhold 1000)
|
||||
|
||||
;; add a buffer modification state indicator in the tab label,
|
||||
;; and place a space around the label to make it looks less crowd
|
||||
(defadvice tabbar-buffer-tab-label (after fixup_tab_label_space_and_flag activate)
|
||||
(setq ad-return-value
|
||||
(if (and (buffer-modified-p (tabbar-tab-value tab))
|
||||
(buffer-file-name (tabbar-tab-value tab)))
|
||||
(concat " " (concat ad-return-value "+ "))
|
||||
(concat " " (concat ad-return-value " ")))))
|
||||
;; called each time the modification state of the buffer changed
|
||||
(defun ztl-modification-state-change ()
|
||||
(tabbar-set-template tabbar-current-tabset nil)
|
||||
(tabbar-display-update))
|
||||
;; first-change-hook is called BEFORE the change is made
|
||||
(defun ztl-on-buffer-modification ()
|
||||
(set-buffer-modified-p t)
|
||||
(ztl-modification-state-change))
|
||||
;; Project management
|
||||
(require 'ack-and-a-half)
|
||||
(require 'projectile)
|
||||
(projectile-global-mode)
|
||||
|
||||
(defun ztl-on-buffer-demodification ()
|
||||
(set-buffer-modified-p nil)
|
||||
(ztl-modification-state-change))
|
||||
(add-hook 'after-save-hook 'ztl-modification-state-change)
|
||||
;; this doesn't work for revert, I don't know
|
||||
(add-hook 'after-revert-hook 'ztl-on-buffer-demodification)
|
||||
(add-hook 'first-change-hook 'ztl-on-buffer-modification)
|
||||
;; Snippets
|
||||
;; https://github.com/capitaomorte/yasnippet
|
||||
(require 'yasnippet)
|
||||
(yas-load-directory (concat root-dir "snippets"))
|
||||
(yas-global-mode 1)
|
||||
|
||||
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
|
||||
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
|
||||
;; Evil Key Defines
|
||||
(define-key evil-normal-state-map "gc" 'kill-buffer-and-window)
|
||||
|
||||
(load-theme 'barak)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;; Hack to get *Messages* in viper-mode.
|
||||
;; ;; (must be done after loading viper)
|
||||
;; ;; Futzing with fundamental-mode doesn't seem to help.
|
||||
;; (save-excursion
|
||||
;; (set-buffer "*Messages*")
|
||||
;; (viper-change-state-to-vi))
|
||||
|
||||
|
||||
;Tabbar settings (Simple groups)
|
||||
;(defun tabbar-buffer-groups ()
|
||||
;"Return the list of group names the current buffer belongs to.
|
||||
;This function is a custom function for tabbar-mode's tabbar-buffer-groups.
|
||||
;This function group all buffers into 3 groups:
|
||||
;Those Dired, those user buffer, and those emacs buffer.
|
||||
;Emacs buffer are those starting with “*”."
|
||||
;(list
|
||||
;(cond
|
||||
;((string-equal "*" (substring (buffer-name) 0 1))
|
||||
;"Emacs Buffer"
|
||||
;)
|
||||
;((eq major-mode 'dired-mode)
|
||||
;"Dired"
|
||||
;)
|
||||
;(t
|
||||
;"User Buffer"
|
||||
;)
|
||||
;))) ; from Xah Lee
|
||||
;(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)
|
||||
|
||||
;(tabbar-mode)
|
||||
|
||||
;(add-to-list 'ex-token-alist '("ls" (list-buffers)))
|
||||
;(add-to-list 'ex-token-alist '("mx" (icicle-execute-extended-command)))
|
||||
;(vimpulse-map "gn" 'tabbar-forward-tab)
|
||||
;(vimpulse-map "gp" 'tabbar-backward-tab)
|
||||
;(vimpulse-map "gw" 'vimpulse-search-forward-for-symbol-at-point)
|
||||
;(vimpulse-map "gK" 'kill-buffer-and-window)
|
||||
;(vimpulse-map "gc" 'kill-buffer-and-window)
|
||||
;(define-key viper-insert-global-user-map "\C-d" 'delete-char))
|
||||
;(define-key evil-normal-state-map "gn" 'tabbar-forward-tab)
|
||||
;(define-key evil-normal-state-map "gp" 'tabbar-backward-tab)
|
||||
|
||||
;(add-hook 'window-setup-hook 'delete-other-windows)
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(custom-safe-themes (quote ("f2acfa2f448218e8868bbb4b914e9f5a8c580e8a33d19809f4a4f32ad306cab5" "9df3b76bdd78c0209521b4e0374dcbdd4f2c8cd40ca00fedcd499e53630c646b" "6ca7862869dcbf7079ab507dbceb37e42e71fe7dd4b83f994de9b42037436bf2" "7a3b1a9661a271313a71a5177f31f344f533cab4c68c47985571d28b8f320769" "9370aeac615012366188359cb05011aea721c73e1cb194798bc18576025cabeb" default))))
|
||||
(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.
|
||||
)
|
||||
|
|
|
|||
20
.emacs.d/install.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ ! -e ~/.cask ]]
|
||||
then
|
||||
echo "Cloning Cask repo"
|
||||
git clone git@github.com:cask/cask.git ~/.cask
|
||||
fi
|
||||
|
||||
if [[ $(grep "cask/bin" ~/.bash_profile) == "" ]]
|
||||
then
|
||||
echo "Adding \$HOME/.cask/bin to \$PATH in ~/.bash_profile"
|
||||
echo '' >> ~/.bash_profile
|
||||
echo "# Added by ~/.emacs.d/install.sh" >> ~/.bash_profile
|
||||
echo "export PATH=\$HOME/.cask/bin:\$PATH" >> ~/.bash_profile
|
||||
fi
|
||||
|
||||
export PATH=$HOME/.cask/bin:$PATH
|
||||
|
||||
cd ~/.emacs.d
|
||||
cask install
|
||||
|
Before Width: | Height: | Size: 412 B |
|
Before Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 287 B |
|
Before Width: | Height: | Size: 175 B |
28
.emacs.d/themes/barak-theme-autoloads.el
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
;;; zenburn-theme-autoloads.el --- automatically extracted autoloads
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
|
||||
;;;### (autoloads nil "zenburn-theme" "zenburn-theme.el" (21208 56234
|
||||
;;;;;; 19803 585000))
|
||||
;;; Generated autoloads from zenburn-theme.el
|
||||
|
||||
(and load-file-name (boundp 'custom-theme-load-path) (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(add-to-list 'safe-local-eval-forms '(when (require 'rainbow-mode nil t) (rainbow-mode 1)))
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil nil ("zenburn-theme-pkg.el") (21208 56234 81574
|
||||
;;;;;; 838000))
|
||||
|
||||
;;;***
|
||||
|
||||
(provide 'barak-theme-autoloads)
|
||||
;; Local Variables:
|
||||
;; version-control: never
|
||||
;; no-byte-compile: t
|
||||
;; no-update-autoloads: t
|
||||
;; coding: utf-8
|
||||
;; End:
|
||||
;;; zenburn-theme-autoloads.el ends here
|
||||
1052
.emacs.d/themes/barak-theme-half.el
Normal file
245
.emacs.d/themes/barak-theme.el
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
;;; Code:
|
||||
|
||||
(deftheme barak "Barak's Theme")
|
||||
|
||||
;;; Color Palette
|
||||
|
||||
(defvar zenburn-colors-alist
|
||||
'(("zenburn-fg+1" . "#FFFFEF")
|
||||
("zenburn-fg" . "#DCDCCC")
|
||||
("zenburn-fg-1" . "#656555")
|
||||
("zenburn-bg-2" . "#000000")
|
||||
("zenburn-bg-1" . "#2B2B2B")
|
||||
("zenburn-bg-05" . "#383838")
|
||||
("zenburn-bg" . "#3F3F3F")
|
||||
("zenburn-bg+1" . "#4F4F4F")
|
||||
("zenburn-bg+2" . "#5F5F5F")
|
||||
("zenburn-bg+3" . "#6F6F6F")
|
||||
("zenburn-red+1" . "#DCA3A3")
|
||||
("zenburn-red" . "#CC9393")
|
||||
("zenburn-red-1" . "#BC8383")
|
||||
("zenburn-red-2" . "#AC7373")
|
||||
("zenburn-red-3" . "#9C6363")
|
||||
("zenburn-red-4" . "#8C5353")
|
||||
("zenburn-orange" . "#DFAF8F")
|
||||
("zenburn-yellow" . "#F0DFAF")
|
||||
("zenburn-yellow-1" . "#E0CF9F")
|
||||
("zenburn-yellow-2" . "#D0BF8F")
|
||||
("zenburn-green-1" . "#5F7F5F")
|
||||
("zenburn-green" . "#7F9F7F")
|
||||
("zenburn-green+1" . "#8FB28F")
|
||||
("zenburn-green+2" . "#9FC59F")
|
||||
("zenburn-green+3" . "#AFD8AF")
|
||||
("zenburn-green+4" . "#BFEBBF")
|
||||
("zenburn-cyan" . "#93E0E3")
|
||||
("zenburn-blue+1" . "#94BFF3")
|
||||
("zenburn-blue" . "#8CD0D3")
|
||||
("zenburn-blue-1" . "#7CB8BB")
|
||||
("zenburn-blue-2" . "#6CA0A3")
|
||||
("zenburn-blue-3" . "#5C888B")
|
||||
("zenburn-blue-4" . "#4C7073")
|
||||
("zenburn-blue-5" . "#366060")
|
||||
("zenburn-magenta" . "#DC8CC3")))
|
||||
|
||||
(defvar barak-colors-alist
|
||||
'(("background" . "#000000")
|
||||
("cursor" . "#A7A7A7")
|
||||
("fg-default" . "#E0E0E0")
|
||||
("mouse" . "sienna1")
|
||||
("comment" . "#238E23")
|
||||
("constant" . "#E3AC3D")
|
||||
("docstring" . "DarkOrange")
|
||||
("zenburn-fg+1" . "#FFFFEF")
|
||||
("zenburn-fg" . "#DCDCCC")
|
||||
("zenburn-fg-1" . "#656555")
|
||||
("zenburn-bg-2" . "#000000")
|
||||
("zenburn-bg-1" . "#2B2B2B")
|
||||
("zenburn-bg-05" . "#383838")
|
||||
("zenburn-bg" . "#3F3F3F")
|
||||
("zenburn-bg+1" . "#4F4F4F")
|
||||
("zenburn-bg+2" . "#5F5F5F")
|
||||
("zenburn-bg+3" . "#6F6F6F")
|
||||
("zenburn-red+1" . "#DCA3A3")
|
||||
("zenburn-red" . "#CC9393")
|
||||
("zenburn-red-1" . "#BC8383")
|
||||
("zenburn-red-2" . "#AC7373")
|
||||
("zenburn-red-3" . "#9C6363")
|
||||
("zenburn-red-4" . "#8C5353")
|
||||
("zenburn-orange" . "#DFAF8F")
|
||||
("zenburn-yellow" . "#F0DFAF")
|
||||
("zenburn-yellow-1" . "#E0CF9F")
|
||||
("zenburn-yellow-2" . "#D0BF8F")
|
||||
("zenburn-green-1" . "#5F7F5F")
|
||||
("zenburn-green" . "#7F9F7F")
|
||||
("zenburn-green+1" . "#8FB28F")
|
||||
("zenburn-green+2" . "#9FC59F")
|
||||
("zenburn-green+3" . "#AFD8AF")
|
||||
("zenburn-green+4" . "#BFEBBF")
|
||||
("zenburn-cyan" . "#93E0E3")
|
||||
("zenburn-blue+1" . "#94BFF3")
|
||||
("zenburn-blue" . "#8CD0D3")
|
||||
("zenburn-blue-1" . "#7CB8BB")
|
||||
("zenburn-blue-2" . "#6CA0A3")
|
||||
("zenburn-blue-3" . "#5C888B")
|
||||
("zenburn-blue-4" . "#4C7073")
|
||||
("zenburn-blue-5" . "#366060")
|
||||
("zenburn-magenta" . "#DC8CC3"))
|
||||
"List of Zenburn colors.
|
||||
Each element has the form (NAME . HEX).")
|
||||
|
||||
|
||||
(defmacro barak-with-color-variables (&rest body)
|
||||
"`let' bind all colors defined in `zenburn-colors-alist' around BODY.
|
||||
Also bind `class' to ((class color) (min-colors 89))."
|
||||
(declare (indent 0))
|
||||
`(let ((class '((class color) (min-colors 89)))
|
||||
,@(mapcar (lambda (cons)
|
||||
(list (intern (car cons)) (cdr cons)))
|
||||
barak-colors-alist))
|
||||
,@body))
|
||||
|
||||
(defmacro zenburn-with-color-variables (&rest body)
|
||||
"`let' bind all colors defined in `zenburn-colors-alist' around BODY.
|
||||
Also bind `class' to ((class color) (min-colors 89))."
|
||||
(declare (indent 0))
|
||||
`(let ((class '((class color) (min-colors 89)))
|
||||
,@(mapcar (lambda (cons)
|
||||
(list (intern (car cons)) (cdr cons)))
|
||||
zenburn-colors-alist))
|
||||
,@body))
|
||||
|
||||
;;; Theme Faces
|
||||
(barak-with-color-variables
|
||||
(custom-theme-set-faces
|
||||
'barak
|
||||
;;;; Built-in
|
||||
;;;;; basic coloring
|
||||
'(button ((t (:underline t))))
|
||||
`(link ((t (:foreground ,zenburn-yellow :underline t :weight bold))))
|
||||
`(link-visited ((t (:foreground ,zenburn-yellow-2 :underline t :weight normal))))
|
||||
`(default ((t (:foreground ,fg-default :background ,background))))
|
||||
`(cursor ((t (:foreground ,cursor :background ,zenburn-fg+1))))
|
||||
`(blue ((t (:foreground "blue"))))
|
||||
`(bold ((t (:bold t))))
|
||||
`(bold-italic ((t (:bold t))))
|
||||
`(border-glyph ((t (nil))))
|
||||
`(buffers-tab ((t (:background "#121212" :foreground "#E0E0E0"))))
|
||||
`(font-lock-builtin-face ((t (:foreground "#E0E0E0"))))
|
||||
`(font-lock-comment-face ((t (:foreground "#238E23"))))
|
||||
`(font-lock-constant-face ((t (:foreground "#E3AC3D"))))
|
||||
`(font-lock-doc-string-face ((t (:foreground "DarkOrange"))))
|
||||
`(font-lock-function-name-face ((t (:foreground "#C5A6FF"))))
|
||||
`(font-lock-keyword-face ((t (:bold t :foreground "#4876FF"))))
|
||||
`(font-lock-preprocessor-face ((t (:foreground "#E9DFEF"))))
|
||||
`(font-lock-reference-face ((t (:foreground "#E1634F"))))
|
||||
`(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062"))))
|
||||
`(font-lock-regexp-grouping-construct ((t (:foreground "red"))))
|
||||
`(font-lock-string-face ((t (:foreground "#F05656"))))
|
||||
`(font-lock-type-face ((t (:foreground "#73E1E6"))))
|
||||
`(font-lock-variable-name-face ((t (:foreground "#00BFFF"))))
|
||||
`(font-lock-warning-face ((t (:bold t :foreground "Pink"))))
|
||||
`(gui-element ((t (:background "#D4D0C8" :foreground "black"))))
|
||||
`(region ((t (:background "#364458"))))
|
||||
`(mode-line ((t (:background "grey75" :foreground "black"))))
|
||||
`(highlight ((t (:background "#222222"))))
|
||||
`(highline-face ((t (:background "SeaGreen"))))
|
||||
`(italic ((t (nil))))
|
||||
`(left-margin ((t (nil))))
|
||||
;`(text-cursor ((t (:background "yellow" :foreground "black"))))
|
||||
`(toolbar ((t (nil))))
|
||||
`(tabbar-default ((t (:background "black" :foreground "grey75"))))
|
||||
`(tabbar-selected ((t (:background "grey75" :foreground "black"))))
|
||||
`(tabbar-highlight ((t (:bold t))))
|
||||
`(underline ((nil (:underline nil))))
|
||||
))
|
||||
|
||||
;;; Theme Variables
|
||||
(zenburn-with-color-variables
|
||||
(custom-theme-set-variables
|
||||
'barak
|
||||
;;;;; ansi-color
|
||||
`(ansi-color-names-vector [,zenburn-bg ,zenburn-red ,zenburn-green ,zenburn-yellow
|
||||
,zenburn-blue ,zenburn-magenta ,zenburn-cyan ,zenburn-fg])
|
||||
;;;;; fill-column-indicator
|
||||
`(fci-rule-color ,zenburn-bg-05)
|
||||
;;;;; vc-annotate
|
||||
`(vc-annotate-color-map
|
||||
'(( 20. . ,zenburn-red-1)
|
||||
( 40. . ,zenburn-red)
|
||||
( 60. . ,zenburn-orange)
|
||||
( 80. . ,zenburn-yellow-2)
|
||||
(100. . ,zenburn-yellow-1)
|
||||
(120. . ,zenburn-yellow)
|
||||
(140. . ,zenburn-green-1)
|
||||
(160. . ,zenburn-green)
|
||||
(180. . ,zenburn-green+1)
|
||||
(200. . ,zenburn-green+2)
|
||||
(220. . ,zenburn-green+3)
|
||||
(240. . ,zenburn-green+4)
|
||||
(260. . ,zenburn-cyan)
|
||||
(280. . ,zenburn-blue-2)
|
||||
(300. . ,zenburn-blue-1)
|
||||
(320. . ,zenburn-blue)
|
||||
(340. . ,zenburn-blue+1)
|
||||
(360. . ,zenburn-magenta)))
|
||||
`(vc-annotate-very-old-color ,zenburn-magenta)
|
||||
`(vc-annotate-background ,zenburn-bg-1)
|
||||
))
|
||||
|
||||
;;; Rainbow Support
|
||||
|
||||
(declare-function rainbow-mode 'rainbow-mode)
|
||||
(declare-function rainbow-colorize-by-assoc 'rainbow-mode)
|
||||
|
||||
(defvar barak-add-font-lock-keywords nil
|
||||
"Whether to add font-lock keywords for zenburn color names.
|
||||
In buffers visiting library `zenburn-theme.el' the zenburn
|
||||
specific keywords are always added. In all other Emacs-Lisp
|
||||
buffers this variable controls whether this should be done.
|
||||
This requires library `rainbow-mode'.")
|
||||
|
||||
(defvar barak-colors-font-lock-keywords nil)
|
||||
|
||||
;; (defadvice rainbow-turn-on (after zenburn activate)
|
||||
;; "Maybe also add font-lock keywords for zenburn colors."
|
||||
;; (when (and (derived-mode-p 'emacs-lisp-mode)
|
||||
;; (or zenburn-add-font-lock-keywords
|
||||
;; (equal (file-name-nondirectory (buffer-file-name))
|
||||
;; "zenburn-theme.el")))
|
||||
;; (unless zenburn-colors-font-lock-keywords
|
||||
;; (setq zenburn-colors-font-lock-keywords
|
||||
;; `((,(regexp-opt (mapcar 'car zenburn-colors-alist) 'words)
|
||||
;; (0 (rainbow-colorize-by-assoc zenburn-colors-alist))))))
|
||||
;; (font-lock-add-keywords nil zenburn-colors-font-lock-keywords)))
|
||||
|
||||
;; (defadvice rainbow-turn-off (after zenburn activate)
|
||||
;; "Also remove font-lock keywords for zenburn colors."
|
||||
;; (font-lock-remove-keywords nil zenburn-colors-font-lock-keywords))
|
||||
|
||||
;;; Footer
|
||||
|
||||
;;;###autoload
|
||||
(and load-file-name
|
||||
(boundp 'custom-theme-load-path)
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory
|
||||
(file-name-directory load-file-name))))
|
||||
|
||||
(defun color-theme-barak-extras ()
|
||||
; Highlight numbers
|
||||
(add-hook 'after-change-major-mode-hook
|
||||
(lambda () (font-lock-add-keywords
|
||||
nil
|
||||
'(("\\<\\(\\(0[xX]\\|0[bB]\\)?-?[0-9a-fA-F]+\\.?[0-9]*?[fFlL]?\\)\\>" 1 '((t (:foreground "#E3AC3D")))))))))
|
||||
|
||||
(provide-theme 'barak)
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'safe-local-eval-forms
|
||||
'(when (require 'rainbow-mode nil t) (rainbow-mode 1)))
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; indent-tabs-mode: nil
|
||||
;; eval: (when (require 'rainbow-mode nil t) (rainbow-mode 1))
|
||||
;; End:
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
|
||||
(defun color-theme-barak ()
|
||||
"Color theme by Barak Michener, created 08-11-2010"
|
||||
(interactive)
|
||||
(color-theme-install
|
||||
'(color-theme-barak
|
||||
((background-color . "#000000")
|
||||
(background-mode . dark)
|
||||
(border-color . "#000000")
|
||||
(cursor-color . "#A7A7A7")
|
||||
(foreground-color . "#E0E0E0")
|
||||
(mouse-color . "sienna1"))
|
||||
(default ((t (:background "#000000" :foreground "#E0E0E0"))))
|
||||
(blue ((t (:foreground "blue"))))
|
||||
(bold ((t (:bold t))))
|
||||
(bold-italic ((t (:bold t))))
|
||||
(border-glyph ((t (nil))))
|
||||
(buffers-tab ((t (:background "#121212" :foreground "#E0E0E0"))))
|
||||
(font-lock-builtin-face ((t (:foreground "#E0E0E0"))))
|
||||
(font-lock-comment-face ((t (:foreground "#238E23"))))
|
||||
(font-lock-constant-face ((t (:foreground "#E3AC3D"))))
|
||||
(font-lock-doc-string-face ((t (:foreground "DarkOrange"))))
|
||||
(font-lock-function-name-face ((t (:foreground "#C5A6FF"))))
|
||||
(font-lock-keyword-face ((t (:bold t :foreground "#4876FF"))))
|
||||
(font-lock-preprocessor-face ((t (:foreground "#E9DFEF"))))
|
||||
(font-lock-reference-face ((t (:foreground "#E1634F"))))
|
||||
(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062"))))
|
||||
(font-lock-regexp-grouping-construct ((t (:foreground "red"))))
|
||||
(font-lock-string-face ((t (:foreground "#F05656"))))
|
||||
(font-lock-type-face ((t (:foreground "#73E1E6"))))
|
||||
(font-lock-variable-name-face ((t (:foreground "#00BFFF"))))
|
||||
(font-lock-warning-face ((t (:bold t :foreground "Pink"))))
|
||||
(gui-element ((t (:background "#D4D0C8" :foreground "black"))))
|
||||
(region ((t (:background "#364458"))))
|
||||
(mode-line ((t (:background "grey75" :foreground "black"))))
|
||||
(highlight ((t (:background "#222222"))))
|
||||
(highline-face ((t (:background "SeaGreen"))))
|
||||
(italic ((t (nil))))
|
||||
(left-margin ((t (nil))))
|
||||
(text-cursor ((t (:background "yellow" :foreground "black"))))
|
||||
(toolbar ((t (nil))))
|
||||
(tabbar-default ((t (:background "black" :foreground "grey75"))))
|
||||
(tabbar-selected ((t (:background "grey75" :foreground "black"))))
|
||||
(tabbar-highlight ((t (:bold t))))
|
||||
(underline ((nil (:underline nil))))
|
||||
(zmacs-region ((t (:background "snow" :foreground "ble")))))))
|
||||
(defun color-theme-barak-extras ()
|
||||
; Highlight numbers
|
||||
(add-hook 'after-change-major-mode-hook
|
||||
(lambda () (font-lock-add-keywords
|
||||
nil
|
||||
'(("\\<\\(\\(0[xX]\\|0[bB]\\)?-?[0-9a-fA-F]+\\.?[0-9]*?[fFlL]?\\)\\>" 1 '((t (:foreground "#E3AC3D")))))))))
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
;; Blackboard Colour Theme for Emacs.
|
||||
;;
|
||||
;; Defines a colour scheme resembling that of the original TextMate Blackboard colour theme.
|
||||
;; To use add the following to your .emacs file (requires the color-theme package):
|
||||
;;
|
||||
;; (require 'color-theme)
|
||||
;; (color-theme-initialize)
|
||||
;; (load-file "~/.emacs.d/themes/color-theme-blackboard.el")
|
||||
;;
|
||||
;; And then (color-theme-blackboard) to activate it.
|
||||
;;
|
||||
;; MIT License Copyright (c) 2008 JD Huntington <jdhuntington at gmail dot com>
|
||||
;; Credits due to the excellent TextMate Blackboard theme
|
||||
;;
|
||||
;; All patches welcome
|
||||
|
||||
(defun color-theme-blackboard ()
|
||||
"Color theme by JD Huntington, based off the TextMate Blackboard theme, created 2008-11-27"
|
||||
(interactive)
|
||||
(color-theme-install
|
||||
'(color-theme-blackboard
|
||||
((background-color . "#0C1021")
|
||||
(background-mode . dark)
|
||||
(border-color . "black")
|
||||
(cursor-color . "#A7A7A7")
|
||||
(foreground-color . "#F8F8F8")
|
||||
(mouse-color . "sienna1"))
|
||||
(default ((t (:background "#0C1021" :foreground "#F8F8F8"))))
|
||||
(blue ((t (:foreground "blue"))))
|
||||
(bold ((t (:bold t))))
|
||||
(bold-italic ((t (:bold t))))
|
||||
(border-glyph ((t (nil))))
|
||||
(buffers-tab ((t (:background "#0C1021" :foreground "#F8F8F8"))))
|
||||
(font-lock-builtin-face ((t (:foreground "#F8F8F8"))))
|
||||
(font-lock-comment-face ((t (:italic t :foreground "#AEAEAE"))))
|
||||
(font-lock-constant-face ((t (:foreground "#D8FA3C"))))
|
||||
(font-lock-doc-string-face ((t (:foreground "DarkOrange"))))
|
||||
(font-lock-function-name-face ((t (:foreground "#FF6400"))))
|
||||
(font-lock-keyword-face ((t (:foreground "#FBDE2D"))))
|
||||
(font-lock-preprocessor-face ((t (:foreground "Aquamarine"))))
|
||||
(font-lock-reference-face ((t (:foreground "SlateBlue"))))
|
||||
|
||||
(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062"))))
|
||||
(font-lock-regexp-grouping-construct ((t (:foreground "red"))))
|
||||
|
||||
(font-lock-string-face ((t (:foreground "#61CE3C"))))
|
||||
(font-lock-type-face ((t (:foreground "#8DA6CE"))))
|
||||
(font-lock-variable-name-face ((t (:foreground "#FF6400"))))
|
||||
(font-lock-warning-face ((t (:bold t :foreground "Pink"))))
|
||||
(gui-element ((t (:background "#D4D0C8" :foreground "black"))))
|
||||
(region ((t (:background "#253B76"))))
|
||||
(mode-line ((t (:background "grey75" :foreground "black"))))
|
||||
(highlight ((t (:background "#222222"))))
|
||||
(highline-face ((t (:background "SeaGreen"))))
|
||||
(italic ((t (nil))))
|
||||
(left-margin ((t (nil))))
|
||||
(text-cursor ((t (:background "yellow" :foreground "black"))))
|
||||
(toolbar ((t (nil))))
|
||||
(underline ((nil (:underline nil))))
|
||||
(zmacs-region ((t (:background "snow" :foreground "ble")))))))
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
(eval-when-compile
|
||||
(require 'color-theme))
|
||||
|
||||
(defun color-theme-example ()
|
||||
"Example theme. Carbon copy of color-theme-gnome contributed by Jonadab."
|
||||
(interactive)
|
||||
(color-theme-install
|
||||
'(color-theme-example
|
||||
((foreground-color . "wheat")
|
||||
(background-color . "darkslategrey")
|
||||
(background-mode . dark))
|
||||
(default ((t (nil))))
|
||||
(region ((t (:foreground "cyan" :background "dark cyan"))))
|
||||
(underline ((t (:foreground "yellow" :underline t))))
|
||||
(modeline ((t (:foreground "dark cyan" :background "wheat"))))
|
||||
(modeline-buffer-id ((t (:foreground "dark cyan" :background "wheat"))))
|
||||
(modeline-mousable ((t (:foreground "dark cyan" :background "wheat"))))
|
||||
(modeline-mousable-minor-mode ((t (:foreground "dark cyan" :background "wheat"))))
|
||||
(italic ((t (:foreground "dark red" :italic t))))
|
||||
(bold-italic ((t (:foreground "dark red" :bold t :italic t))))
|
||||
(font-lock-comment-face ((t (:foreground "Firebrick"))))
|
||||
(bold ((t (:bold)))))))
|
||||
|
|
@ -1,194 +0,0 @@
|
|||
;;; Emacs Color theme based on the Tango Palette colors.
|
||||
;;; First derived from color-theme-tango.el, created by danranx@gmail.com :
|
||||
;;; http://www.emacswiki.org/emacs/color-theme-tango.el
|
||||
|
||||
;; Copyright (C) 2010 Julien Barnier <julien@nozav.org>
|
||||
|
||||
;; Project homepage : http://blog.nozav.org/post/2010/07/12/Updated-tangotango-emacs-color-theme
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
;; This is free software; you can redistribute it and/or modify it under
|
||||
;; the terms of the GNU General Public License as published by the Free
|
||||
;; Software Foundation; either version 2, or (at your option) any later
|
||||
;; version.
|
||||
|
||||
;; This file is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Emacs; see the file COPYING, or type `C-h C-c'. If not,
|
||||
;; write to the Free Software Foundation at this address:
|
||||
|
||||
;; Free Software Foundation
|
||||
;; 51 Franklin Street, Fifth Floor
|
||||
;; Boston, MA 02110-1301
|
||||
;; USA
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'color-theme))
|
||||
|
||||
(defun color-theme-tangotango ()
|
||||
"A color theme based on Tango Palette colors."
|
||||
;; Color codes :
|
||||
;; - blue : "dodger blue"
|
||||
;; - yellow : "#edd400"
|
||||
;; - green : "#6ac214"
|
||||
;; - orange/red : "tomato"
|
||||
(interactive)
|
||||
(color-theme-install
|
||||
'(color-theme-tangotango
|
||||
((background-color . "#2e3434")
|
||||
(background-mode . dark)
|
||||
(border-color . "#888a85")
|
||||
(cursor-color . "#fce94f")
|
||||
(foreground-color . "#eeeeec")
|
||||
(mouse-color . "#8ae234"))
|
||||
((help-highlight-face . underline)
|
||||
(ibuffer-dired-buffer-face . font-lock-function-name-face)
|
||||
(ibuffer-help-buffer-face . font-lock-comment-face)
|
||||
(ibuffer-hidden-buffer-face . font-lock-warning-face)
|
||||
(ibuffer-occur-match-face . font-lock-warning-face)
|
||||
(ibuffer-read-only-buffer-face . font-lock-type-face)
|
||||
(ibuffer-special-buffer-face . font-lock-keyword-face)
|
||||
(ibuffer-title-face . font-lock-type-face))
|
||||
(highlight ((t (:background "brown4" :foreground nil))))
|
||||
(border ((t (:background "#888a85"))))
|
||||
(fringe ((t (:background "grey10"))))
|
||||
(mode-line ((t (:foreground "#bbbbbc" :background "#222222" :box (:line-width 1 :color nil :style released-button)))))
|
||||
(mode-line-inactive ((t (:foreground "#bbbbbc" :background "#555753"))))
|
||||
(mode-line-buffer-id ((t (:bold t :foreground "orange" :background nil))))
|
||||
(region ((t (:background "dark slate blue"))))
|
||||
(link ((t (:underline t :foreground "dodger blue"))))
|
||||
(custom-link ((t (:inherit 'link))))
|
||||
(match ((t (:bold t :background "#e9b96e" :foreground "#2e3436"))))
|
||||
(tool-tips ((t (:inherit 'variable-pitch :foreground "black" :background "lightyellow"))))
|
||||
(tooltip ((t (:inherit 'variable-pitch :foreground "black" :background "lightyellow"))))
|
||||
(bold ((t (:bold t :underline nil :background nil))))
|
||||
(italic ((t (:italic t :underline nil :background nil))))
|
||||
(font-lock-builtin-face ((t (:foreground "#729fcf"))))
|
||||
(font-lock-comment-face ((t (:foreground "#888a85"))))
|
||||
(font-lock-constant-face ((t (:foreground "#8ae234"))))
|
||||
(font-lock-doc-face ((t (:foreground "#888a85"))))
|
||||
(font-lock-keyword-face ((t (:foreground "#729fcf" :bold t))))
|
||||
(font-lock-string-face ((t (:foreground "#ad7fa8" :italic t))))
|
||||
(font-lock-type-face ((t (:foreground "#8ae234" :bold t))))
|
||||
(font-lock-variable-name-face ((t (:foreground "tomato"))))
|
||||
(font-lock-warning-face ((t (:bold t :foreground "#f57900"))))
|
||||
(font-lock-function-name-face ((t (:foreground "#edd400" :bold t))))
|
||||
(comint-highlight-input ((t (:italic t :bold t))))
|
||||
(comint-highlight-prompt ((t (:foreground "#8ae234"))))
|
||||
(isearch ((t (:background "#f57900" :foreground "#2e3436"))))
|
||||
(isearch-lazy-highlight-face ((t (:foreground "#2e3436" :background "#e9b96e"))))
|
||||
(show-paren-match-face ((t (:foreground "#2e3436" :background "#73d216"))))
|
||||
(show-paren-mismatch-face ((t (:background "#ad7fa8" :foreground "#2e3436"))))
|
||||
(minibuffer-prompt ((t (:foreground "#729fcf" :bold t))))
|
||||
(info-xref ((t (:foreground "#729fcf"))))
|
||||
(info-xref-visited ((t (:foreground "#ad7fa8"))))
|
||||
(diary-face ((t (:bold t :foreground "IndianRed"))))
|
||||
(eshell-ls-clutter-face ((t (:bold t :foreground "DimGray"))))
|
||||
(eshell-ls-executable-face ((t (:bold t :foreground "Coral"))))
|
||||
(eshell-ls-missing-face ((t (:bold t :foreground "black"))))
|
||||
(eshell-ls-special-face ((t (:bold t :foreground "Gold"))))
|
||||
(eshell-ls-symlink-face ((t (:bold t :foreground "White"))))
|
||||
(widget-button ((t (:bold t))))
|
||||
(widget-mouse-face ((t (:bold t :foreground "white" :background "brown4"))))
|
||||
(widget-field ((t (:foreground "orange" :background "gray30"))))
|
||||
(widget-single-line-field ((t (:foreground "orange" :background "gray30"))))
|
||||
(custom-group-tag ((t (:bold t :foreground "#edd400" :height 1.3))))
|
||||
(custom-variable-tag ((t (:bold t :foreground "#edd400" :height 1.1))))
|
||||
(custom-face-tag ((t (:bold t :foreground "#edd400" :height 1.1))))
|
||||
(custom-state-face ((t (:foreground "#729fcf"))))
|
||||
(custom-button ((t (:box (:line-width 1 :style released-button) :background "grey50" :foreground "black"))))
|
||||
(custom-variable-button ((t (:inherit 'custom-button))))
|
||||
(custom-button-mouse ((t (:inherit 'custom-button :background "grey60"))))
|
||||
(custom-button-unraised ((t (:background "grey50" :foreground "black"))))
|
||||
(custom-button-mouse-unraised ((t (:inherit 'custom-button-unraised :background "grey60"))))
|
||||
(custom-button-pressed ((t (:inherit 'custom-button :box (:style pressed-button)))))
|
||||
(custom-button-mouse-pressed-unraised ((t (:inherit 'custom-button-unraised :background "grey60"))))
|
||||
(custom-documentation ((t (:italic t))))
|
||||
(message-cited-text ((t (:foreground "#edd400"))))
|
||||
(gnus-cite-face-1 ((t (:foreground "#ad7fa8"))))
|
||||
(gnus-cite-face-2 ((t (:foreground "sienna4"))))
|
||||
(gnus-cite-face-3 ((t (:foreground "khaki4"))))
|
||||
(gnus-cite-face-4 ((t (:foreground "PaleTurquoise4"))))
|
||||
(gnus-group-mail-1-empty-face ((t (:foreground "light cyan"))))
|
||||
(gnus-group-mail-1-face ((t (:bold t :foreground "light cyan"))))
|
||||
(gnus-group-mail-2-empty-face ((t (:foreground "turquoise"))))
|
||||
(gnus-group-mail-2-face ((t (:bold t :foreground "turquoise"))))
|
||||
(gnus-group-mail-3-empty-face ((t (:foreground "#729fcf"))))
|
||||
(gnus-group-mail-3-face ((t (:bold t :foreground "#edd400"))))
|
||||
(gnus-group-mail-low-empty-face ((t (:foreground "dodger blue"))))
|
||||
(gnus-group-mail-low-face ((t (:bold t :foreground "dodger blue"))))
|
||||
(gnus-group-news-1-empty-face ((t (:foreground "light cyan"))))
|
||||
(gnus-group-news-1-face ((t (:bold t :foreground "light cyan"))))
|
||||
(gnus-group-news-2-empty-face ((t (:foreground "turquoise"))))
|
||||
(gnus-group-news-2-face ((t (:bold t :foreground "turquoise"))))
|
||||
(gnus-group-news-3-empty-face ((t (:foreground "#729fcf"))))
|
||||
(gnus-group-news-3-face ((t (:bold t :foreground "#edd400"))))
|
||||
(gnus-group-news-low-empty-face ((t (:foreground "dodger blue"))))
|
||||
(gnus-group-news-low-face ((t (:bold t :foreground "dodger blue"))))
|
||||
(gnus-header-name-face ((t (:bold t :foreground "#729fcf"))))
|
||||
(gnus-header-from ((t (:bold t :foreground "#edd400"))))
|
||||
(gnus-header-subject ((t (:foreground "#edd400"))))
|
||||
(gnus-header-content ((t (:italic t :foreground "#8ae234"))))
|
||||
(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3"))))
|
||||
(gnus-signature-face ((t (:italic t :foreground "dark grey"))))
|
||||
(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow"))))
|
||||
(gnus-summary-high-ancient-face ((t (:bold t :foreground "rotal blue"))))
|
||||
(gnus-summary-high-read-face ((t (:bold t :foreground "lime green"))))
|
||||
(gnus-summary-high-ticked-face ((t (:bold t :foreground "tomato"))))
|
||||
(gnus-summary-high-unread-face ((t (:bold t :foreground "white"))))
|
||||
(gnus-summary-low-ancient-face ((t (:italic t :foreground "lime green"))))
|
||||
(gnus-summary-low-read-face ((t (:italic t :foreground "royal blue"))))
|
||||
(gnus-summary-low-ticked-face ((t (:italic t :foreground "dark red"))))
|
||||
(gnus-summary-low-unread-face ((t (:italic t :foreground "white"))))
|
||||
(gnus-summary-normal-ancient-face ((t (:foreground "royal blue"))))
|
||||
(gnus-summary-normal-read-face ((t (:foreground "lime green"))))
|
||||
(gnus-summary-normal-ticked-face ((t (:foreground "indian red"))))
|
||||
(gnus-summary-normal-unread-face ((t (:foreground "white"))))
|
||||
(gnus-summary-selected ((t (:background "brown4" :foreground "white"))))
|
||||
(message-header-name-face ((t (:foreground "tomato"))))
|
||||
(message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3"))))
|
||||
(message-header-other-face ((t (:foreground "LightSkyBlue3"))))
|
||||
(message-header-xheader-face ((t (:foreground "DodgerBlue3"))))
|
||||
(message-header-subject ((t (:foreground "white"))))
|
||||
(message-header-to ((t (:foreground "white"))))
|
||||
(message-header-cc ((t (:foreground "white"))))
|
||||
(org-hide ((t (:foreground "#2e3436"))))
|
||||
(org-level-1 ((t (:bold t :foreground "dodger blue" :height 1.5))))
|
||||
(org-level-2 ((t (:bold nil :foreground "#edd400" :height 1.2))))
|
||||
(org-level-3 ((t (:bold t :foreground "#6ac214" :height 1.0))))
|
||||
(org-level-4 ((t (:bold nil :foreground "tomato" :height 1.0))))
|
||||
(org-date ((t (:underline t :foreground "magenta3"))))
|
||||
(org-footnote ((t (:underline t :foreground "magenta3"))))
|
||||
(org-link ((t (:foreground "skyblue2" :background "#2e3436"))))
|
||||
(org-special-keyword ((t (:foreground "brown"))))
|
||||
(org-verbatim ((t (:foreground "#eeeeec" :underline t :slant italic))))
|
||||
(org-block ((t (:foreground "#bbbbbc"))))
|
||||
(org-quote ((t (:inherit org-block :slant italic))))
|
||||
(org-verse ((t (:inherit org-block :slant italic))))
|
||||
(org-todo ((t (:bold t :foreground "Red"))))
|
||||
(org-done ((t (:bold t :foreground "ForestGreen"))))
|
||||
(org-agenda-structure ((t (:weight bold :foreground "tomato"))))
|
||||
(org-agenda-date ((t (:foreground "#6ac214"))))
|
||||
(org-agenda-date-weekend ((t (:weight normal :foreground "dodger blue"))))
|
||||
(org-agenda-date-today ((t (:weight bold :foreground "#edd400"))))
|
||||
(anything-header ((t (:bold t :background "grey15" :foreground "#edd400"))))
|
||||
(ess-jb-comment-face ((t (:background "#2e3436" :foreground "firebrick" :slant italic))))
|
||||
(ess-jb-hide-face ((t (:background "#2e3436" :foreground "#243436"))))
|
||||
(ess-jb-h1-face ((t (:height 1.6 :foreground "dodger blue" :slant normal))))
|
||||
(ess-jb-h2-face ((t (:height 1.4 :foreground "#6ac214" :slant normal))))
|
||||
(ess-jb-h3-face ((t (:height 1.2 :foreground "#edd400" :slant normal))))
|
||||
(ecb-default-highlight-face ((t (:background "#729fcf"))))
|
||||
(ecb-tag-header-face ((t (:background "#f57900"))))
|
||||
(magit-header ((t (:foreground "#edd400"))))
|
||||
(magit-diff-add ((t (:foreground "#729fcf"))))
|
||||
(magit-item-highlight ((t (:weight extra-bold :inverse-video t))))
|
||||
)))
|
||||
|
||||
(provide 'color-theme-tangotango)
|
||||
|
|
@ -1 +0,0 @@
|
|||
default
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
9c9e1bf0c4a2ed90304bab5e7b00bbbe23ea1fe7 286
|
||||
9c9e1bf0c4a2ed90304bab5e7b00bbbe23ea1fe7 default
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[paths]
|
||||
default = http://bitbucket.org/lyro/vim-mode
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
revlogv1
|
||||
store
|
||||
fncache
|
||||