commit 8e93ca7a95bf16b168a44e19073d17c2ba9ee9b7 Author: Mikaël Capelle Date: Thu Feb 18 14:53:30 2016 +0100 Initial commit. diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..1bb309d --- /dev/null +++ b/.bashrc @@ -0,0 +1,115 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +PATH=~/.softwares/bin:$PATH + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# don't put duplicate lines in the history. See bash(1) for more options +# don't overwrite GNU Midnight Commander's setting of `ignorespace'. +export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups +# ... or force ignoredups and ignorespace +export HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[01;36m\]@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +#if [ -f ~/.bash_aliases ]; then +# . ~/.bash_aliases +#fi + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + eval "`dircolors -b`" + alias ls='ls --color=auto' + #alias dir='ls --color=auto' + #alias vdir='ls --color=auto' + + #alias grep='grep --color=auto' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' +fi + +# some more ls aliases +alias ll='ls -l' +alias la='ls -A' +alias l='ls -CF' + +alias rm='rm -i --preserve-root' +alias gcc='gcc-5' +alias g++='g++-5' + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib + +# enable programmable completion features (ycase ou don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if [ -f /etc/bash_completion ]; then + . /etc/bash_completion +fi + +# export python path +export PYTHONPATH=${PYTHONPATH}:${HOME}/Dev/python/libs:/local/lib/python3.4 + +DATA_FOLDER=~/Dev/data +export DATASETS_FOLDER=$DATA_FOLDER/datasets +export INSTANCES_FOLDER=$DATA_FOLDER/instances +export RESULTS_FOLDER=$DATA_FOLDER/results diff --git a/.emacs.d/ac-comphist.dat b/.emacs.d/ac-comphist.dat new file mode 100644 index 0000000..9bf0a88 --- /dev/null +++ b/.emacs.d/ac-comphist.dat @@ -0,0 +1,254 @@ +((("virtual" . + [0 0 1 0 0 0 0]) + ("slot" . + [0 0 1 0]) + ("hpp" . + [1 0 0]) + ("main" . + [1 0 0 0]) + ("oops" . + [1 0 0 0]) + ("struct" . + [0 0 0 1 1 0]) + ("sort" . + [2 0 1 0]) + ("yas-global-mode" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]) + ("algorithm" . + [0 0 0 0 1 0 0 1 0]) + ("alignas" . + [0 0 1 0 0 0 0]) + ("clock" . + [1 0 0 0 0]) + ("t1" . + [1 0]) + ("seq" . + [1 0 0]) + ("matrix" . + [1 0 0 0 0 0]) + ("range" . + [1 0 0 0 0]) + ("1:72" . + [5 0 1 0]) + ("scatterplot3d" . + [0 0 0 0 0 0 0 0 0 0 0 0 1]) + ("attach" . + [1 0 0 0 0 0]) + ("plot" . + [1 0 0 0]) + ("ncol" . + [1 0 0 0]) + ("nrow" . + [2 0 0 0]) + ("rgl::persp3d" . + [0 0 0 0 0 0 0 0 0 1 0 0]) + ("wireframe" . + [0 0 0 0 1 0 0 0 0]) + ("data" . + [4 0 0 0]) + ("ggplot" . + [0 0 0 0 0 1]) + ("library" . + [7 0 0 0 0 0 0]) + ("b" . + [1]) + ("auto" . + [0 0 1 0]) + (":download_per_slot() const" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]) + ("download_per_slot" . + [0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) + ("olsg" . + [2 0 1 1]) + ("(basic_ostream<_CharT, _Traits> &__os)" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2]) + (":pdt() const" . + [0 0 0 0 0 0 0 0 0 0 0 11]) + ("pdt" . + [3 1 11]) + ("solve" . + [6 0 0 0 1]) + ("_instance" . + [0 0 0 0 1 0 0 0 1]) + (":stations() const" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5]) + ("stations" . + [12 0 3 2 4 2 0 7]) + ("py_solution" . + [2 0 1 0 1 0 0 0 0 0 0]) + ("(int gen, ogsn::type_t type, int satellite" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2]) + ("cnes" . + [1 0 0 1]) + ("(int gen, ogsn::type_t type, int satellite{#, int year{#, int month#}#})" . + [0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) + ("make_instance" . + [3 0 0 0 0 0 0 0 0 1 0 0 1]) + ("instance" . + [11 0 1 1 0 0 0 1]) + (":" . + [3]) + ("ogsn" . + [9 0 3 2]) + ("include" . + [0 0 0 0 0 0 3]) + ("begin" . + [3 0 1 1 0]) + ("()" . + [0 9]) + ("size" . + [7 0 4 2]) + ("at" . + [0 1]) + ("endl" . + [8 0 1 6]) + ("end" . + [2 0 1]) + ("cout" . + [8 0 0 8]) + ("vector" . + [11 0 4 3 2 2]) + ("std" . + [66 0 7]) + ("sol" . + [2 0 1]) + ("solution" . + [7 0 0 5 2 2 2 6]) + ("make_solution" . + [2 0 0 0 0 0 1 1 1 0 0 0 0]) + ("ilp_windows" . + [1 0 0 0 0 1 1 2 0 0 0]) + ("(const std::vector &)" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2]) + ("size_t" . + [10 0 0 0 0 0]) + ("_constraints" . + [1 0 0 0 0 0 0 0 0 0 0 3]) + ("x" . + [1]) + ("i" . + [20]) + ("_stations" . + [3 0 0 0 0 1 0 0 0]) + (":solve()" . + [0 0 0 0 0 0 0 2]) + ("s" . + [4]) + ("percent_data_transfered" . + [1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]) + (":percent_data_transfered() const" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]) + ("shared_ptr" . + [5 0 0 0 0 1 1 0 0 0]) + ("st_ilp" . + [2 0 0 0 0 0]) + ("mh" . + [2 0]) + ("solution_t" . + [2 0 0 0 0 0 0 0 0 0]) + ("keep" . + [1 0 0 0]) + ("stdin" . + [0 0 0 1 0]) + ("stationOn" . + [2 0 0 0 0 0 0 0 0]) + ("stationOff" . + [2 0 0 0 0 0 0 0 0 0]) + ("false" . + [0 0 0 0 1]) + ("_compute_pdt" . + [0 0 0 0 0 1 0 0 2 0 0 0]) + ("(std::vector stations)" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3]) + ("offPDT" . + [3 0 0 0 0 0]) + ("lastPDT" . + [1 0 0 0 0 0 0]) + ("onPDT" . + [1 0 0 0 0]) + ("gap_on2off" . + [1 0 0 0 0 0 0 0 0 0]) + ("gap_off2on" . + [0 0 0 0 0 0 0 0 0 1]) + ("ilp_prioritize" . + [0 0 0 0 0 0 0 1 0 0 0 0 0 0]) + ("ilpp" . + [1 0 0 0]) + ("_STDIO_H" . + [0 0 0 0 0 0 0 1]) + ("d" . + [1]) + ("int" . + [0 0 1]) + ("type_t" . + [0 0 1 0 0 0]) + ("y" . + [2]) + ("m" . + [6]) + ("(const std::string &filename)" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]) + ("type" . + [3 0 0 0]) + ("sat" . + [2 0 0]) + ("first_year" . + [7 0 0 0 0 0 0 0 0 0]) + ("last_year" . + [3 0 0 0 0 0 0 0 0]) + ("array" . + [9 0 0 0 1]) + ("n_solutions" . + [4 0 1 2 1 1 0 0 0 0 0]) + ("yb" . + [4 0]) + ("ym" . + [2 0]) + ("(std::shared_ptr instance)" . + [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2]) + ("log" . + [1 0 0]) + ("pdts" . + [3 0 0 0]) + ("mb" . + [1 0]) + ("j" . + [9]) + ("instances" . + [4 0 0 0 0 0 0 0 1]) + ("solutions" . + [4 0 0 0 0 0 0 0 0]) + ("k" . + [5]) + ("l" . + [3]) + ("flush" . + [0 0 0 0 1]) + ("v" . + [1]) + ("p" . + [1]) + ("cerr" . + [3 0 0 0]) + ("c++-mode-common-hook" . + [0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) + ("defun" . + [1 0 0 0 0]) + ("auto-complete" . + [0 0 0 0 0 0 0 0 0 0 0 0 1]) + ("add-to-list" . + [0 0 0 0 0 0 1 0 0 0 0]) + ("ac-sources" . + [0 0 0 0 0 0 0 1 0 0]) + ("DATA_FOLDER" . + [1 0 0 0 0 0 0 0 0 0 0]) + ("environment" . + [0 0 0 0 0 0 0 0 0 0 1]) + ("usebox" . + [0 0 0 2 0 1]) + ("usepackage" . + [0 0 0 0 1 4 2 0 0 0]) + ("français" . + [0 0 0 0 0 0 1 0]) + ("short" . + [0 0 0 0 1]))) diff --git a/.emacs.d/auto-save-list/.saves-1032-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-1032-SPRINGSTEEN~ new file mode 100755 index 0000000..b1956fb --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-1032-SPRINGSTEEN~ @@ -0,0 +1,2 @@ +z:/Windows/RoutingVirtualization/NetworkGenerator.py +z:\Windows\RoutingVirtualization\#NetworkGenerator.py# diff --git a/.emacs.d/auto-save-list/.saves-1136-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-1136-SPRINGSTEEN~ new file mode 100755 index 0000000..b3ce577 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-1136-SPRINGSTEEN~ @@ -0,0 +1,2 @@ +z:/FinalResults - SORTED/calc_capa.py +z:\FinalResults - SORTED\#calc_capa.py# diff --git a/.emacs.d/auto-save-list/.saves-12370-pinkfloyd.laas.fr~ b/.emacs.d/auto-save-list/.saves-12370-pinkfloyd.laas.fr~ new file mode 100644 index 0000000..f660bb6 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-12370-pinkfloyd.laas.fr~ @@ -0,0 +1,6 @@ +/home/mcapelle/.emacs.el +/home/mcapelle/#.emacs.el# +/home/mcapelle/.bashrc +/home/mcapelle/#.bashrc# +/home/mcapelle/.softwares/emacs-24.5/share/emacs/24.5/lisp/loaddefs.el +/home/mcapelle/.softwares/emacs-24.5/share/emacs/24.5/lisp/#loaddefs.el# diff --git a/.emacs.d/auto-save-list/.saves-12374-pinkfloyd.laas.fr~ b/.emacs.d/auto-save-list/.saves-12374-pinkfloyd.laas.fr~ new file mode 100644 index 0000000..477f41a --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-12374-pinkfloyd.laas.fr~ @@ -0,0 +1,14 @@ +/home/mcapelle/Dev/CPP/lns/src/solution.cpp +/home/mcapelle/Dev/CPP/lns/src/#solution.cpp# +/home/mcapelle/Dev/CPP/lns/inc/solution.hpp +/home/mcapelle/Dev/CPP/lns/inc/#solution.hpp# +/home/mcapelle/Dev/CPP/lns/src/verifier.cpp +/home/mcapelle/Dev/CPP/lns/src/#verifier.cpp# +/home/mcapelle/Dev/CPP/lns/src/main.cpp +/home/mcapelle/Dev/CPP/lns/src/#main.cpp# +/home/mcapelle/Dev/Python/Projects/Model_1/model.py +/home/mcapelle/Dev/Python/Projects/Model_1/#model.py# +/home/mcapelle/Dev/Python/Projects/Model_1/test-result.py +/home/mcapelle/Dev/Python/Projects/Model_1/#test-result.py# +/home/mcapelle/Dev/CPP/lns/Makefile +/home/mcapelle/Dev/CPP/lns/#Makefile# diff --git a/.emacs.d/auto-save-list/.saves-1540-PIXIES~ b/.emacs.d/auto-save-list/.saves-1540-PIXIES~ new file mode 100755 index 0000000..03d320e --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-1540-PIXIES~ @@ -0,0 +1,2 @@ +e:/Python/Project1/access_cflos_rerun.py +e:\Python\Project1\#access_cflos_rerun.py# diff --git a/.emacs.d/auto-save-list/.saves-17826-pinkfloyd.laas.fr~ b/.emacs.d/auto-save-list/.saves-17826-pinkfloyd.laas.fr~ new file mode 100644 index 0000000..4f75c7e --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-17826-pinkfloyd.laas.fr~ @@ -0,0 +1,4 @@ +/home/mcapelle/Dev/CPP/lns/script.m +/home/mcapelle/Dev/CPP/lns/#script.m# +/home/mcapelle/Dev/CPP/lns/src/main.cpp +/home/mcapelle/Dev/CPP/lns/src/#main.cpp# diff --git a/.emacs.d/auto-save-list/.saves-1840-PIXIES~ b/.emacs.d/auto-save-list/.saves-1840-PIXIES~ new file mode 100755 index 0000000..fbb6309 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-1840-PIXIES~ @@ -0,0 +1,2 @@ +z:/Dev/main.cpp +z:\Dev\#main.cpp# diff --git a/.emacs.d/auto-save-list/.saves-2128-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-2128-SPRINGSTEEN~ new file mode 100755 index 0000000..cf482a6 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-2128-SPRINGSTEEN~ @@ -0,0 +1,6 @@ +z:/Results/pyresults/show_info.py +z:\Results\pyresults\#show_info.py# +z:/Results/pyresults/analyzer.py +z:\Results\pyresults\#analyzer.py# +z:/Results/pyresults/graphic.py +z:\Results\pyresults\#graphic.py# diff --git a/.emacs.d/auto-save-list/.saves-2152-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-2152-SPRINGSTEEN~ new file mode 100755 index 0000000..4b212a1 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-2152-SPRINGSTEEN~ @@ -0,0 +1,2 @@ +z:/Results/result_reader.py +z:\Results\#result_reader.py# diff --git a/.emacs.d/auto-save-list/.saves-2232-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-2232-SPRINGSTEEN~ new file mode 100755 index 0000000..c306d75 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-2232-SPRINGSTEEN~ @@ -0,0 +1,2 @@ +z:/Results/pyresults/show_info.py +z:\Results\pyresults\#show_info.py# diff --git a/.emacs.d/auto-save-list/.saves-2356-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-2356-SPRINGSTEEN~ new file mode 100755 index 0000000..aef70b7 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-2356-SPRINGSTEEN~ @@ -0,0 +1,8 @@ +z:/FinalResults - SORTED/script_frepart.py +z:\FinalResults - SORTED\#script_frepart.py# +z:/FinalResults - SORTED/script_time.py +z:\FinalResults - SORTED\#script_time.py# +z:/FinalResults - SORTED/script_param.py +z:\FinalResults - SORTED\#script_param.py# +z:/FinalResults - SORTED/script_heur.py +z:\FinalResults - SORTED\#script_heur.py# diff --git a/.emacs.d/auto-save-list/.saves-29259-pinkfloyd.laas.fr~ b/.emacs.d/auto-save-list/.saves-29259-pinkfloyd.laas.fr~ new file mode 100644 index 0000000..7602b49 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-29259-pinkfloyd.laas.fr~ @@ -0,0 +1,6 @@ +/home/mcapelle/Documents/Presentation_ROADEFF/PresentationROADEFF.tex +/home/mcapelle/Documents/Presentation_ROADEFF/#PresentationROADEFF.tex# +/home/mcapelle/Documents/Presentation_ROADEFF/plots/plot_ps.tex +/home/mcapelle/Documents/Presentation_ROADEFF/plots/#plot_ps.tex# +/home/mcapelle/Documents/Presentation_ROADEFF/plots/plot_heuristics.tex +/home/mcapelle/Documents/Presentation_ROADEFF/plots/#plot_heuristics.tex# diff --git a/.emacs.d/auto-save-list/.saves-3332-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-3332-SPRINGSTEEN~ new file mode 100755 index 0000000..377824a --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-3332-SPRINGSTEEN~ @@ -0,0 +1,4 @@ +z:/Results/show_info.py +z:\Results\#show_info.py# +z:/Results/create_csv.py +z:\Results\#create_csv.py# diff --git a/.emacs.d/auto-save-list/.saves-3380-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-3380-SPRINGSTEEN~ new file mode 100755 index 0000000..980416e --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-3380-SPRINGSTEEN~ @@ -0,0 +1,10 @@ +z:/test.txt +z:\#test.txt# +z:/Results/pyresults/show_info.py +z:\Results\pyresults\#show_info.py# +z:/Results/pyresults/result.py +z:\Results\pyresults\#result.py# +z:/Results/pyresults/result_reader.py +z:\Results\pyresults\#result_reader.py# +z:/Results/pyresults/request.py +z:\Results\pyresults\#request.py# diff --git a/.emacs.d/auto-save-list/.saves-3416-pinkfloyd.laas.fr~ b/.emacs.d/auto-save-list/.saves-3416-pinkfloyd.laas.fr~ new file mode 100644 index 0000000..d86bf1f --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-3416-pinkfloyd.laas.fr~ @@ -0,0 +1,12 @@ +/home/mcapelle/Dev/CPP/lns/inc/ilp.hpp +/home/mcapelle/Dev/CPP/lns/inc/#ilp.hpp# +/home/mcapelle/Dev/CPP/lns/src/solution.cpp +/home/mcapelle/Dev/CPP/lns/src/#solution.cpp# +/home/mcapelle/Dev/CPP/lns/inc/solution.hpp +/home/mcapelle/Dev/CPP/lns/inc/#solution.hpp# +/home/mcapelle/Dev/CPP/lns/src/ilp.cpp +/home/mcapelle/Dev/CPP/lns/src/#ilp.cpp# +/home/mcapelle/Dev/CPP/lns/inc/instance.hpp +/home/mcapelle/Dev/CPP/lns/inc/#instance.hpp# +/home/mcapelle/Dev/CPP/lns/src/instance.cpp +/home/mcapelle/Dev/CPP/lns/src/#instance.cpp# diff --git a/.emacs.d/auto-save-list/.saves-3936-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-3936-SPRINGSTEEN~ new file mode 100755 index 0000000..3ed69e2 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-3936-SPRINGSTEEN~ @@ -0,0 +1,2 @@ +z:/Windows/Prog/cwebsocket-master/x86_server/main.c +z:\Windows\Prog\cwebsocket-master\x86_server\#main.c# diff --git a/.emacs.d/auto-save-list/.saves-4088-PIXIES~ b/.emacs.d/auto-save-list/.saves-4088-PIXIES~ new file mode 100755 index 0000000..b9c26b7 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-4088-PIXIES~ @@ -0,0 +1,18 @@ +z:/Dev/main.cpp +z:\Dev\#main.cpp# +z:/Dev/Python/Projects/Model_1/test-result.py +z:\Dev\Python\Projects\Model_1\#test-result.py# +z:/Dev/Python/Projects/Model_1/verifier_c.pyx +z:\Dev\Python\Projects\Model_1\#verifier_c.pyx# +z:/Dev/Python/Projects/Model_1/model.py +z:\Dev\Python\Projects\Model_1\#model.py# +z:/Dev/Python/Projects/Model_1/setup.py +z:\Dev\Python\Projects\Model_1\#setup.py# +z:/Dev/Python/Projects/Model_1/run-many.sh +z:\Dev\Python\Projects\Model_1\#run-many.sh# +z:/Dev/Python/Libs/utility.py +z:\Dev\Python\Libs\#utility.py# +z:/Dev/Python/Projects/Model_1/main.py +z:\Dev\Python\Projects\Model_1\#main.py# +z:/Dev/Python/Projects/Model_1/run-instance.py +z:\Dev\Python\Projects\Model_1\#run-instance.py# diff --git a/.emacs.d/auto-save-list/.saves-4164-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-4164-SPRINGSTEEN~ new file mode 100755 index 0000000..f3059e9 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-4164-SPRINGSTEEN~ @@ -0,0 +1,4 @@ +z:/Windows/Prog/fractionnal.hpp +z:\Windows\Prog\#fractionnal.hpp# +z:/Windows/Prog/frac.cpp +z:\Windows\Prog\#frac.cpp# diff --git a/.emacs.d/auto-save-list/.saves-4220-PIXIES~ b/.emacs.d/auto-save-list/.saves-4220-PIXIES~ new file mode 100755 index 0000000..6743693 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-4220-PIXIES~ @@ -0,0 +1,2 @@ +e:/Python/Ephem/main.py +e:\Python\Ephem\#main.py# diff --git a/.emacs.d/auto-save-list/.saves-4260-PIXIES~ b/.emacs.d/auto-save-list/.saves-4260-PIXIES~ new file mode 100755 index 0000000..e69de29 diff --git a/.emacs.d/auto-save-list/.saves-4268-PIXIES~ b/.emacs.d/auto-save-list/.saves-4268-PIXIES~ new file mode 100755 index 0000000..55b7c3d --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-4268-PIXIES~ @@ -0,0 +1,8 @@ +z:/Dev/CPP/lns/src/main.cpp +z:\Dev\CPP\lns\src\#main.cpp# +z:/Dev/CPP/test.cpp +z:\Dev\CPP\#test.cpp# +z:/Dev/Python/Projects/Model_1/run-many.sh +z:\Dev\Python\Projects\Model_1\#run-many.sh# +z:/Dev/CPP/test.c +z:\Dev\CPP\#test.c# diff --git a/.emacs.d/auto-save-list/.saves-4572-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-4572-SPRINGSTEEN~ new file mode 100755 index 0000000..e0bcf05 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-4572-SPRINGSTEEN~ @@ -0,0 +1,4 @@ +z:/Results/result_reader.py +z:\Results\#result_reader.py# +z:/Results/create_csv.py +z:\Results\#create_csv.py# diff --git a/.emacs.d/auto-save-list/.saves-4816-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-4816-SPRINGSTEEN~ new file mode 100755 index 0000000..a4a34e3 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-4816-SPRINGSTEEN~ @@ -0,0 +1,2 @@ +z:/test.adb +z:\#test.adb# diff --git a/.emacs.d/auto-save-list/.saves-4880-PIXIES~ b/.emacs.d/auto-save-list/.saves-4880-PIXIES~ new file mode 100755 index 0000000..94f5209 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-4880-PIXIES~ @@ -0,0 +1,6 @@ +z:/Dev/CPP/lns/main.cpp +z:\Dev\CPP\lns\#main.cpp# +z:/Dev/CPP/lns/makefile +z:\Dev\CPP\lns\#makefile# +z:/Dev/Python/Projects/Model_1/main.py +z:\Dev\Python\Projects\Model_1\#main.py# diff --git a/.emacs.d/auto-save-list/.saves-5296-PIXIES~ b/.emacs.d/auto-save-list/.saves-5296-PIXIES~ new file mode 100755 index 0000000..13ef650 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-5296-PIXIES~ @@ -0,0 +1,10 @@ +z:/Dev/CPP/lns/inc/instance.hpp +z:\Dev\CPP\lns\inc\#instance.hpp# +z:/Dev/CPP/lns/src/instance.cpp +z:\Dev\CPP\lns\src\#instance.cpp# +z:/Dev/CPP/lns/main.cpp +z:\Dev\CPP\lns\#main.cpp# +z:/Dev/CPP/lns/inc/ogsn.hpp +z:\Dev\CPP\lns\inc\#ogsn.hpp# +z:/Dev/CPP/lns/makefile +z:\Dev\CPP\lns\#makefile# diff --git a/.emacs.d/auto-save-list/.saves-5400-PIXIES~ b/.emacs.d/auto-save-list/.saves-5400-PIXIES~ new file mode 100755 index 0000000..548329c --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-5400-PIXIES~ @@ -0,0 +1,4 @@ +z:/Dev/set_def.c +z:\Dev\#set_def.c# +z:/Dev/main.adb +z:\Dev\#main.adb# diff --git a/.emacs.d/auto-save-list/.saves-5904-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-5904-SPRINGSTEEN~ new file mode 100755 index 0000000..d9d897b --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-5904-SPRINGSTEEN~ @@ -0,0 +1,2 @@ +z:/FinalResults - SORTED/analyze.py +z:\FinalResults - SORTED\#analyze.py# diff --git a/.emacs.d/auto-save-list/.saves-5960-PIXIES~ b/.emacs.d/auto-save-list/.saves-5960-PIXIES~ new file mode 100755 index 0000000..9406dbc --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-5960-PIXIES~ @@ -0,0 +1,34 @@ +z:/Dev/CPP/lns/src/ilp.cpp +z:\Dev\CPP\lns\src\#ilp.cpp# +z:/Dev/CPP/lns/inc/ilp.hpp +z:\Dev\CPP\lns\inc\#ilp.hpp# +z:/Dev/CPP/lns/makefile +z:\Dev\CPP\lns\#makefile# +z:/Dev/CPP/lns/src/instance.cpp +z:\Dev\CPP\lns\src\#instance.cpp# +z:/Dev/CPP/lns/inc/instance.hpp +z:\Dev\CPP\lns\inc\#instance.hpp# +z:/Dev/CPP/lns/src/greedy.cpp +z:\Dev\CPP\lns\src\#greedy.cpp# +z:/Dev/CPP/lns/inc/greedy.hpp +z:\Dev\CPP\lns\inc\#greedy.hpp# +z:/Dev/CPP/lns/src/main.cpp +z:\Dev\CPP\lns\src\#main.cpp# +z:/Dev/CPP/lns/inc/ogsn.hpp +z:\Dev\CPP\lns\inc\#ogsn.hpp# +z:/Dev/CPP/lns/src/ogsn.cpp +z:\Dev\CPP\lns\src\#ogsn.cpp# +z:/Dev/CPP/lns/inc/solution.hpp +z:\Dev\CPP\lns\inc\#solution.hpp# +z:/Dev/CPP/test.cpp +z:\Dev\CPP\#test.cpp# +z:/Dev/CPP/lns/src/solution.cpp +z:\Dev\CPP\lns\src\#solution.cpp# +z:/Dev/Python/Projects/Model_1/run-many.sh +z:\Dev\Python\Projects\Model_1\#run-many.sh# +z:/Dev/Python/Projects/Instances/generate.py +z:\Dev\Python\Projects\Instances\#generate.py# +z:/Dev/Python/Projects/Instances/main.py +z:\Dev\Python\Projects\Instances\#main.py# +z:/Dev/CPP/lns/.gitignore +z:\Dev\CPP\lns\#.gitignore# diff --git a/.emacs.d/auto-save-list/.saves-6292-PIXIES~ b/.emacs.d/auto-save-list/.saves-6292-PIXIES~ new file mode 100755 index 0000000..cc9149a --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-6292-PIXIES~ @@ -0,0 +1,8 @@ +z:/Dev/main.cpp +z:\Dev\#main.cpp# +z:/Dev/main.c +z:\Dev\#main.c# +z:/Dev/Python/Projects/Model_1/test-result.py +z:\Dev\Python\Projects\Model_1\#test-result.py# +z:/Dev/Python/Projects/Model_1/main.py +z:\Dev\Python\Projects\Model_1\#main.py# diff --git a/.emacs.d/auto-save-list/.saves-6632-PIXIES~ b/.emacs.d/auto-save-list/.saves-6632-PIXIES~ new file mode 100755 index 0000000..5faa2dc --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-6632-PIXIES~ @@ -0,0 +1,2 @@ +e:/Python/Project1/access_cflos_rerun_lat.py +e:\Python\Project1\#access_cflos_rerun_lat.py# diff --git a/.emacs.d/auto-save-list/.saves-7132-SPRINGSTEEN~ b/.emacs.d/auto-save-list/.saves-7132-SPRINGSTEEN~ new file mode 100755 index 0000000..60cd755 --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-7132-SPRINGSTEEN~ @@ -0,0 +1,2 @@ +c:/Users/mcapelle/Downloads/matplotlib-1.3.1/setup.py +c:\Users\mcapelle\Downloads\matplotlib-1.3.1\#setup.py# diff --git a/.emacs.d/auto-save-list/.saves-7253-pinkfloyd.laas.fr~ b/.emacs.d/auto-save-list/.saves-7253-pinkfloyd.laas.fr~ new file mode 100644 index 0000000..41e0a0e --- /dev/null +++ b/.emacs.d/auto-save-list/.saves-7253-pinkfloyd.laas.fr~ @@ -0,0 +1,2 @@ +/home/mcapelle/Documents/Lettre_Resiliation_Bail/lettre.tex +/home/mcapelle/Documents/Lettre_Resiliation_Bail/#lettre.tex# diff --git a/.emacs.d/clang-complete b/.emacs.d/clang-complete new file mode 100755 index 0000000..56c344b Binary files /dev/null and b/.emacs.d/clang-complete differ diff --git a/.emacs.d/elpa/2048-game-20151026.1233/2048-game-autoloads.el b/.emacs.d/elpa/2048-game-20151026.1233/2048-game-autoloads.el new file mode 100644 index 0000000..ed05894 --- /dev/null +++ b/.emacs.d/elpa/2048-game-20151026.1233/2048-game-autoloads.el @@ -0,0 +1,22 @@ +;;; 2048-game-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;;;### (autoloads nil "2048-game" "2048-game.el" (22209 50994 959 +;;;;;; 0)) +;;; Generated autoloads from 2048-game.el + +(autoload '2048-game "2048-game" "\ +Start playing 2048. + +\(fn)" t nil) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; 2048-game-autoloads.el ends here diff --git a/.emacs.d/elpa/2048-game-20151026.1233/2048-game-autoloads.el~ b/.emacs.d/elpa/2048-game-20151026.1233/2048-game-autoloads.el~ new file mode 100644 index 0000000..83c3349 --- /dev/null +++ b/.emacs.d/elpa/2048-game-20151026.1233/2048-game-autoloads.el~ @@ -0,0 +1,11 @@ +;;; 2048-game-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; 2048-game-autoloads.el ends here diff --git a/.emacs.d/elpa/2048-game-20151026.1233/2048-game-pkg.el b/.emacs.d/elpa/2048-game-20151026.1233/2048-game-pkg.el new file mode 100644 index 0000000..b78ae69 --- /dev/null +++ b/.emacs.d/elpa/2048-game-20151026.1233/2048-game-pkg.el @@ -0,0 +1 @@ +(define-package "2048-game" "20151026.1233" "play 2048 in Emacs" 'nil :url "https://bitbucket.org/zck/2048.el") diff --git a/.emacs.d/elpa/2048-game-20151026.1233/2048-game-pkg.elc b/.emacs.d/elpa/2048-game-20151026.1233/2048-game-pkg.elc new file mode 100644 index 0000000..034277d Binary files /dev/null and b/.emacs.d/elpa/2048-game-20151026.1233/2048-game-pkg.elc differ diff --git a/.emacs.d/elpa/2048-game-20151026.1233/2048-game.el b/.emacs.d/elpa/2048-game-20151026.1233/2048-game.el new file mode 100644 index 0000000..6a146a9 --- /dev/null +++ b/.emacs.d/elpa/2048-game-20151026.1233/2048-game.el @@ -0,0 +1,538 @@ +;;; 2048-game.el --- play 2048 in Emacs + +;; Copyright 2014 Zachary Kanfer + +;; Author: Zachary Kanfer +;; Version: 2014.03.27 +;; Package-Version: 20151026.1233 +;; URL: https://bitbucket.org/zck/2048.el + +;; 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 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 . + + +;;; Commentary: + +;; This program is an implementation of 2048 for Emacs. +;; To begin playing, call `M-x 2048-game`, then use the arrow keys, +;; p/n/b/f, or C-p/C-n/C-b/C-f to move the tiles around. + +;; Whenever you move the board, all tiles slide as far to that direction +;; as they can go. If a tile collides with another tile of the same value, +;; the tiles combine into a tile with double the initial value, and you +;; gain the new tile's value as your score. + +;; The goal is to create a tile with value 2048. + +;; The size of the board and goal value can be customized -- see the variables +;; *2048-columns*, *2048-rows*, and *2048-victory-value*. + + +;;; Code: + +(define-derived-mode 2048-mode special-mode "2048-mode" + (define-key 2048-mode-map (kbd "p") '2048-up) + (define-key 2048-mode-map (kbd "C-p") '2048-up) + (define-key 2048-mode-map (kbd "") '2048-up) + (define-key 2048-mode-map (kbd "n") '2048-down) + (define-key 2048-mode-map (kbd "C-n") '2048-down) + (define-key 2048-mode-map (kbd "") '2048-down) + (define-key 2048-mode-map (kbd "b") '2048-left) + (define-key 2048-mode-map (kbd "C-b") '2048-left) + (define-key 2048-mode-map (kbd "") '2048-left) + (define-key 2048-mode-map (kbd "f") '2048-right) + (define-key 2048-mode-map (kbd "C-f") '2048-right) + (define-key 2048-mode-map (kbd "") '2048-right) + (define-key 2048-mode-map (kbd "r") '2048-random-move)) + +;;;###autoload +(defun 2048-game () "Start playing 2048." + (interactive) + (switch-to-buffer "2048") + (buffer-disable-undo "2048") + (2048-mode) + (2048-init)) + +(require 'cl-lib) + +(defvar *2048-board* nil + "The board itself. + +If a number is in the square, the number is stored. Otherwise, 0 is stored. + +Instead of accessing this directly, use 2048-get-cell.") + +(defvar *2048-combines-this-move* nil + "This stores, for each cell in the board, whether the number in it was generated this turn by two numbers combining.") + +(defvar *2048-columns* 4 + "The width of the board. It could be customized, if you wanted to make the game very very hard, or very very easy.") + +(defvar *2048-rows* 4 + "The height of the board. It could be customized, if you wanted to make the game very very tall, or very very short.") + +(defvar *2048-possible-values-to-insert* (cons 4 (make-list 9 2)) + "When a new element is inserted into the board, randomly choose a number from this sequence.") + +(defvar *2048-victory-value* nil + "When this number is reached, the user wins! Yay!") + +(defvar *2048-default-victory-value* 2048 + "When the game starts, reset *2048-victory-value* to this value.") + +(defvar *2048-debug* nil + "When 't, print debugging information.") + +(defconst *2048-numbers* '(0 2 4 8 16 32 64 128 256 512 1024 2048)) + +(defvar *2048-score* nil + "Current score in the game.") + +(defvar *2048-hi-tile* nil + "Current highest-number tile.") + +(defvar *2048-history* nil + "Score history in this Emacs session. Each element is (SCORE HI-TILE TIME).") + +(defvar *2048-history-size* 10 + "Keep this many items in the history.") + +(defvar *2048-game-has-been-added-to-history* nil + "Whether the current game has been added to the history yet. + +Right now, it's only for use when the game has been lost. Since the user can choose to not start a new game, we want to add the score to the history the first time the game is lost, but not any other time.") + +(defvar *2048-game-epoch* nil + "The time the current game started.") + +;; These are prefixed with "twentyfortyeight-face-", not "2048-face" +;; because face names starting with numbers break htmlfontify-buffer, +;; as CSS classes beginning with numbers are ignored. +(defface twentyfortyeight-face-2 '((t . (:background "khaki" :foreground "black"))) "Face for the tile 2" :group '2048-faces) +(defface twentyfortyeight-face-4 '((t . (:background "burlywood" :foreground "black"))) "Face for the tile 4" :group '2048-faces) +(defface twentyfortyeight-face-8 '((t . (:background "orange3" :foreground "black"))) "Face for the tile 8" :group '2048-faces) +(defface twentyfortyeight-face-16 '((t . (:background "orange" :foreground "black"))) "Face for the tile 16" :group '2048-faces) +(defface twentyfortyeight-face-32 '((t . (:background "orange red" :foreground "black"))) "Face for the tile 32" :group '2048-faces) +(defface twentyfortyeight-face-64 '((t . (:background "firebrick" :foreground "white"))) "Face for the tile 64" :group '2048-faces) +(defface twentyfortyeight-face-128 '((t . (:background "dark red" :foreground "white"))) "Face for the tile 128" :group '2048-faces) +(defface twentyfortyeight-face-256 '((t . (:background "dark magenta" :foreground "white"))) "Face for the tile 256" :group '2048-faces) +(defface twentyfortyeight-face-512 '((t . (:background "magenta" :foreground "black"))) "Face for the tile 512" :group '2048-faces) +(defface twentyfortyeight-face-1024 '((t . (:background "gold" :foreground "black"))) "Face for the tile 1024" :group '2048-faces) +(defface twentyfortyeight-face-2048 '((t . (:background "yellow" :foreground "black"))) "Face for the tile 2048" :group '2048-faces) + +(defun 2048-get-face (number) + "Return the face for squares holding NUMBER." + (let ((face-symbol (2048-get-face-symbol number))) + (if (facep face-symbol) + face-symbol + 'twentyfortyeight-face-2048))) + +(defun 2048-get-face-symbol (number) + "Return the face symbol for squares holding NUMBER." + (intern (concat "twentyfortyeight-face-" + (int-to-string number)))) + +(defun 2048-empty-tile (num) + "Return the tile to be inserted for the blank part of a square holding NUM. + +That is, an empty string with font stuff on it." + (symbol-value (2048-empty-symbol num))) + +(defun 2048-empty-symbol (num) + "Return symbol of the variable holding empty space for number NUM." + (intern (concat "2048-empty-" (int-to-string num)))) + +(defun 2048-tile-symbol (num) + "Return symbol of the variable for the tile for squares holding NUM." + (intern (concat "2048-tile-" (int-to-string num)))) + +(defun 2048-tile (num) + "Return the tile to be inserted for a square holding NUM. + +The tile is the string, but with extra font stuff on it." + (symbol-value (2048-tile-symbol num))) + +(defmacro 2048-game-move (&rest body) + "Perform the game move indicated by BODY. + +This macro is used to do some housekeeping around the move." + `(progn (setq *2048-combines-this-move* (make-vector (* *2048-columns* *2048-rows*) + nil)) + + ,@body + (2048-print-board) + (2048-check-game-end))) + +(defmacro 2048-debug (&rest body) + "If *2048-debug* is 't, log ,@BODY as a string to the buffer named '2048-debug'." + `(when *2048-debug* + (print (concat ,@body) + (get-buffer-create "2048-debug")))) + +(defun 2048-init-tiles () + "Initialize each variable 2048-empty-N and 2048-tile-N with appropriate string and face." + (mapc #'2048-init-tile + *2048-numbers*)) + +(defun 2048-init-tile (number) + "Initialize the tile holding NUMBER. + +This sets up both the tile to hold it, and the empty space around it." + (set (2048-empty-symbol number) (format "%7s" " ")) + ;; if constant then all faces are applied to this one constant. (Symptom: all background is yellow) + ;; The bytecompiler is smart enough to see that (concat...) is a constant, but not (format...) ;-) + (set (2048-tile-symbol number) (format "%5s " (2048-num-to-printable number))) + (when (> number 0) + (let ((face (2048-get-face number))) + (put-text-property 0 7 'font-lock-face face (2048-empty-tile number)) + (put-text-property 0 7 'font-lock-face face (2048-tile number))))) + +(defun 2048-test-tiles () + "Test out the tile colors." + (interactive) + (let ((*2048-board* + (vconcat *2048-numbers* + (make-vector (- (* *2048-columns* *2048-rows*) + (length *2048-numbers*)) + 0))) + (*2048-score* 123456) + (*2048-history* '((123 512 "2014-06-18 12:34:56" (0 30 0 0)) + (456 1024 "2014-06-18 12:45:00" (0 123 0 0))))) + (switch-to-buffer "2048-test") + (2048-init-tiles) + (2048-mode) + (2048-print-board))) + +(defun 2048-init () + "Begin a game of 2048." + (setq *2048-board* (make-vector (* *2048-columns* *2048-rows*) + 0)) + (setq *2048-combines-this-move* (make-vector (* *2048-columns* *2048-rows*) + nil)) + (setq *2048-score* 0 + *2048-hi-tile* 2) + (setq *2048-victory-value* *2048-default-victory-value*) + (setq *2048-game-has-been-added-to-history* nil) + (setq *2048-game-epoch* (current-time)) + (2048-insert-random-cell) + (2048-insert-random-cell) + (2048-init-tiles) + (2048-print-board) + (message "Good luck!")) + +(defun 2048-get-cell (row col) + "Get the value in (ROW, COL)." + (elt *2048-board* + (+ (* row *2048-columns*) + col))) + +(defun 2048-set-cell (row column val) + "Set the value in (ROW, COLUMN) to VAL." + (when (< *2048-hi-tile* val) + (setq *2048-hi-tile* val)) + (aset *2048-board* + (+ (* row *2048-columns*) + column) + val)) + +(defun 2048-num-to-printable (num) + "Return NUM as a string that can be put into the board. + +That is, print zeros as empty strings, and all other numbers as themselves." + (if (eq num 0) + "" + (format "%d" num))) + +(defun 2048-was-combined-this-turn (row column) + "Return whether the number in (ROW, COLUMN) was generated this turn by two numbers combining." + (elt *2048-combines-this-move* + (+ (* row *2048-columns*) + column))) + +(defun 2048-set-was-combined-this-turn (row column) + "Set that the number in (ROW, COLUMN) was generated this turn by two numbers combining." + (2048-debug (format "setting (%d, %d) as combined this turn." row column)) + (aset *2048-combines-this-move* + (+ (* row *2048-columns*) + column) + t)) + +(defun 2048-insert-random-cell () + "Pick a number randomly, and insert it into a random cell." + (let ((number-to-insert (elt *2048-possible-values-to-insert* + (random (length *2048-possible-values-to-insert*)))) + (row (random *2048-rows*)) + (column (random *2048-columns*))) + (while (not (eq (2048-get-cell row column) + 0)) + (setq row (random *2048-rows*)) + (setq column (random *2048-columns*))) + (2048-set-cell row column number-to-insert))) + +(defun 2048-check-game-end () + "Check whether the game has either been won or lost. If so, notify the user and restarting." + (cond ((2048-game-was-won) + (2048-print-board) + (if (y-or-n-p "Yay! You beat the game! y to start again; n to continue. Start again? ") + (progn (2048-add-new-history-item *2048-score* *2048-hi-tile* (current-time) (time-subtract (current-time) *2048-game-epoch*)) + (2048-init)) + (setq *2048-victory-value* + (* *2048-victory-value* 2)))) + ((2048-game-was-lost) + (unless *2048-game-has-been-added-to-history* + (2048-add-new-history-item *2048-score* *2048-hi-tile* (current-time) (time-subtract (current-time) *2048-game-epoch*)) + (setq *2048-game-has-been-added-to-history* t)) + (2048-print-board) + (when (y-or-n-p "Aw, too bad. You lost. Want to play again? ") + (2048-init))))) + +(defun 2048-add-new-history-item (score hi-tile game-end-time game-duration) + "Generate and add a new history item to the score list. + +This item should have score SCORE, the highest tile reached as HI-TILE, +have ended at GAME-END-TIME, and have duration GAME-DURATION" + (setq *2048-history* + (let ((history-length (length *2048-history*))) + ;; get the history length before calling cl-sort because cl-sort is destructive. + (butlast (cl-sort (cons (list *2048-score* + *2048-hi-tile* + (format-time-string "%Y-%m-%d" game-end-time) + game-duration) + *2048-history*) + '> + :key 'car) + (max 0 + (- (1+ history-length) + *2048-history-size*)))))) + +(defun 2048-game-was-won () + "Return t if the game was won, nil otherwise." + (let ((game-was-won nil)) + (dotimes (row *2048-rows*) + (dotimes (column *2048-columns*) + (when (eq (2048-get-cell row column) + *2048-victory-value*) + (setq game-was-won t)))) + game-was-won)) + +(defun 2048-game-was-lost () + "Return t if the game was lost, nil otherwise." + (let ((game-was-lost t)) + (dotimes (row *2048-rows*) + (dotimes (column *2048-columns*) + (when (eq (2048-get-cell row column) + 0) + (setq game-was-lost nil)))) + + ;; For each square, if that square has one below it that's the same, + ;; the game's not over. + (dotimes (row (1- *2048-rows*)) + (dotimes (column *2048-columns*) + (when (eq (2048-get-cell row column) + (2048-get-cell (1+ row) column)) + (setq game-was-lost nil)))) + + ;; For each square, if that square has one to its right that's the same, + ;; the game's not over. + (dotimes (row *2048-rows*) + (dotimes (column (1- *2048-columns*)) + (when (eq (2048-get-cell row column) + (2048-get-cell row (1+ column))) + (setq game-was-lost nil)))) + game-was-lost)) + +(defun 2048-print-board () + "Wipes the entire field, and prints the board." + (let ((inhibit-read-only t)) + (erase-buffer) + (dotimes (row *2048-rows*) + + ;;print the separator line on top of, and between cells + (dotimes (col *2048-columns*) + (insert "+-------")) + (insert "+") + (insert "\n") + + ;;print the empty line above numbers + (dotimes (col *2048-columns*) + (insert "|") + (let ((current-value (2048-get-cell row col))) + (insert (2048-empty-tile current-value)))) + (insert "|") + (insert "\n") + + ;; print the number tiles + (dotimes (col *2048-columns*) + (insert "|") + (let ((current-value (2048-get-cell row col))) + (insert (2048-tile current-value)))) + (insert "|") + (insert "\n") + + ;;print the empty line below numbers + (dotimes (col *2048-columns*) + (insert "|") + (let ((current-value (2048-get-cell row col))) + (insert (2048-empty-tile current-value)))) + (insert "|") + (insert "\n")) + + ;;print the separator line on the bottom of the last row. + (dotimes (col *2048-columns*) + (insert "+-------")) + (insert "+\n") + (insert "\n") + + (let ((score-width (if (= 0 *2048-score*) + 1 + (ceiling (log *2048-score* 10))))) + (insert (format "%10s%s%s\n" "/" (make-string (+ 9 + score-width) + ?\=) "\\")) + (insert (format "%10s %s %d %s\n" "|" "Score:" *2048-score* "|")) + (insert (format "%10s%s%s\n" "\\" (make-string (+ 9 + score-width) + ?\=) "/"))) + (insert "\n") + + (2048-print-help) + + (insert "\n") + + ;; print score and history + (insert (format "%10s%s%s\n" "/" (make-string 13 ?\=) "\\")) + (insert (format "%24s\n" "| HIGH SCORES |")) + (insert (format "%10s%s%s\n" "\\" (make-string 13 ?\=) "/")) + (insert "\n") + (insert (format "%8s %7s %7s %4s\n" "Score" "Hi-Tile" "Date" "Duration")) + (mapc #'(lambda (x) + (insert (format "%8d %7d %10s %s\n" + (elt x 0) (elt x 1) (elt x 2) (format-time-string "%H:%M:%S" (elt x 3) t)))) + *2048-history*) + + (goto-char (point-min)))) + +(defun 2048-print-help () + "Print basic help text." + (insert "The goal is to create a tile with value 2048. +Use the arrow keys, p/n/b/f, or C-p/C-n/C-b/C-f +to move the tiles around. Press r to move randomly. + +If two tiles of the same value collide, the tiles +combine into a tile with twice the value.\n")) + +(defun 2048-move (from-row from-column delta-row delta-column) + "Try to move the number in (FROM-ROW, FROM-COLUMN) + +Move it by (DELTA-ROW, DELTA-COLUMN). +This succeeds when the destination (to-row, to-column) either is 0, +or is the same value as (from-row, from-column). +If (to-row, to-column) is zero, cascade and try to move further. +Returns t if we were able to move; otherwise nil." + (let ((to-row (+ from-row delta-row)) + (to-column (+ from-column delta-column))) + (when (in-bounds to-row to-column) + (2048-debug (format "moving the cell (%d, %d) by (%d, %d) to (%d, %d)" from-row from-column delta-row delta-column to-row to-column)) + (let ((from-val (2048-get-cell from-row from-column)) + (to-val (2048-get-cell to-row to-column))) + (cond ((eq from-val to-val) + (unless (or (eq from-val 0) + (2048-was-combined-this-turn to-row to-column)) + (2048-debug (format "combining (%d, %d) into (%d, %d)" from-row from-column to-row to-column)) + (let ((combined-value (* from-val 2))) + (unless (boundp (2048-tile-symbol combined-value)) + (2048-init-tile combined-value)) + (2048-set-cell to-row to-column combined-value) + (setq *2048-score* (+ *2048-score* combined-value)) + (2048-set-cell from-row from-column 0) + (2048-set-was-combined-this-turn to-row to-column)))) + ((eq to-val 0) + (2048-set-cell to-row to-column from-val) + (2048-set-cell from-row from-column 0) + (2048-move to-row to-column delta-row delta-column) + t) + (t nil)))))) ;;ugh, need to pass out whether something was combined, and pass that to the _next_ call to 2048-move. We see bugs on rows like 4 0 4 0. + +(defun in-bounds (row column) + "Return t if (ROW, COLUMN) is in the bounds of the field." + (and (>= row 0) + (>= column 0) + (< row *2048-rows*) + (< column *2048-columns*))) + + +(defun 2048-up () + "Shift the board up." + (interactive) + (2048-game-move + (setq *2048-combines-this-move* (make-vector (* *2048-columns* *2048-rows*) + nil)) + (let ((has-moved nil)) + (dotimes (col *2048-columns*) + (dolist (row (number-sequence 1 + (1- *2048-rows*))) + (setq has-moved (or (2048-move row col -1 0) + has-moved)))) + (when has-moved + (2048-insert-random-cell))))) + +(defun 2048-down () + "Shift the board down." + (interactive) + (2048-game-move + (setq *2048-combines-this-move* (make-vector (* *2048-columns* *2048-rows*) + nil)) + (let ((has-moved nil)) + (dotimes (col *2048-columns*) + (dolist (row (number-sequence (- *2048-rows* 2) 0 -1)) + (setq has-moved (or (2048-move row col 1 0) + has-moved)))) + (when has-moved + (2048-insert-random-cell))))) + +(defun 2048-left () + "Shifts the board left." + (interactive) + (2048-game-move + (let ((has-moved nil)) + (dotimes (row *2048-rows*) + (dolist (col (number-sequence 1 (1- *2048-columns*))) + (setq has-moved (or (2048-move row col 0 -1) + has-moved)))) + (when has-moved + (2048-insert-random-cell))))) + +(defun 2048-right () + "Shifts the board right." + (interactive) + (2048-game-move + (let ((has-moved nil)) + (dotimes (row *2048-rows*) + (dolist (col (number-sequence (- *2048-columns* 2) 0 -1)) + (setq has-moved (or (2048-move row col 0 1) + has-moved)))) + (when has-moved + (2048-insert-random-cell))))) + +(defun 2048-random-move () + "Move the board in a random direction. + +This may result in no changes to the board, +if the move was the same as the last one." + (interactive) + (funcall (elt '(2048-left 2048-right 2048-up 2048-down) (random 4)))) + +(provide '2048-game) +;;; 2048-game.el ends here diff --git a/.emacs.d/elpa/2048-game-20151026.1233/2048-game.elc b/.emacs.d/elpa/2048-game-20151026.1233/2048-game.elc new file mode 100644 index 0000000..812dca6 Binary files /dev/null and b/.emacs.d/elpa/2048-game-20151026.1233/2048-game.elc differ diff --git a/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-autoloads.el b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-autoloads.el new file mode 100644 index 0000000..fe702c3 --- /dev/null +++ b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-autoloads.el @@ -0,0 +1,16 @@ +;;; ac-c-headers-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;;;### (autoloads nil nil ("ac-c-headers.el") (22213 27915 34914 +;;;;;; 134000)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; ac-c-headers-autoloads.el ends here diff --git a/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-autoloads.el~ b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-autoloads.el~ new file mode 100644 index 0000000..9b87e5f --- /dev/null +++ b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-autoloads.el~ @@ -0,0 +1,11 @@ +;;; ac-c-headers-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; ac-c-headers-autoloads.el ends here diff --git a/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-pkg.el b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-pkg.el new file mode 100644 index 0000000..8f74cc3 --- /dev/null +++ b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-pkg.el @@ -0,0 +1 @@ +(define-package "ac-c-headers" "20151021.134" "auto-complete source for C headers" '((auto-complete "1.3.1")) :url "http://hins11.yu-yake.com/") diff --git a/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-pkg.elc b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-pkg.elc new file mode 100644 index 0000000..f51ec93 Binary files /dev/null and b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers-pkg.elc differ diff --git a/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers.el b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers.el new file mode 100644 index 0000000..af08a46 --- /dev/null +++ b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers.el @@ -0,0 +1,174 @@ +;;; ac-c-headers.el --- auto-complete source for C headers + +;; Copyright (C) 2013-2015 zk_phi + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2 of the License, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program; if not, write to the Free Software +;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +;; Author: zk_phi +;; URL: http://hins11.yu-yake.com/ +;; Package-Version: 20151021.134 +;; Version: 1.0.0 +;; Package-Requires: ((auto-complete "1.3.1")) + +;;; Commentary: + +;; Require this script (and auto-complete) then add to ac-sources. +;; +;; (add-hook 'c-mode-hook +;; (lambda () +;; (add-to-list 'ac-sources 'ac-source-c-headers) +;; (add-to-list 'ac-sources 'ac-source-c-header-symbols t))) +;; +;; then header filenames and symbols in imported headers are completed. +;; +;; #include ] <- ac-source-c-headers +;; pr[intf] <- ac-source-c-header-symbols + +;;; Change Log: + +;; 1.0.0 first released + +;;; Code: + +(require 'find-file) + +;; + constants + +(defconst ac-c-headers-version "1.0.0") + +;; + filenames + +(defvar ac-c-headers--files-cache nil + "list of (PREFIX . FILE-OR-DIRECTORY ...)") + +(defun ac-c-headers--files-update (&optional prefix) + (setq prefix (or prefix "")) + (unless (assoc prefix ac-c-headers--files-cache) + (setq ac-c-headers--files-cache + (cons (cons prefix + (apply 'append + (mapcar + (lambda (dir) + (let ((path (concat (file-name-as-directory dir) prefix))) + (when (file-accessible-directory-p path) + (delq nil + (mapcar + (lambda (file) + (cond ((file-directory-p (concat path file)) + (concat file "/")) + ((string-match "\\h$" file) + file) + (t + nil))) + (directory-files path nil)))))) + cc-search-directories))) + ac-c-headers--files-cache)))) + +(defun ac-c-headers--files-list (&optional point) + "returns possible completions at the point" + (save-excursion + (when point (goto-char point)) + (when (looking-back "[<\"]\\([^<>\"]*?\\)\\([^<>\"/]*\\)") + (let ((prefix (match-string 1))) + (unless (assoc prefix ac-c-headers--files-cache) + (ac-c-headers--files-update prefix)) + (cdr (assoc prefix ac-c-headers--files-cache)))))) + +;; + symbols in headers + +(defvar ac-c-headers--symbols-cache nil + "list of (HEADER . SYMBOL ...)") + +(defun ac-c-headers--search-header-file (header) + (catch 'found + (dolist (prefix cc-search-directories) + (let ((file (concat prefix + (unless (string-match "/$" prefix) "/") + header))) + (when (file-exists-p file) + (throw 'found file)))))) + +(defun ac-c-headers--symbols-update (header) + (unless (assoc header ac-c-headers--symbols-cache) + (let ((file (ac-c-headers--search-header-file header))) + (when (and file (file-exists-p file)) + (with-temp-buffer + (insert-file-contents file) + ;; delete /* comments */ + (goto-char (point-min)) + (while (search-forward-regexp + "/\\*\\([^*]\\|\\*[^/]\\)*\\*/" nil t) + (replace-match "")) + ;; delete // comments + (goto-char (point-min)) + (while (search-forward-regexp "//.*$" nil t) + (replace-match "")) + ;; search symbols + (setq ac-c-headers--symbols-cache + (cons (cons header + (delete-dups + (let ((res nil)) + (goto-char (point-min)) + (while (search-forward-regexp + "\\_<[a-zA-Z_]*\\_>" nil t) + (setq res (cons (match-string 0) res))) + res))) + ac-c-headers--symbols-cache))))))) + +(defun ac-c-headers--symbols-list (&optional buffer) + "returns possible completions for the buffer" + (setq buffer (or buffer (current-buffer))) + (with-current-buffer buffer + (let ((res nil) header) + (save-excursion + (goto-char (point-min)) + (while (search-forward-regexp + "^#include *[<\"]\\([^>\"]*\\)[>\"]" nil t) + (setq header (match-string 1)) + (unless (assoc header ac-c-headers--symbols-cache) + (ac-c-headers--symbols-update header)) + (setq res (append (cdr (assoc header ac-c-headers--symbols-cache)) + res)))) + res))) + +;; + ac-sources + +(defvar ac-source-c-headers + '((prefix . "#include *[<\"][^<>\"]*?\\([^<>\"/]*\\)") + (candidates . ac-c-headers--files-list) + (action . (lambda () + (when (string-match "\\.h$" candidate) + (ac-c-headers--symbols-update candidate) + (cond ((looking-at "[>\"]") + (forward-char 1) + (newline-and-indent)) + ((looking-back "#include *<\\([^<]*\\)") + (insert ">\n")) + (t + (insert "\"\n")))))) + (symbol . "h") + (requires . 0) + (cache))) + +(defvar ac-source-c-header-symbols + '((candidates . ac-c-headers--symbols-list) + (symbol . "h") + (cache))) + +;; + provide + +(provide 'ac-c-headers) + +;;; ac-c-headers.el ends here diff --git a/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers.elc b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers.elc new file mode 100644 index 0000000..c407179 Binary files /dev/null and b/.emacs.d/elpa/ac-c-headers-20151021.134/ac-c-headers.elc differ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-autoloads.el b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-autoloads.el new file mode 100644 index 0000000..8d3119e --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-autoloads.el @@ -0,0 +1,16 @@ +;;; ac-clang-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;;;### (autoloads nil nil ("ac-clang-pkg.el" "ac-clang.el") (22209 +;;;;;; 51595 894686 65000)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; ac-clang-autoloads.el ends here diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-autoloads.el~ b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-autoloads.el~ new file mode 100644 index 0000000..a031ac6 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-autoloads.el~ @@ -0,0 +1,11 @@ +;;; ac-clang-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; ac-clang-autoloads.el ends here diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-pkg.el b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-pkg.el new file mode 100644 index 0000000..f5eef8f --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang-pkg.el @@ -0,0 +1,11 @@ +(define-package "ac-clang" "20150906.1008" "Auto Completion source by libclang for GNU Emacs" + '((emacs "24") + (cl-lib "0.5") + (auto-complete "1.4.0") + (pos-tip "0.4.6") + (yasnippet "0.8.0")) + :url "https://github.com/yaruopooner/ac-clang" :keywords + '("completion" "convenience" "intellisense")) +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang.el b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang.el new file mode 100644 index 0000000..47a8bd6 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang.el @@ -0,0 +1,1406 @@ +;;; ac-clang.el --- Auto Completion source by libclang for GNU Emacs -*- lexical-binding: t; -*- + +;;; last updated : 2015/09/05.04:13:04 + +;; Copyright (C) 2010 Brian Jiang +;; Copyright (C) 2012 Taylan Ulrich Bayirli/Kammer +;; Copyright (C) 2013 Golevka +;; Copyright (C) 2013-2015 yaruopooner +;; +;; Original Authors: Brian Jiang +;; Golevka [https://github.com/Golevka] +;; Taylan Ulrich Bayirli/Kammer +;; Many others +;; Author: yaruopooner [https://github.com/yaruopooner] +;; URL: https://github.com/yaruopooner/ac-clang +;; Keywords: completion, convenience, intellisense +;; Version: 1.6.0 +;; Package-Requires: ((emacs "24") (cl-lib "0.5") (auto-complete "1.4.0") (pos-tip "0.4.6") (yasnippet "0.8.0")) + + +;; 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 . + + +;;; Commentary: +;; +;; * INTRODUCTION: +;; This program fork from auto-complete-clang-async.el +;; ac-clang provide code completion and arguments expand. +;; This program consists of the client(elisp) and server(binary). +;; The server is executable file, and a self-build is necessary. +;; The server achieve code completion using libclang of LLVM. +;; +;; * FEATURES: +;; - Basic(same auto-complete-clang-async) +;; Code Completion by libclang. +;; Auto Completion support. +;; Uses a "completion server" process to utilize libclang. +;; C/C++/Objective-C mode support. +;; Jump to definition or declaration. return from jumped location. +;; Jump is an on-the-fly that doesn't use the tag file. +;; Also provides flymake syntax checking. +;; A few bugfix and refactoring. +;; +;; - Extension +;; "completion server" process is 1 process per Emacs. (original version is per buffer) +;; Template Method Parameters expand support. +;; Manual Completion support. +;; libclang CXTranslationUnit Flags support. +;; libclang CXCodeComplete Flags support. +;; Multibyte support. +;; Debug Logger Buffer support. +;; Jump to inclusion-file. return from jumped location. +;; more a few modified. (client & server) +;; +;; - Optional +;; CMake support. +;; clang-server.exe and libclang.dll built with Microsoft Visual Studio 2015/2013. +;; x86_64 Machine Architecture + Windows Platform support. (Visual Studio Predefined Macros) +;; +;; * EASY INSTALLATION(Windows Only): +;; - Visual C++ Redistributable Packages for Visual Studio 2015/2013 +;; Must be installed if don't have a Visual Studio 2015/2013. +;; +;; - 2015 +;; [http://www.microsoft.com/download/details.aspx?id=48145] +;; - 2013 +;; [http://www.microsoft.com/download/details.aspx?id=40784] +;; +;; - Completion Server Program +;; Built with Microsoft Visual Studio 2015/2013. +;; [https://github.com/yaruopooner/ac-clang/releases] +;; 1. download clang-server.zip +;; 2. clang-server.exe and libclang.dll is expected to be available in the PATH or in Emacs' exec-path. +;; +;; * STANDARD INSTALLATION(Linux, Windows): +;; Generate a Unix Makefile or a Visual Studio Project by CMake. +;; +;; - Self-Build step +;; 1. LLVM +;; checkout, apply patch, generate project, build +;; It is recommended that you use this shell. +;; [https://github.com/yaruopooner/llvm-build-shells.git] +;; +;; 2. Clang Server +;; generate project, build +;; +;; see clang-server's reference manual. +;; ac-clang/clang-server/readme.org +;; +;; * NOTICE: +;; - LLVM libclang.[dll, so, ...] +;; This binary is not official binary. +;; Because offical libclang has mmap lock problem. +;; Applied a patch to LLVM's source code in order to solve this problem. +;; +;; see clang-server's reference manual. +;; ac-clang/clang-server/readme.org +;; + + +;; Usage: +;; * DETAILED MANUAL: +;; For more information and detailed usage, refer to the project page: +;; [https://github.com/yaruopooner/ac-clang] +;; +;; * SETUP: +;; (require 'ac-clang) +;; +;; (setq w32-pipe-read-delay 0) ;; <- Windows Only +;; +;; (when (ac-clang-initialize) +;; (add-hook 'c-mode-common-hook '(lambda () +;; (setq ac-clang-cflags CFLAGS) +;; (ac-clang-activate-after-modify)))) +;; +;; * DEFAULT KEYBIND +;; - start auto completion +;; code completion & arguments expand +;; `.` `->` `::` +;; - start manual completion +;; code completion & arguments expand +;; `` +;; - jump to inclusion-file, definition, declaration / return from it +;; this is nestable jump. +;; `M-.` / `M-,` +;; + +;;; Code: + + + +(require 'cl-lib) +(require 'auto-complete) +(require 'pos-tip) +(require 'yasnippet) +(require 'flymake) + + + + +(defconst ac-clang-version "1.6.0") +(defconst ac-clang-libclang-version nil) + + +;;; +;;; for Server vars +;;; + + +;; clang-server binary type +(defvar ac-clang-server-type 'release + "clang-server binary type +`release' : release build version +`debug' : debug build version (server develop only) +`x86_64' : (obsolete. It will be removed in the future.) 64bit release build version +`x86_64d' : (obsolete. It will be removed in the future.) 64bit debug build version (server develop only) +`x86_32' : (obsolete. It will be removed in the future.) 32bit release build version +`x86_32d' : (obsolete. It will be removed in the future.) 32bit debug build version (server develop only) +") + + +;; clang-server launch option values +(defvar ac-clang-server-stdin-buffer-size nil + "STDIN buffer size. value range is 1 - 5 MB. +If the value is nil, will be allocated 1MB. +The value is specified in MB.") + +(defvar ac-clang-server-stdout-buffer-size nil + "STDOUT buffer size. value range is 1 - 5 MB. +If the value is nil, will be allocated 1MB. +The value is specified in MB.") + +(defvar ac-clang-server-logfile nil + "IPC records output file.(for debug)") + + +;; server binaries property list +(defconst ac-clang--server-binaries '(release "clang-server" + debug "clang-server-debug")) + +(defconst ac-clang--server-obsolete-binaries '(x86_64 "clang-server-x86_64" + x86_64d "clang-server-x86_64d" + x86_32 "clang-server-x86_32" + x86_32d "clang-server-x86_32d")) + + +;; server process details +(defcustom ac-clang--server-executable nil + "Location of clang-server executable." + :group 'auto-complete + :type 'file) + + +(defconst ac-clang--process-name "Clang-Server") + +(defconst ac-clang--process-buffer-name "*Clang-Server*") +(defconst ac-clang--completion-buffer-name "*Clang-Completion*") +(defconst ac-clang--diagnostics-buffer-name "*Clang-Diagnostics*") + +(defvar ac-clang--server-process nil) +(defvar ac-clang--status 'idle + "clang-server status +`idle' : job is nothing +`receive' : receiving command sent result +`transaction' : transaction execute to received command result +`shutdown' : shutdown server + ") + + +(defvar ac-clang--activate-buffers nil) + + +;; server debug +(defconst ac-clang--debug-log-buffer-name "*Clang-Log*") +(defvar ac-clang-debug-log-buffer-p nil) +(defvar ac-clang-debug-log-buffer-size (* 1024 50)) + + +;; clang-server behaviors +(defvar ac-clang-clang-translation-unit-flags "CXTranslationUnit_DetailedPreprocessingRecord|CXTranslationUnit_PrecompiledPreamble|CXTranslationUnit_CacheCompletionResults" + "CXTranslationUnit Flags. +for Server behavior. +The value sets flag-name strings or flag-name combined strings. +Separator is `|'. +`CXTranslationUnit_DetailedPreprocessingRecord' : Required if you want jump to macro declaration, inclusion-file. +`CXTranslationUnit_Incomplete' : +`CXTranslationUnit_PrecompiledPreamble' : Increase completion performance. +`CXTranslationUnit_CacheCompletionResults' : Increase completion performance. +`CXTranslationUnit_ForSerialization' : +`CXTranslationUnit_CXXChainedPCH' : +`CXTranslationUnit_SkipFunctionBodies' : +`CXTranslationUnit_IncludeBriefCommentsInCodeCompletion' : Required if you want to brief-comment of completion. +") + +(defvar ac-clang-clang-complete-at-flags "CXCodeComplete_IncludeMacros" + "CXCodeComplete Flags. +for Server behavior. +The value sets flag-name strings or flag-name combined strings. +Separator is `|'. +`CXCodeComplete_IncludeMacros' +`CXCodeComplete_IncludeCodePatterns' +`CXCodeComplete_IncludeBriefComments' +") + +(defvar ac-clang-clang-complete-results-limit 0 + "acceptable number of result candidate. +for Server behavior. +ac-clang-clang-complete-results-limit == 0 : accept all candidates. +ac-clang-clang-complete-results-limit != 0 : if number of result candidates greater than ac-clang-clang-complete-results-limit, discard all candidates. +") + + +;; client behaviors +(defvar ac-clang-tmp-pch-automatic-cleanup-p (eq system-type 'windows-nt) + "automatically cleanup for generated temporary precompiled headers.") + + +(defvar ac-clang-server-automatic-recovery-p t + "automatically recover server when command queue reached limitation.") + + + +;;; +;;; for auto-complete vars +;;; + +;; clang-server response filter pattern for auto-complete candidates +(defconst ac-clang--completion-pattern "^COMPLETION: \\(%s[^\s\n:]*\\)\\(?: : \\)*\\(.*$\\)") + +;; auto-complete behaviors +(defvar ac-clang-async-autocompletion-automatically-p t + "If autocompletion is automatically triggered when you type `.', `->', `::'") + +(defvar ac-clang-async-autocompletion-manualtrigger-key "") + + + +;; auto-complete faces +(defface ac-clang-candidate-face + '((t (:background "lightgray" :foreground "navy"))) + "Face for clang candidate" + :group 'auto-complete) + +(defface ac-clang-selection-face + '((t (:background "navy" :foreground "white"))) + "Face for the clang selected candidate." + :group 'auto-complete) + + + +;;; +;;; for Session vars +;;; + +(defvar-local ac-clang--activate-p nil) + +(defvar-local ac-clang--session-name nil) + +;; for patch +(defvar-local ac-clang--suspend-p nil) + + +;; auto-complete ac-sources backup +(defvar-local ac-clang--ac-sources-backup nil) + + +;; auto-complete candidates and completion start-point +(defvar-local ac-clang--candidates nil) +(defvar-local ac-clang--start-point nil) +(defvar-local ac-clang--template-candidates nil) +(defvar-local ac-clang--template-start-point nil) + + +;; CFLAGS build behaviors +(defvar-local ac-clang-language-option-function nil + "Function to return the language type for option -x.") + +(defvar-local ac-clang-prefix-header nil + "The prefix header to pass to the Clang executable.") + + +;; clang-server session behavior +(defvar-local ac-clang-cflags nil + "Extra flags to pass to the Clang executable. +This variable will typically contain include paths, e.g., (\"-I~/MyProject\" \"-I.\").") + + +(defvar ac-clang--jump-stack nil + "The jump stack (keeps track of jumps via jump-inclusion, jump-definition, jump-declaration, jump-smart)") + + + + +;;; +;;; primitive functions +;;; + +;; server launch option builder +(defun ac-clang--build-server-launch-options () + (append + (when ac-clang-server-stdin-buffer-size + (list "--stdin-buffer-size" (format "%d" ac-clang-server-stdin-buffer-size))) + (when ac-clang-server-stdout-buffer-size + (list "--stdout-buffer-size" (format "%d" ac-clang-server-stdout-buffer-size))) + (when ac-clang-server-logfile + (list "--logfile" (format "%s" ac-clang-server-logfile))))) + + +;; CFLAGS builders +(defsubst ac-clang--language-option () + (or (and ac-clang-language-option-function + (funcall ac-clang-language-option-function)) + (cond ((eq major-mode 'c++-mode) + "c++") + ((eq major-mode 'c-mode) + "c") + ((eq major-mode 'objc-mode) + (cond ((string= "m" (file-name-extension (buffer-file-name))) + "objective-c") + (t + "objective-c++"))) + (t + "c++")))) + + +(defsubst ac-clang--build-complete-cflags () + (append '("-cc1" "-fsyntax-only") + (list "-x" (ac-clang--language-option)) + ac-clang-cflags + (when (stringp ac-clang-prefix-header) + (list "-include-pch" (expand-file-name ac-clang-prefix-header))))) + + + +(defsubst ac-clang--get-column-bytes () + (1+ (length (encode-coding-string (buffer-substring-no-properties (line-beginning-position) (point)) 'binary)))) + + +(defsubst ac-clang--get-buffer-bytes () + (1- (position-bytes (point-max)))) + + +(defsubst ac-clang--create-position-string (point) + (save-excursion + (goto-char point) + (format "line:%d\ncolumn:%d\n" (line-number-at-pos) (ac-clang--get-column-bytes)))) + + +(defmacro ac-clang--with-widening (&rest body) + (declare (indent 0) (debug t)) + `(save-restriction + (widen) + (progn ,@body))) + + +;; (defmacro ac-clang--with-running-server (&rest body) +;; (declare (indent 0) (debug t)) +;; (when (eq (process-status ac-clang--server-process) 'run) +;; `(progn ,@body))) + + + +;;; +;;; transaction command functions for IPC +;;; + +(defvar ac-clang--server-command-queue nil) +(defvar ac-clang--server-command-queue-limit 4) + + +(defsubst ac-clang--request-command (sender-function receive-buffer receiver-function args) + (if (< (length ac-clang--server-command-queue) ac-clang--server-command-queue-limit) + (progn + (when (and receive-buffer receiver-function) + (ac-clang--enqueue-command `(:buffer ,receive-buffer :receiver ,receiver-function :sender ,sender-function :args ,args))) + (funcall sender-function args)) + (message "ac-clang : The number of requests of the command queue reached the limit.") + ;; This is recovery logic. + (when ac-clang-server-automatic-recovery-p + (ac-clang--clear-command-queue) + ;; Send message + (ac-clang-get-server-specification) + ;; Process response wait(as with thread preemption point) + (sleep-for 0.1) + ;; When process response is not received, I suppose that server became to deadlock. + (if (= (length ac-clang--server-command-queue) 0) + (message "ac-clang : clear server command queue.") + (ac-clang-reboot-server))))) + + +(defsubst ac-clang--enqueue-command (command) + (if ac-clang--server-command-queue + (nconc ac-clang--server-command-queue (list command)) + (setq ac-clang--server-command-queue (list command)))) + + +(defsubst ac-clang--dequeue-command () + (let ((command ac-clang--server-command-queue)) + (setq ac-clang--server-command-queue (cdr command)) + (car command))) + + +(defsubst ac-clang--get-top-command () + (car ac-clang--server-command-queue)) + + +(defsubst ac-clang--clear-command-queue () + (setq ac-clang--server-command-queue nil)) + + + +;;; +;;; sender primitive functions for IPC +;;; + +(defsubst ac-clang--process-send-string (string) + (process-send-string ac-clang--server-process string) + + (when ac-clang-debug-log-buffer-p + (let ((log-buffer (get-buffer-create ac-clang--debug-log-buffer-name))) + (when log-buffer + (with-current-buffer log-buffer + (when (and ac-clang-debug-log-buffer-size (> (buffer-size) ac-clang-debug-log-buffer-size)) + (erase-buffer)) + + (goto-char (point-max)) + (pp (encode-coding-string string 'binary) log-buffer) + (insert "\n")))))) + + +(defsubst ac-clang--process-send-region (start end) + (process-send-region ac-clang--server-process start end)) + + +(defun ac-clang--send-set-clang-parameters () + (ac-clang--process-send-string (format "translation_unit_flags:%s\n" ac-clang-clang-translation-unit-flags)) + (ac-clang--process-send-string (format "complete_at_flags:%s\n" ac-clang-clang-complete-at-flags)) + (ac-clang--process-send-string (format "complete_results_limit:%d\n" ac-clang-clang-complete-results-limit))) + + +(defun ac-clang--send-cflags () + ;; send message head and num_cflags + (ac-clang--process-send-string (format "num_cflags:%d\n" (length (ac-clang--build-complete-cflags)))) + + (let (cflags) + ;; create CFLAGS strings + (mapc + (lambda (arg) + (setq cflags (concat cflags (format "%s\n" arg)))) + (ac-clang--build-complete-cflags)) + ;; send cflags + (ac-clang--process-send-string cflags))) + + +(defun ac-clang--send-source-code () + (ac-clang--with-widening + (let ((source-buffuer (current-buffer)) + (cs (coding-system-change-eol-conversion buffer-file-coding-system 'unix))) + (with-temp-buffer + (set-buffer-multibyte nil) + (let ((temp-buffer (current-buffer))) + (with-current-buffer source-buffuer + (decode-coding-region (point-min) (point-max) cs temp-buffer))) + + (ac-clang--process-send-string (format "source_length:%d\n" (ac-clang--get-buffer-bytes))) + ;; (ac-clang--process-send-region (point-min) (point-max)) + (ac-clang--process-send-string (buffer-substring-no-properties (point-min) (point-max))) + (ac-clang--process-send-string "\n\n"))))) + + +;; (defun ac-clang--send-source-code () +;; (ac-clang--with-widening +;; (ac-clang--process-send-string (format "source_length:%d\n" (ac-clang--get-buffer-bytes))) +;; (ac-clang--process-send-region (point-min) (point-max)) +;; (ac-clang--process-send-string "\n\n"))) + + +(defsubst ac-clang--send-command (command-type command-name &optional session-name) + (let ((command (format "command_type:%s\ncommand_name:%s\n" command-type command-name))) + (when session-name + (setq command (concat command (format "session_name:%s\n" session-name)))) + (ac-clang--process-send-string command))) + + + +;;; +;;; sender command request functions for IPC +;;; + +(defun ac-clang--send-server-specification-request (&optional _args) + (ac-clang--send-command "Server" "GET_SPECIFICATION")) + + +(defun ac-clang--send-clang-parameters-request (&optional _args) + (ac-clang--send-command "Server" "SET_CLANG_PARAMETERS") + (ac-clang--send-set-clang-parameters)) + + +(defun ac-clang--send-create-session-request (&optional _args) + (ac-clang--with-widening + (ac-clang--send-command "Server" "CREATE_SESSION" ac-clang--session-name) + (ac-clang--send-cflags) + (ac-clang--send-source-code))) + + +(defun ac-clang--send-delete-session-request (&optional _args) + (ac-clang--send-command "Server" "DELETE_SESSION" ac-clang--session-name)) + + +(defun ac-clang--send-reset-server-request (&optional _args) + (ac-clang--send-command "Server" "RESET")) + + +(defun ac-clang--send-shutdown-request (&optional _args) + (when (eq (process-status ac-clang--server-process) 'run) + (ac-clang--send-command "Server" "SHUTDOWN"))) + + +(defun ac-clang--send-suspend-request (&optional _args) + (ac-clang--send-command "Session" "SUSPEND" ac-clang--session-name)) + + +(defun ac-clang--send-resume-request (&optional _args) + (ac-clang--send-command "Session" "RESUME" ac-clang--session-name)) + + +(defun ac-clang--send-cflags-request (&optional _args) + (if (listp ac-clang-cflags) + (ac-clang--with-widening + (ac-clang--send-command "Session" "SET_CFLAGS" ac-clang--session-name) + (ac-clang--send-cflags) + (ac-clang--send-source-code)) + (message "`ac-clang-cflags' should be a list of strings"))) + + +(defun ac-clang--send-reparse-request (&optional _args) + (ac-clang--with-widening + (ac-clang--send-command "Session" "SET_SOURCECODE" ac-clang--session-name) + (ac-clang--send-source-code) + (ac-clang--send-command "Session" "REPARSE" ac-clang--session-name))) + + +(defun ac-clang--send-completion-request (&optional args) + (ac-clang--with-widening + (ac-clang--send-command "Session" "COMPLETION" ac-clang--session-name) + (ac-clang--process-send-string (ac-clang--create-position-string (plist-get args :start-point))) + (ac-clang--send-source-code))) + + +(defun ac-clang--send-diagnostics-request (&optional _args) + (ac-clang--with-widening + (ac-clang--send-command "Session" "SYNTAXCHECK" ac-clang--session-name) + (ac-clang--send-source-code))) + + +(defun ac-clang--send-inclusion-request (&optional _args) + (ac-clang--with-widening + (ac-clang--send-command "Session" "INCLUSION" ac-clang--session-name) + (ac-clang--process-send-string (ac-clang--create-position-string (point))) + (ac-clang--send-source-code))) + + +(defun ac-clang--send-definition-request (&optional _args) + (ac-clang--with-widening + (ac-clang--send-command "Session" "DEFINITION" ac-clang--session-name) + (ac-clang--process-send-string (ac-clang--create-position-string (point))) + (ac-clang--send-source-code))) + + +(defun ac-clang--send-declaration-request (&optional _args) + (ac-clang--with-widening + (ac-clang--send-command "Session" "DECLARATION" ac-clang--session-name) + (ac-clang--process-send-string (ac-clang--create-position-string (point))) + (ac-clang--send-source-code))) + + +(defun ac-clang--send-smart-jump-request (&optional _args) + (ac-clang--with-widening + (ac-clang--send-command "Session" "SMARTJUMP" ac-clang--session-name) + (ac-clang--process-send-string (ac-clang--create-position-string (point))) + (ac-clang--send-source-code))) + + + + +;;; +;;; Receive clang-server responses common filter (receive response by command) +;;; + +(defvar ac-clang--transaction-context nil) +(defvar ac-clang--transaction-context-buffer-name nil) +(defvar ac-clang--transaction-context-buffer nil) +(defvar ac-clang--transaction-context-buffer-marker nil) +(defvar ac-clang--transaction-context-receiver nil) +(defvar ac-clang--transaction-context-args nil) + + +(defun ac-clang--process-filter (process output) + ;; command parse for context + (unless ac-clang--transaction-context + (if (setq ac-clang--transaction-context (ac-clang--dequeue-command)) + ;; setup context + (progn + (setq ac-clang--transaction-context-buffer-name (plist-get ac-clang--transaction-context :buffer) + ac-clang--transaction-context-receiver (plist-get ac-clang--transaction-context :receiver) + ac-clang--transaction-context-args (plist-get ac-clang--transaction-context :args)) + (setq ac-clang--status 'receive) + (when ac-clang--transaction-context-buffer-name + (setq ac-clang--transaction-context-buffer (get-buffer-create ac-clang--transaction-context-buffer-name)) + (with-current-buffer ac-clang--transaction-context-buffer + (unless (local-variable-p 'ac-clang--transaction-context-buffer-marker) + ;; The buffer created just now. + (set (make-local-variable 'ac-clang--transaction-context-buffer-marker) (point-min-marker))) + (erase-buffer)))) + (progn + (setq ac-clang--transaction-context-buffer (process-buffer process)) + (setq ac-clang--transaction-context-buffer-marker (process-mark process))))) + + ;; Output of the server is appended to context buffer. + (when ac-clang--transaction-context-buffer + (ac-clang--append-to-transaction-context-buffer output)) + + ;; Check the server response termination. + (when (and ac-clang--transaction-context (string= (substring output -1 nil) "$")) + ;; execute context receiver. + (setq ac-clang--status 'transaction) + (unless (ignore-errors + (funcall ac-clang--transaction-context-receiver ac-clang--transaction-context-buffer output ac-clang--transaction-context-args) + t) + (message "ac-clang : receiver function error!")) + ;; clear current context. + (setq ac-clang--transaction-context nil + ac-clang--transaction-context-buffer-name nil + ac-clang--transaction-context-buffer nil + ac-clang--transaction-context-receiver nil + ac-clang--transaction-context-args nil) + (setq ac-clang--status 'idle))) + + +(defun ac-clang--append-to-transaction-context-buffer (output) + "Append output to the transaction context buffer." + (with-current-buffer ac-clang--transaction-context-buffer + (save-excursion + ;; Insert the text, advancing the process marker. + (goto-char ac-clang--transaction-context-buffer-marker) + (insert output) + (set-marker ac-clang--transaction-context-buffer-marker (point))) + (goto-char ac-clang--transaction-context-buffer-marker))) + + + + +;;; +;;; receive clang-server responses. +;;; build completion candidates and fire auto-complete. +;;; + +(defun ac-clang--build-completion-candidates (buffer start-word) + (with-current-buffer buffer + (goto-char (point-min)) + (let ((pattern (format ac-clang--completion-pattern (regexp-quote start-word))) + candidates + candidate + declaration + (prev-candidate "")) + (while (re-search-forward pattern nil t) + (setq candidate (match-string-no-properties 1)) + (unless (string= "Pattern" candidate) + (setq declaration (match-string-no-properties 2)) + + (if (string= candidate prev-candidate) + (progn + (when declaration + (setq candidate (propertize candidate 'ac-clang--detail (concat (get-text-property 0 'ac-clang--detail (car candidates)) "\n" declaration))) + (setf (car candidates) candidate))) + (setq prev-candidate candidate) + (when declaration + (setq candidate (propertize candidate 'ac-clang--detail declaration))) + (push candidate candidates)))) + candidates))) + + +(defun ac-clang--receive-completion (buffer _output args) + (setq ac-clang--candidates (ac-clang--build-completion-candidates buffer (plist-get args :start-word))) + (setq ac-clang--start-point (plist-get args :start-point)) + + ;; (setq ac-show-menu t) + ;; (ac-start :force-init t) + ;; (ac-update)) + (ac-complete-clang-async)) + + + +(defun ac-clang--get-autotrigger-start-point (&optional point) + (unless point + (setq point (point))) + (let ((c (char-before point))) + (when (or + ;; '.' + (eq ?. c) + ;; '->' + (and (eq ?> c) + (eq ?- (char-before (1- point)))) + ;; '::' + (and (eq ?: c) + (eq ?: (char-before (1- point))))) + point))) + + +(defun ac-clang--get-manualtrigger-start-point () + (let* ((symbol-point (ac-prefix-symbol)) + (point (or symbol-point (point))) + (c (char-before point))) + (when (or + (ac-clang--get-autotrigger-start-point point) + ;; ' ' for manual completion + (eq ?\s c)) + point))) + + +(defsubst ac-clang--async-completion (start-point) + (when start-point + (ac-clang--request-command + 'ac-clang--send-completion-request + ac-clang--completion-buffer-name + 'ac-clang--receive-completion + (list :start-word (buffer-substring-no-properties start-point (point)) :start-point start-point)))) + + +(defun ac-clang-async-autocomplete-autotrigger () + (interactive) + + (self-insert-command 1) + (when ac-clang-async-autocompletion-automatically-p + (ac-clang--async-completion (ac-clang--get-autotrigger-start-point)))) + + +(defun ac-clang-async-autocomplete-manualtrigger () + (interactive) + + (ac-clang--async-completion (ac-clang--get-manualtrigger-start-point))) + + + + +;;; +;;; auto-complete ac-source build functions +;;; + +(defsubst ac-clang--candidates () + ac-clang--candidates) + + +(defsubst ac-clang--prefix () + ac-clang--start-point) + + +(defsubst ac-clang--clean-document (s) + (when s + (setq s (replace-regexp-in-string "<#\\|#>\\|\\[#" "" s)) + (setq s (replace-regexp-in-string "#\\]" " " s))) + s) + + +(defsubst ac-clang--in-string/comment () + "Return non-nil if point is in a literal (a comment or string)." + (nth 8 (syntax-ppss))) + + +(defun ac-clang--action () + (interactive) + + ;; (ac-last-quick-help) + (let* ((func-name (regexp-quote (substring-no-properties (cdr ac-last-completion)))) + (c/c++-pattern (format "\\(?:^.*%s\\)\\([<(].*)\\)" func-name)) + (objc-pattern (format "\\(?:^.*%s\\)\\(:.*\\)" func-name)) + (detail (get-text-property 0 'ac-clang--detail (cdr ac-last-completion))) + (help (ac-clang--clean-document detail)) + (declarations (split-string detail "\n")) + args + (ret-t "") + ret-f + candidates) + + ;; parse function or method overload declarations + (cl-dolist (declaration declarations) + ;; function result type + (when (string-match "\\[#\\(.*\\)#\\]" declaration) + (setq ret-t (match-string 1 declaration))) + ;; remove result type + (setq declaration (replace-regexp-in-string "\\[#.*?#\\]" "" declaration)) + + ;; parse arguments + (cond (;; C/C++ standard argument + (string-match c/c++-pattern declaration) + (setq args (match-string 1 declaration)) + (push (propertize (ac-clang--clean-document args) 'ac-clang--detail ret-t 'ac-clang--args args) candidates) + ;; default argument + (when (string-match "\{#" args) + (setq args (replace-regexp-in-string "\{#.*#\}" "" args)) + (push (propertize (ac-clang--clean-document args) 'ac-clang--detail ret-t 'ac-clang--args args) candidates)) + ;; variadic argument + (when (string-match ", \\.\\.\\." args) + (setq args (replace-regexp-in-string ", \\.\\.\\." "" args)) + (push (propertize (ac-clang--clean-document args) 'ac-clang--detail ret-t 'ac-clang--args args) candidates))) + + (;; check whether it is a function ptr + (string-match "^\\([^(]*\\)(\\*)\\((.*)\\)" ret-t) + (setq ret-f (match-string 1 ret-t) + args (match-string 2 ret-t)) + (push (propertize args 'ac-clang--detail ret-f 'ac-clang--args "") candidates) + ;; variadic argument + (when (string-match ", \\.\\.\\." args) + (setq args (replace-regexp-in-string ", \\.\\.\\." "" args)) + (push (propertize args 'ac-clang--detail ret-f 'ac-clang--args "") candidates))) + + (;; Objective-C/C++ argument + (string-match objc-pattern declaration) + (setq args (match-string 1 declaration)) + (push (propertize (ac-clang--clean-document args) 'ac-clang--detail ret-t 'ac-clang--args args) candidates)))) + + (cond (candidates + (setq candidates (delete-dups candidates)) + (setq candidates (nreverse candidates)) + (setq ac-clang--template-candidates candidates) + (setq ac-clang--template-start-point (point)) + (ac-complete-clang-template) + + (unless (cdr candidates) ;; unless length > 1 + (message (replace-regexp-in-string "\n" " ; " help)))) + (t + (message (replace-regexp-in-string "\n" " ; " help)))))) + + +(defun ac-clang--document (item) + (if (stringp item) + (let (s) + (setq s (get-text-property 0 'ac-clang--detail item)) + (ac-clang--clean-document s))) + ;; (popup-item-property item 'ac-clang--detail) + ) + + + +(ac-define-source clang-async + '((candidates . ac-clang--candidates) + (candidate-face . ac-clang-candidate-face) + (selection-face . ac-clang-selection-face) + (prefix . ac-clang--prefix) + (requires . 0) + (action . ac-clang--action) + (document . ac-clang--document) + (cache) + (symbol . "c"))) + + + +(defun ac-clang--same-count-in-string (c1 c2 s) + (let ((count 0) + (cur 0) + (end (length s)) + c) + (while (< cur end) + (setq c (aref s cur)) + (cond ((eq c1 c) + (setq count (1+ count))) + ((eq c2 c) + (setq count (1- count)))) + (setq cur (1+ cur))) + (= count 0))) + + +(defun ac-clang--split-args (s) + (let ((sl (split-string s ", *"))) + (cond ((string-match "<\\|(" s) + (let (res + (pre "") + subs) + (while sl + (setq subs (pop sl)) + (unless (string= pre "") + (setq subs (concat pre ", " subs)) + (setq pre "")) + (cond ((and (ac-clang--same-count-in-string ?\< ?\> subs) + (ac-clang--same-count-in-string ?\( ?\) subs)) + ;; (cond ((ac-clang--same-count-in-string ?\< ?\> subs) + (push subs res)) + (t + (setq pre subs)))) + (nreverse res))) + (t + sl)))) + + +(defsubst ac-clang--template-candidates () + ac-clang--template-candidates) + + +(defsubst ac-clang--template-prefix () + ac-clang--template-start-point) + + +(defun ac-clang--template-action () + (interactive) + + (when ac-clang--template-start-point + (let ((point (point)) + sl + (snp "") + (s (get-text-property 0 'ac-clang--args (cdr ac-last-completion)))) + (cond (;; function ptr call + (string= s "") + (setq s (cdr ac-last-completion)) + (setq s (replace-regexp-in-string "^(\\|)$" "" s)) + (setq sl (ac-clang--split-args s)) + (cl-dolist (arg sl) + (setq snp (concat snp ", ${" arg "}"))) + (yas-expand-snippet (concat "(" (substring snp 2) ")") ac-clang--template-start-point point)) + (;; function args + t + (unless (string= s "()") + (setq s (replace-regexp-in-string "{#" "" s)) + (setq s (replace-regexp-in-string "#}" "" s)) + (setq s (replace-regexp-in-string "<#" "${" s)) + (setq s (replace-regexp-in-string "#>" "}" s)) + (setq s (replace-regexp-in-string ", \\.\\.\\." "}, ${..." s)) + (yas-expand-snippet s ac-clang--template-start-point point))))))) + + +;; This source shall only be used internally. +(ac-define-source clang-template + '((candidates . ac-clang--template-candidates) + (prefix . ac-clang--template-prefix) + (requires . 0) + (action . ac-clang--template-action) + (document . ac-clang--document) + (cache) + (symbol . "t"))) + + + + + +;;; +;;; receive clang-server responses. +;;; syntax checking with flymake +;;; + +(defun ac-clang--receive-diagnostics (buffer _output _args) + (let (result-texts) + (with-current-buffer buffer + (flymake-log 3 "received %d byte(s) of output from process %d" (ac-clang--get-buffer-bytes) (process-id ac-clang--server-process)) + (setq result-texts (buffer-substring-no-properties (point-min) (point-max)))) + (flymake-parse-output-and-residual result-texts)) + + (flymake-parse-residual) + (setq flymake-err-info flymake-new-err-info) + (setq flymake-new-err-info nil) + (setq flymake-err-info (flymake-fix-line-numbers flymake-err-info 1 (count-lines (point-min) (point-max)))) + (flymake-delete-own-overlays) + (flymake-highlight-err-lines flymake-err-info)) + + +(defun ac-clang-diagnostics () + (interactive) + + (if ac-clang--suspend-p + (ac-clang-resume) + (ac-clang-activate)) + + (ac-clang--request-command 'ac-clang--send-diagnostics-request ac-clang--diagnostics-buffer-name 'ac-clang--receive-diagnostics nil)) + + + + +;;; +;;; receive clang-server responses. +;;; jump declaration/definition/smart-jump +;;; + +(defun ac-clang--receive-jump (_buffer output _arg) + (unless (eq (aref output 0) ?$) + (let* ((parsed (split-string-and-unquote output)) + (filename (pop parsed)) + (line (string-to-number (pop parsed))) + (column (1- (string-to-number (pop parsed)))) + (new-loc (list filename line column)) + (current-loc (list (buffer-file-name) (line-number-at-pos) (current-column)))) + (when (not (equal current-loc new-loc)) + (push current-loc ac-clang--jump-stack) + (ac-clang--jump new-loc))))) + + +(defun ac-clang--jump (location) + (let* ((filename (pop location)) + (line (pop location)) + (column (pop location))) + (find-file filename) + (goto-char (point-min)) + (forward-line (1- line)) + (move-to-column column))) + + +(defun ac-clang-jump-back () + (interactive) + + (when ac-clang--jump-stack + (ac-clang--jump (pop ac-clang--jump-stack)))) + + +(defun ac-clang-jump-inclusion () + (interactive) + + (if ac-clang--suspend-p + (ac-clang-resume) + (ac-clang-activate)) + + (ac-clang--request-command 'ac-clang--send-inclusion-request ac-clang--process-buffer-name 'ac-clang--receive-jump nil)) + + +(defun ac-clang-jump-definition () + (interactive) + + (if ac-clang--suspend-p + (ac-clang-resume) + (ac-clang-activate)) + + (ac-clang--request-command 'ac-clang--send-definition-request ac-clang--process-buffer-name 'ac-clang--receive-jump nil)) + + +(defun ac-clang-jump-declaration () + (interactive) + + (if ac-clang--suspend-p + (ac-clang-resume) + (ac-clang-activate)) + + (ac-clang--request-command 'ac-clang--send-declaration-request ac-clang--process-buffer-name 'ac-clang--receive-jump nil)) + + +(defun ac-clang-jump-smart () + (interactive) + + (if ac-clang--suspend-p + (ac-clang-resume) + (ac-clang-activate)) + + (ac-clang--request-command 'ac-clang--send-smart-jump-request ac-clang--process-buffer-name 'ac-clang--receive-jump nil)) + + + + +;;; +;;; sender function for IPC +;;; + +(defun ac-clang-get-server-specification () + (interactive) + + (when ac-clang--server-process + (ac-clang--request-command 'ac-clang--send-server-specification-request ac-clang--process-buffer-name '(lambda (_buffer _output _args)) nil))) + + + +;;; +;;; The session control functions +;;; + +(defun ac-clang-activate () + (interactive) + + (remove-hook 'first-change-hook 'ac-clang-activate t) + + (unless ac-clang--activate-p + ;; (if ac-clang--activate-buffers + ;; (ac-clang-update-cflags) + ;; (ac-clang-initialize)) + + (setq ac-clang--activate-p t) + (setq ac-clang--session-name (buffer-file-name)) + (setq ac-clang--suspend-p nil) + (setq ac-clang--ac-sources-backup ac-sources) + (setq ac-sources '(ac-source-clang-async)) + (push (current-buffer) ac-clang--activate-buffers) + + (ac-clang--send-create-session-request) + + (local-set-key (kbd ".") 'ac-clang-async-autocomplete-autotrigger) + (local-set-key (kbd ">") 'ac-clang-async-autocomplete-autotrigger) + (local-set-key (kbd ":") 'ac-clang-async-autocomplete-autotrigger) + (local-set-key (kbd ac-clang-async-autocompletion-manualtrigger-key) 'ac-clang-async-autocomplete-manualtrigger) + + (add-hook 'before-save-hook 'ac-clang-suspend nil t) + ;; (add-hook 'after-save-hook 'ac-clang-deactivate nil t) + ;; (add-hook 'first-change-hook 'ac-clang-activate nil t) + ;; (add-hook 'before-save-hook 'ac-clang-reparse-buffer nil t) + ;; (add-hook 'after-save-hook 'ac-clang-reparse-buffer nil t) + (add-hook 'before-revert-hook 'ac-clang-deactivate nil t) + (add-hook 'kill-buffer-hook 'ac-clang-deactivate nil t))) + + +(defun ac-clang-deactivate () + (interactive) + + (when ac-clang--activate-p + (remove-hook 'before-save-hook 'ac-clang-suspend t) + (remove-hook 'first-change-hook 'ac-clang-resume t) + ;; (remove-hook 'before-save-hook 'ac-clang-reparse-buffer t) + ;; (remove-hook 'after-save-hook 'ac-clang-reparse-buffer t) + (remove-hook 'before-revert-hook 'ac-clang-deactivate t) + (remove-hook 'kill-buffer-hook 'ac-clang-deactivate t) + + (ac-clang--send-delete-session-request) + + (pop ac-clang--activate-buffers) + (setq ac-sources ac-clang--ac-sources-backup) + (setq ac-clang--ac-sources-backup nil) + (setq ac-clang--suspend-p nil) + (setq ac-clang--session-name nil) + (setq ac-clang--activate-p nil) + + ;; (unless ac-clang--activate-buffers + ;; (ac-clang-finalize)) + )) + + +(defun ac-clang-activate-after-modify () + (interactive) + + (if (buffer-modified-p) + (ac-clang-activate) + (add-hook 'first-change-hook 'ac-clang-activate nil t))) + + +(defun ac-clang-suspend () + (when (and ac-clang--activate-p (not ac-clang--suspend-p)) + (setq ac-clang--suspend-p t) + (ac-clang--send-suspend-request) + (add-hook 'first-change-hook 'ac-clang-resume nil t))) + + +(defun ac-clang-resume () + (when (and ac-clang--activate-p ac-clang--suspend-p) + (setq ac-clang--suspend-p nil) + (remove-hook 'first-change-hook 'ac-clang-resume t) + (ac-clang--send-resume-request))) + + +(defun ac-clang-reparse-buffer () + (when ac-clang--server-process + (ac-clang--send-reparse-request))) + + +(defun ac-clang-update-cflags () + (interactive) + + (when ac-clang--activate-p + ;; (message "ac-clang-update-cflags %s" ac-clang--session-name) + (ac-clang--send-cflags-request))) + + +(defun ac-clang-set-cflags () + "Set `ac-clang-cflags' interactively." + (interactive) + + (setq ac-clang-cflags (split-string (read-string "New cflags: "))) + (ac-clang-update-cflags)) + + +(defun ac-clang-set-cflags-from-shell-command () + "Set `ac-clang-cflags' to a shell command's output. + set new cflags for ac-clang from shell command output" + (interactive) + + (setq ac-clang-cflags + (split-string + (shell-command-to-string + (read-shell-command "Shell command: " nil nil + (and buffer-file-name + (file-relative-name buffer-file-name)))))) + (ac-clang-update-cflags)) + + +(defun ac-clang-set-prefix-header (prefix-header) + "Set `ac-clang-prefix-header' interactively." + (interactive + (let ((default (car (directory-files "." t "\\([^.]h\\|[^h]\\).pch\\'" t)))) + (list + (read-file-name (concat "Clang prefix header (currently " (or ac-clang-prefix-header "nil") "): ") + (when default (file-name-directory default)) + default nil (when default (file-name-nondirectory default)))))) + + (cond + ((string-match "^[\s\t]*$" prefix-header) + (setq ac-clang-prefix-header nil)) + (t + (setq ac-clang-prefix-header prefix-header)))) + + + + +;;; +;;; The server control functions +;;; + + +(defun ac-clang--clean-tmp-pch () + "Clean up temporary precompiled headers." + + (cl-dolist (pch-file (directory-files temporary-file-directory t "preamble-.*\\.pch$" t)) + (ignore-errors + (delete-file pch-file) + t))) + + + +(defun ac-clang-launch-server () + (interactive) + + (when (and ac-clang--server-executable (not ac-clang--server-process)) + (let ((process-connection-type nil) + (coding-system-for-write 'binary)) + (setq ac-clang--server-process + (apply 'start-process + ac-clang--process-name ac-clang--process-buffer-name + ac-clang--server-executable (ac-clang--build-server-launch-options)))) + + (if ac-clang--server-process + (progn + (setq ac-clang--status 'idle) + (ac-clang--clear-command-queue) + + (set-process-coding-system ac-clang--server-process + (coding-system-change-eol-conversion buffer-file-coding-system nil) + 'binary) + (set-process-filter ac-clang--server-process 'ac-clang--process-filter) + (set-process-query-on-exit-flag ac-clang--server-process nil) + + (ac-clang--send-clang-parameters-request) + t) + (display-warning 'ac-clang "clang-server launch failed.") + nil))) + + +(defun ac-clang-shutdown-server () + (interactive) + + (when ac-clang--server-process + (ac-clang--send-shutdown-request) + + (setq ac-clang--status 'shutdown) + + (setq ac-clang--server-process nil) + t)) + + +(defun ac-clang-update-clang-parameters () + (interactive) + + (when ac-clang--server-process + (ac-clang--send-clang-parameters-request) + t)) + + +(defun ac-clang-reset-server () + (interactive) + + (when ac-clang--server-process + (cl-dolist (buffer ac-clang--activate-buffers) + (with-current-buffer buffer + (ac-clang-deactivate))) + (ac-clang--send-reset-server-request))) + + +(cl-defun ac-clang-reboot-server () + (interactive) + + (let ((buffers ac-clang--activate-buffers)) + (ac-clang-reset-server) + + (unless (ac-clang-shutdown-server) + (message "ac-clang : reboot server failed.") + (cl-return-from ac-clang-reset-server nil)) + + (unless (ac-clang-launch-server) + (message "ac-clang : reboot server failed.") + (cl-return-from ac-clang-reset-server nil)) + + (cl-dolist (buffer buffers) + (with-current-buffer buffer + (ac-clang-activate)))) + + (message "ac-clang : reboot server success.") + t) + + + + +(defun ac-clang-initialize () + (interactive) + + ;; server binary decide + (unless ac-clang--server-executable + (setq ac-clang--server-executable (executable-find (or (plist-get ac-clang--server-binaries ac-clang-server-type) "")))) + + ;; check obsolete + (unless ac-clang--server-executable + (when (setq ac-clang--server-executable (executable-find (or (plist-get ac-clang--server-obsolete-binaries ac-clang-server-type) ""))) + (display-warning 'ac-clang "The clang-server which you are using is obsolete. please replace to the new binary."))) + + ;; (message "ac-clang-initialize") + (if ac-clang--server-executable + (when (ac-clang-launch-server) + ;; Optional keybindings + (define-key ac-mode-map (kbd "M-.") 'ac-clang-jump-smart) + (define-key ac-mode-map (kbd "M-,") 'ac-clang-jump-back) + ;; (define-key ac-mode-map (kbd "C-c `") 'ac-clang-diagnostics)) + + (add-hook 'kill-emacs-hook 'ac-clang-finalize) + + (when (and (eq system-type 'windows-nt) (boundp 'w32-pipe-read-delay) (> w32-pipe-read-delay 0)) + (display-warning 'ac-clang "Please set the appropriate value for `w32-pipe-read-delay'. Because a pipe delay value is large value. Ideal value is 0. see help of `w32-pipe-read-delay'.")) + + t) + (display-warning 'ac-clang "clang-server binary not found.") + nil)) + + +(defun ac-clang-finalize () + (interactive) + + ;; (message "ac-clang-finalize") + (when (ac-clang-shutdown-server) + (define-key ac-mode-map (kbd "M-.") nil) + (define-key ac-mode-map (kbd "M-,") nil) + + (setq ac-clang--server-executable nil) + + (when ac-clang-tmp-pch-automatic-cleanup-p + (ac-clang--clean-tmp-pch)) + + t)) + + + + + +(provide 'ac-clang) + +;; Local Variables: +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; ac-clang.el ends here diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang.elc b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang.elc new file mode 100644 index 0000000..a94e649 Binary files /dev/null and b/.emacs.d/elpa/ac-clang-20150906.1008/ac-clang.elc differ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/build/builder_sample.bat b/.emacs.d/elpa/ac-clang-20150906.1008/build/builder_sample.bat new file mode 100755 index 0000000..088fdbf --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/build/builder_sample.bat @@ -0,0 +1,26 @@ +@rem @set PATH=c:/cygwin-x86_64/tmp/cmake-3.0.2-win32-x86/bin;%PATH% +@set PATH=c:/cygwin-x86_64/tmp/cmake-3.3.1-win32-x86/bin;%PATH% + + +@del /Q CMakeCache.txt +@del /Q cmake_install.cmake +@rmdir /Q /S CMakeFiles +@rmdir /Q /S clang-server-x86_64.dir + + +@rem cmake -G "Visual Studio 12 2013 Win64" ../clang-server +@rem cmake -G "Visual Studio 12 2013 Win64" ../clang-server -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" +@rem cmake -G "Visual Studio 12 2013 Win64" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-370/build/msvc-64/" +rem cmake -G "Visual Studio 12 2013 Win64" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-370/build/msvc-64/" -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" +rem cmake -G "Visual Studio 12 2013 Win64" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-370/build/msvc-64/Release/" -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" +cmake -G "Visual Studio 14 2015 Win64" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-370/build/msvc-64/Release/" -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" +rem cmake -G "Visual Studio 12 2013" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-370/build/msvc-32/Release/" -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" +@pause + +@rem cmake --build . [--config ] [--target ] [-- -i] +@rem cmake --build . --config Release --target ALL_BUILD +@rem cmake --build . --config Debug --target ALL_BUILD +cmake --build . --config Release --target INSTALL +@rem cmake --build . --config Debug --target INSTALL + +@pause diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/build/builder_sample.sh b/.emacs.d/elpa/ac-clang-20150906.1008/build/builder_sample.sh new file mode 100755 index 0000000..f0d424c --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/build/builder_sample.sh @@ -0,0 +1,28 @@ +# -*- mode: shell-script ; coding: utf-8-unix -*- +#! /bin/sh +# export PATH="/cygdrive/c/cygwin-x86_64/tmp/cmake-3.1.0-win32-x86/bin/:$PATH" + +rm -rf CMakeCache.txt +rm -rf cmake_install.cmake +rm -rf CMakeFiles +rm -rf Makefile + +# switch compiler +# export CC=clang +# export CXX=clang++ + +# cmake --version +# cmake -G "Unix Makefiles" ../clang-server -DCMAKE_EXPORT_COMPILE_COMMANDS=ON +# cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/sh/clang-361/build" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON +cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="/home/yaruopooner/work/llvm-build-shells/sh/clang-361/build" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON +# cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="/home/yaruopooner/work/llvm-build-shells/sh/clang-361/build" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RELWITHDEBINFO +# cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="/home/yaruopooner/work/llvm-build-shells/sh/clang-361/build" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=DEBUG +# cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="/home/yaruopooner/work/llvm-build-shells/sh/clang-361/build" -DCMAKE_INSTALL_PREFIX="~/work/test" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + +# echo "please press Enter key" +# read discard_tmp + +cmake --build . +# sudo make install + + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/.nosearch b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/.nosearch new file mode 100644 index 0000000..e69de29 diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/CMakeLists.txt b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/CMakeLists.txt new file mode 100644 index 0000000..c4327a5 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/CMakeLists.txt @@ -0,0 +1,383 @@ +# -*- mode: cmake ; coding: utf-8-unix -*- + +cmake_minimum_required(VERSION 2.8) + +cmake_policy(SET CMP0015 NEW) +cmake_policy(SET CMP0022 NEW) + +include(CheckCXXCompilerFlag) + + +# ---------------------------------------- +# before common setting +# ---------------------------------------- + +set(project_name clang-server) +# set(platform_name x86_64) +# set(platform_name x86_32) +# set(project_elf_name ${project_name}-${platform_name}) +set(project_elf_name ${project_name}) + + +# CMAKE_INSTALL_PREFIX check designated value before function Project() +if(CMAKE_INSTALL_PREFIX) + # message("user_install_prefix TRUE") + set(user_install_prefix TRUE) +else() + # message("user_install_prefix FALSE") +endif() + + +# The set before project declaration. +set(CMAKE_CONFIGURATION_TYPES Release RelWithDebInfo Debug CACHE TYPE INTERNAL FORCE) +# setup library per configuration +string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" project_configurations) + + +Project(${project_name}) + + +# The set after project declaration. +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + + + + +# CMAKE_INSTALL_PREFIX +# Windows (exe,dll) +# Default: C:/Program Files/clang-server/ +# prefix : +# +# Linux (elf) +# Default: /usr/local/bin/ +# prefix : +# Linux (so) +# Default: /usr/local/lib/clang-server/ +# prefix : + +set(CMAKE_SKIP_RPATH TRUE) +# set(CMAKE_SKIP_BUILD_RPATH FALSE) +# set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) +# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +# set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) + + +set(project_sources main.cpp ClangServer.cpp ClangServer.hpp ClangSession.cpp ClangSession.hpp Common.cpp Common.hpp CommandLine.hpp) + + +add_library(libclang SHARED IMPORTED) + +set(dependency_libraries libclang) + + +list(APPEND CMAKE_FIND_LIBRARY_PREFIXES lib) +list(REMOVE_DUPLICATES CMAKE_FIND_LIBRARY_PREFIXES) + +# set(libclang_names clang-${platform_name} clang) +set(libclang_names clang) + + +function(display_vars vars prefix) + message("${prefix}") + foreach(IT ${vars}) + message("${prefix}${IT} = ${${IT}}") + endforeach() +endfunction() + + +set(echo_vars) +list(APPEND echo_vars CMAKE_CXX_COMPILER_ID CMAKE_CXX_STANDARD CYGWIN WIN32 UNIX MSVC MSVC_VERSION CMAKE_GNUtoMS CMAKE_SYSTEM_NAME CMAKE_COMPILER_IS_GNUC CMAKE_COMPILER_IS_GNUCXX CMAKE_COMPILER_IS_MINGW CMAKE_COMPILER_IS_CYGWIN) +display_vars("${echo_vars}" "env: ") + + +# ---------------------------------------- +# platform dependency setting +# ---------------------------------------- + +if(MSVC) + # ---------------------------------------- + # Microsoft Visual Studio + # ---------------------------------------- + message("environment: MSVC") + + set(echo_vars) + list(APPEND echo_vars CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE) + list(APPEND echo_vars CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_RELEASE) + list(APPEND echo_vars IMPORTED_IMPLIB IMPORTED_IMPLIB_DEBUG IMPORTED_IMPLIB_RELEASE) + display_vars("${echo_vars}" "msvc: ") + + + # set_target_properties(TARGET) + + # setup compile & link flags + set(project_defs -D_CONSOLE -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) + + set(CMAKE_CXX_FLAGS "/GR /EHsc /W3 /Zi") + set(CMAKE_CXX_FLAGS_DEBUG "/Gm /Od") + set(CMAKE_CXX_FLAGS_RELEASE "/GL /Gy /Oi") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /DEBUG /OPT:ICF /OPT:REF") + + set(dependency_libraries odbc32 odbccp32 ${dependency_libraries}) + + + # search & setup link library properties + list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .imp) + list(REMOVE_DUPLICATES CMAKE_FIND_LIBRARY_SUFFIXES) + + + # search priority EXTERNAL > CURRENT + set(libclang_search_paths ${LIBRARY_PATHS} ${CMAKE_SOURCE_DIR}) + + foreach(IT_SEARCH_PATH ${libclang_search_paths}) + message("") + message("IT_SEARCH_PATH : ${IT_SEARCH_PATH}") + + # collect absolute file paths + file(GLOB_RECURSE collected_library_apath ${IT_SEARCH_PATH} ${IT_SEARCH_PATH}/*.imp ${IT_SEARCH_PATH}/*.lib ${IT_SEARCH_PATH}/*.dll) + + if(collected_library_apath) + # generate absolute directory paths + set(library_apaths ${IT_SEARCH_PATH}) + foreach(IT_PATH ${collected_library_apath}) + get_filename_component(library_dir_path ${IT_PATH} DIRECTORY) + list(APPEND library_apaths ${library_dir_path}) + endforeach() + list(REMOVE_DUPLICATES library_apaths) + + # message("collected_library_apath : ${collected_library_apath}") + message("library_apaths : ${library_apaths}") + + # find library > generate relative path > set property per configuration. + foreach(IT_CONFIG ${project_configurations}) + if(NOT matched_${IT_CONFIG}) + # collect a absolute path that includes the same configuration name. + # IT_SEARCH_PATH is always accept. + # set(filtered_library_apaths ${IT_SEARCH_PATH}) + # foreach(IT_PATH ${library_apaths}) + # string(TOUPPER ${IT_PATH} CHECK_PATH_STR) + # if(${CHECK_PATH_STR} MATCHES /${IT_CONFIG}) + # list(APPEND filtered_library_apaths ${IT_PATH}) + # endif() + # endforeach() + # set(filtered_library_apaths ${library_apaths}) + + set(CMAKE_FIND_LIBRARY_SUFFIXES .imp .lib) + find_library(libclang_${IT_CONFIG}_found_lib_apath NAMES ${libclang_names} PATHS ${library_apaths} NO_DEFAULT_PATH) + + set(CMAKE_FIND_LIBRARY_SUFFIXES .dll) + find_library(libclang_${IT_CONFIG}_found_dll_apath NAMES ${libclang_names} PATHS ${library_apaths} NO_DEFAULT_PATH) + + display_vars("library_apaths;libclang_${IT_CONFIG}_found_lib_apath;libclang_${IT_CONFIG}_found_dll_apath" "${IT_CONFIG}: ") + + if(libclang_${IT_CONFIG}_found_lib_apath AND libclang_${IT_CONFIG}_found_dll_apath) + file(RELATIVE_PATH libclang_${IT_CONFIG}_rpath ${IT_SEARCH_PATH} ${libclang_${IT_CONFIG}_found_lib_apath}) + + set_property(TARGET libclang PROPERTY IMPORTED_IMPLIB_${IT_CONFIG} ${libclang_${IT_CONFIG}_rpath}) + set_property(TARGET libclang PROPERTY INTERFACE_LINK_LIBRARIES_${IT_CONFIG} ${libclang_${IT_CONFIG}_rpath}) + set_property(TARGET libclang PROPERTY IMPORTED_LOCATION_${IT_CONFIG} ${libclang_${IT_CONFIG}_found_lib_apath}) + link_directories(${IT_SEARCH_PATH}) + + set(libclang_${IT_CONFIG}_found_apath ${libclang_${IT_CONFIG}_found_dll_apath}) + message("${IT_CONFIG}: found library at ${IT_SEARCH_PATH}") + set(matched_${IT_CONFIG} TRUE) + endif() + endif() + endforeach() + endif() + endforeach() + + + # install info + set(binary_destination_apath ${CMAKE_INSTALL_PREFIX}) + set(library_destination_apath ${CMAKE_INSTALL_PREFIX}) + + + if(NOT (matched_DEBUG OR matched_RELEASE OR matched_MINSIZEREL OR matched_RELWITHDEBINFO)) + message("not found library") + endif() + +elseif(UNIX) + # ---------------------------------------- + # UNIX, Linux + # ---------------------------------------- + message("environment: UNIX") + + # setup compile & link flags + check_cxx_compiler_flag(-std=c++11 COMPILER_SUPPORTS_CXX11) + check_cxx_compiler_flag(-std=c++0x COMPILER_SUPPORTS_CXX0X) + + # setup compile & link flags + if(COMPILER_SUPPORTS_CXX11) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + elseif(COMPILER_SUPPORTS_CXX0X) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") + else() + message(FATAL_ERROR "The compiler has no C++11 support.") + endif() + + # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused-result") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-result") + + + # search priority EXTERNAL > CURRENT + + if(CYGWIN) + message("CYGWIN") + # set(dependency_libraries clang.dll) + # set(dependency_libraries libclang.a) + + # find_library(CYG_LIBCLANG_PATH NAMES clang.dll PATHS ${library_apaths}) + # find_library(CYG_LIBCLANG_PATH NAMES libclang.dll clang.dll clang PATHS "/lib" "c:/cygwin-x86_64/lib" ) + # find_library(CYG_LIBCLANG_PATH NAMES libclang.dll PATHS "/lib" "c:/cygwin-x86_64/lib" ) + # find_library(CYG_LIBCLANG_PATH NAMES libclang libclang.dll PATHS "c:/cygwin-x86_64/lib" ) + message("CYG_LIBCLANG_PATH : ${CYG_LIBCLANG_PATH}") + + else() + message("non CYGWIN") + endif() + + + # search priority EXTERNAL > CURRENT + set(libclang_search_paths ${LIBRARY_PATHS} ${CMAKE_SOURCE_DIR}) + + foreach(IT_SEARCH_PATH ${libclang_search_paths}) + message("IT_SEARCH_PATH : ${IT_SEARCH_PATH}") + + # collect absolute file paths + file(GLOB_RECURSE collected_library_apath ${IT_SEARCH_PATH} ${IT_SEARCH_PATH}/*.so ${IT_SEARCH_PATH}/*.a) + + if(collected_library_apath) + # generate absolute directory paths + set(library_apaths ${IT_SEARCH_PATH}) + foreach(IT_PATH ${collected_library_apath}) + get_filename_component(library_dir_path ${IT_PATH} DIRECTORY) + list(APPEND library_apaths ${library_dir_path}) + endforeach() + list(REMOVE_DUPLICATES library_apaths) + + # message("collected_library_apath : ${collected_library_apath}") + message("library_apaths : ${library_apaths}") + + # find library > generate relative path > set property per configuration. + foreach(IT_CONFIG ${project_configurations}) + if(NOT matched_${IT_CONFIG}) + # find library > generate relative path + find_library(libclang_${IT_CONFIG}_found_apath NAMES ${libclang_names} PATHS ${library_apaths} NO_DEFAULT_PATH) + + display_vars("libclang_${IT_CONFIG}_found_apath" "${IT_CONFIG}: ") + + if(libclang_${IT_CONFIG}_found_apath) + # message("found library at ${libclang_${IT_CONFIG}_found_apath}") + get_filename_component(libclang_link_apath ${libclang_${IT_CONFIG}_found_apath} DIRECTORY) + link_directories(${libclang_link_apath}) + get_filename_component(libclang_found_name ${libclang_${IT_CONFIG}_found_apath} NAME_WE) + string(REGEX REPLACE "^lib" "" libclang_found_name ${libclang_found_name}) + + # message("libclang_found_name at ${libclang_found_name}") + set_property(TARGET libclang PROPERTY INTERFACE_LINK_LIBRARIES_${IT_CONFIG} ${libclang_found_name}) + set_property(TARGET libclang PROPERTY IMPORTED_LOCATION_${IT_CONFIG} ${libclang_${IT_CONFIG}_found_apath}) + message("${IT_CONFIG}: found library at ${libclang_link_apath}") + set(matched_${IT_CONFIG} TRUE) + endif() + endif() + endforeach() + endif() + endforeach() + + + # install info + if(user_install_prefix) + string(REGEX REPLACE "^~" "$ENV{HOME}" CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) + get_filename_component(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} ABSOLUTE) + set(binary_destination_apath ${CMAKE_INSTALL_PREFIX}) + set(library_destination_apath ${CMAKE_INSTALL_PREFIX}) + else() + set(binary_destination_apath ${CMAKE_INSTALL_PREFIX}/bin) + set(library_destination_apath ${CMAKE_INSTALL_PREFIX}/lib/${project_name}) + endif() + + + # The rpath is runtime library search path. The rpath specify path where you want to install a shared object. + set(CMAKE_EXE_LINKER_FLAGS "-Wl,-rpath,${library_destination_apath}") + + + if(NOT (matched_DEBUG OR matched_RELEASE OR matched_MINSIZEREL OR matched_RELWITHDEBINFO)) + message("not found library") + endif() + + +else() + + message("sorry, not support environment") + +endif() + + + +# ---------------------------------------- +# after common setting +# ---------------------------------------- + +add_executable(${project_name} ${project_sources}) + +# set_property(TARGET ${project_name} PROPERTY CXX_STANDARD 11) + +set_property(TARGET ${project_name} PROPERTY OUTPUT_NAME_DEBUG "${project_elf_name}-debug") +set_property(TARGET ${project_name} PROPERTY OUTPUT_NAME_RELEASE "${project_elf_name}") +# set_property(TARGET ${project_name} PROPERTY OUTPUT_NAME_MINSIZEREL "${project_elf_name}") +set_property(TARGET ${project_name} PROPERTY OUTPUT_NAME_RELWITHDEBINFO "${project_elf_name}-reldbg") + + +list(APPEND project_defs -DCMAKE_GENERATOR="${CMAKE_GENERATOR}" -DCMAKE_HOST_SYSTEM_PROCESSOR="${CMAKE_HOST_SYSTEM_PROCESSOR}") + +# list(APPEND project_defs CMAKE_GENERATOR="${CMAKE_GENERATOR}") +# set_property(TARGET ${project_name} PROPERTY COMPILE_DEFINITIONS ${project_defs}) +# set_property(TARGET ${project_name} PROPERTY COMPILE_DEFINITIONS_DEBUG ${project_defs}) +# set_property(TARGET ${project_name} PROPERTY COMPILE_DEFINITIONS_RELEASE ${project_defs}) +add_definitions(${project_defs}) + +include_directories(./) + + +target_link_libraries(${project_name} ${dependency_libraries}) + + +# ---------------------------------------- +# install setting +# ---------------------------------------- + +set(CMAKE_INSTALL_RPATH ${library_destination_apath}) +install(TARGETS ${project_name} RUNTIME DESTINATION ${binary_destination_apath}) +foreach(IT_CONFIG ${project_configurations}) + install(FILES ${libclang_${IT_CONFIG}_found_apath} DESTINATION ${library_destination_apath} CONFIGURATIONS ${IT_CONFIG}) +endforeach() + + + +# ---------------------------------------- +# debug display for variables +# ---------------------------------------- + + +# get_directory_property(DirDefs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS) +# foreach(IT_DEF ${DirDefs}) +# message(STATUS "Found Define: " ${IT_DEF}) +# endforeach() +# message( "DirDefs: " ${DirDefs} ) + +set(echo_vars) +list(APPEND echo_vars CMAKE_CONFIGURATION_TYPES project_configurations CMAKE_GENERATOR CMAKE_HOST_SYSTEM_PROCESSOR CMAKE_CURRENT_SOURCE_DIR collected_library_apath library_apaths) +list(APPEND echo_vars CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE project_defs) +list(APPEND echo_vars CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_RELEASE) +list(APPEND echo_vars dependency_libraries binary_destination_apath library_destination_apath) +list(APPEND echo_vars CMAKE_FIND_LIBRARY_PREFIXES CMAKE_FIND_LIBRARY_SUFFIXES) +# list(APPEND echo_vars CMAKE_IMPORT_LIBRARY_SUFFIXES CMAKE_LINK_LIBRARY_SUFFIX CMAKE_SHARED_LIBRARY_SUFFIX CMAKE_SHARED_MODULE_SUFFIX CMAKE_STATIC_LIBRARY_SUFFIX) +# list(APPEND echo_vars PROJECT_SOURCE_DIR PROJECT_BINARY_DIR CMAKE_SOURCE_DIR CMAKE_BINARY_DIR CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_INSTALL_NAME_DIR CMAKE_INCLUDE_CURRENT_DIR CMAKE_HOME_DIRECTORY CMAKE_CURRENT_LIST_DIR CMAKE_CURRENT_BINARY_DIR CMAKE_BINARY_DIR CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${project_name}_SOURCE_DIR ${project_name}_BINARY_DIR) +list(APPEND echo_vars CMAKE_INSTALL_PREFIX CMAKE_INSTALL_RPATH CMAKE_SKIP_BUILD_RPATH CMAKE_BUILD_WITH_INSTALL_RPATH CMAKE_SKIP_RPATH CMAKE_SKIP_INSTALL_RPATH) +# list(APPEND echo_vars CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_FRAMEWORK_PATH) +display_vars("${echo_vars}" "final: ") + + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangServer.cpp b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangServer.cpp new file mode 100644 index 0000000..54b32c6 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangServer.cpp @@ -0,0 +1,439 @@ +/* -*- mode: c++ ; coding: utf-8-unix -*- */ +/* last updated : 2015/07/25.03:24:29 */ + +/* + * Copyright (c) 2013-2015 yaruopooner [https://github.com/yaruopooner] + * + * This file is part of ac-clang. + * + * 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 . + */ + + +/*================================================================================================*/ +/* Comment */ +/*================================================================================================*/ + + +/*================================================================================================*/ +/* Include Files */ +/*================================================================================================*/ + +#include "ClangServer.hpp" + + +using namespace std; + + + +/*================================================================================================*/ +/* Internal Function Definitions Section */ +/*================================================================================================*/ + +namespace +{ + +std::string GetClangVersion( void ) +{ + CXString version_text = clang_getClangVersion(); + const std::string clang_version = clang_getCString( version_text ); + + clang_disposeString( version_text ); + + return clang_version; +} + +} + + + +/*================================================================================================*/ +/* Global Class Method Definitions Section */ +/*================================================================================================*/ + + +/* + + ---- SERVER MESSAGE ---- + + - GET_SPECIFIC_PROPERTIES: return clang-server specific properties + Message format: + command_type:Server + command_name:GET_SPECIFIC_PROPERTIES + + - GET_CLANG_VERSION: return libclang version (libclang.lib/a) + Message format: + command_type:Server + command_name:GET_CLANG_VERSION + + - SET_CLANG_PARAMETERS: setup libclang behavior parameters + Message format: + command_type:Server + command_name:SET_CLANG_PARAMETERS + translation_unit_flags:[#flag_name0|flag_name1|...#] + complete_at_flags:[#flag_name0|flag_name1|...#] + + - CREATE_SESSION: create session. + Message format: + command_type:Server + command_name:CREATE_SESSION + session_name::[#session_name#] + + - DELETE_SESSION: delete session. + Message format: + command_type:Server + command_name:DELETE_SESSION + session_name::[#session_name#] + + - RESET: reset the clang server(all session delete. context reallocate) + Message format: + command_type:Server + command_name:RESET + + - SHUTDOWN: shutdown the clang server (this program) + Message format: + command_type:Server + command_name:SHUTDOWN + + + ---- SESSION MESSAGE ---- + + - SUSPEND: delete CXTranslationUnit + Message format: + command_type:Session + command_name:SUSPEND + session_name:[#session_name#] + + - RESUME: realloc CXTranslationUnit + Message format: + command_type:Session + command_name:RESUME + session_name:[#session_name#] + + - SET_CFLAGS: Specify CFLAGS argument passing to clang parser. + Message format: + command_type:Session + command_name:SET_CFLAGS + session_name:[#session_name#] + num_cflags:[#num_cflags#] + arg1 arg2 ...... (there should be num_cflags items here) + CFLAGS's white space must be accept. + a separator is '\n'. + source_length:[#source_length#] + <# SOURCE CODE #> + + - SET_SOURCECODE: Update the source code in the source buffer + Message format: + command_type:Session + command_name:SET_SOURCECODE + session_name:[#session_name#] + source_length:[#source_length#] + <# SOURCE CODE #> + + - REPARSE: Reparse the source code + command_type:Session + command_name:REPARSE + session_name:[#session_name#] + + - COMPLETION: Do code completion at a specified point. + Message format: + command_type:Session + command_name:COMPLETION + session_name:[#session_name#] + line:[#line#] + column:[#column#] + source_length:[#source_length#] + <# SOURCE CODE #> + + - SYNTAXCHECK: Retrieve diagnostic messages + Message format: + command_type:Session + command_name:SYNTAXCHECK + session_name:[#session_name#] + source_length:[#source_length#] + <# SOURCE CODE #> + + - INCLUSION: Get location of inclusion file at point + Message format: + command_type:Session + command_name:INCLUSION + session_name:[#session_name#] + line:[#line#] + column:[#column#] + source_length:[#source_length#] + <# SOURCE CODE #> + + - DEFINITION: Get location of definition at point + Message format: + command_type:Session + command_name:DEFINITION + session_name:[#session_name#] + line:[#line#] + column:[#column#] + source_length:[#source_length#] + <# SOURCE CODE #> + + - DECLARATION: Get location of declaration at point + Message format: + command_type:Session + command_name:DECLARATION + session_name:[#session_name#] + line:[#line#] + column:[#column#] + source_length:[#source_length#] + <# SOURCE CODE #> + + - SMARTJUMP: Get location of inclusion, definition, declaration at point. If that fails, it will search following. + inclusion -> finish, definition -> declaration -> finish. + Message format: + command_type:Session + command_name:SMARTJUMP + session_name:[#session_name#] + line:[#line#] + column:[#column#] + source_length:[#source_length#] + <# SOURCE CODE #> + + +*/ + + + + +ClangServer::ClangServer( const Specification& specification ) + : + m_Status( kStatus_Running ) + , m_Specification( specification ) +{ + // setup stream buffer size + m_Specification.m_StdinBufferSize = std::max( m_Specification.m_StdinBufferSize, static_cast< size_t >( Specification::kStreamBuffer_UnitSize ) ); + m_Specification.m_StdoutBufferSize = std::max( m_Specification.m_StdoutBufferSize, static_cast< size_t >( Specification::kStreamBuffer_UnitSize ) ); + + ::setvbuf( stdin, nullptr, _IOFBF, m_Specification.m_StdinBufferSize ); + ::setvbuf( stdout, nullptr, _IOFBF, m_Specification.m_StdoutBufferSize ); + + + // server command + m_ServerCommands.insert( ServerHandleMap::value_type( "GET_SPECIFICATION", std::mem_fn( &ClangServer::commandGetSpecification ) ) ); + m_ServerCommands.insert( ServerHandleMap::value_type( "GET_CLANG_VERSION", std::mem_fn( &ClangServer::commandGetClangVersion ) ) ); + m_ServerCommands.insert( ServerHandleMap::value_type( "SET_CLANG_PARAMETERS", std::mem_fn( &ClangServer::commandSetClangParameters ) ) ); + m_ServerCommands.insert( ServerHandleMap::value_type( "CREATE_SESSION", std::mem_fn( &ClangServer::commandCreateSession ) ) ); + m_ServerCommands.insert( ServerHandleMap::value_type( "DELETE_SESSION", std::mem_fn( &ClangServer::commandDeleteSession ) ) ); + m_ServerCommands.insert( ServerHandleMap::value_type( "RESET", std::mem_fn( &ClangServer::commandReset ) ) ); + m_ServerCommands.insert( ServerHandleMap::value_type( "SHUTDOWN", std::mem_fn( &ClangServer::commandShutdown ) ) ); + + // session command + m_SessionCommands.insert( SessionHandleMap::value_type( "SUSPEND", std::mem_fn( &ClangSession::commandSuspend ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "RESUME", std::mem_fn( &ClangSession::commandResume ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "SET_CFLAGS", std::mem_fn( &ClangSession::commandSetCFlags ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "SET_SOURCECODE", std::mem_fn( &ClangSession::commandSetSourceCode ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "REPARSE", std::mem_fn( &ClangSession::commandReparse ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "COMPLETION", std::mem_fn( &ClangSession::commandCompletion ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "SYNTAXCHECK", std::mem_fn( &ClangSession::commandDiagnostics ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "INCLUSION", std::mem_fn( &ClangSession::commandInclusion ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "DEFINITION", std::mem_fn( &ClangSession::commandDefinition ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "DECLARATION", std::mem_fn( &ClangSession::commandDeclaration ) ) ); + m_SessionCommands.insert( SessionHandleMap::value_type( "SMARTJUMP", std::mem_fn( &ClangSession::commandSmartJump ) ) ); + + // display initial specification + commandGetSpecification(); +} + +ClangServer::~ClangServer( void ) +{ + // m_Sessions must be destruction early than m_Context. + // Because m_Sessions depend to m_Context. + m_Sessions.clear(); +} + + +void ClangServer::commandGetSpecification( void ) +{ + const std::string server_version = CLANG_SERVER_VERSION; + const std::string clang_version = ::GetClangVersion(); + const std::string generate = CMAKE_GENERATOR "/" CMAKE_HOST_SYSTEM_PROCESSOR; + + m_Writer.Write( "-------- Clang-Server Specification --------\n" ); + m_Writer.Write( "Server Version : %s\n", server_version.c_str() ); + m_Writer.Write( "Clang Version : %s\n", clang_version.c_str() ); + m_Writer.Write( "Generate : %s\n", generate.c_str() ); + // m_Writer.Write( "Log File : %s\n", m_Specification.m_LogFile.c_str() ); + m_Writer.Write( "STDIN Buffer Size : %d bytes\n", m_Specification.m_StdinBufferSize ); + m_Writer.Write( "STDOUT Buffer Size : %d bytes\n", m_Specification.m_StdoutBufferSize ); + m_Writer.Flush(); +} + + +void ClangServer::commandGetClangVersion( void ) +{ + const std::string clang_version = ::GetClangVersion(); + + m_Writer.Write( "%s ", clang_version.c_str() ); + m_Writer.Flush(); +} + + +void ClangServer::commandSetClangParameters( void ) +{ + const string translation_unit_flags = m_Reader.ReadToken( "translation_unit_flags:%s" ); + const string complete_at_flags = m_Reader.ReadToken( "complete_at_flags:%s" ); + const uint32_t translation_unit_flags_value = ClangFlagConverters::GetCXTranslationUnitFlags().GetValue( translation_unit_flags ); + const uint32_t complete_at_flags_value = ClangFlagConverters::GetCXCodeCompleteFlags().GetValue( complete_at_flags ); + uint32_t complete_results_limit; + + m_Reader.ReadToken( "complete_results_limit:%d", complete_results_limit ); + + m_Context.SetTranslationUnitFlags( translation_unit_flags_value ); + m_Context.SetCompleteAtFlags( complete_at_flags_value ); + m_Context.SetCompleteResultsLimit( complete_results_limit ); +} + + +void ClangServer::commandCreateSession( void ) +{ + const string session_name = m_Reader.ReadToken( "session_name:%s" ); + + // search session + Dictionary::iterator session_it = m_Sessions.find( session_name ); + + if ( session_it == m_Sessions.end() ) + { + // not found session + // allocate & setup new session + std::shared_ptr< ClangSession > new_session( std::make_shared< ClangSession >( session_name, m_Context, m_Reader, m_Writer ) ); + std::pair< Dictionary::iterator, bool > result = m_Sessions.insert( Dictionary::value_type( session_name, new_session ) ); + + if ( result.second ) + { + // success + new_session->Allocate(); + } + } + else + { + // already exist + } +} + + +void ClangServer::commandDeleteSession( void ) +{ + const string session_name = m_Reader.ReadToken( "session_name:%s" ); + + // search session + Dictionary::iterator session_it = m_Sessions.find( session_name ); + + if ( session_it != m_Sessions.end() ) + { + // session_it->second->Deallocate(); + + m_Sessions.erase( session_it ); + } +} + + +void ClangServer::commandReset( void ) +{ + m_Sessions.clear(); + m_Context.Deallocate(); + m_Context.Allocate(); +} + + +void ClangServer::commandShutdown( void ) +{ + m_Status = kStatus_Exit; +} + + + + +void ClangServer::ParseServerCommand( void ) +{ + const string command_name = m_Reader.ReadToken( "command_name:%s" ); + + ServerHandleMap::iterator command_it = m_ServerCommands.find( command_name ); + + // execute command handler + if ( command_it != m_ServerCommands.end() ) + { + command_it->second( *this ); + } + else + { + // unknown command + } +} + +void ClangServer::ParseSessionCommand( void ) +{ + const string command_name = m_Reader.ReadToken( "command_name:%s" ); + const string session_name = m_Reader.ReadToken( "session_name:%s" ); + + if ( session_name.empty() ) + { + return; + } + + // search session + Dictionary::iterator session_it = m_Sessions.find( session_name ); + + // execute command handler + if ( session_it != m_Sessions.end() ) + { + SessionHandleMap::iterator command_it = m_SessionCommands.find( command_name ); + + if ( command_it != m_SessionCommands.end() ) + { + command_it->second( *session_it->second ); + } + else + { + // session not found + } + } + else + { + // unknown command + } +} + + +void ClangServer::ParseCommand( void ) +{ + do + { + const string command_type = m_Reader.ReadToken( "command_type:%s" ); + + if ( command_type == "Server" ) + { + ParseServerCommand(); + } + else if ( command_type == "Session" ) + { + ParseSessionCommand(); + } + else + { + // unknown command type + } + } while ( m_Status != kStatus_Exit ); +} + + + + +/*================================================================================================*/ +/* EOF */ +/*================================================================================================*/ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangServer.hpp b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangServer.hpp new file mode 100644 index 0000000..3364bbb --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangServer.hpp @@ -0,0 +1,132 @@ +/* -*- mode: c++ ; coding: utf-8-unix -*- */ +/* last updated : 2015/09/05.04:13:59 */ + +/* + * Copyright (c) 2013-2015 yaruopooner [https://github.com/yaruopooner] + * + * This file is part of ac-clang. + * + * 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 . + */ + + +#pragma once + +#ifndef __CLANG_SERVER_HPP__ +#define __CLANG_SERVER_HPP__ + + + +#define CLANG_SERVER_VERSION "server version 1.4.0" + + +/*================================================================================================*/ +/* Comment */ +/*================================================================================================*/ + + +/*================================================================================================*/ +/* Include Files */ +/*================================================================================================*/ + +#include +#include +#include + +#include "ClangSession.hpp" + + +/*================================================================================================*/ +/* Class */ +/*================================================================================================*/ + + +class ClangServer +{ +public: + enum Status + { + kStatus_Running, + kStatus_Exit, + }; + + + struct Specification + { + enum + { + kStreamBuffer_UnitSize = 1 * 1024 * 1024, + }; + + Specification( size_t StdinBufferSize = kStreamBuffer_UnitSize, + size_t StdoutBufferSize = kStreamBuffer_UnitSize, + const std::string& LogFile = std::string() ) : + m_StdinBufferSize( StdinBufferSize ) + , m_StdoutBufferSize( StdoutBufferSize ) + , m_LogFile( LogFile ) + { + } + + size_t m_StdinBufferSize; + size_t m_StdoutBufferSize; + std::string m_LogFile; + }; + + + ClangServer( const Specification& specification = Specification() ); + ~ClangServer( void ); + + void ParseCommand( void ); + + // void SetLogFile( const std::string& LogFile ); + + +private: + void ParseServerCommand( void ); + void ParseSessionCommand( void ); + + + // commands + void commandGetSpecification( void ); + void commandGetClangVersion( void ); + void commandSetClangParameters( void ); + void commandCreateSession( void ); + void commandDeleteSession( void ); + void commandReset( void ); + void commandShutdown( void ); + + +private: + typedef std::unordered_map< std::string, std::function< void (ClangServer&) > > ServerHandleMap; + typedef std::unordered_map< std::string, std::function< void (ClangSession&) > > SessionHandleMap; + typedef std::unordered_map< std::string, std::shared_ptr< ClangSession > > Dictionary; + + + ClangContext m_Context; + ServerHandleMap m_ServerCommands; + SessionHandleMap m_SessionCommands; + Dictionary m_Sessions; + StreamReader m_Reader; + StreamWriter m_Writer; + uint32_t m_Status; + Specification m_Specification; +}; + + + + +#endif // __CLANG_SERVER_HPP__ +/*================================================================================================*/ +/* EOF */ +/*================================================================================================*/ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangSession.cpp b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangSession.cpp new file mode 100644 index 0000000..6625a54 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangSession.cpp @@ -0,0 +1,739 @@ +/* -*- mode: c++ ; coding: utf-8-unix -*- */ +/* last updated : 2015/07/25.03:32:02 */ + +/* + * Copyright (c) 2013-2015 yaruopooner [https://github.com/yaruopooner] + * + * This file is part of ac-clang. + * + * 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 . + */ + + +/*================================================================================================*/ +/* Comment */ +/*================================================================================================*/ + + +/*================================================================================================*/ +/* Include Files */ +/*================================================================================================*/ + +#include + +#include "ClangSession.hpp" + + +using namespace std; + + + +/*================================================================================================*/ +/* Internal Printer Class Definitions Section */ +/*================================================================================================*/ + + +namespace +{ + +string GetNormalizePath( CXFile file ) +{ + CXString filename = clang_getFileName( file ); + const string path = clang_getCString( filename ); + const regex expression( "[\\\\]+" ); + const string replace( "/" ); + const string normalize_path = regex_replace( path, expression, replace ); + + clang_disposeString( filename ); + + return normalize_path; +} + +} + + + +class ClangSession::Completion +{ +public: + Completion( ClangSession& Session ) : + m_Session( Session ) + { + } + + void PrintCompleteCandidates( void ); + +private: + bool PrintCompletionHeadTerm( CXCompletionString CompletionString ); + void PrintAllCompletionTerms( CXCompletionString CompletionString ); + void PrintCompletionLine( CXCompletionString CompletionString ); + void PrintCompletionResults( CXCodeCompleteResults* CompleteResults ); + +private: + ClangSession& m_Session; +}; + + +class ClangSession::Diagnostics +{ +public: + Diagnostics( ClangSession& Session ) : + m_Session( Session ) + { + } + + void PrintDiagnosticsResult( void ); + +private: + ClangSession& m_Session; +}; + + +class ClangSession::Jump +{ +public: + Jump( ClangSession& Session ) : + m_Session( Session ) + { + } + + void PrintInclusionFileLocation( void ); + void PrintDefinitionLocation( void ); + void PrintDeclarationLocation( void ); + void PrintSmartJumpLocation( void ); + +private: + struct Location + { + Location( void ) : + m_Line( 0 ) + , m_Column( 0 ) + { + } + + string m_NormalizePath; + uint32_t m_Line; + uint32_t m_Column; + }; + + CXCursor GetCursor( const uint32_t Line, const uint32_t Column ) const; + void PrepareTransaction( uint32_t& Line, uint32_t& Column ); + bool EvaluateCursorLocation( const CXCursor& Cursor ); + + bool EvaluateInclusionFileLocation( void ); + bool EvaluateDefinitionLocation( void ); + bool EvaluateDeclarationLocation( void ); + bool EvaluateSmartJumpLocation( void ); + void PrintLocation( void ); + +private: + ClangSession& m_Session; + Location m_Location; +}; + + + + +bool ClangSession::Completion::PrintCompletionHeadTerm( CXCompletionString CompletionString ) +{ + // check accessibility of candidate. (access specifier of member : public/protected/private) + if ( clang_getCompletionAvailability( CompletionString ) == CXAvailability_NotAccessible ) + { + return ( false ); + } + + const uint32_t n_chunks = clang_getNumCompletionChunks( CompletionString ); + + // inspect all chunks only to find the TypedText chunk + for ( uint32_t i_chunk = 0; i_chunk < n_chunks; ++i_chunk ) + { + if ( clang_getCompletionChunkKind( CompletionString, i_chunk ) == CXCompletionChunk_TypedText ) + { + // We got it, just dump it to fp + CXString ac_string = clang_getCompletionChunkText( CompletionString, i_chunk ); + + m_Session.m_Writer.Write( "COMPLETION: %s", clang_getCString( ac_string ) ); + + clang_disposeString( ac_string ); + + // care package on the way + return ( true ); + } + } + + // We haven't found TypedText chunk in CompletionString + return ( false ); +} + +void ClangSession::Completion::PrintAllCompletionTerms( CXCompletionString CompletionString ) +{ + const uint32_t n_chunks = clang_getNumCompletionChunks( CompletionString ); + + for ( uint32_t i_chunk = 0; i_chunk < n_chunks; ++i_chunk ) + { + // get the type and completion text of this chunk + CXCompletionChunkKind chk_kind = clang_getCompletionChunkKind( CompletionString, i_chunk ); + CXString chk_text = clang_getCompletionChunkText( CompletionString, i_chunk ); + + // differenct kinds of chunks has various output formats + switch ( chk_kind ) + { + case CXCompletionChunk_Placeholder: + m_Session.m_Writer.Write( "<#%s#>", clang_getCString( chk_text ) ); + break; + + case CXCompletionChunk_ResultType: + m_Session.m_Writer.Write( "[#%s#]", clang_getCString( chk_text ) ); + break; + + case CXCompletionChunk_Optional: + // print optional term in a recursive way + m_Session.m_Writer.Write( "{#" ); + PrintAllCompletionTerms( clang_getCompletionChunkCompletionString( CompletionString, i_chunk ) ); + m_Session.m_Writer.Write( "#}" ); + break; + + default: + m_Session.m_Writer.Write( "%s", clang_getCString( chk_text ) ); + } + + clang_disposeString( chk_text ); + } +} + +void ClangSession::Completion::PrintCompletionLine( CXCompletionString CompletionString ) +{ + // print completion item head: COMPLETION: typed_string + if ( PrintCompletionHeadTerm( CompletionString ) ) + { + // If there's not only one TypedText chunk in this completion string, + // * we still have a lot of info to dump: + // * + // * COMPLETION: typed_text : ##infos## \n + m_Session.m_Writer.Write( " : " ); + + PrintAllCompletionTerms( CompletionString ); + + m_Session.m_Writer.Write( "\n" ); + } +} + +void ClangSession::Completion::PrintCompletionResults( CXCodeCompleteResults* CompleteResults ) +{ + const uint32_t results_limit = m_Session.m_Context.GetCompleteResultsLimit(); + const bool is_accept = results_limit ? ( CompleteResults->NumResults < results_limit ) : true; + + if ( !is_accept ) + { + m_Session.m_Writer.Write( "A number of completion results(%d) is threshold value(%d) over!!\n", CompleteResults->NumResults, results_limit ); + return; + } + + for ( uint32_t i = 0; i < CompleteResults->NumResults; ++i ) + { + PrintCompletionLine( CompleteResults->Results[ i ].CompletionString ); + } +} + +void ClangSession::Completion::PrintCompleteCandidates( void ) +{ + uint32_t line; + uint32_t column; + + m_Session.m_Reader.ReadToken( "line:%d", line ); + m_Session.m_Reader.ReadToken( "column:%d", column ); + + m_Session.ReadSourceCode(); + + CXUnsavedFile unsaved_file = m_Session.GetCXUnsavedFile(); + // necessary call? + // clang_reparseTranslationUnit( m_Session.m_CxTU, 1, &unsaved_file, m_Session.m_TranslationUnitFlags ); + CXCodeCompleteResults* results = clang_codeCompleteAt( m_Session.m_CxTU, m_Session.m_SessionName.c_str(), line, column, &unsaved_file, 1, m_Session.m_CompleteAtFlags ); + + if ( results ) + { + clang_sortCodeCompletionResults( results->Results, results->NumResults ); + + PrintCompletionResults( results ); + + clang_disposeCodeCompleteResults( results ); + } + + m_Session.m_Writer.Flush(); +} + + + +void ClangSession::Diagnostics::PrintDiagnosticsResult( void ) +{ + m_Session.ReadSourceCode(); + + CXUnsavedFile unsaved_file = m_Session.GetCXUnsavedFile(); + + clang_reparseTranslationUnit( m_Session.m_CxTU, 1, &unsaved_file, m_Session.m_TranslationUnitFlags ); + + const uint32_t n_diagnostics = clang_getNumDiagnostics( m_Session.m_CxTU ); + + for ( uint32_t i = 0; i < n_diagnostics; ++i ) + { + CXDiagnostic diagnostic = clang_getDiagnostic( m_Session.m_CxTU, i ); + CXString message = clang_formatDiagnostic( diagnostic, clang_defaultDiagnosticDisplayOptions() ); + + m_Session.m_Writer.Write( "%s\n", clang_getCString( message ) ); + + clang_disposeString( message ); + clang_disposeDiagnostic( diagnostic ); + } + + m_Session.m_Writer.Flush(); +} + + + +CXCursor ClangSession::Jump::GetCursor( const uint32_t Line, const uint32_t Column ) const +{ + const CXFile file = clang_getFile( m_Session.m_CxTU, m_Session.m_SessionName.c_str() ); + const CXSourceLocation location = clang_getLocation( m_Session.m_CxTU, file, Line, Column ); + const CXCursor cursor = clang_getCursor( m_Session.m_CxTU, location ); + + return cursor; +} + +void ClangSession::Jump::PrepareTransaction( uint32_t& Line, uint32_t& Column ) +{ + m_Session.m_Reader.ReadToken( "line:%d", Line ); + m_Session.m_Reader.ReadToken( "column:%d", Column ); + + m_Session.ReadSourceCode(); + + CXUnsavedFile unsaved_file = m_Session.GetCXUnsavedFile(); + + clang_reparseTranslationUnit( m_Session.m_CxTU, 1, &unsaved_file, m_Session.m_TranslationUnitFlags ); +} + + +bool ClangSession::Jump::EvaluateCursorLocation( const CXCursor& Cursor ) +{ + if ( clang_isInvalid( Cursor.kind ) ) + { + return ( false ); + } + + const CXSourceLocation dest_location = clang_getCursorLocation( Cursor ); + CXFile dest_file; + uint32_t dest_line; + uint32_t dest_column; + uint32_t dest_offset; + + clang_getExpansionLocation( dest_location, &dest_file, &dest_line, &dest_column, &dest_offset ); + + if ( !dest_file ) + { + return ( false ); + } + + const string normalize_path = ::GetNormalizePath( dest_file ); + + m_Location.m_NormalizePath = normalize_path; + m_Location.m_Line = dest_line; + m_Location.m_Column = dest_column; + + return ( true ); +} + + +bool ClangSession::Jump::EvaluateInclusionFileLocation( void ) +{ + uint32_t line; + uint32_t column; + + PrepareTransaction( line, column ); + + const CXCursor source_cursor = GetCursor( line, column ); + + if ( !clang_isInvalid( source_cursor.kind ) ) + { + if ( source_cursor.kind == CXCursor_InclusionDirective ) + { + const CXFile file = clang_getIncludedFile( source_cursor ); + + if ( file ) + { + const uint32_t file_line = 1; + const uint32_t file_column = 1; + const string normalize_path = ::GetNormalizePath( file ); + + m_Location.m_NormalizePath = normalize_path; + m_Location.m_Line = file_line; + m_Location.m_Column = file_column; + + return ( true ); + } + } + } + + return ( false ); +} + +bool ClangSession::Jump::EvaluateDefinitionLocation( void ) +{ + uint32_t line; + uint32_t column; + + PrepareTransaction( line, column ); + + const CXCursor source_cursor = GetCursor( line, column ); + + if ( !clang_isInvalid( source_cursor.kind ) ) + { + return EvaluateCursorLocation( clang_getCursorDefinition( source_cursor ) ); + } + + return ( false ); +} + +bool ClangSession::Jump::EvaluateDeclarationLocation( void ) +{ + uint32_t line; + uint32_t column; + + PrepareTransaction( line, column ); + + const CXCursor source_cursor = GetCursor( line, column ); + + if ( !clang_isInvalid( source_cursor.kind ) ) + { + return EvaluateCursorLocation( clang_getCursorReferenced( source_cursor ) ); + } + + return ( false ); +} + +bool ClangSession::Jump::EvaluateSmartJumpLocation( void ) +{ + uint32_t line; + uint32_t column; + + PrepareTransaction( line, column ); + + const CXCursor source_cursor = GetCursor( line, column ); + + if ( !clang_isInvalid( source_cursor.kind ) ) + { + if ( source_cursor.kind == CXCursor_InclusionDirective ) + { + const CXFile file = clang_getIncludedFile( source_cursor ); + + if ( file ) + { + const uint32_t file_line = 1; + const uint32_t file_column = 1; + const string normalize_path = ::GetNormalizePath( file ); + + m_Location.m_NormalizePath = normalize_path; + m_Location.m_Line = file_line; + m_Location.m_Column = file_column; + + return ( true ); + } + } + else + { + return ( EvaluateCursorLocation( clang_getCursorDefinition( source_cursor ) ) + || EvaluateCursorLocation( clang_getCursorReferenced( source_cursor ) ) ); + } + } + + return ( false ); +} + + +void ClangSession::Jump::PrintLocation( void ) +{ + m_Session.m_Writer.Write( "\"%s\" %d %d ", m_Location.m_NormalizePath.c_str(), m_Location.m_Line, m_Location.m_Column ); +} + + +void ClangSession::Jump::PrintInclusionFileLocation( void ) +{ + if ( EvaluateInclusionFileLocation() ) + { + PrintLocation(); + } + + m_Session.m_Writer.Flush(); +} + +void ClangSession::Jump::PrintDefinitionLocation( void ) +{ + if ( EvaluateDefinitionLocation() ) + { + PrintLocation(); + } + + m_Session.m_Writer.Flush(); +} + +void ClangSession::Jump::PrintDeclarationLocation( void ) +{ + if ( EvaluateDeclarationLocation() ) + { + PrintLocation(); + } + + m_Session.m_Writer.Flush(); +} + +void ClangSession::Jump::PrintSmartJumpLocation( void ) +{ + if ( EvaluateSmartJumpLocation() ) + { + PrintLocation(); + } + + m_Session.m_Writer.Flush(); +} + + + + +/*================================================================================================*/ +/* Global Class Method Definitions Section */ +/*================================================================================================*/ + + +ClangSession::ClangSession( const std::string& SessionName, const ClangContext& Context, StreamReader& Reader, StreamWriter& Writer ) + : + m_SessionName( SessionName ) + , m_Context( Context ) + , m_Reader( Reader ) + , m_Writer( Writer ) + , m_CxTU( nullptr ) + , m_TranslationUnitFlags( Context.GetTranslationUnitFlags() ) + , m_CompleteAtFlags( Context.GetCompleteAtFlags() ) +{ +} + + +ClangSession::~ClangSession( void ) +{ + Deallocate(); +} + + + +void ClangSession::ReadCFlags( void ) +{ + int32_t num_cflags; + + m_Reader.ReadToken( "num_cflags:%d", num_cflags ); + + vector< string > cflags; + + for ( int32_t i = 0; i < num_cflags; ++i ) + { + // CFLAGS's white space must be accept. + // a separator is '\n'. + cflags.push_back( m_Reader.ReadToken( "%[^\n]" ) ); + } + + m_CFlagsBuffer.Allocate( cflags ); +} + +void ClangSession::ReadSourceCode( void ) +{ + int32_t src_length; + + m_Reader.ReadToken( "source_length:%d", src_length ); + + m_CSourceCodeBuffer.Allocate( src_length ); + + m_Reader.Read( m_CSourceCodeBuffer.GetBuffer(), m_CSourceCodeBuffer.GetSize() ); +} + + + +void ClangSession::CreateTranslationUnit( void ) +{ + if ( m_CxTU ) + { + // clang parser already exist + return; + } + + CXUnsavedFile unsaved_file = GetCXUnsavedFile(); + + m_CxTU = clang_parseTranslationUnit( m_Context.GetCXIndex(), m_SessionName.c_str(), + static_cast< const char * const *>( m_CFlagsBuffer.GetCFlags() ), m_CFlagsBuffer.GetNumberOfCFlags(), + &unsaved_file, 1, m_TranslationUnitFlags ); + + clang_reparseTranslationUnit( m_CxTU, 1, &unsaved_file, m_TranslationUnitFlags ); +} + +void ClangSession::DeleteTranslationUnit( void ) +{ + if ( !m_CxTU ) + { + // clang parser not exist + return; + } + + clang_disposeTranslationUnit( m_CxTU ); + m_CxTU = nullptr; +} + + + +void ClangSession::Allocate( void ) +{ + ReadCFlags(); + ReadSourceCode(); + CreateTranslationUnit(); +} + +void ClangSession::Deallocate( void ) +{ + DeleteTranslationUnit(); +} + + +void ClangSession::commandSuspend( void ) +{ + DeleteTranslationUnit(); +} + +void ClangSession::commandResume( void ) +{ + CreateTranslationUnit(); +} + + +void ClangSession::commandSetCFlags( void ) +{ + DeleteTranslationUnit(); + ReadCFlags(); + ReadSourceCode(); + CreateTranslationUnit(); +} + + +void ClangSession::commandSetSourceCode( void ) +{ + ReadSourceCode(); +} + +void ClangSession::commandReparse( void ) +{ + if ( !m_CxTU ) + { + // clang parser not exist + return; + } + + CXUnsavedFile unsaved_file = GetCXUnsavedFile(); + + clang_reparseTranslationUnit( m_CxTU, 1, &unsaved_file, m_TranslationUnitFlags ); +} + + +void ClangSession::commandCompletion( void ) +{ + if ( !m_CxTU ) + { + // clang parser not exist + return; + } + + Completion printer( *this ); + + printer.PrintCompleteCandidates(); +} + + +void ClangSession::commandDiagnostics( void ) +{ + if ( !m_CxTU ) + { + // clang parser not exist + return; + } + + Diagnostics printer( *this ); + + printer.PrintDiagnosticsResult(); +} + + +void ClangSession::commandInclusion( void ) +{ + if ( !m_CxTU ) + { + // clang parser not exist + return; + } + + Jump printer( *this ); + + printer.PrintInclusionFileLocation(); +} + + +void ClangSession::commandDeclaration( void ) +{ + if ( !m_CxTU ) + { + // clang parser not exist + return; + } + + Jump printer( *this ); + + printer.PrintDeclarationLocation(); +} + + +void ClangSession::commandDefinition( void ) +{ + if ( !m_CxTU ) + { + // clang parser not exist + return; + } + + Jump printer( *this ); + + printer.PrintDefinitionLocation(); +} + + +void ClangSession::commandSmartJump( void ) +{ + if ( !m_CxTU ) + { + // clang parser not exist + return; + } + + Jump printer( *this ); + + printer.PrintSmartJumpLocation(); +} + + + + + +/*================================================================================================*/ +/* EOF */ +/*================================================================================================*/ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangSession.hpp b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangSession.hpp new file mode 100644 index 0000000..4a3e889 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/ClangSession.hpp @@ -0,0 +1,133 @@ +/* -*- mode: c++ ; coding: utf-8-unix -*- */ +/* last updated : 2015/07/25.00:55:41 */ + +/* + * Copyright (c) 2013-2015 yaruopooner [https://github.com/yaruopooner] + * + * This file is part of ac-clang. + * + * 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 . + */ + + +#pragma once + +#ifndef __CLANG_SESSION_HPP__ +#define __CLANG_SESSION_HPP__ + + + + +/*================================================================================================*/ +/* Comment */ +/*================================================================================================*/ + + +/*================================================================================================*/ +/* Include Files */ +/*================================================================================================*/ + +#include "Common.hpp" + + +/*================================================================================================*/ +/* Global Class Method Definitions Section */ +/*================================================================================================*/ + + + +class ClangSession +{ +public: + ClangSession( const std::string& SessionName, const ClangContext& Context, StreamReader& Reader, StreamWriter& Writer ); + virtual ~ClangSession( void ); + + + void Allocate( void ); + void Deallocate( void ); + + + // const CFlagsBuffer& GetCFlagsBuffer( void ) const + // { + // return ( m_CFlagsBuffer ); + // } + // CFlagsBuffer& GetCFlagsBuffer( void ) + // { + // return ( m_CFlagsBuffer ); + // } + + + // commands + void commandSuspend( void ); + void commandResume( void ); + void commandSetCFlags( void ); + void commandSetSourceCode( void ); + void commandReparse( void ); + void commandCompletion( void ); + void commandDiagnostics( void ); + void commandInclusion( void ); + void commandDeclaration( void ); + void commandDefinition( void ); + void commandSmartJump( void ); + + +private: + CXUnsavedFile GetCXUnsavedFile( void ) const + { + CXUnsavedFile unsaved_file; + + unsaved_file.Filename = m_SessionName.c_str(); + unsaved_file.Contents = m_CSourceCodeBuffer.GetBuffer(); + unsaved_file.Length = m_CSourceCodeBuffer.GetSize(); + + return ( unsaved_file ); + } + + void ReadCFlags( void ); + void ReadSourceCode( void ); + + void CreateTranslationUnit( void ); + void DeleteTranslationUnit( void ); + + + // internal printer classes + class Completion; + class Diagnostics; + class Jump; + + +private: + const std::string m_SessionName; + const ClangContext& m_Context; + StreamReader& m_Reader; + StreamWriter& m_Writer; + + // clang parser object + CXTranslationUnit m_CxTU; + + // clang parser options + uint32_t m_TranslationUnitFlags; + uint32_t m_CompleteAtFlags; + + CFlagsBuffer m_CFlagsBuffer; + CSourceCodeBuffer m_CSourceCodeBuffer; +}; + + + + +#endif // __CLANG_SESSION_HPP__ +/*================================================================================================*/ +/* EOF */ +/*================================================================================================*/ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/CommandLine.hpp b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/CommandLine.hpp new file mode 100644 index 0000000..15d1973 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/CommandLine.hpp @@ -0,0 +1,607 @@ +/* -*- mode: c++ ; coding: utf-8-unix -*- */ +/* last updated : 2015/05/23.23:17:32 */ + +/* + * Copyright (c) 2013-2015 yaruopooner [https://github.com/yaruopooner] + * + * This file is part of ac-clang. + * + * 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 . + */ + + +#pragma once + +#ifndef __COMMAND_LINE_HPP__ +#define __COMMAND_LINE_HPP__ + + +/*================================================================================================*/ +/* Include Files */ +/*================================================================================================*/ + +#include +#include +#include +#include +#include +#include + + +/*================================================================================================*/ +/* Class */ +/*================================================================================================*/ + + +namespace CommandLine +{ + + +template< typename Target, typename Source > +struct lexical_cast_imp +{ + static Target cast( const Source& value ) + { + Target result; + std::stringstream interpreter; + + if ( !( interpreter << value ) || !( interpreter >> result ) || !( interpreter >> std::ws ).eof() ) + { + throw std::invalid_argument( "value cast failure." ); + } + + return result; + } +}; + +template< typename Source > +struct lexical_cast_imp< Source, Source > +{ + static Source cast( const Source& value ) + { + return value; + } +}; + +template< typename Target, typename Source > +static Target lexical_cast( const Source& value ) +{ + return lexical_cast_imp< Target, Source >::cast( value ); +} + + +template< typename T > +struct DefaultReader +{ + virtual ~DefaultReader( void ) + { + } + virtual T operator ()( const std::string& argument ) const + { + return lexical_cast< T >( argument ); + } +}; + +template< typename T > +class RangeReader : public DefaultReader< T > +{ +public: + RangeReader( T min, T max ) : + m_Min( min ) + , m_Max( max ) + { + } + + virtual T operator ()( const std::string& argument ) const override + { + const T value = lexical_cast< T >( argument ); + + if ( ( value < m_Min ) || ( m_Max < value ) ) + { + throw std::domain_error( "value is out of range : " + argument ); + } + + return value; + } + + T m_Min; + T m_Max; +}; + + +class IOptionWithValue; +template< typename T, typename Reader > +class OptionWithValueWithReader; + + +class IOptionDetail +{ +protected: + virtual ~IOptionDetail() + { + } + +public: + enum Flag + { + kFlag_Once = 1 << 0, + kFlag_HasValue = 1 << 1, + kFlag_RequireValue = 1 << 2, + }; + + virtual int32_t GetId( void ) const = 0; + virtual const std::string& GetName( void ) const = 0; + virtual const std::string& GetShortName( void ) const = 0; + virtual const std::string& GetDescription( void ) const = 0; + virtual bool HasFlag( uint32_t flag ) const = 0; + virtual const std::string& GetValueDescription( void ) const = 0; + + virtual bool IsSameName( const std::string& name ) const = 0; + + virtual std::shared_ptr< IOptionWithValue > CreateEvaluator( const std::string& argument ) const = 0; +}; + + + +template< typename T, typename Reader = DefaultReader< T > > +class OptionDetail : public IOptionDetail +{ +public: + OptionDetail( int32_t id, const std::string& name, const std::string& shortName, const std::string& description, uint32_t flags = 0, const std::string& valueDescription = std::string(), const Reader& reader = Reader() ) : + m_Id( id ) + , m_Name( "--" + name ) + , m_ShortName( "-" + shortName ) + , m_Description( description ) + , m_Flags( flags ) + , m_ValueDescription( valueDescription ) + , m_Reader( reader ) + { + } + virtual ~OptionDetail() + { + } + + int32_t GetId( void ) const final + { + return m_Id; + } + const std::string& GetName( void ) const final + { + return m_Name; + } + const std::string& GetShortName( void ) const final + { + return m_ShortName; + } + const std::string& GetDescription( void ) const final + { + return m_Description; + } + bool HasFlag( uint32_t flag ) const final + { + return ( m_Flags & flag ) ? true : false; + } + const std::string& GetValueDescription( void ) const final + { + return m_ValueDescription; + } + + bool IsSameName( const std::string& name ) const final + { + return ( ( m_Name == name ) || ( m_ShortName == name ) ); + } + + std::shared_ptr< IOptionWithValue > CreateEvaluator( const std::string& argument ) const override + { + return std::make_shared< OptionWithValueWithReader< T, Reader > >( this, argument ); + } + + T GetValue( const std::string& argument ) const + { + return m_Reader( argument ); + } + + +protected: + const int32_t m_Id; + const std::string m_Name; + const std::string m_ShortName; + const std::string m_Description; + const uint32_t m_Flags; + const std::string m_ValueDescription; + const Reader m_Reader; +}; + + + +class IOptionWithValue +{ +protected: + virtual ~IOptionWithValue( void ) + { + } + +public: + virtual const IOptionDetail* GetDetail( void ) const = 0; + virtual uint32_t GetId( void ) const = 0; + virtual const std::string& GetOptionName( void ) const = 0; + virtual bool IsValid( void ) const = 0; + virtual bool Evaluate( std::string& message ) = 0; +}; + + +template< typename T > +class OptionWithValue : public IOptionWithValue +{ +protected: + OptionWithValue( const IOptionDetail* detail, const std::string& argument ) : + m_Detail( detail ) + , m_Argument( argument ) + , m_ValidValue( false ) + { + } + +public: + virtual ~OptionWithValue( void ) + { + } + + const IOptionDetail* GetDetail( void ) const final + { + return m_Detail; + } + + uint32_t GetId( void ) const final + { + return m_Detail->GetId(); + } + + const std::string& GetOptionName( void ) const final + { + return m_Detail->GetName(); + } + + bool IsValid( void ) const final + { + return m_ValidValue; + } + + virtual bool Evaluate( std::string& message ) override + { + return true; + } + + const T& GetValue( void ) const + { + return m_Value; + } + +protected: + const IOptionDetail* m_Detail; + const std::string m_Argument; + bool m_ValidValue; + T m_Value; +}; + + +template< typename T, typename Reader > +class OptionWithValueWithReader : public OptionWithValue< T > +{ +public: + OptionWithValueWithReader( const IOptionDetail* detail, const std::string& argument ) : + OptionWithValue< T >( detail, argument ) + { + } + virtual ~OptionWithValueWithReader( void ) + { + } + + bool Evaluate( std::string& message ) override + { + try + { + if ( !this->m_Argument.empty() ) + { + const auto* detail = dynamic_cast< const OptionDetail< T, Reader >* >( this->m_Detail ); + + this->m_Value = detail->GetValue( this->m_Argument ); + this->m_ValidValue = true; + } + + return true; + } + catch ( const std::exception& exception ) + { + std::stringstream ss; + + ss << this->m_Detail->GetName() << " : " << exception.what() << std::endl; + ss << this->m_Detail->GetDescription(); + message = ss.str(); + + return false; + } + } +}; + + + +typedef std::vector< std::shared_ptr< IOptionDetail > > OptionDetailArray; +typedef std::vector< std::shared_ptr< IOptionWithValue > > OptionWithValueArray; + +class Parser +{ +public: + + void AddOption( int32_t id, const std::string& name, const std::string& shortName, const std::string& description, uint32_t flags = 0, const std::string& valueDescription = std::string() ) + { + m_Details.push_back( std::make_shared< OptionDetail< std::string > >( id, name, shortName, description, flags, valueDescription ) ); + } + + template< typename T, typename Reader = DefaultReader< T > > + void AddOption( int32_t id, const std::string& name, const std::string& shortName, const std::string& description, uint32_t flags = 0, const std::string& valueDescription = std::string(), const Reader& reader = Reader() ) + { + m_Details.push_back( std::make_shared< OptionDetail< T, Reader > >( id, name, shortName, description, flags, valueDescription, reader ) ); + } + + size_t GetNumberOfOptionValues( void ) const + { + return m_OptionValues.size(); + } + + size_t GetNumberOfArguments( void ) const + { + return m_Arguments.size(); + } + + static const std::string& GetOptionName( const IOptionWithValue* value ) + { + return value->GetDetail()->GetName(); + } + + template< typename T > + static const T& GetValue( const std::shared_ptr< IOptionWithValue >& value ) + { + const auto* casted_value = dynamic_cast< const OptionWithValue< T >* >( value.get() ); + + return casted_value->GetValue(); + } + + const OptionDetailArray& GetOptionDetailArray( void ) const + { + return m_Details; + } + const OptionWithValueArray& GetOptionWithValueArray( void ) const + { + return m_OptionValues; + } + + bool Parse( int argc, char* argv[] ) + { + // clear & store + m_Arguments.clear(); + for ( int i = 1; i < argc; ++i ) + { + m_Arguments.push_back( argv[ i ] ); + } + + // parse + const size_t n_args = m_Arguments.size(); + + for ( size_t i = 0; i < n_args; ++i ) + { + const std::string& option_name = m_Arguments[ i ]; + + if ( !HasOptionPrefix( option_name ) ) + { + // error, argument is not option format + // ignore + m_Errors.push_back( "option syntax error : argument is not option format : " + option_name ); + continue; + } + + bool is_match = false; + bool is_valid_format = false; + std::string value; + + for ( const auto detail : m_Details ) + { + if ( !detail->IsSameName( option_name ) ) + { + continue; + } + + is_match = true; + + // found + if ( detail->HasFlag( IOptionDetail::kFlag_HasValue ) ) + { + const size_t next_i = i + 1; + + if ( detail->HasFlag( IOptionDetail::kFlag_RequireValue ) ) + { + if ( n_args <= next_i ) + { + // error, argument locator over + m_Errors.push_back( "option syntax error : not enough argument : " + option_name ); + break; + } + + const std::string& next_value = m_Arguments[ next_i ]; + + if ( HasOptionPrefix( next_value ) ) + { + // option have not value + m_Errors.push_back( "option syntax error : value not found : " + option_name ); + break; + } + + value = m_Arguments[ next_i ]; + i = next_i; + } + else + { + if ( next_i < n_args ) + { + const std::string& next_value = m_Arguments[ next_i ]; + + if ( !HasOptionPrefix( next_value ) ) + { + // option have not value + value = m_Arguments[ next_i ]; + i = next_i; + } + } + else + { + // not value, option only + } + } + } + + // store found detal & value + m_OptionValues.push_back( detail->CreateEvaluator( value ) ); + + is_valid_format = true; + break; + } + + if ( !is_match ) + { + // unknown option + m_Warnings.push_back( "unknown option : " + option_name ); + + // value check + const size_t next_i = i + 1; + + if ( next_i < n_args ) + { + const std::string& next_value = m_Arguments[ next_i ]; + + if ( !HasOptionPrefix( next_value ) ) + { + // discard unknown option value + i = next_i; + } + } + } + else if ( !is_valid_format ) + { + // illegal option format + m_Errors.push_back( "option syntax error : illegal option format : " + option_name ); + } + } + + std::set< const IOptionDetail* > used_options; + + for ( auto& option_value : m_OptionValues ) + { + const IOptionDetail* detal = option_value->GetDetail(); + const bool found = ( used_options.find( detal ) != used_options.end() ); + + if ( !found ) + { + // first use + used_options.insert( detal ); + } + + if ( found && detal->HasFlag( IOptionDetail::kFlag_Once ) ) + { + // duplicate use + m_Errors.push_back( "option syntax error : duplicate use : " + detal->GetName() ); + continue; + } + + std::string message; + + if ( !option_value->Evaluate( message ) ) + { + m_Errors.push_back( message ); + // bad value + } + } + + return ( m_Errors.size() == 0 ); + } + + void PrintUsage( const std::string& format ) const + { + std::cout << "Usage: " << format <GetName(); + if ( !detail->GetShortName().empty() ) + { + std::cout << ", " << detail->GetShortName(); + } + if ( !detail->GetValueDescription().empty() ) + { + std::cout << " <" << detail->GetValueDescription() << ">"; + } + std::cout << std::endl; + std::cout << " " << detail->GetDescription() << std::endl; + } + } + + void PrintErrors( void ) const + { + if ( !m_Errors.empty() ) + { + std::cout << "Error:" << std::endl; + for ( const auto& error : m_Errors ) + { + std::cout << error << std::endl; + } + } + } + + void PrintWarnings( void ) const + { + if ( !m_Warnings.empty() ) + { + std::cout << "Warning:" << std::endl; + for ( const auto& warning : m_Warnings ) + { + std::cout << warning << std::endl; + } + } + } + +private: + static bool HasOptionPrefix( const std::string& name ) + { + return ( ( name.compare( 0, 2, "--" ) == 0 ) || ( name.compare( 0, 1, "-" ) == 0 ) ); + } + + +private: + OptionDetailArray m_Details; + std::vector< std::string > m_Arguments; + std::vector< std::string > m_Errors; + std::vector< std::string > m_Warnings; + OptionWithValueArray m_OptionValues; +}; + + + + +}; + + + +#endif +/*================================================================================================*/ +/* EOF */ +/*================================================================================================*/ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/Common.cpp b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/Common.cpp new file mode 100644 index 0000000..d2bcc7f --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/Common.cpp @@ -0,0 +1,284 @@ +/* -*- mode: c++ ; coding: utf-8-unix -*- */ +/* last updated : 2015/03/25.01:38:16 */ + +/* + * Copyright (c) 2013-2015 yaruopooner [https://github.com/yaruopooner] + * + * This file is part of ac-clang. + * + * 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 . + */ + + +/*================================================================================================*/ +/* Comment */ +/*================================================================================================*/ + + +/*================================================================================================*/ +/* Include Files */ +/*================================================================================================*/ + +#include +#include + +#include "Common.hpp" + + +using namespace std; + + +FlagConverter ClangFlagConverters::sm_CXTranslationUnitFlags; +FlagConverter ClangFlagConverters::sm_CXCodeCompleteFlags; + + + +/*================================================================================================*/ +/* Global Class Method Definitions Section */ +/*================================================================================================*/ + + + +StreamReader::StreamReader( void ) + : + m_File( stdin ) +{ + ClearLine(); +} + +StreamReader::~StreamReader( void ) +{ +} + + +void StreamReader::ClearLine( void ) +{ + ::memset( m_Line, 0, kLineMax ); +} + + +void StreamReader::StepNextLine( void ) +{ + char crlf[ kLineMax ]; + ::fgets( crlf, kLineMax, m_File ); +} + +const char* StreamReader::ReadToken( const char* Format, bool bStepNextLine ) +{ + ClearLine(); + + const int32_t result = ::fscanf( m_File, Format, m_Line ); + (void) result; + + if ( bStepNextLine ) + { + StepNextLine(); + } + + return ( m_Line ); +} + +void StreamReader::Read( char* Buffer, size_t ReadSize ) +{ + const size_t stored_size = ::fread( Buffer, 1, ReadSize, m_File ); + + if ( (stored_size < ReadSize) || ::feof( m_File ) ) + { + // error + } +} + + +StreamWriter::StreamWriter( void ) + : + m_File( stdout ) +{ +} + +StreamWriter::~StreamWriter( void ) +{ +} + + +void StreamWriter::Write( const char* Format, ... ) +{ + va_list args; + va_start( args, Format ); + + ::vfprintf( m_File, Format, args ); + + va_end( args ); +} + +void StreamWriter::Flush( void ) +{ + ::fprintf( m_File, "$" ); + ::fflush( m_File ); +} + + + + +CFlagsBuffer::CFlagsBuffer( void ) + : + m_NumberOfCFlags( 0 ) + , m_CFlags( nullptr ) +{ +} + + +CFlagsBuffer::~CFlagsBuffer( void ) +{ + Deallocate(); +} + + +void CFlagsBuffer::Allocate( const std::vector< std::string >& Args ) +{ + Deallocate(); + + m_NumberOfCFlags = static_cast< int32_t >( Args.size() ); + m_CFlags = reinterpret_cast< char** >( ::calloc( sizeof( char* ), m_NumberOfCFlags ) ); + + for ( int32_t i = 0; i < m_NumberOfCFlags; ++i ) + { + m_CFlags[ i ] = reinterpret_cast< char* >( ::calloc( sizeof( char ), Args[ i ].length() + 1 ) ); + + ::strcpy( m_CFlags[ i ], Args[ i ].c_str() ); + } +} + +void CFlagsBuffer::Deallocate( void ) +{ + if ( !m_CFlags ) + { + return; + } + + for ( int32_t i = 0; i < m_NumberOfCFlags; ++i ) + { + ::free( m_CFlags[ i ] ); + } + ::free( m_CFlags ); + + m_CFlags = nullptr; + m_NumberOfCFlags = 0; +} + + +CSourceCodeBuffer::CSourceCodeBuffer( void ) + : + m_Size( 0 ) + , m_BufferCapacity( 0 ) + , m_Buffer( nullptr ) +{ +} + +CSourceCodeBuffer::~CSourceCodeBuffer( void ) +{ + Deallocate(); +} + + +void CSourceCodeBuffer::Allocate( int32_t Size ) +{ + m_Size = Size; + + if ( m_Size >= m_BufferCapacity ) + { + const int32_t extend_size = std::max( m_Size * 2, static_cast< int32_t >( kInitialSrcBufferSize ) ); + char* extend_buffer = reinterpret_cast< char* >( ::realloc( m_Buffer, extend_size ) ); + + if ( extend_buffer ) + { + m_BufferCapacity = extend_size; + m_Buffer = extend_buffer; + } + else + { + // error + } + } +} + +void CSourceCodeBuffer::Deallocate( void ) +{ + if ( m_Buffer ) + { + ::free( m_Buffer ); + m_Buffer = nullptr; + } + + m_Size = 0; +} + + + +ClangContext::ClangContext( bool excludeDeclarationsFromPCH ) + : + m_CxIndex( nullptr ) + , m_ExcludeDeclarationsFromPCH( excludeDeclarationsFromPCH ) + , m_TranslationUnitFlags( CXTranslationUnit_PrecompiledPreamble ) + , m_CompleteAtFlags( CXCodeComplete_IncludeMacros ) + , m_CompleteResultsLimit( 0 ) +{ + Allocate(); +} + +ClangContext::~ClangContext( void ) +{ + Deallocate(); +} + + +void ClangContext::Allocate( void ) +{ + m_CxIndex = clang_createIndex( m_ExcludeDeclarationsFromPCH, 0 ); +} + +void ClangContext::Deallocate( void ) +{ + if ( m_CxIndex ) + { + clang_disposeIndex( m_CxIndex ); + m_CxIndex = nullptr; + } +} + + + + +ClangFlagConverters::ClangFlagConverters( void ) +{ + sm_CXTranslationUnitFlags.Add( FLAG_DETAILS( CXTranslationUnit_DetailedPreprocessingRecord ) ); + sm_CXTranslationUnitFlags.Add( FLAG_DETAILS( CXTranslationUnit_Incomplete ) ); + sm_CXTranslationUnitFlags.Add( FLAG_DETAILS( CXTranslationUnit_PrecompiledPreamble ) ); + sm_CXTranslationUnitFlags.Add( FLAG_DETAILS( CXTranslationUnit_CacheCompletionResults ) ); + sm_CXTranslationUnitFlags.Add( FLAG_DETAILS( CXTranslationUnit_ForSerialization ) ); + sm_CXTranslationUnitFlags.Add( FLAG_DETAILS( CXTranslationUnit_CXXChainedPCH ) ); + sm_CXTranslationUnitFlags.Add( FLAG_DETAILS( CXTranslationUnit_SkipFunctionBodies ) ); + sm_CXTranslationUnitFlags.Add( FLAG_DETAILS( CXTranslationUnit_IncludeBriefCommentsInCodeCompletion ) ); + + sm_CXCodeCompleteFlags.Add( FLAG_DETAILS( CXCodeComplete_IncludeMacros ) ); + sm_CXCodeCompleteFlags.Add( FLAG_DETAILS( CXCodeComplete_IncludeCodePatterns ) ); + sm_CXCodeCompleteFlags.Add( FLAG_DETAILS( CXCodeComplete_IncludeBriefComments ) ); +} + + + + + +/*================================================================================================*/ +/* EOF */ +/*================================================================================================*/ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/Common.hpp b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/Common.hpp new file mode 100644 index 0000000..f212be0 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/Common.hpp @@ -0,0 +1,371 @@ +/* -*- mode: c++ ; coding: utf-8-unix -*- */ +/* last updated : 2015/03/25.01:38:00 */ + +/* + * Copyright (c) 2013-2015 yaruopooner [https://github.com/yaruopooner] + * + * This file is part of ac-clang. + * + * 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 . + */ + + +#pragma once + +#ifndef __COMMON_HPP__ +#define __COMMON_HPP__ + + + + +/*================================================================================================*/ +/* Comment */ +/*================================================================================================*/ + + +/*================================================================================================*/ +/* Include Files */ +/*================================================================================================*/ + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "clang-c/Index.h" + + + +/*================================================================================================*/ +/* Class */ +/*================================================================================================*/ + + + + +class StreamReader +{ +public: + StreamReader( void ); + virtual ~StreamReader( void ); + + template< typename T > + void ReadToken( const char* Format, T& Value, bool bStepNextLine = true ) + { + ClearLine(); + ::fscanf( m_File, Format, &Value ); + if ( bStepNextLine ) + { + StepNextLine(); + } + } + + const char* ReadToken( const char* Format, bool bStepNextLine = true ); + + void Read( char* Buffer, size_t ReadSize ); + +private: + void ClearLine( void ); + void StepNextLine( void ); + +private: + enum + { + kLineMax = 2048, + }; + + FILE* m_File; + char m_Line[ kLineMax ]; +}; + + +class StreamWriter +{ +public: + StreamWriter( void ); + virtual ~StreamWriter( void ); + + void Write( const char* Format, ... ); + void Flush( void ); + +private: + FILE* m_File; +}; + + + +class CFlagsBuffer +{ +public: + CFlagsBuffer( void ); + virtual ~CFlagsBuffer( void ); + + void Allocate( const std::vector< std::string >& CFlags ); + void Deallocate( void ); + + int32_t GetNumberOfCFlags( void ) const + { + return ( m_NumberOfCFlags ); + } + char** GetCFlags( void ) const + { + return ( m_CFlags ); + } + +private: + int32_t m_NumberOfCFlags; + char** m_CFlags; +}; + + +class CSourceCodeBuffer +{ +public: + CSourceCodeBuffer( void ); + virtual ~CSourceCodeBuffer( void ); + + void Allocate( int32_t Size ); + void Deallocate( void ); + + int32_t GetSize( void ) const + { + return ( m_Size ); + } + char* GetBuffer( void ) const + { + return ( m_Buffer ); + } + +private: + enum + { + kInitialSrcBufferSize = 4096, + }; + + int32_t m_Size; + int32_t m_BufferCapacity; + char* m_Buffer; +}; + + + +class ClangContext +{ +public: + ClangContext( bool excludeDeclarationsFromPCH = false ); + virtual ~ClangContext( void ); + + void Allocate( void ); + void Deallocate( void ); + + const CXIndex GetCXIndex( void ) const + { + return ( m_CxIndex ); + } + CXIndex GetCXIndex( void ) + { + return ( m_CxIndex ); + } + + void SetTranslationUnitFlags( uint32_t Flags ) + { + m_TranslationUnitFlags = Flags; + } + uint32_t GetTranslationUnitFlags( void ) const + { + return ( m_TranslationUnitFlags ); + } + + void SetCompleteAtFlags( uint32_t Flags ) + { + m_CompleteAtFlags = Flags; + } + uint32_t GetCompleteAtFlags( void ) const + { + return ( m_CompleteAtFlags ); + } + + void SetCompleteResultsLimit( uint32_t NumberOfLimit ) + { + m_CompleteResultsLimit = NumberOfLimit; + } + uint32_t GetCompleteResultsLimit( void ) const + { + return ( m_CompleteResultsLimit ); + } + + +private: + CXIndex m_CxIndex; + + bool m_ExcludeDeclarationsFromPCH; + uint32_t m_TranslationUnitFlags; + uint32_t m_CompleteAtFlags; + uint32_t m_CompleteResultsLimit; +}; + + + + +template< uint32_t Value > +struct BitField +{ + enum + { + kValue = Value, + kIndex = BitField< (Value >> 1) >::kIndex + 1, + }; +}; + +template<> +struct BitField< 0 > +{ + enum + { + kValue = 0, + kIndex = -1, + }; +}; + + + +class FlagConverter +{ +public: + typedef std::tuple< const char*, uint32_t > Details; + + + enum + { + kMaxValues = 32, + }; + + + FlagConverter( void ) : + m_MaxValue( 0 ) + { + } + virtual ~FlagConverter( void ) + { + } + + void Clear( void ) + { + m_MaxValue = 0; + } + + + void Add( const Details& Values ) + { + Add( std::get< 0 >( Values ), std::get< 1 >( Values ) ); + } + + void Add( const char* Name, uint32_t BitIndex ) + { + assert( Name ); + assert( BitIndex < kMaxValues ); + + m_FlagNames[ BitIndex ] = Name; + m_MaxValue = std::max( m_MaxValue, (BitIndex + 1) ); + } + + uint32_t GetValue( const std::string& Names ) const + { + return ( GetValue( Names.c_str() ) ); + } + + uint32_t GetValue( const char* Names ) const + { + if ( !Names ) + { + return ( 0 ); + } + + std::string names( Names ); + const char* delimit = "|"; + + if ( *(names.rbegin()) != *delimit ) + { + names += delimit; + } + + uint32_t value = 0; + size_t begin = 0; + size_t end = names.find_first_of( delimit ); + + while ( end != std::string::npos ) + { + const size_t length = end - begin; + const std::string name = names.substr( begin, length ); + + for ( size_t i = 0; i < m_MaxValue; ++i ) + { + if ( m_FlagNames[ i ] == name ) + { + value |= (1 << i); + break; + } + } + + begin = end + 1; + end = names.find_first_of( delimit, begin ); + } + + return ( value ); + } + +private: + std::string m_FlagNames[ kMaxValues ]; + uint32_t m_MaxValue; +}; + + +#define FLAG_DETAILS( _FLAG_NAME ) FlagConverter::Details( #_FLAG_NAME, BitField< _FLAG_NAME >::kIndex ) + + + + +class ClangFlagConverters +{ +public: + ClangFlagConverters( void ); + + + static const FlagConverter& GetCXTranslationUnitFlags( void ) + { + return ( sm_CXTranslationUnitFlags ); + } + static const FlagConverter& GetCXCodeCompleteFlags( void ) + { + return ( sm_CXCodeCompleteFlags ); + } + +private: + static FlagConverter sm_CXTranslationUnitFlags; + static FlagConverter sm_CXCodeCompleteFlags; +}; + + + + + +#endif // __COMMON_HPP__ +/*================================================================================================*/ +/* EOF */ +/*================================================================================================*/ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/changes.org b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/changes.org new file mode 100755 index 0000000..b144459 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/changes.org @@ -0,0 +1,32 @@ +# -*- mode: org ; coding: utf-8-unix -*- +# last updated : 2015/09/05.04:13:32 + + +#+TITLE: clang-server Changes Log +#+AUTHOR: yaruopooner +#+EMAIL: [https://github.com/yaruopooner] +#+OPTIONS: author:nil timestamp:t |:t \n:t ^:nil + + +* 1.4.0 + - Clang-3.7.0 support + +* 1.3.0 + - Added new feature. Jump to inclusion file. return from jumped location. + - Bugfix + +* 1.2.1 + - Fix compile error in clang. + +* 1.2.0 + - Access specifier of completion candidate support. + +* 1.1.1 + - Clang-3.6.1 support + - Bugfix + +* 1.1.0 + - Clang-3.6.0 support + +* 1.0.0 + - Clang-3.5.0 support diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/BuildSystem.h b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/BuildSystem.h new file mode 100644 index 0000000..8d323a4 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/BuildSystem.h @@ -0,0 +1,156 @@ +/*==-- clang-c/BuildSystem.h - Utilities for use by build systems -*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides various utilities for use by build systems. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_CLANG_C_BUILDSYSTEM_H +#define LLVM_CLANG_C_BUILDSYSTEM_H + +#include "clang-c/Platform.h" +#include "clang-c/CXErrorCode.h" +#include "clang-c/CXString.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \defgroup BUILD_SYSTEM Build system utilities + * @{ + */ + +/** + * \brief Return the timestamp for use with Clang's + * \c -fbuild-session-timestamp= option. + */ +CINDEX_LINKAGE unsigned long long clang_getBuildSessionTimestamp(void); + +/** + * \brief Object encapsulating information about overlaying virtual + * file/directories over the real file system. + */ +typedef struct CXVirtualFileOverlayImpl *CXVirtualFileOverlay; + +/** + * \brief Create a \c CXVirtualFileOverlay object. + * Must be disposed with \c clang_VirtualFileOverlay_dispose(). + * + * \param options is reserved, always pass 0. + */ +CINDEX_LINKAGE CXVirtualFileOverlay +clang_VirtualFileOverlay_create(unsigned options); + +/** + * \brief Map an absolute virtual file path to an absolute real one. + * The virtual path must be canonicalized (not contain "."/".."). + * \returns 0 for success, non-zero to indicate an error. + */ +CINDEX_LINKAGE enum CXErrorCode +clang_VirtualFileOverlay_addFileMapping(CXVirtualFileOverlay, + const char *virtualPath, + const char *realPath); + +/** + * \brief Set the case sensitivity for the \c CXVirtualFileOverlay object. + * The \c CXVirtualFileOverlay object is case-sensitive by default, this + * option can be used to override the default. + * \returns 0 for success, non-zero to indicate an error. + */ +CINDEX_LINKAGE enum CXErrorCode +clang_VirtualFileOverlay_setCaseSensitivity(CXVirtualFileOverlay, + int caseSensitive); + +/** + * \brief Write out the \c CXVirtualFileOverlay object to a char buffer. + * + * \param options is reserved, always pass 0. + * \param out_buffer_ptr pointer to receive the buffer pointer, which should be + * disposed using \c clang_free(). + * \param out_buffer_size pointer to receive the buffer size. + * \returns 0 for success, non-zero to indicate an error. + */ +CINDEX_LINKAGE enum CXErrorCode +clang_VirtualFileOverlay_writeToBuffer(CXVirtualFileOverlay, unsigned options, + char **out_buffer_ptr, + unsigned *out_buffer_size); + +/** + * \brief free memory allocated by libclang, such as the buffer returned by + * \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer(). + * + * \param buffer memory pointer to free. + */ +CINDEX_LINKAGE void clang_free(void *buffer); + +/** + * \brief Dispose a \c CXVirtualFileOverlay object. + */ +CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay); + +/** + * \brief Object encapsulating information about a module.map file. + */ +typedef struct CXModuleMapDescriptorImpl *CXModuleMapDescriptor; + +/** + * \brief Create a \c CXModuleMapDescriptor object. + * Must be disposed with \c clang_ModuleMapDescriptor_dispose(). + * + * \param options is reserved, always pass 0. + */ +CINDEX_LINKAGE CXModuleMapDescriptor +clang_ModuleMapDescriptor_create(unsigned options); + +/** + * \brief Sets the framework module name that the module.map describes. + * \returns 0 for success, non-zero to indicate an error. + */ +CINDEX_LINKAGE enum CXErrorCode +clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor, + const char *name); + +/** + * \brief Sets the umbrealla header name that the module.map describes. + * \returns 0 for success, non-zero to indicate an error. + */ +CINDEX_LINKAGE enum CXErrorCode +clang_ModuleMapDescriptor_setUmbrellaHeader(CXModuleMapDescriptor, + const char *name); + +/** + * \brief Write out the \c CXModuleMapDescriptor object to a char buffer. + * + * \param options is reserved, always pass 0. + * \param out_buffer_ptr pointer to receive the buffer pointer, which should be + * disposed using \c clang_free(). + * \param out_buffer_size pointer to receive the buffer size. + * \returns 0 for success, non-zero to indicate an error. + */ +CINDEX_LINKAGE enum CXErrorCode +clang_ModuleMapDescriptor_writeToBuffer(CXModuleMapDescriptor, unsigned options, + char **out_buffer_ptr, + unsigned *out_buffer_size); + +/** + * \brief Dispose a \c CXModuleMapDescriptor object. + */ +CINDEX_LINKAGE void clang_ModuleMapDescriptor_dispose(CXModuleMapDescriptor); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* CLANG_C_BUILD_SYSTEM_H */ + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXCompilationDatabase.h b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXCompilationDatabase.h new file mode 100644 index 0000000..068a677 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXCompilationDatabase.h @@ -0,0 +1,170 @@ +/*===-- clang-c/CXCompilationDatabase.h - Compilation database ---*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides a public inferface to use CompilationDatabase without *| +|* the full Clang C++ API. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_CLANG_C_CXCOMPILATIONDATABASE_H +#define LLVM_CLANG_C_CXCOMPILATIONDATABASE_H + +#include "clang-c/Platform.h" +#include "clang-c/CXString.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup COMPILATIONDB CompilationDatabase functions + * \ingroup CINDEX + * + * @{ + */ + +/** + * A compilation database holds all information used to compile files in a + * project. For each file in the database, it can be queried for the working + * directory or the command line used for the compiler invocation. + * + * Must be freed by \c clang_CompilationDatabase_dispose + */ +typedef void * CXCompilationDatabase; + +/** + * \brief Contains the results of a search in the compilation database + * + * When searching for the compile command for a file, the compilation db can + * return several commands, as the file may have been compiled with + * different options in different places of the project. This choice of compile + * commands is wrapped in this opaque data structure. It must be freed by + * \c clang_CompileCommands_dispose. + */ +typedef void * CXCompileCommands; + +/** + * \brief Represents the command line invocation to compile a specific file. + */ +typedef void * CXCompileCommand; + +/** + * \brief Error codes for Compilation Database + */ +typedef enum { + /* + * \brief No error occurred + */ + CXCompilationDatabase_NoError = 0, + + /* + * \brief Database can not be loaded + */ + CXCompilationDatabase_CanNotLoadDatabase = 1 + +} CXCompilationDatabase_Error; + +/** + * \brief Creates a compilation database from the database found in directory + * buildDir. For example, CMake can output a compile_commands.json which can + * be used to build the database. + * + * It must be freed by \c clang_CompilationDatabase_dispose. + */ +CINDEX_LINKAGE CXCompilationDatabase +clang_CompilationDatabase_fromDirectory(const char *BuildDir, + CXCompilationDatabase_Error *ErrorCode); + +/** + * \brief Free the given compilation database + */ +CINDEX_LINKAGE void +clang_CompilationDatabase_dispose(CXCompilationDatabase); + +/** + * \brief Find the compile commands used for a file. The compile commands + * must be freed by \c clang_CompileCommands_dispose. + */ +CINDEX_LINKAGE CXCompileCommands +clang_CompilationDatabase_getCompileCommands(CXCompilationDatabase, + const char *CompleteFileName); + +/** + * \brief Get all the compile commands in the given compilation database. + */ +CINDEX_LINKAGE CXCompileCommands +clang_CompilationDatabase_getAllCompileCommands(CXCompilationDatabase); + +/** + * \brief Free the given CompileCommands + */ +CINDEX_LINKAGE void clang_CompileCommands_dispose(CXCompileCommands); + +/** + * \brief Get the number of CompileCommand we have for a file + */ +CINDEX_LINKAGE unsigned +clang_CompileCommands_getSize(CXCompileCommands); + +/** + * \brief Get the I'th CompileCommand for a file + * + * Note : 0 <= i < clang_CompileCommands_getSize(CXCompileCommands) + */ +CINDEX_LINKAGE CXCompileCommand +clang_CompileCommands_getCommand(CXCompileCommands, unsigned I); + +/** + * \brief Get the working directory where the CompileCommand was executed from + */ +CINDEX_LINKAGE CXString +clang_CompileCommand_getDirectory(CXCompileCommand); + +/** + * \brief Get the number of arguments in the compiler invocation. + * + */ +CINDEX_LINKAGE unsigned +clang_CompileCommand_getNumArgs(CXCompileCommand); + +/** + * \brief Get the I'th argument value in the compiler invocations + * + * Invariant : + * - argument 0 is the compiler executable + */ +CINDEX_LINKAGE CXString +clang_CompileCommand_getArg(CXCompileCommand, unsigned I); + +/** + * \brief Get the number of source mappings for the compiler invocation. + */ +CINDEX_LINKAGE unsigned +clang_CompileCommand_getNumMappedSources(CXCompileCommand); + +/** + * \brief Get the I'th mapped source path for the compiler invocation. + */ +CINDEX_LINKAGE CXString +clang_CompileCommand_getMappedSourcePath(CXCompileCommand, unsigned I); + +/** + * \brief Get the I'th mapped source content for the compiler invocation. + */ +CINDEX_LINKAGE CXString +clang_CompileCommand_getMappedSourceContent(CXCompileCommand, unsigned I); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif +#endif + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXErrorCode.h b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXErrorCode.h new file mode 100644 index 0000000..aff73b7 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXErrorCode.h @@ -0,0 +1,64 @@ +/*===-- clang-c/CXErrorCode.h - C Index Error Codes --------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides the CXErrorCode enumerators. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_CLANG_C_CXERRORCODE_H +#define LLVM_CLANG_C_CXERRORCODE_H + +#include "clang-c/Platform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \brief Error codes returned by libclang routines. + * + * Zero (\c CXError_Success) is the only error code indicating success. Other + * error codes, including not yet assigned non-zero values, indicate errors. + */ +enum CXErrorCode { + /** + * \brief No error. + */ + CXError_Success = 0, + + /** + * \brief A generic error code, no further details are available. + * + * Errors of this kind can get their own specific error codes in future + * libclang versions. + */ + CXError_Failure = 1, + + /** + * \brief libclang crashed while performing the requested operation. + */ + CXError_Crashed = 2, + + /** + * \brief The function detected that the arguments violate the function + * contract. + */ + CXError_InvalidArguments = 3, + + /** + * \brief An AST deserialization error has occurred. + */ + CXError_ASTReadError = 4 +}; + +#ifdef __cplusplus +} +#endif +#endif + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXString.h b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXString.h new file mode 100644 index 0000000..a649cdf --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/CXString.h @@ -0,0 +1,61 @@ +/*===-- clang-c/CXString.h - C Index strings --------------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides the interface to C Index strings. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_CLANG_C_CXSTRING_H +#define LLVM_CLANG_C_CXSTRING_H + +#include "clang-c/Platform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \defgroup CINDEX_STRING String manipulation routines + * \ingroup CINDEX + * + * @{ + */ + +/** + * \brief A character string. + * + * The \c CXString type is used to return strings from the interface when + * the ownership of that string might differ from one call to the next. + * Use \c clang_getCString() to retrieve the string data and, once finished + * with the string data, call \c clang_disposeString() to free the string. + */ +typedef struct { + const void *data; + unsigned private_flags; +} CXString; + +/** + * \brief Retrieve the character data associated with the given string. + */ +CINDEX_LINKAGE const char *clang_getCString(CXString string); + +/** + * \brief Free the given string. + */ +CINDEX_LINKAGE void clang_disposeString(CXString string); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif +#endif + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Documentation.h b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Documentation.h new file mode 100644 index 0000000..89373b1 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Documentation.h @@ -0,0 +1,554 @@ +/*==-- clang-c/Documentation.h - Utilities for comment processing -*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides a supplementary interface for inspecting *| +|* documentation comments. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_CLANG_C_DOCUMENTATION_H +#define LLVM_CLANG_C_DOCUMENTATION_H + +#include "clang-c/Index.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \defgroup CINDEX_COMMENT Comment introspection + * + * The routines in this group provide access to information in documentation + * comments. These facilities are distinct from the core and may be subject to + * their own schedule of stability and deprecation. + * + * @{ + */ + +/** + * \brief A parsed comment. + */ +typedef struct { + const void *ASTNode; + CXTranslationUnit TranslationUnit; +} CXComment; + +/** + * \brief Given a cursor that represents a documentable entity (e.g., + * declaration), return the associated parsed comment as a + * \c CXComment_FullComment AST node. + */ +CINDEX_LINKAGE CXComment clang_Cursor_getParsedComment(CXCursor C); + +/** + * \brief Describes the type of the comment AST node (\c CXComment). A comment + * node can be considered block content (e. g., paragraph), inline content + * (plain text) or neither (the root AST node). + */ +enum CXCommentKind { + /** + * \brief Null comment. No AST node is constructed at the requested location + * because there is no text or a syntax error. + */ + CXComment_Null = 0, + + /** + * \brief Plain text. Inline content. + */ + CXComment_Text = 1, + + /** + * \brief A command with word-like arguments that is considered inline content. + * + * For example: \\c command. + */ + CXComment_InlineCommand = 2, + + /** + * \brief HTML start tag with attributes (name-value pairs). Considered + * inline content. + * + * For example: + * \verbatim + *

+ * \endverbatim + */ + CXComment_HTMLStartTag = 3, + + /** + * \brief HTML end tag. Considered inline content. + * + * For example: + * \verbatim + * + * \endverbatim + */ + CXComment_HTMLEndTag = 4, + + /** + * \brief A paragraph, contains inline comment. The paragraph itself is + * block content. + */ + CXComment_Paragraph = 5, + + /** + * \brief A command that has zero or more word-like arguments (number of + * word-like arguments depends on command name) and a paragraph as an + * argument. Block command is block content. + * + * Paragraph argument is also a child of the block command. + * + * For example: \\brief has 0 word-like arguments and a paragraph argument. + * + * AST nodes of special kinds that parser knows about (e. g., \\param + * command) have their own node kinds. + */ + CXComment_BlockCommand = 6, + + /** + * \brief A \\param or \\arg command that describes the function parameter + * (name, passing direction, description). + * + * For example: \\param [in] ParamName description. + */ + CXComment_ParamCommand = 7, + + /** + * \brief A \\tparam command that describes a template parameter (name and + * description). + * + * For example: \\tparam T description. + */ + CXComment_TParamCommand = 8, + + /** + * \brief A verbatim block command (e. g., preformatted code). Verbatim + * block has an opening and a closing command and contains multiple lines of + * text (\c CXComment_VerbatimBlockLine child nodes). + * + * For example: + * \\verbatim + * aaa + * \\endverbatim + */ + CXComment_VerbatimBlockCommand = 9, + + /** + * \brief A line of text that is contained within a + * CXComment_VerbatimBlockCommand node. + */ + CXComment_VerbatimBlockLine = 10, + + /** + * \brief A verbatim line command. Verbatim line has an opening command, + * a single line of text (up to the newline after the opening command) and + * has no closing command. + */ + CXComment_VerbatimLine = 11, + + /** + * \brief A full comment attached to a declaration, contains block content. + */ + CXComment_FullComment = 12 +}; + +/** + * \brief The most appropriate rendering mode for an inline command, chosen on + * command semantics in Doxygen. + */ +enum CXCommentInlineCommandRenderKind { + /** + * \brief Command argument should be rendered in a normal font. + */ + CXCommentInlineCommandRenderKind_Normal, + + /** + * \brief Command argument should be rendered in a bold font. + */ + CXCommentInlineCommandRenderKind_Bold, + + /** + * \brief Command argument should be rendered in a monospaced font. + */ + CXCommentInlineCommandRenderKind_Monospaced, + + /** + * \brief Command argument should be rendered emphasized (typically italic + * font). + */ + CXCommentInlineCommandRenderKind_Emphasized +}; + +/** + * \brief Describes parameter passing direction for \\param or \\arg command. + */ +enum CXCommentParamPassDirection { + /** + * \brief The parameter is an input parameter. + */ + CXCommentParamPassDirection_In, + + /** + * \brief The parameter is an output parameter. + */ + CXCommentParamPassDirection_Out, + + /** + * \brief The parameter is an input and output parameter. + */ + CXCommentParamPassDirection_InOut +}; + +/** + * \param Comment AST node of any kind. + * + * \returns the type of the AST node. + */ +CINDEX_LINKAGE enum CXCommentKind clang_Comment_getKind(CXComment Comment); + +/** + * \param Comment AST node of any kind. + * + * \returns number of children of the AST node. + */ +CINDEX_LINKAGE unsigned clang_Comment_getNumChildren(CXComment Comment); + +/** + * \param Comment AST node of any kind. + * + * \param ChildIdx child index (zero-based). + * + * \returns the specified child of the AST node. + */ +CINDEX_LINKAGE +CXComment clang_Comment_getChild(CXComment Comment, unsigned ChildIdx); + +/** + * \brief A \c CXComment_Paragraph node is considered whitespace if it contains + * only \c CXComment_Text nodes that are empty or whitespace. + * + * Other AST nodes (except \c CXComment_Paragraph and \c CXComment_Text) are + * never considered whitespace. + * + * \returns non-zero if \c Comment is whitespace. + */ +CINDEX_LINKAGE unsigned clang_Comment_isWhitespace(CXComment Comment); + +/** + * \returns non-zero if \c Comment is inline content and has a newline + * immediately following it in the comment text. Newlines between paragraphs + * do not count. + */ +CINDEX_LINKAGE +unsigned clang_InlineContentComment_hasTrailingNewline(CXComment Comment); + +/** + * \param Comment a \c CXComment_Text AST node. + * + * \returns text contained in the AST node. + */ +CINDEX_LINKAGE CXString clang_TextComment_getText(CXComment Comment); + +/** + * \param Comment a \c CXComment_InlineCommand AST node. + * + * \returns name of the inline command. + */ +CINDEX_LINKAGE +CXString clang_InlineCommandComment_getCommandName(CXComment Comment); + +/** + * \param Comment a \c CXComment_InlineCommand AST node. + * + * \returns the most appropriate rendering mode, chosen on command + * semantics in Doxygen. + */ +CINDEX_LINKAGE enum CXCommentInlineCommandRenderKind +clang_InlineCommandComment_getRenderKind(CXComment Comment); + +/** + * \param Comment a \c CXComment_InlineCommand AST node. + * + * \returns number of command arguments. + */ +CINDEX_LINKAGE +unsigned clang_InlineCommandComment_getNumArgs(CXComment Comment); + +/** + * \param Comment a \c CXComment_InlineCommand AST node. + * + * \param ArgIdx argument index (zero-based). + * + * \returns text of the specified argument. + */ +CINDEX_LINKAGE +CXString clang_InlineCommandComment_getArgText(CXComment Comment, + unsigned ArgIdx); + +/** + * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST + * node. + * + * \returns HTML tag name. + */ +CINDEX_LINKAGE CXString clang_HTMLTagComment_getTagName(CXComment Comment); + +/** + * \param Comment a \c CXComment_HTMLStartTag AST node. + * + * \returns non-zero if tag is self-closing (for example, <br />). + */ +CINDEX_LINKAGE +unsigned clang_HTMLStartTagComment_isSelfClosing(CXComment Comment); + +/** + * \param Comment a \c CXComment_HTMLStartTag AST node. + * + * \returns number of attributes (name-value pairs) attached to the start tag. + */ +CINDEX_LINKAGE unsigned clang_HTMLStartTag_getNumAttrs(CXComment Comment); + +/** + * \param Comment a \c CXComment_HTMLStartTag AST node. + * + * \param AttrIdx attribute index (zero-based). + * + * \returns name of the specified attribute. + */ +CINDEX_LINKAGE +CXString clang_HTMLStartTag_getAttrName(CXComment Comment, unsigned AttrIdx); + +/** + * \param Comment a \c CXComment_HTMLStartTag AST node. + * + * \param AttrIdx attribute index (zero-based). + * + * \returns value of the specified attribute. + */ +CINDEX_LINKAGE +CXString clang_HTMLStartTag_getAttrValue(CXComment Comment, unsigned AttrIdx); + +/** + * \param Comment a \c CXComment_BlockCommand AST node. + * + * \returns name of the block command. + */ +CINDEX_LINKAGE +CXString clang_BlockCommandComment_getCommandName(CXComment Comment); + +/** + * \param Comment a \c CXComment_BlockCommand AST node. + * + * \returns number of word-like arguments. + */ +CINDEX_LINKAGE +unsigned clang_BlockCommandComment_getNumArgs(CXComment Comment); + +/** + * \param Comment a \c CXComment_BlockCommand AST node. + * + * \param ArgIdx argument index (zero-based). + * + * \returns text of the specified word-like argument. + */ +CINDEX_LINKAGE +CXString clang_BlockCommandComment_getArgText(CXComment Comment, + unsigned ArgIdx); + +/** + * \param Comment a \c CXComment_BlockCommand or + * \c CXComment_VerbatimBlockCommand AST node. + * + * \returns paragraph argument of the block command. + */ +CINDEX_LINKAGE +CXComment clang_BlockCommandComment_getParagraph(CXComment Comment); + +/** + * \param Comment a \c CXComment_ParamCommand AST node. + * + * \returns parameter name. + */ +CINDEX_LINKAGE +CXString clang_ParamCommandComment_getParamName(CXComment Comment); + +/** + * \param Comment a \c CXComment_ParamCommand AST node. + * + * \returns non-zero if the parameter that this AST node represents was found + * in the function prototype and \c clang_ParamCommandComment_getParamIndex + * function will return a meaningful value. + */ +CINDEX_LINKAGE +unsigned clang_ParamCommandComment_isParamIndexValid(CXComment Comment); + +/** + * \param Comment a \c CXComment_ParamCommand AST node. + * + * \returns zero-based parameter index in function prototype. + */ +CINDEX_LINKAGE +unsigned clang_ParamCommandComment_getParamIndex(CXComment Comment); + +/** + * \param Comment a \c CXComment_ParamCommand AST node. + * + * \returns non-zero if parameter passing direction was specified explicitly in + * the comment. + */ +CINDEX_LINKAGE +unsigned clang_ParamCommandComment_isDirectionExplicit(CXComment Comment); + +/** + * \param Comment a \c CXComment_ParamCommand AST node. + * + * \returns parameter passing direction. + */ +CINDEX_LINKAGE +enum CXCommentParamPassDirection clang_ParamCommandComment_getDirection( + CXComment Comment); + +/** + * \param Comment a \c CXComment_TParamCommand AST node. + * + * \returns template parameter name. + */ +CINDEX_LINKAGE +CXString clang_TParamCommandComment_getParamName(CXComment Comment); + +/** + * \param Comment a \c CXComment_TParamCommand AST node. + * + * \returns non-zero if the parameter that this AST node represents was found + * in the template parameter list and + * \c clang_TParamCommandComment_getDepth and + * \c clang_TParamCommandComment_getIndex functions will return a meaningful + * value. + */ +CINDEX_LINKAGE +unsigned clang_TParamCommandComment_isParamPositionValid(CXComment Comment); + +/** + * \param Comment a \c CXComment_TParamCommand AST node. + * + * \returns zero-based nesting depth of this parameter in the template parameter list. + * + * For example, + * \verbatim + * template class TT> + * void test(TT aaa); + * \endverbatim + * for C and TT nesting depth is 0, + * for T nesting depth is 1. + */ +CINDEX_LINKAGE +unsigned clang_TParamCommandComment_getDepth(CXComment Comment); + +/** + * \param Comment a \c CXComment_TParamCommand AST node. + * + * \returns zero-based parameter index in the template parameter list at a + * given nesting depth. + * + * For example, + * \verbatim + * template class TT> + * void test(TT aaa); + * \endverbatim + * for C and TT nesting depth is 0, so we can ask for index at depth 0: + * at depth 0 C's index is 0, TT's index is 1. + * + * For T nesting depth is 1, so we can ask for index at depth 0 and 1: + * at depth 0 T's index is 1 (same as TT's), + * at depth 1 T's index is 0. + */ +CINDEX_LINKAGE +unsigned clang_TParamCommandComment_getIndex(CXComment Comment, unsigned Depth); + +/** + * \param Comment a \c CXComment_VerbatimBlockLine AST node. + * + * \returns text contained in the AST node. + */ +CINDEX_LINKAGE +CXString clang_VerbatimBlockLineComment_getText(CXComment Comment); + +/** + * \param Comment a \c CXComment_VerbatimLine AST node. + * + * \returns text contained in the AST node. + */ +CINDEX_LINKAGE CXString clang_VerbatimLineComment_getText(CXComment Comment); + +/** + * \brief Convert an HTML tag AST node to string. + * + * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST + * node. + * + * \returns string containing an HTML tag. + */ +CINDEX_LINKAGE CXString clang_HTMLTagComment_getAsString(CXComment Comment); + +/** + * \brief Convert a given full parsed comment to an HTML fragment. + * + * Specific details of HTML layout are subject to change. Don't try to parse + * this HTML back into an AST, use other APIs instead. + * + * Currently the following CSS classes are used: + * \li "para-brief" for \\brief paragraph and equivalent commands; + * \li "para-returns" for \\returns paragraph and equivalent commands; + * \li "word-returns" for the "Returns" word in \\returns paragraph. + * + * Function argument documentation is rendered as a \ list with arguments + * sorted in function prototype order. CSS classes used: + * \li "param-name-index-NUMBER" for parameter name (\); + * \li "param-descr-index-NUMBER" for parameter description (\); + * \li "param-name-index-invalid" and "param-descr-index-invalid" are used if + * parameter index is invalid. + * + * Template parameter documentation is rendered as a \ list with + * parameters sorted in template parameter list order. CSS classes used: + * \li "tparam-name-index-NUMBER" for parameter name (\); + * \li "tparam-descr-index-NUMBER" for parameter description (\); + * \li "tparam-name-index-other" and "tparam-descr-index-other" are used for + * names inside template template parameters; + * \li "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used if + * parameter position is invalid. + * + * \param Comment a \c CXComment_FullComment AST node. + * + * \returns string containing an HTML fragment. + */ +CINDEX_LINKAGE CXString clang_FullComment_getAsHTML(CXComment Comment); + +/** + * \brief Convert a given full parsed comment to an XML document. + * + * A Relax NG schema for the XML can be found in comment-xml-schema.rng file + * inside clang source tree. + * + * \param Comment a \c CXComment_FullComment AST node. + * + * \returns string containing an XML document. + */ +CINDEX_LINKAGE CXString clang_FullComment_getAsXML(CXComment Comment); + +/** + * @} + */ + + +#ifdef __cplusplus +} +#endif + +#endif /* CLANG_C_DOCUMENTATION_H */ + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Index.h b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Index.h new file mode 100644 index 0000000..fad9cfa --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Index.h @@ -0,0 +1,5755 @@ +/*===-- clang-c/Index.h - Indexing Public C Interface -------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides a public inferface to a Clang library for extracting *| +|* high-level symbol information from source files without exposing the full *| +|* Clang C++ API. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_CLANG_C_INDEX_H +#define LLVM_CLANG_C_INDEX_H + +#include + +#include "clang-c/Platform.h" +#include "clang-c/CXErrorCode.h" +#include "clang-c/CXString.h" +#include "clang-c/BuildSystem.h" + +/** + * \brief The version constants for the libclang API. + * CINDEX_VERSION_MINOR should increase when there are API additions. + * CINDEX_VERSION_MAJOR is intended for "major" source/ABI breaking changes. + * + * The policy about the libclang API was always to keep it source and ABI + * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. + */ +#define CINDEX_VERSION_MAJOR 0 +#define CINDEX_VERSION_MINOR 30 + +#define CINDEX_VERSION_ENCODE(major, minor) ( \ + ((major) * 10000) \ + + ((minor) * 1)) + +#define CINDEX_VERSION CINDEX_VERSION_ENCODE( \ + CINDEX_VERSION_MAJOR, \ + CINDEX_VERSION_MINOR ) + +#define CINDEX_VERSION_STRINGIZE_(major, minor) \ + #major"."#minor +#define CINDEX_VERSION_STRINGIZE(major, minor) \ + CINDEX_VERSION_STRINGIZE_(major, minor) + +#define CINDEX_VERSION_STRING CINDEX_VERSION_STRINGIZE( \ + CINDEX_VERSION_MAJOR, \ + CINDEX_VERSION_MINOR) + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup CINDEX libclang: C Interface to Clang + * + * The C Interface to Clang provides a relatively small API that exposes + * facilities for parsing source code into an abstract syntax tree (AST), + * loading already-parsed ASTs, traversing the AST, associating + * physical source locations with elements within the AST, and other + * facilities that support Clang-based development tools. + * + * This C interface to Clang will never provide all of the information + * representation stored in Clang's C++ AST, nor should it: the intent is to + * maintain an API that is relatively stable from one release to the next, + * providing only the basic functionality needed to support development tools. + * + * To avoid namespace pollution, data types are prefixed with "CX" and + * functions are prefixed with "clang_". + * + * @{ + */ + +/** + * \brief An "index" that consists of a set of translation units that would + * typically be linked together into an executable or library. + */ +typedef void *CXIndex; + +/** + * \brief A single translation unit, which resides in an index. + */ +typedef struct CXTranslationUnitImpl *CXTranslationUnit; + +/** + * \brief Opaque pointer representing client data that will be passed through + * to various callbacks and visitors. + */ +typedef void *CXClientData; + +/** + * \brief Provides the contents of a file that has not yet been saved to disk. + * + * Each CXUnsavedFile instance provides the name of a file on the + * system along with the current contents of that file that have not + * yet been saved to disk. + */ +struct CXUnsavedFile { + /** + * \brief The file whose contents have not yet been saved. + * + * This file must already exist in the file system. + */ + const char *Filename; + + /** + * \brief A buffer containing the unsaved contents of this file. + */ + const char *Contents; + + /** + * \brief The length of the unsaved contents of this buffer. + */ + unsigned long Length; +}; + +/** + * \brief Describes the availability of a particular entity, which indicates + * whether the use of this entity will result in a warning or error due to + * it being deprecated or unavailable. + */ +enum CXAvailabilityKind { + /** + * \brief The entity is available. + */ + CXAvailability_Available, + /** + * \brief The entity is available, but has been deprecated (and its use is + * not recommended). + */ + CXAvailability_Deprecated, + /** + * \brief The entity is not available; any use of it will be an error. + */ + CXAvailability_NotAvailable, + /** + * \brief The entity is available, but not accessible; any use of it will be + * an error. + */ + CXAvailability_NotAccessible +}; + +/** + * \brief Describes a version number of the form major.minor.subminor. + */ +typedef struct CXVersion { + /** + * \brief The major version number, e.g., the '10' in '10.7.3'. A negative + * value indicates that there is no version number at all. + */ + int Major; + /** + * \brief The minor version number, e.g., the '7' in '10.7.3'. This value + * will be negative if no minor version number was provided, e.g., for + * version '10'. + */ + int Minor; + /** + * \brief The subminor version number, e.g., the '3' in '10.7.3'. This value + * will be negative if no minor or subminor version number was provided, + * e.g., in version '10' or '10.7'. + */ + int Subminor; +} CXVersion; + +/** + * \brief Provides a shared context for creating translation units. + * + * It provides two options: + * + * - excludeDeclarationsFromPCH: When non-zero, allows enumeration of "local" + * declarations (when loading any new translation units). A "local" declaration + * is one that belongs in the translation unit itself and not in a precompiled + * header that was used by the translation unit. If zero, all declarations + * will be enumerated. + * + * Here is an example: + * + * \code + * // excludeDeclsFromPCH = 1, displayDiagnostics=1 + * Idx = clang_createIndex(1, 1); + * + * // IndexTest.pch was produced with the following command: + * // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch" + * TU = clang_createTranslationUnit(Idx, "IndexTest.pch"); + * + * // This will load all the symbols from 'IndexTest.pch' + * clang_visitChildren(clang_getTranslationUnitCursor(TU), + * TranslationUnitVisitor, 0); + * clang_disposeTranslationUnit(TU); + * + * // This will load all the symbols from 'IndexTest.c', excluding symbols + * // from 'IndexTest.pch'. + * char *args[] = { "-Xclang", "-include-pch=IndexTest.pch" }; + * TU = clang_createTranslationUnitFromSourceFile(Idx, "IndexTest.c", 2, args, + * 0, 0); + * clang_visitChildren(clang_getTranslationUnitCursor(TU), + * TranslationUnitVisitor, 0); + * clang_disposeTranslationUnit(TU); + * \endcode + * + * This process of creating the 'pch', loading it separately, and using it (via + * -include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks + * (which gives the indexer the same performance benefit as the compiler). + */ +CINDEX_LINKAGE CXIndex clang_createIndex(int excludeDeclarationsFromPCH, + int displayDiagnostics); + +/** + * \brief Destroy the given index. + * + * The index must not be destroyed until all of the translation units created + * within that index have been destroyed. + */ +CINDEX_LINKAGE void clang_disposeIndex(CXIndex index); + +typedef enum { + /** + * \brief Used to indicate that no special CXIndex options are needed. + */ + CXGlobalOpt_None = 0x0, + + /** + * \brief Used to indicate that threads that libclang creates for indexing + * purposes should use background priority. + * + * Affects #clang_indexSourceFile, #clang_indexTranslationUnit, + * #clang_parseTranslationUnit, #clang_saveTranslationUnit. + */ + CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 0x1, + + /** + * \brief Used to indicate that threads that libclang creates for editing + * purposes should use background priority. + * + * Affects #clang_reparseTranslationUnit, #clang_codeCompleteAt, + * #clang_annotateTokens + */ + CXGlobalOpt_ThreadBackgroundPriorityForEditing = 0x2, + + /** + * \brief Used to indicate that all threads that libclang creates should use + * background priority. + */ + CXGlobalOpt_ThreadBackgroundPriorityForAll = + CXGlobalOpt_ThreadBackgroundPriorityForIndexing | + CXGlobalOpt_ThreadBackgroundPriorityForEditing + +} CXGlobalOptFlags; + +/** + * \brief Sets general options associated with a CXIndex. + * + * For example: + * \code + * CXIndex idx = ...; + * clang_CXIndex_setGlobalOptions(idx, + * clang_CXIndex_getGlobalOptions(idx) | + * CXGlobalOpt_ThreadBackgroundPriorityForIndexing); + * \endcode + * + * \param options A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags. + */ +CINDEX_LINKAGE void clang_CXIndex_setGlobalOptions(CXIndex, unsigned options); + +/** + * \brief Gets the general options associated with a CXIndex. + * + * \returns A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags that + * are associated with the given CXIndex object. + */ +CINDEX_LINKAGE unsigned clang_CXIndex_getGlobalOptions(CXIndex); + +/** + * \defgroup CINDEX_FILES File manipulation routines + * + * @{ + */ + +/** + * \brief A particular source file that is part of a translation unit. + */ +typedef void *CXFile; + + +/** + * \brief Retrieve the complete file and path name of the given file. + */ +CINDEX_LINKAGE CXString clang_getFileName(CXFile SFile); + +/** + * \brief Retrieve the last modification time of the given file. + */ +CINDEX_LINKAGE time_t clang_getFileTime(CXFile SFile); + +/** + * \brief Uniquely identifies a CXFile, that refers to the same underlying file, + * across an indexing session. + */ +typedef struct { + unsigned long long data[3]; +} CXFileUniqueID; + +/** + * \brief Retrieve the unique ID for the given \c file. + * + * \param file the file to get the ID for. + * \param outID stores the returned CXFileUniqueID. + * \returns If there was a failure getting the unique ID, returns non-zero, + * otherwise returns 0. +*/ +CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID); + +/** + * \brief Determine whether the given header is guarded against + * multiple inclusions, either with the conventional + * \#ifndef/\#define/\#endif macro guards or with \#pragma once. + */ +CINDEX_LINKAGE unsigned +clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file); + +/** + * \brief Retrieve a file handle within the given translation unit. + * + * \param tu the translation unit + * + * \param file_name the name of the file. + * + * \returns the file handle for the named file in the translation unit \p tu, + * or a NULL file handle if the file was not a part of this translation unit. + */ +CINDEX_LINKAGE CXFile clang_getFile(CXTranslationUnit tu, + const char *file_name); + +/** + * \brief Returns non-zero if the \c file1 and \c file2 point to the same file, + * or they are both NULL. + */ +CINDEX_LINKAGE int clang_File_isEqual(CXFile file1, CXFile file2); + +/** + * @} + */ + +/** + * \defgroup CINDEX_LOCATIONS Physical source locations + * + * Clang represents physical source locations in its abstract syntax tree in + * great detail, with file, line, and column information for the majority of + * the tokens parsed in the source code. These data types and functions are + * used to represent source location information, either for a particular + * point in the program or for a range of points in the program, and extract + * specific location information from those data types. + * + * @{ + */ + +/** + * \brief Identifies a specific source location within a translation + * unit. + * + * Use clang_getExpansionLocation() or clang_getSpellingLocation() + * to map a source location to a particular file, line, and column. + */ +typedef struct { + const void *ptr_data[2]; + unsigned int_data; +} CXSourceLocation; + +/** + * \brief Identifies a half-open character range in the source code. + * + * Use clang_getRangeStart() and clang_getRangeEnd() to retrieve the + * starting and end locations from a source range, respectively. + */ +typedef struct { + const void *ptr_data[2]; + unsigned begin_int_data; + unsigned end_int_data; +} CXSourceRange; + +/** + * \brief Retrieve a NULL (invalid) source location. + */ +CINDEX_LINKAGE CXSourceLocation clang_getNullLocation(void); + +/** + * \brief Determine whether two source locations, which must refer into + * the same translation unit, refer to exactly the same point in the source + * code. + * + * \returns non-zero if the source locations refer to the same location, zero + * if they refer to different locations. + */ +CINDEX_LINKAGE unsigned clang_equalLocations(CXSourceLocation loc1, + CXSourceLocation loc2); + +/** + * \brief Retrieves the source location associated with a given file/line/column + * in a particular translation unit. + */ +CINDEX_LINKAGE CXSourceLocation clang_getLocation(CXTranslationUnit tu, + CXFile file, + unsigned line, + unsigned column); +/** + * \brief Retrieves the source location associated with a given character offset + * in a particular translation unit. + */ +CINDEX_LINKAGE CXSourceLocation clang_getLocationForOffset(CXTranslationUnit tu, + CXFile file, + unsigned offset); + +/** + * \brief Returns non-zero if the given source location is in a system header. + */ +CINDEX_LINKAGE int clang_Location_isInSystemHeader(CXSourceLocation location); + +/** + * \brief Returns non-zero if the given source location is in the main file of + * the corresponding translation unit. + */ +CINDEX_LINKAGE int clang_Location_isFromMainFile(CXSourceLocation location); + +/** + * \brief Retrieve a NULL (invalid) source range. + */ +CINDEX_LINKAGE CXSourceRange clang_getNullRange(void); + +/** + * \brief Retrieve a source range given the beginning and ending source + * locations. + */ +CINDEX_LINKAGE CXSourceRange clang_getRange(CXSourceLocation begin, + CXSourceLocation end); + +/** + * \brief Determine whether two ranges are equivalent. + * + * \returns non-zero if the ranges are the same, zero if they differ. + */ +CINDEX_LINKAGE unsigned clang_equalRanges(CXSourceRange range1, + CXSourceRange range2); + +/** + * \brief Returns non-zero if \p range is null. + */ +CINDEX_LINKAGE int clang_Range_isNull(CXSourceRange range); + +/** + * \brief Retrieve the file, line, column, and offset represented by + * the given source location. + * + * If the location refers into a macro expansion, retrieves the + * location of the macro expansion. + * + * \param location the location within a source file that will be decomposed + * into its parts. + * + * \param file [out] if non-NULL, will be set to the file to which the given + * source location points. + * + * \param line [out] if non-NULL, will be set to the line to which the given + * source location points. + * + * \param column [out] if non-NULL, will be set to the column to which the given + * source location points. + * + * \param offset [out] if non-NULL, will be set to the offset into the + * buffer to which the given source location points. + */ +CINDEX_LINKAGE void clang_getExpansionLocation(CXSourceLocation location, + CXFile *file, + unsigned *line, + unsigned *column, + unsigned *offset); + +/** + * \brief Retrieve the file, line, column, and offset represented by + * the given source location, as specified in a # line directive. + * + * Example: given the following source code in a file somefile.c + * + * \code + * #123 "dummy.c" 1 + * + * static int func(void) + * { + * return 0; + * } + * \endcode + * + * the location information returned by this function would be + * + * File: dummy.c Line: 124 Column: 12 + * + * whereas clang_getExpansionLocation would have returned + * + * File: somefile.c Line: 3 Column: 12 + * + * \param location the location within a source file that will be decomposed + * into its parts. + * + * \param filename [out] if non-NULL, will be set to the filename of the + * source location. Note that filenames returned will be for "virtual" files, + * which don't necessarily exist on the machine running clang - e.g. when + * parsing preprocessed output obtained from a different environment. If + * a non-NULL value is passed in, remember to dispose of the returned value + * using \c clang_disposeString() once you've finished with it. For an invalid + * source location, an empty string is returned. + * + * \param line [out] if non-NULL, will be set to the line number of the + * source location. For an invalid source location, zero is returned. + * + * \param column [out] if non-NULL, will be set to the column number of the + * source location. For an invalid source location, zero is returned. + */ +CINDEX_LINKAGE void clang_getPresumedLocation(CXSourceLocation location, + CXString *filename, + unsigned *line, + unsigned *column); + +/** + * \brief Legacy API to retrieve the file, line, column, and offset represented + * by the given source location. + * + * This interface has been replaced by the newer interface + * #clang_getExpansionLocation(). See that interface's documentation for + * details. + */ +CINDEX_LINKAGE void clang_getInstantiationLocation(CXSourceLocation location, + CXFile *file, + unsigned *line, + unsigned *column, + unsigned *offset); + +/** + * \brief Retrieve the file, line, column, and offset represented by + * the given source location. + * + * If the location refers into a macro instantiation, return where the + * location was originally spelled in the source file. + * + * \param location the location within a source file that will be decomposed + * into its parts. + * + * \param file [out] if non-NULL, will be set to the file to which the given + * source location points. + * + * \param line [out] if non-NULL, will be set to the line to which the given + * source location points. + * + * \param column [out] if non-NULL, will be set to the column to which the given + * source location points. + * + * \param offset [out] if non-NULL, will be set to the offset into the + * buffer to which the given source location points. + */ +CINDEX_LINKAGE void clang_getSpellingLocation(CXSourceLocation location, + CXFile *file, + unsigned *line, + unsigned *column, + unsigned *offset); + +/** + * \brief Retrieve the file, line, column, and offset represented by + * the given source location. + * + * If the location refers into a macro expansion, return where the macro was + * expanded or where the macro argument was written, if the location points at + * a macro argument. + * + * \param location the location within a source file that will be decomposed + * into its parts. + * + * \param file [out] if non-NULL, will be set to the file to which the given + * source location points. + * + * \param line [out] if non-NULL, will be set to the line to which the given + * source location points. + * + * \param column [out] if non-NULL, will be set to the column to which the given + * source location points. + * + * \param offset [out] if non-NULL, will be set to the offset into the + * buffer to which the given source location points. + */ +CINDEX_LINKAGE void clang_getFileLocation(CXSourceLocation location, + CXFile *file, + unsigned *line, + unsigned *column, + unsigned *offset); + +/** + * \brief Retrieve a source location representing the first character within a + * source range. + */ +CINDEX_LINKAGE CXSourceLocation clang_getRangeStart(CXSourceRange range); + +/** + * \brief Retrieve a source location representing the last character within a + * source range. + */ +CINDEX_LINKAGE CXSourceLocation clang_getRangeEnd(CXSourceRange range); + +/** + * \brief Identifies an array of ranges. + */ +typedef struct { + /** \brief The number of ranges in the \c ranges array. */ + unsigned count; + /** + * \brief An array of \c CXSourceRanges. + */ + CXSourceRange *ranges; +} CXSourceRangeList; + +/** + * \brief Retrieve all ranges that were skipped by the preprocessor. + * + * The preprocessor will skip lines when they are surrounded by an + * if/ifdef/ifndef directive whose condition does not evaluate to true. + */ +CINDEX_LINKAGE CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit tu, + CXFile file); + +/** + * \brief Destroy the given \c CXSourceRangeList. + */ +CINDEX_LINKAGE void clang_disposeSourceRangeList(CXSourceRangeList *ranges); + +/** + * @} + */ + +/** + * \defgroup CINDEX_DIAG Diagnostic reporting + * + * @{ + */ + +/** + * \brief Describes the severity of a particular diagnostic. + */ +enum CXDiagnosticSeverity { + /** + * \brief A diagnostic that has been suppressed, e.g., by a command-line + * option. + */ + CXDiagnostic_Ignored = 0, + + /** + * \brief This diagnostic is a note that should be attached to the + * previous (non-note) diagnostic. + */ + CXDiagnostic_Note = 1, + + /** + * \brief This diagnostic indicates suspicious code that may not be + * wrong. + */ + CXDiagnostic_Warning = 2, + + /** + * \brief This diagnostic indicates that the code is ill-formed. + */ + CXDiagnostic_Error = 3, + + /** + * \brief This diagnostic indicates that the code is ill-formed such + * that future parser recovery is unlikely to produce useful + * results. + */ + CXDiagnostic_Fatal = 4 +}; + +/** + * \brief A single diagnostic, containing the diagnostic's severity, + * location, text, source ranges, and fix-it hints. + */ +typedef void *CXDiagnostic; + +/** + * \brief A group of CXDiagnostics. + */ +typedef void *CXDiagnosticSet; + +/** + * \brief Determine the number of diagnostics in a CXDiagnosticSet. + */ +CINDEX_LINKAGE unsigned clang_getNumDiagnosticsInSet(CXDiagnosticSet Diags); + +/** + * \brief Retrieve a diagnostic associated with the given CXDiagnosticSet. + * + * \param Diags the CXDiagnosticSet to query. + * \param Index the zero-based diagnostic number to retrieve. + * + * \returns the requested diagnostic. This diagnostic must be freed + * via a call to \c clang_disposeDiagnostic(). + */ +CINDEX_LINKAGE CXDiagnostic clang_getDiagnosticInSet(CXDiagnosticSet Diags, + unsigned Index); + + +/** + * \brief Describes the kind of error that occurred (if any) in a call to + * \c clang_loadDiagnostics. + */ +enum CXLoadDiag_Error { + /** + * \brief Indicates that no error occurred. + */ + CXLoadDiag_None = 0, + + /** + * \brief Indicates that an unknown error occurred while attempting to + * deserialize diagnostics. + */ + CXLoadDiag_Unknown = 1, + + /** + * \brief Indicates that the file containing the serialized diagnostics + * could not be opened. + */ + CXLoadDiag_CannotLoad = 2, + + /** + * \brief Indicates that the serialized diagnostics file is invalid or + * corrupt. + */ + CXLoadDiag_InvalidFile = 3 +}; + +/** + * \brief Deserialize a set of diagnostics from a Clang diagnostics bitcode + * file. + * + * \param file The name of the file to deserialize. + * \param error A pointer to a enum value recording if there was a problem + * deserializing the diagnostics. + * \param errorString A pointer to a CXString for recording the error string + * if the file was not successfully loaded. + * + * \returns A loaded CXDiagnosticSet if successful, and NULL otherwise. These + * diagnostics should be released using clang_disposeDiagnosticSet(). + */ +CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics(const char *file, + enum CXLoadDiag_Error *error, + CXString *errorString); + +/** + * \brief Release a CXDiagnosticSet and all of its contained diagnostics. + */ +CINDEX_LINKAGE void clang_disposeDiagnosticSet(CXDiagnosticSet Diags); + +/** + * \brief Retrieve the child diagnostics of a CXDiagnostic. + * + * This CXDiagnosticSet does not need to be released by + * clang_disposeDiagnosticSet. + */ +CINDEX_LINKAGE CXDiagnosticSet clang_getChildDiagnostics(CXDiagnostic D); + +/** + * \brief Determine the number of diagnostics produced for the given + * translation unit. + */ +CINDEX_LINKAGE unsigned clang_getNumDiagnostics(CXTranslationUnit Unit); + +/** + * \brief Retrieve a diagnostic associated with the given translation unit. + * + * \param Unit the translation unit to query. + * \param Index the zero-based diagnostic number to retrieve. + * + * \returns the requested diagnostic. This diagnostic must be freed + * via a call to \c clang_disposeDiagnostic(). + */ +CINDEX_LINKAGE CXDiagnostic clang_getDiagnostic(CXTranslationUnit Unit, + unsigned Index); + +/** + * \brief Retrieve the complete set of diagnostics associated with a + * translation unit. + * + * \param Unit the translation unit to query. + */ +CINDEX_LINKAGE CXDiagnosticSet + clang_getDiagnosticSetFromTU(CXTranslationUnit Unit); + +/** + * \brief Destroy a diagnostic. + */ +CINDEX_LINKAGE void clang_disposeDiagnostic(CXDiagnostic Diagnostic); + +/** + * \brief Options to control the display of diagnostics. + * + * The values in this enum are meant to be combined to customize the + * behavior of \c clang_formatDiagnostic(). + */ +enum CXDiagnosticDisplayOptions { + /** + * \brief Display the source-location information where the + * diagnostic was located. + * + * When set, diagnostics will be prefixed by the file, line, and + * (optionally) column to which the diagnostic refers. For example, + * + * \code + * test.c:28: warning: extra tokens at end of #endif directive + * \endcode + * + * This option corresponds to the clang flag \c -fshow-source-location. + */ + CXDiagnostic_DisplaySourceLocation = 0x01, + + /** + * \brief If displaying the source-location information of the + * diagnostic, also include the column number. + * + * This option corresponds to the clang flag \c -fshow-column. + */ + CXDiagnostic_DisplayColumn = 0x02, + + /** + * \brief If displaying the source-location information of the + * diagnostic, also include information about source ranges in a + * machine-parsable format. + * + * This option corresponds to the clang flag + * \c -fdiagnostics-print-source-range-info. + */ + CXDiagnostic_DisplaySourceRanges = 0x04, + + /** + * \brief Display the option name associated with this diagnostic, if any. + * + * The option name displayed (e.g., -Wconversion) will be placed in brackets + * after the diagnostic text. This option corresponds to the clang flag + * \c -fdiagnostics-show-option. + */ + CXDiagnostic_DisplayOption = 0x08, + + /** + * \brief Display the category number associated with this diagnostic, if any. + * + * The category number is displayed within brackets after the diagnostic text. + * This option corresponds to the clang flag + * \c -fdiagnostics-show-category=id. + */ + CXDiagnostic_DisplayCategoryId = 0x10, + + /** + * \brief Display the category name associated with this diagnostic, if any. + * + * The category name is displayed within brackets after the diagnostic text. + * This option corresponds to the clang flag + * \c -fdiagnostics-show-category=name. + */ + CXDiagnostic_DisplayCategoryName = 0x20 +}; + +/** + * \brief Format the given diagnostic in a manner that is suitable for display. + * + * This routine will format the given diagnostic to a string, rendering + * the diagnostic according to the various options given. The + * \c clang_defaultDiagnosticDisplayOptions() function returns the set of + * options that most closely mimics the behavior of the clang compiler. + * + * \param Diagnostic The diagnostic to print. + * + * \param Options A set of options that control the diagnostic display, + * created by combining \c CXDiagnosticDisplayOptions values. + * + * \returns A new string containing for formatted diagnostic. + */ +CINDEX_LINKAGE CXString clang_formatDiagnostic(CXDiagnostic Diagnostic, + unsigned Options); + +/** + * \brief Retrieve the set of display options most similar to the + * default behavior of the clang compiler. + * + * \returns A set of display options suitable for use with \c + * clang_formatDiagnostic(). + */ +CINDEX_LINKAGE unsigned clang_defaultDiagnosticDisplayOptions(void); + +/** + * \brief Determine the severity of the given diagnostic. + */ +CINDEX_LINKAGE enum CXDiagnosticSeverity +clang_getDiagnosticSeverity(CXDiagnostic); + +/** + * \brief Retrieve the source location of the given diagnostic. + * + * This location is where Clang would print the caret ('^') when + * displaying the diagnostic on the command line. + */ +CINDEX_LINKAGE CXSourceLocation clang_getDiagnosticLocation(CXDiagnostic); + +/** + * \brief Retrieve the text of the given diagnostic. + */ +CINDEX_LINKAGE CXString clang_getDiagnosticSpelling(CXDiagnostic); + +/** + * \brief Retrieve the name of the command-line option that enabled this + * diagnostic. + * + * \param Diag The diagnostic to be queried. + * + * \param Disable If non-NULL, will be set to the option that disables this + * diagnostic (if any). + * + * \returns A string that contains the command-line option used to enable this + * warning, such as "-Wconversion" or "-pedantic". + */ +CINDEX_LINKAGE CXString clang_getDiagnosticOption(CXDiagnostic Diag, + CXString *Disable); + +/** + * \brief Retrieve the category number for this diagnostic. + * + * Diagnostics can be categorized into groups along with other, related + * diagnostics (e.g., diagnostics under the same warning flag). This routine + * retrieves the category number for the given diagnostic. + * + * \returns The number of the category that contains this diagnostic, or zero + * if this diagnostic is uncategorized. + */ +CINDEX_LINKAGE unsigned clang_getDiagnosticCategory(CXDiagnostic); + +/** + * \brief Retrieve the name of a particular diagnostic category. This + * is now deprecated. Use clang_getDiagnosticCategoryText() + * instead. + * + * \param Category A diagnostic category number, as returned by + * \c clang_getDiagnosticCategory(). + * + * \returns The name of the given diagnostic category. + */ +CINDEX_DEPRECATED CINDEX_LINKAGE +CXString clang_getDiagnosticCategoryName(unsigned Category); + +/** + * \brief Retrieve the diagnostic category text for a given diagnostic. + * + * \returns The text of the given diagnostic category. + */ +CINDEX_LINKAGE CXString clang_getDiagnosticCategoryText(CXDiagnostic); + +/** + * \brief Determine the number of source ranges associated with the given + * diagnostic. + */ +CINDEX_LINKAGE unsigned clang_getDiagnosticNumRanges(CXDiagnostic); + +/** + * \brief Retrieve a source range associated with the diagnostic. + * + * A diagnostic's source ranges highlight important elements in the source + * code. On the command line, Clang displays source ranges by + * underlining them with '~' characters. + * + * \param Diagnostic the diagnostic whose range is being extracted. + * + * \param Range the zero-based index specifying which range to + * + * \returns the requested source range. + */ +CINDEX_LINKAGE CXSourceRange clang_getDiagnosticRange(CXDiagnostic Diagnostic, + unsigned Range); + +/** + * \brief Determine the number of fix-it hints associated with the + * given diagnostic. + */ +CINDEX_LINKAGE unsigned clang_getDiagnosticNumFixIts(CXDiagnostic Diagnostic); + +/** + * \brief Retrieve the replacement information for a given fix-it. + * + * Fix-its are described in terms of a source range whose contents + * should be replaced by a string. This approach generalizes over + * three kinds of operations: removal of source code (the range covers + * the code to be removed and the replacement string is empty), + * replacement of source code (the range covers the code to be + * replaced and the replacement string provides the new code), and + * insertion (both the start and end of the range point at the + * insertion location, and the replacement string provides the text to + * insert). + * + * \param Diagnostic The diagnostic whose fix-its are being queried. + * + * \param FixIt The zero-based index of the fix-it. + * + * \param ReplacementRange The source range whose contents will be + * replaced with the returned replacement string. Note that source + * ranges are half-open ranges [a, b), so the source code should be + * replaced from a and up to (but not including) b. + * + * \returns A string containing text that should be replace the source + * code indicated by the \c ReplacementRange. + */ +CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic, + unsigned FixIt, + CXSourceRange *ReplacementRange); + +/** + * @} + */ + +/** + * \defgroup CINDEX_TRANSLATION_UNIT Translation unit manipulation + * + * The routines in this group provide the ability to create and destroy + * translation units from files, either by parsing the contents of the files or + * by reading in a serialized representation of a translation unit. + * + * @{ + */ + +/** + * \brief Get the original translation unit source file name. + */ +CINDEX_LINKAGE CXString +clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit); + +/** + * \brief Return the CXTranslationUnit for a given source file and the provided + * command line arguments one would pass to the compiler. + * + * Note: The 'source_filename' argument is optional. If the caller provides a + * NULL pointer, the name of the source file is expected to reside in the + * specified command line arguments. + * + * Note: When encountered in 'clang_command_line_args', the following options + * are ignored: + * + * '-c' + * '-emit-ast' + * '-fsyntax-only' + * '-o \' (both '-o' and '\' are ignored) + * + * \param CIdx The index object with which the translation unit will be + * associated. + * + * \param source_filename The name of the source file to load, or NULL if the + * source file is included in \p clang_command_line_args. + * + * \param num_clang_command_line_args The number of command-line arguments in + * \p clang_command_line_args. + * + * \param clang_command_line_args The command-line arguments that would be + * passed to the \c clang executable if it were being invoked out-of-process. + * These command-line options will be parsed and will affect how the translation + * unit is parsed. Note that the following options are ignored: '-c', + * '-emit-ast', '-fsyntax-only' (which is the default), and '-o \'. + * + * \param num_unsaved_files the number of unsaved file entries in \p + * unsaved_files. + * + * \param unsaved_files the files that have not yet been saved to disk + * but may be required for code completion, including the contents of + * those files. The contents and name of these files (as specified by + * CXUnsavedFile) are copied when necessary, so the client only needs to + * guarantee their validity until the call to this function returns. + */ +CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile( + CXIndex CIdx, + const char *source_filename, + int num_clang_command_line_args, + const char * const *clang_command_line_args, + unsigned num_unsaved_files, + struct CXUnsavedFile *unsaved_files); + +/** + * \brief Same as \c clang_createTranslationUnit2, but returns + * the \c CXTranslationUnit instead of an error code. In case of an error this + * routine returns a \c NULL \c CXTranslationUnit, without further detailed + * error codes. + */ +CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit( + CXIndex CIdx, + const char *ast_filename); + +/** + * \brief Create a translation unit from an AST file (\c -emit-ast). + * + * \param[out] out_TU A non-NULL pointer to store the created + * \c CXTranslationUnit. + * + * \returns Zero on success, otherwise returns an error code. + */ +CINDEX_LINKAGE enum CXErrorCode clang_createTranslationUnit2( + CXIndex CIdx, + const char *ast_filename, + CXTranslationUnit *out_TU); + +/** + * \brief Flags that control the creation of translation units. + * + * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * constructing the translation unit. + */ +enum CXTranslationUnit_Flags { + /** + * \brief Used to indicate that no special translation-unit options are + * needed. + */ + CXTranslationUnit_None = 0x0, + + /** + * \brief Used to indicate that the parser should construct a "detailed" + * preprocessing record, including all macro definitions and instantiations. + * + * Constructing a detailed preprocessing record requires more memory + * and time to parse, since the information contained in the record + * is usually not retained. However, it can be useful for + * applications that require more detailed information about the + * behavior of the preprocessor. + */ + CXTranslationUnit_DetailedPreprocessingRecord = 0x01, + + /** + * \brief Used to indicate that the translation unit is incomplete. + * + * When a translation unit is considered "incomplete", semantic + * analysis that is typically performed at the end of the + * translation unit will be suppressed. For example, this suppresses + * the completion of tentative declarations in C and of + * instantiation of implicitly-instantiation function templates in + * C++. This option is typically used when parsing a header with the + * intent of producing a precompiled header. + */ + CXTranslationUnit_Incomplete = 0x02, + + /** + * \brief Used to indicate that the translation unit should be built with an + * implicit precompiled header for the preamble. + * + * An implicit precompiled header is used as an optimization when a + * particular translation unit is likely to be reparsed many times + * when the sources aren't changing that often. In this case, an + * implicit precompiled header will be built containing all of the + * initial includes at the top of the main file (what we refer to as + * the "preamble" of the file). In subsequent parses, if the + * preamble or the files in it have not changed, \c + * clang_reparseTranslationUnit() will re-use the implicit + * precompiled header to improve parsing performance. + */ + CXTranslationUnit_PrecompiledPreamble = 0x04, + + /** + * \brief Used to indicate that the translation unit should cache some + * code-completion results with each reparse of the source file. + * + * Caching of code-completion results is a performance optimization that + * introduces some overhead to reparsing but improves the performance of + * code-completion operations. + */ + CXTranslationUnit_CacheCompletionResults = 0x08, + + /** + * \brief Used to indicate that the translation unit will be serialized with + * \c clang_saveTranslationUnit. + * + * This option is typically used when parsing a header with the intent of + * producing a precompiled header. + */ + CXTranslationUnit_ForSerialization = 0x10, + + /** + * \brief DEPRECATED: Enabled chained precompiled preambles in C++. + * + * Note: this is a *temporary* option that is available only while + * we are testing C++ precompiled preamble support. It is deprecated. + */ + CXTranslationUnit_CXXChainedPCH = 0x20, + + /** + * \brief Used to indicate that function/method bodies should be skipped while + * parsing. + * + * This option can be used to search for declarations/definitions while + * ignoring the usages. + */ + CXTranslationUnit_SkipFunctionBodies = 0x40, + + /** + * \brief Used to indicate that brief documentation comments should be + * included into the set of code completions returned from this translation + * unit. + */ + CXTranslationUnit_IncludeBriefCommentsInCodeCompletion = 0x80 +}; + +/** + * \brief Returns the set of flags that is suitable for parsing a translation + * unit that is being edited. + * + * The set of flags returned provide options for \c clang_parseTranslationUnit() + * to indicate that the translation unit is likely to be reparsed many times, + * either explicitly (via \c clang_reparseTranslationUnit()) or implicitly + * (e.g., by code completion (\c clang_codeCompletionAt())). The returned flag + * set contains an unspecified set of optimizations (e.g., the precompiled + * preamble) geared toward improving the performance of these routines. The + * set of optimizations enabled may change from one version to the next. + */ +CINDEX_LINKAGE unsigned clang_defaultEditingTranslationUnitOptions(void); + +/** + * \brief Same as \c clang_parseTranslationUnit2, but returns + * the \c CXTranslationUnit instead of an error code. In case of an error this + * routine returns a \c NULL \c CXTranslationUnit, without further detailed + * error codes. + */ +CINDEX_LINKAGE CXTranslationUnit +clang_parseTranslationUnit(CXIndex CIdx, + const char *source_filename, + const char *const *command_line_args, + int num_command_line_args, + struct CXUnsavedFile *unsaved_files, + unsigned num_unsaved_files, + unsigned options); + +/** + * \brief Parse the given source file and the translation unit corresponding + * to that file. + * + * This routine is the main entry point for the Clang C API, providing the + * ability to parse a source file into a translation unit that can then be + * queried by other functions in the API. This routine accepts a set of + * command-line arguments so that the compilation can be configured in the same + * way that the compiler is configured on the command line. + * + * \param CIdx The index object with which the translation unit will be + * associated. + * + * \param source_filename The name of the source file to load, or NULL if the + * source file is included in \c command_line_args. + * + * \param command_line_args The command-line arguments that would be + * passed to the \c clang executable if it were being invoked out-of-process. + * These command-line options will be parsed and will affect how the translation + * unit is parsed. Note that the following options are ignored: '-c', + * '-emit-ast', '-fsyntax-only' (which is the default), and '-o \'. + * + * \param num_command_line_args The number of command-line arguments in + * \c command_line_args. + * + * \param unsaved_files the files that have not yet been saved to disk + * but may be required for parsing, including the contents of + * those files. The contents and name of these files (as specified by + * CXUnsavedFile) are copied when necessary, so the client only needs to + * guarantee their validity until the call to this function returns. + * + * \param num_unsaved_files the number of unsaved file entries in \p + * unsaved_files. + * + * \param options A bitmask of options that affects how the translation unit + * is managed but not its compilation. This should be a bitwise OR of the + * CXTranslationUnit_XXX flags. + * + * \param[out] out_TU A non-NULL pointer to store the created + * \c CXTranslationUnit, describing the parsed code and containing any + * diagnostics produced by the compiler. + * + * \returns Zero on success, otherwise returns an error code. + */ +CINDEX_LINKAGE enum CXErrorCode +clang_parseTranslationUnit2(CXIndex CIdx, + const char *source_filename, + const char *const *command_line_args, + int num_command_line_args, + struct CXUnsavedFile *unsaved_files, + unsigned num_unsaved_files, + unsigned options, + CXTranslationUnit *out_TU); + +/** + * \brief Flags that control how translation units are saved. + * + * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * saving the translation unit. + */ +enum CXSaveTranslationUnit_Flags { + /** + * \brief Used to indicate that no special saving options are needed. + */ + CXSaveTranslationUnit_None = 0x0 +}; + +/** + * \brief Returns the set of flags that is suitable for saving a translation + * unit. + * + * The set of flags returned provide options for + * \c clang_saveTranslationUnit() by default. The returned flag + * set contains an unspecified set of options that save translation units with + * the most commonly-requested data. + */ +CINDEX_LINKAGE unsigned clang_defaultSaveOptions(CXTranslationUnit TU); + +/** + * \brief Describes the kind of error that occurred (if any) in a call to + * \c clang_saveTranslationUnit(). + */ +enum CXSaveError { + /** + * \brief Indicates that no error occurred while saving a translation unit. + */ + CXSaveError_None = 0, + + /** + * \brief Indicates that an unknown error occurred while attempting to save + * the file. + * + * This error typically indicates that file I/O failed when attempting to + * write the file. + */ + CXSaveError_Unknown = 1, + + /** + * \brief Indicates that errors during translation prevented this attempt + * to save the translation unit. + * + * Errors that prevent the translation unit from being saved can be + * extracted using \c clang_getNumDiagnostics() and \c clang_getDiagnostic(). + */ + CXSaveError_TranslationErrors = 2, + + /** + * \brief Indicates that the translation unit to be saved was somehow + * invalid (e.g., NULL). + */ + CXSaveError_InvalidTU = 3 +}; + +/** + * \brief Saves a translation unit into a serialized representation of + * that translation unit on disk. + * + * Any translation unit that was parsed without error can be saved + * into a file. The translation unit can then be deserialized into a + * new \c CXTranslationUnit with \c clang_createTranslationUnit() or, + * if it is an incomplete translation unit that corresponds to a + * header, used as a precompiled header when parsing other translation + * units. + * + * \param TU The translation unit to save. + * + * \param FileName The file to which the translation unit will be saved. + * + * \param options A bitmask of options that affects how the translation unit + * is saved. This should be a bitwise OR of the + * CXSaveTranslationUnit_XXX flags. + * + * \returns A value that will match one of the enumerators of the CXSaveError + * enumeration. Zero (CXSaveError_None) indicates that the translation unit was + * saved successfully, while a non-zero value indicates that a problem occurred. + */ +CINDEX_LINKAGE int clang_saveTranslationUnit(CXTranslationUnit TU, + const char *FileName, + unsigned options); + +/** + * \brief Destroy the specified CXTranslationUnit object. + */ +CINDEX_LINKAGE void clang_disposeTranslationUnit(CXTranslationUnit); + +/** + * \brief Flags that control the reparsing of translation units. + * + * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * reparsing the translation unit. + */ +enum CXReparse_Flags { + /** + * \brief Used to indicate that no special reparsing options are needed. + */ + CXReparse_None = 0x0 +}; + +/** + * \brief Returns the set of flags that is suitable for reparsing a translation + * unit. + * + * The set of flags returned provide options for + * \c clang_reparseTranslationUnit() by default. The returned flag + * set contains an unspecified set of optimizations geared toward common uses + * of reparsing. The set of optimizations enabled may change from one version + * to the next. + */ +CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU); + +/** + * \brief Reparse the source files that produced this translation unit. + * + * This routine can be used to re-parse the source files that originally + * created the given translation unit, for example because those source files + * have changed (either on disk or as passed via \p unsaved_files). The + * source code will be reparsed with the same command-line options as it + * was originally parsed. + * + * Reparsing a translation unit invalidates all cursors and source locations + * that refer into that translation unit. This makes reparsing a translation + * unit semantically equivalent to destroying the translation unit and then + * creating a new translation unit with the same command-line arguments. + * However, it may be more efficient to reparse a translation + * unit using this routine. + * + * \param TU The translation unit whose contents will be re-parsed. The + * translation unit must originally have been built with + * \c clang_createTranslationUnitFromSourceFile(). + * + * \param num_unsaved_files The number of unsaved file entries in \p + * unsaved_files. + * + * \param unsaved_files The files that have not yet been saved to disk + * but may be required for parsing, including the contents of + * those files. The contents and name of these files (as specified by + * CXUnsavedFile) are copied when necessary, so the client only needs to + * guarantee their validity until the call to this function returns. + * + * \param options A bitset of options composed of the flags in CXReparse_Flags. + * The function \c clang_defaultReparseOptions() produces a default set of + * options recommended for most uses, based on the translation unit. + * + * \returns 0 if the sources could be reparsed. A non-zero error code will be + * returned if reparsing was impossible, such that the translation unit is + * invalid. In such cases, the only valid call for \c TU is + * \c clang_disposeTranslationUnit(TU). The error codes returned by this + * routine are described by the \c CXErrorCode enum. + */ +CINDEX_LINKAGE int clang_reparseTranslationUnit(CXTranslationUnit TU, + unsigned num_unsaved_files, + struct CXUnsavedFile *unsaved_files, + unsigned options); + +/** + * \brief Categorizes how memory is being used by a translation unit. + */ +enum CXTUResourceUsageKind { + CXTUResourceUsage_AST = 1, + CXTUResourceUsage_Identifiers = 2, + CXTUResourceUsage_Selectors = 3, + CXTUResourceUsage_GlobalCompletionResults = 4, + CXTUResourceUsage_SourceManagerContentCache = 5, + CXTUResourceUsage_AST_SideTables = 6, + CXTUResourceUsage_SourceManager_Membuffer_Malloc = 7, + CXTUResourceUsage_SourceManager_Membuffer_MMap = 8, + CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9, + CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10, + CXTUResourceUsage_Preprocessor = 11, + CXTUResourceUsage_PreprocessingRecord = 12, + CXTUResourceUsage_SourceManager_DataStructures = 13, + CXTUResourceUsage_Preprocessor_HeaderSearch = 14, + CXTUResourceUsage_MEMORY_IN_BYTES_BEGIN = CXTUResourceUsage_AST, + CXTUResourceUsage_MEMORY_IN_BYTES_END = + CXTUResourceUsage_Preprocessor_HeaderSearch, + + CXTUResourceUsage_First = CXTUResourceUsage_AST, + CXTUResourceUsage_Last = CXTUResourceUsage_Preprocessor_HeaderSearch +}; + +/** + * \brief Returns the human-readable null-terminated C string that represents + * the name of the memory category. This string should never be freed. + */ +CINDEX_LINKAGE +const char *clang_getTUResourceUsageName(enum CXTUResourceUsageKind kind); + +typedef struct CXTUResourceUsageEntry { + /* \brief The memory usage category. */ + enum CXTUResourceUsageKind kind; + /* \brief Amount of resources used. + The units will depend on the resource kind. */ + unsigned long amount; +} CXTUResourceUsageEntry; + +/** + * \brief The memory usage of a CXTranslationUnit, broken into categories. + */ +typedef struct CXTUResourceUsage { + /* \brief Private data member, used for queries. */ + void *data; + + /* \brief The number of entries in the 'entries' array. */ + unsigned numEntries; + + /* \brief An array of key-value pairs, representing the breakdown of memory + usage. */ + CXTUResourceUsageEntry *entries; + +} CXTUResourceUsage; + +/** + * \brief Return the memory usage of a translation unit. This object + * should be released with clang_disposeCXTUResourceUsage(). + */ +CINDEX_LINKAGE CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU); + +CINDEX_LINKAGE void clang_disposeCXTUResourceUsage(CXTUResourceUsage usage); + +/** + * @} + */ + +/** + * \brief Describes the kind of entity that a cursor refers to. + */ +enum CXCursorKind { + /* Declarations */ + /** + * \brief A declaration whose specific kind is not exposed via this + * interface. + * + * Unexposed declarations have the same operations as any other kind + * of declaration; one can extract their location information, + * spelling, find their definitions, etc. However, the specific kind + * of the declaration is not reported. + */ + CXCursor_UnexposedDecl = 1, + /** \brief A C or C++ struct. */ + CXCursor_StructDecl = 2, + /** \brief A C or C++ union. */ + CXCursor_UnionDecl = 3, + /** \brief A C++ class. */ + CXCursor_ClassDecl = 4, + /** \brief An enumeration. */ + CXCursor_EnumDecl = 5, + /** + * \brief A field (in C) or non-static data member (in C++) in a + * struct, union, or C++ class. + */ + CXCursor_FieldDecl = 6, + /** \brief An enumerator constant. */ + CXCursor_EnumConstantDecl = 7, + /** \brief A function. */ + CXCursor_FunctionDecl = 8, + /** \brief A variable. */ + CXCursor_VarDecl = 9, + /** \brief A function or method parameter. */ + CXCursor_ParmDecl = 10, + /** \brief An Objective-C \@interface. */ + CXCursor_ObjCInterfaceDecl = 11, + /** \brief An Objective-C \@interface for a category. */ + CXCursor_ObjCCategoryDecl = 12, + /** \brief An Objective-C \@protocol declaration. */ + CXCursor_ObjCProtocolDecl = 13, + /** \brief An Objective-C \@property declaration. */ + CXCursor_ObjCPropertyDecl = 14, + /** \brief An Objective-C instance variable. */ + CXCursor_ObjCIvarDecl = 15, + /** \brief An Objective-C instance method. */ + CXCursor_ObjCInstanceMethodDecl = 16, + /** \brief An Objective-C class method. */ + CXCursor_ObjCClassMethodDecl = 17, + /** \brief An Objective-C \@implementation. */ + CXCursor_ObjCImplementationDecl = 18, + /** \brief An Objective-C \@implementation for a category. */ + CXCursor_ObjCCategoryImplDecl = 19, + /** \brief A typedef */ + CXCursor_TypedefDecl = 20, + /** \brief A C++ class method. */ + CXCursor_CXXMethod = 21, + /** \brief A C++ namespace. */ + CXCursor_Namespace = 22, + /** \brief A linkage specification, e.g. 'extern "C"'. */ + CXCursor_LinkageSpec = 23, + /** \brief A C++ constructor. */ + CXCursor_Constructor = 24, + /** \brief A C++ destructor. */ + CXCursor_Destructor = 25, + /** \brief A C++ conversion function. */ + CXCursor_ConversionFunction = 26, + /** \brief A C++ template type parameter. */ + CXCursor_TemplateTypeParameter = 27, + /** \brief A C++ non-type template parameter. */ + CXCursor_NonTypeTemplateParameter = 28, + /** \brief A C++ template template parameter. */ + CXCursor_TemplateTemplateParameter = 29, + /** \brief A C++ function template. */ + CXCursor_FunctionTemplate = 30, + /** \brief A C++ class template. */ + CXCursor_ClassTemplate = 31, + /** \brief A C++ class template partial specialization. */ + CXCursor_ClassTemplatePartialSpecialization = 32, + /** \brief A C++ namespace alias declaration. */ + CXCursor_NamespaceAlias = 33, + /** \brief A C++ using directive. */ + CXCursor_UsingDirective = 34, + /** \brief A C++ using declaration. */ + CXCursor_UsingDeclaration = 35, + /** \brief A C++ alias declaration */ + CXCursor_TypeAliasDecl = 36, + /** \brief An Objective-C \@synthesize definition. */ + CXCursor_ObjCSynthesizeDecl = 37, + /** \brief An Objective-C \@dynamic definition. */ + CXCursor_ObjCDynamicDecl = 38, + /** \brief An access specifier. */ + CXCursor_CXXAccessSpecifier = 39, + + CXCursor_FirstDecl = CXCursor_UnexposedDecl, + CXCursor_LastDecl = CXCursor_CXXAccessSpecifier, + + /* References */ + CXCursor_FirstRef = 40, /* Decl references */ + CXCursor_ObjCSuperClassRef = 40, + CXCursor_ObjCProtocolRef = 41, + CXCursor_ObjCClassRef = 42, + /** + * \brief A reference to a type declaration. + * + * A type reference occurs anywhere where a type is named but not + * declared. For example, given: + * + * \code + * typedef unsigned size_type; + * size_type size; + * \endcode + * + * The typedef is a declaration of size_type (CXCursor_TypedefDecl), + * while the type of the variable "size" is referenced. The cursor + * referenced by the type of size is the typedef for size_type. + */ + CXCursor_TypeRef = 43, + CXCursor_CXXBaseSpecifier = 44, + /** + * \brief A reference to a class template, function template, template + * template parameter, or class template partial specialization. + */ + CXCursor_TemplateRef = 45, + /** + * \brief A reference to a namespace or namespace alias. + */ + CXCursor_NamespaceRef = 46, + /** + * \brief A reference to a member of a struct, union, or class that occurs in + * some non-expression context, e.g., a designated initializer. + */ + CXCursor_MemberRef = 47, + /** + * \brief A reference to a labeled statement. + * + * This cursor kind is used to describe the jump to "start_over" in the + * goto statement in the following example: + * + * \code + * start_over: + * ++counter; + * + * goto start_over; + * \endcode + * + * A label reference cursor refers to a label statement. + */ + CXCursor_LabelRef = 48, + + /** + * \brief A reference to a set of overloaded functions or function templates + * that has not yet been resolved to a specific function or function template. + * + * An overloaded declaration reference cursor occurs in C++ templates where + * a dependent name refers to a function. For example: + * + * \code + * template void swap(T&, T&); + * + * struct X { ... }; + * void swap(X&, X&); + * + * template + * void reverse(T* first, T* last) { + * while (first < last - 1) { + * swap(*first, *--last); + * ++first; + * } + * } + * + * struct Y { }; + * void swap(Y&, Y&); + * \endcode + * + * Here, the identifier "swap" is associated with an overloaded declaration + * reference. In the template definition, "swap" refers to either of the two + * "swap" functions declared above, so both results will be available. At + * instantiation time, "swap" may also refer to other functions found via + * argument-dependent lookup (e.g., the "swap" function at the end of the + * example). + * + * The functions \c clang_getNumOverloadedDecls() and + * \c clang_getOverloadedDecl() can be used to retrieve the definitions + * referenced by this cursor. + */ + CXCursor_OverloadedDeclRef = 49, + + /** + * \brief A reference to a variable that occurs in some non-expression + * context, e.g., a C++ lambda capture list. + */ + CXCursor_VariableRef = 50, + + CXCursor_LastRef = CXCursor_VariableRef, + + /* Error conditions */ + CXCursor_FirstInvalid = 70, + CXCursor_InvalidFile = 70, + CXCursor_NoDeclFound = 71, + CXCursor_NotImplemented = 72, + CXCursor_InvalidCode = 73, + CXCursor_LastInvalid = CXCursor_InvalidCode, + + /* Expressions */ + CXCursor_FirstExpr = 100, + + /** + * \brief An expression whose specific kind is not exposed via this + * interface. + * + * Unexposed expressions have the same operations as any other kind + * of expression; one can extract their location information, + * spelling, children, etc. However, the specific kind of the + * expression is not reported. + */ + CXCursor_UnexposedExpr = 100, + + /** + * \brief An expression that refers to some value declaration, such + * as a function, variable, or enumerator. + */ + CXCursor_DeclRefExpr = 101, + + /** + * \brief An expression that refers to a member of a struct, union, + * class, Objective-C class, etc. + */ + CXCursor_MemberRefExpr = 102, + + /** \brief An expression that calls a function. */ + CXCursor_CallExpr = 103, + + /** \brief An expression that sends a message to an Objective-C + object or class. */ + CXCursor_ObjCMessageExpr = 104, + + /** \brief An expression that represents a block literal. */ + CXCursor_BlockExpr = 105, + + /** \brief An integer literal. + */ + CXCursor_IntegerLiteral = 106, + + /** \brief A floating point number literal. + */ + CXCursor_FloatingLiteral = 107, + + /** \brief An imaginary number literal. + */ + CXCursor_ImaginaryLiteral = 108, + + /** \brief A string literal. + */ + CXCursor_StringLiteral = 109, + + /** \brief A character literal. + */ + CXCursor_CharacterLiteral = 110, + + /** \brief A parenthesized expression, e.g. "(1)". + * + * This AST node is only formed if full location information is requested. + */ + CXCursor_ParenExpr = 111, + + /** \brief This represents the unary-expression's (except sizeof and + * alignof). + */ + CXCursor_UnaryOperator = 112, + + /** \brief [C99 6.5.2.1] Array Subscripting. + */ + CXCursor_ArraySubscriptExpr = 113, + + /** \brief A builtin binary operation expression such as "x + y" or + * "x <= y". + */ + CXCursor_BinaryOperator = 114, + + /** \brief Compound assignment such as "+=". + */ + CXCursor_CompoundAssignOperator = 115, + + /** \brief The ?: ternary operator. + */ + CXCursor_ConditionalOperator = 116, + + /** \brief An explicit cast in C (C99 6.5.4) or a C-style cast in C++ + * (C++ [expr.cast]), which uses the syntax (Type)expr. + * + * For example: (int)f. + */ + CXCursor_CStyleCastExpr = 117, + + /** \brief [C99 6.5.2.5] + */ + CXCursor_CompoundLiteralExpr = 118, + + /** \brief Describes an C or C++ initializer list. + */ + CXCursor_InitListExpr = 119, + + /** \brief The GNU address of label extension, representing &&label. + */ + CXCursor_AddrLabelExpr = 120, + + /** \brief This is the GNU Statement Expression extension: ({int X=4; X;}) + */ + CXCursor_StmtExpr = 121, + + /** \brief Represents a C11 generic selection. + */ + CXCursor_GenericSelectionExpr = 122, + + /** \brief Implements the GNU __null extension, which is a name for a null + * pointer constant that has integral type (e.g., int or long) and is the same + * size and alignment as a pointer. + * + * The __null extension is typically only used by system headers, which define + * NULL as __null in C++ rather than using 0 (which is an integer that may not + * match the size of a pointer). + */ + CXCursor_GNUNullExpr = 123, + + /** \brief C++'s static_cast<> expression. + */ + CXCursor_CXXStaticCastExpr = 124, + + /** \brief C++'s dynamic_cast<> expression. + */ + CXCursor_CXXDynamicCastExpr = 125, + + /** \brief C++'s reinterpret_cast<> expression. + */ + CXCursor_CXXReinterpretCastExpr = 126, + + /** \brief C++'s const_cast<> expression. + */ + CXCursor_CXXConstCastExpr = 127, + + /** \brief Represents an explicit C++ type conversion that uses "functional" + * notion (C++ [expr.type.conv]). + * + * Example: + * \code + * x = int(0.5); + * \endcode + */ + CXCursor_CXXFunctionalCastExpr = 128, + + /** \brief A C++ typeid expression (C++ [expr.typeid]). + */ + CXCursor_CXXTypeidExpr = 129, + + /** \brief [C++ 2.13.5] C++ Boolean Literal. + */ + CXCursor_CXXBoolLiteralExpr = 130, + + /** \brief [C++0x 2.14.7] C++ Pointer Literal. + */ + CXCursor_CXXNullPtrLiteralExpr = 131, + + /** \brief Represents the "this" expression in C++ + */ + CXCursor_CXXThisExpr = 132, + + /** \brief [C++ 15] C++ Throw Expression. + * + * This handles 'throw' and 'throw' assignment-expression. When + * assignment-expression isn't present, Op will be null. + */ + CXCursor_CXXThrowExpr = 133, + + /** \brief A new expression for memory allocation and constructor calls, e.g: + * "new CXXNewExpr(foo)". + */ + CXCursor_CXXNewExpr = 134, + + /** \brief A delete expression for memory deallocation and destructor calls, + * e.g. "delete[] pArray". + */ + CXCursor_CXXDeleteExpr = 135, + + /** \brief A unary expression. + */ + CXCursor_UnaryExpr = 136, + + /** \brief An Objective-C string literal i.e. @"foo". + */ + CXCursor_ObjCStringLiteral = 137, + + /** \brief An Objective-C \@encode expression. + */ + CXCursor_ObjCEncodeExpr = 138, + + /** \brief An Objective-C \@selector expression. + */ + CXCursor_ObjCSelectorExpr = 139, + + /** \brief An Objective-C \@protocol expression. + */ + CXCursor_ObjCProtocolExpr = 140, + + /** \brief An Objective-C "bridged" cast expression, which casts between + * Objective-C pointers and C pointers, transferring ownership in the process. + * + * \code + * NSString *str = (__bridge_transfer NSString *)CFCreateString(); + * \endcode + */ + CXCursor_ObjCBridgedCastExpr = 141, + + /** \brief Represents a C++0x pack expansion that produces a sequence of + * expressions. + * + * A pack expansion expression contains a pattern (which itself is an + * expression) followed by an ellipsis. For example: + * + * \code + * template + * void forward(F f, Types &&...args) { + * f(static_cast(args)...); + * } + * \endcode + */ + CXCursor_PackExpansionExpr = 142, + + /** \brief Represents an expression that computes the length of a parameter + * pack. + * + * \code + * template + * struct count { + * static const unsigned value = sizeof...(Types); + * }; + * \endcode + */ + CXCursor_SizeOfPackExpr = 143, + + /* \brief Represents a C++ lambda expression that produces a local function + * object. + * + * \code + * void abssort(float *x, unsigned N) { + * std::sort(x, x + N, + * [](float a, float b) { + * return std::abs(a) < std::abs(b); + * }); + * } + * \endcode + */ + CXCursor_LambdaExpr = 144, + + /** \brief Objective-c Boolean Literal. + */ + CXCursor_ObjCBoolLiteralExpr = 145, + + /** \brief Represents the "self" expression in an Objective-C method. + */ + CXCursor_ObjCSelfExpr = 146, + + CXCursor_LastExpr = CXCursor_ObjCSelfExpr, + + /* Statements */ + CXCursor_FirstStmt = 200, + /** + * \brief A statement whose specific kind is not exposed via this + * interface. + * + * Unexposed statements have the same operations as any other kind of + * statement; one can extract their location information, spelling, + * children, etc. However, the specific kind of the statement is not + * reported. + */ + CXCursor_UnexposedStmt = 200, + + /** \brief A labelled statement in a function. + * + * This cursor kind is used to describe the "start_over:" label statement in + * the following example: + * + * \code + * start_over: + * ++counter; + * \endcode + * + */ + CXCursor_LabelStmt = 201, + + /** \brief A group of statements like { stmt stmt }. + * + * This cursor kind is used to describe compound statements, e.g. function + * bodies. + */ + CXCursor_CompoundStmt = 202, + + /** \brief A case statement. + */ + CXCursor_CaseStmt = 203, + + /** \brief A default statement. + */ + CXCursor_DefaultStmt = 204, + + /** \brief An if statement + */ + CXCursor_IfStmt = 205, + + /** \brief A switch statement. + */ + CXCursor_SwitchStmt = 206, + + /** \brief A while statement. + */ + CXCursor_WhileStmt = 207, + + /** \brief A do statement. + */ + CXCursor_DoStmt = 208, + + /** \brief A for statement. + */ + CXCursor_ForStmt = 209, + + /** \brief A goto statement. + */ + CXCursor_GotoStmt = 210, + + /** \brief An indirect goto statement. + */ + CXCursor_IndirectGotoStmt = 211, + + /** \brief A continue statement. + */ + CXCursor_ContinueStmt = 212, + + /** \brief A break statement. + */ + CXCursor_BreakStmt = 213, + + /** \brief A return statement. + */ + CXCursor_ReturnStmt = 214, + + /** \brief A GCC inline assembly statement extension. + */ + CXCursor_GCCAsmStmt = 215, + CXCursor_AsmStmt = CXCursor_GCCAsmStmt, + + /** \brief Objective-C's overall \@try-\@catch-\@finally statement. + */ + CXCursor_ObjCAtTryStmt = 216, + + /** \brief Objective-C's \@catch statement. + */ + CXCursor_ObjCAtCatchStmt = 217, + + /** \brief Objective-C's \@finally statement. + */ + CXCursor_ObjCAtFinallyStmt = 218, + + /** \brief Objective-C's \@throw statement. + */ + CXCursor_ObjCAtThrowStmt = 219, + + /** \brief Objective-C's \@synchronized statement. + */ + CXCursor_ObjCAtSynchronizedStmt = 220, + + /** \brief Objective-C's autorelease pool statement. + */ + CXCursor_ObjCAutoreleasePoolStmt = 221, + + /** \brief Objective-C's collection statement. + */ + CXCursor_ObjCForCollectionStmt = 222, + + /** \brief C++'s catch statement. + */ + CXCursor_CXXCatchStmt = 223, + + /** \brief C++'s try statement. + */ + CXCursor_CXXTryStmt = 224, + + /** \brief C++'s for (* : *) statement. + */ + CXCursor_CXXForRangeStmt = 225, + + /** \brief Windows Structured Exception Handling's try statement. + */ + CXCursor_SEHTryStmt = 226, + + /** \brief Windows Structured Exception Handling's except statement. + */ + CXCursor_SEHExceptStmt = 227, + + /** \brief Windows Structured Exception Handling's finally statement. + */ + CXCursor_SEHFinallyStmt = 228, + + /** \brief A MS inline assembly statement extension. + */ + CXCursor_MSAsmStmt = 229, + + /** \brief The null statement ";": C99 6.8.3p3. + * + * This cursor kind is used to describe the null statement. + */ + CXCursor_NullStmt = 230, + + /** \brief Adaptor class for mixing declarations with statements and + * expressions. + */ + CXCursor_DeclStmt = 231, + + /** \brief OpenMP parallel directive. + */ + CXCursor_OMPParallelDirective = 232, + + /** \brief OpenMP SIMD directive. + */ + CXCursor_OMPSimdDirective = 233, + + /** \brief OpenMP for directive. + */ + CXCursor_OMPForDirective = 234, + + /** \brief OpenMP sections directive. + */ + CXCursor_OMPSectionsDirective = 235, + + /** \brief OpenMP section directive. + */ + CXCursor_OMPSectionDirective = 236, + + /** \brief OpenMP single directive. + */ + CXCursor_OMPSingleDirective = 237, + + /** \brief OpenMP parallel for directive. + */ + CXCursor_OMPParallelForDirective = 238, + + /** \brief OpenMP parallel sections directive. + */ + CXCursor_OMPParallelSectionsDirective = 239, + + /** \brief OpenMP task directive. + */ + CXCursor_OMPTaskDirective = 240, + + /** \brief OpenMP master directive. + */ + CXCursor_OMPMasterDirective = 241, + + /** \brief OpenMP critical directive. + */ + CXCursor_OMPCriticalDirective = 242, + + /** \brief OpenMP taskyield directive. + */ + CXCursor_OMPTaskyieldDirective = 243, + + /** \brief OpenMP barrier directive. + */ + CXCursor_OMPBarrierDirective = 244, + + /** \brief OpenMP taskwait directive. + */ + CXCursor_OMPTaskwaitDirective = 245, + + /** \brief OpenMP flush directive. + */ + CXCursor_OMPFlushDirective = 246, + + /** \brief Windows Structured Exception Handling's leave statement. + */ + CXCursor_SEHLeaveStmt = 247, + + /** \brief OpenMP ordered directive. + */ + CXCursor_OMPOrderedDirective = 248, + + /** \brief OpenMP atomic directive. + */ + CXCursor_OMPAtomicDirective = 249, + + /** \brief OpenMP for SIMD directive. + */ + CXCursor_OMPForSimdDirective = 250, + + /** \brief OpenMP parallel for SIMD directive. + */ + CXCursor_OMPParallelForSimdDirective = 251, + + /** \brief OpenMP target directive. + */ + CXCursor_OMPTargetDirective = 252, + + /** \brief OpenMP teams directive. + */ + CXCursor_OMPTeamsDirective = 253, + + /** \brief OpenMP taskgroup directive. + */ + CXCursor_OMPTaskgroupDirective = 254, + + /** \brief OpenMP cancellation point directive. + */ + CXCursor_OMPCancellationPointDirective = 255, + + /** \brief OpenMP cancel directive. + */ + CXCursor_OMPCancelDirective = 256, + + CXCursor_LastStmt = CXCursor_OMPCancelDirective, + + /** + * \brief Cursor that represents the translation unit itself. + * + * The translation unit cursor exists primarily to act as the root + * cursor for traversing the contents of a translation unit. + */ + CXCursor_TranslationUnit = 300, + + /* Attributes */ + CXCursor_FirstAttr = 400, + /** + * \brief An attribute whose specific kind is not exposed via this + * interface. + */ + CXCursor_UnexposedAttr = 400, + + CXCursor_IBActionAttr = 401, + CXCursor_IBOutletAttr = 402, + CXCursor_IBOutletCollectionAttr = 403, + CXCursor_CXXFinalAttr = 404, + CXCursor_CXXOverrideAttr = 405, + CXCursor_AnnotateAttr = 406, + CXCursor_AsmLabelAttr = 407, + CXCursor_PackedAttr = 408, + CXCursor_PureAttr = 409, + CXCursor_ConstAttr = 410, + CXCursor_NoDuplicateAttr = 411, + CXCursor_CUDAConstantAttr = 412, + CXCursor_CUDADeviceAttr = 413, + CXCursor_CUDAGlobalAttr = 414, + CXCursor_CUDAHostAttr = 415, + CXCursor_CUDASharedAttr = 416, + CXCursor_LastAttr = CXCursor_CUDASharedAttr, + + /* Preprocessing */ + CXCursor_PreprocessingDirective = 500, + CXCursor_MacroDefinition = 501, + CXCursor_MacroExpansion = 502, + CXCursor_MacroInstantiation = CXCursor_MacroExpansion, + CXCursor_InclusionDirective = 503, + CXCursor_FirstPreprocessing = CXCursor_PreprocessingDirective, + CXCursor_LastPreprocessing = CXCursor_InclusionDirective, + + /* Extra Declarations */ + /** + * \brief A module import declaration. + */ + CXCursor_ModuleImportDecl = 600, + CXCursor_FirstExtraDecl = CXCursor_ModuleImportDecl, + CXCursor_LastExtraDecl = CXCursor_ModuleImportDecl, + + /** + * \brief A code completion overload candidate. + */ + CXCursor_OverloadCandidate = 700 +}; + +/** + * \brief A cursor representing some element in the abstract syntax tree for + * a translation unit. + * + * The cursor abstraction unifies the different kinds of entities in a + * program--declaration, statements, expressions, references to declarations, + * etc.--under a single "cursor" abstraction with a common set of operations. + * Common operation for a cursor include: getting the physical location in + * a source file where the cursor points, getting the name associated with a + * cursor, and retrieving cursors for any child nodes of a particular cursor. + * + * Cursors can be produced in two specific ways. + * clang_getTranslationUnitCursor() produces a cursor for a translation unit, + * from which one can use clang_visitChildren() to explore the rest of the + * translation unit. clang_getCursor() maps from a physical source location + * to the entity that resides at that location, allowing one to map from the + * source code into the AST. + */ +typedef struct { + enum CXCursorKind kind; + int xdata; + const void *data[3]; +} CXCursor; + +/** + * \defgroup CINDEX_CURSOR_MANIP Cursor manipulations + * + * @{ + */ + +/** + * \brief Retrieve the NULL cursor, which represents no entity. + */ +CINDEX_LINKAGE CXCursor clang_getNullCursor(void); + +/** + * \brief Retrieve the cursor that represents the given translation unit. + * + * The translation unit cursor can be used to start traversing the + * various declarations within the given translation unit. + */ +CINDEX_LINKAGE CXCursor clang_getTranslationUnitCursor(CXTranslationUnit); + +/** + * \brief Determine whether two cursors are equivalent. + */ +CINDEX_LINKAGE unsigned clang_equalCursors(CXCursor, CXCursor); + +/** + * \brief Returns non-zero if \p cursor is null. + */ +CINDEX_LINKAGE int clang_Cursor_isNull(CXCursor cursor); + +/** + * \brief Compute a hash value for the given cursor. + */ +CINDEX_LINKAGE unsigned clang_hashCursor(CXCursor); + +/** + * \brief Retrieve the kind of the given cursor. + */ +CINDEX_LINKAGE enum CXCursorKind clang_getCursorKind(CXCursor); + +/** + * \brief Determine whether the given cursor kind represents a declaration. + */ +CINDEX_LINKAGE unsigned clang_isDeclaration(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents a simple + * reference. + * + * Note that other kinds of cursors (such as expressions) can also refer to + * other cursors. Use clang_getCursorReferenced() to determine whether a + * particular cursor refers to another entity. + */ +CINDEX_LINKAGE unsigned clang_isReference(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents an expression. + */ +CINDEX_LINKAGE unsigned clang_isExpression(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents a statement. + */ +CINDEX_LINKAGE unsigned clang_isStatement(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents an attribute. + */ +CINDEX_LINKAGE unsigned clang_isAttribute(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents an invalid + * cursor. + */ +CINDEX_LINKAGE unsigned clang_isInvalid(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents a translation + * unit. + */ +CINDEX_LINKAGE unsigned clang_isTranslationUnit(enum CXCursorKind); + +/*** + * \brief Determine whether the given cursor represents a preprocessing + * element, such as a preprocessor directive or macro instantiation. + */ +CINDEX_LINKAGE unsigned clang_isPreprocessing(enum CXCursorKind); + +/*** + * \brief Determine whether the given cursor represents a currently + * unexposed piece of the AST (e.g., CXCursor_UnexposedStmt). + */ +CINDEX_LINKAGE unsigned clang_isUnexposed(enum CXCursorKind); + +/** + * \brief Describe the linkage of the entity referred to by a cursor. + */ +enum CXLinkageKind { + /** \brief This value indicates that no linkage information is available + * for a provided CXCursor. */ + CXLinkage_Invalid, + /** + * \brief This is the linkage for variables, parameters, and so on that + * have automatic storage. This covers normal (non-extern) local variables. + */ + CXLinkage_NoLinkage, + /** \brief This is the linkage for static variables and static functions. */ + CXLinkage_Internal, + /** \brief This is the linkage for entities with external linkage that live + * in C++ anonymous namespaces.*/ + CXLinkage_UniqueExternal, + /** \brief This is the linkage for entities with true, external linkage. */ + CXLinkage_External +}; + +/** + * \brief Determine the linkage of the entity referred to by a given cursor. + */ +CINDEX_LINKAGE enum CXLinkageKind clang_getCursorLinkage(CXCursor cursor); + +/** + * \brief Determine the availability of the entity that this cursor refers to, + * taking the current target platform into account. + * + * \param cursor The cursor to query. + * + * \returns The availability of the cursor. + */ +CINDEX_LINKAGE enum CXAvailabilityKind +clang_getCursorAvailability(CXCursor cursor); + +/** + * Describes the availability of a given entity on a particular platform, e.g., + * a particular class might only be available on Mac OS 10.7 or newer. + */ +typedef struct CXPlatformAvailability { + /** + * \brief A string that describes the platform for which this structure + * provides availability information. + * + * Possible values are "ios" or "macosx". + */ + CXString Platform; + /** + * \brief The version number in which this entity was introduced. + */ + CXVersion Introduced; + /** + * \brief The version number in which this entity was deprecated (but is + * still available). + */ + CXVersion Deprecated; + /** + * \brief The version number in which this entity was obsoleted, and therefore + * is no longer available. + */ + CXVersion Obsoleted; + /** + * \brief Whether the entity is unconditionally unavailable on this platform. + */ + int Unavailable; + /** + * \brief An optional message to provide to a user of this API, e.g., to + * suggest replacement APIs. + */ + CXString Message; +} CXPlatformAvailability; + +/** + * \brief Determine the availability of the entity that this cursor refers to + * on any platforms for which availability information is known. + * + * \param cursor The cursor to query. + * + * \param always_deprecated If non-NULL, will be set to indicate whether the + * entity is deprecated on all platforms. + * + * \param deprecated_message If non-NULL, will be set to the message text + * provided along with the unconditional deprecation of this entity. The client + * is responsible for deallocating this string. + * + * \param always_unavailable If non-NULL, will be set to indicate whether the + * entity is unavailable on all platforms. + * + * \param unavailable_message If non-NULL, will be set to the message text + * provided along with the unconditional unavailability of this entity. The + * client is responsible for deallocating this string. + * + * \param availability If non-NULL, an array of CXPlatformAvailability instances + * that will be populated with platform availability information, up to either + * the number of platforms for which availability information is available (as + * returned by this function) or \c availability_size, whichever is smaller. + * + * \param availability_size The number of elements available in the + * \c availability array. + * + * \returns The number of platforms (N) for which availability information is + * available (which is unrelated to \c availability_size). + * + * Note that the client is responsible for calling + * \c clang_disposeCXPlatformAvailability to free each of the + * platform-availability structures returned. There are + * \c min(N, availability_size) such structures. + */ +CINDEX_LINKAGE int +clang_getCursorPlatformAvailability(CXCursor cursor, + int *always_deprecated, + CXString *deprecated_message, + int *always_unavailable, + CXString *unavailable_message, + CXPlatformAvailability *availability, + int availability_size); + +/** + * \brief Free the memory associated with a \c CXPlatformAvailability structure. + */ +CINDEX_LINKAGE void +clang_disposeCXPlatformAvailability(CXPlatformAvailability *availability); + +/** + * \brief Describe the "language" of the entity referred to by a cursor. + */ +enum CXLanguageKind { + CXLanguage_Invalid = 0, + CXLanguage_C, + CXLanguage_ObjC, + CXLanguage_CPlusPlus +}; + +/** + * \brief Determine the "language" of the entity referred to by a given cursor. + */ +CINDEX_LINKAGE enum CXLanguageKind clang_getCursorLanguage(CXCursor cursor); + +/** + * \brief Returns the translation unit that a cursor originated from. + */ +CINDEX_LINKAGE CXTranslationUnit clang_Cursor_getTranslationUnit(CXCursor); + + +/** + * \brief A fast container representing a set of CXCursors. + */ +typedef struct CXCursorSetImpl *CXCursorSet; + +/** + * \brief Creates an empty CXCursorSet. + */ +CINDEX_LINKAGE CXCursorSet clang_createCXCursorSet(void); + +/** + * \brief Disposes a CXCursorSet and releases its associated memory. + */ +CINDEX_LINKAGE void clang_disposeCXCursorSet(CXCursorSet cset); + +/** + * \brief Queries a CXCursorSet to see if it contains a specific CXCursor. + * + * \returns non-zero if the set contains the specified cursor. +*/ +CINDEX_LINKAGE unsigned clang_CXCursorSet_contains(CXCursorSet cset, + CXCursor cursor); + +/** + * \brief Inserts a CXCursor into a CXCursorSet. + * + * \returns zero if the CXCursor was already in the set, and non-zero otherwise. +*/ +CINDEX_LINKAGE unsigned clang_CXCursorSet_insert(CXCursorSet cset, + CXCursor cursor); + +/** + * \brief Determine the semantic parent of the given cursor. + * + * The semantic parent of a cursor is the cursor that semantically contains + * the given \p cursor. For many declarations, the lexical and semantic parents + * are equivalent (the lexical parent is returned by + * \c clang_getCursorLexicalParent()). They diverge when declarations or + * definitions are provided out-of-line. For example: + * + * \code + * class C { + * void f(); + * }; + * + * void C::f() { } + * \endcode + * + * In the out-of-line definition of \c C::f, the semantic parent is + * the class \c C, of which this function is a member. The lexical parent is + * the place where the declaration actually occurs in the source code; in this + * case, the definition occurs in the translation unit. In general, the + * lexical parent for a given entity can change without affecting the semantics + * of the program, and the lexical parent of different declarations of the + * same entity may be different. Changing the semantic parent of a declaration, + * on the other hand, can have a major impact on semantics, and redeclarations + * of a particular entity should all have the same semantic context. + * + * In the example above, both declarations of \c C::f have \c C as their + * semantic context, while the lexical context of the first \c C::f is \c C + * and the lexical context of the second \c C::f is the translation unit. + * + * For global declarations, the semantic parent is the translation unit. + */ +CINDEX_LINKAGE CXCursor clang_getCursorSemanticParent(CXCursor cursor); + +/** + * \brief Determine the lexical parent of the given cursor. + * + * The lexical parent of a cursor is the cursor in which the given \p cursor + * was actually written. For many declarations, the lexical and semantic parents + * are equivalent (the semantic parent is returned by + * \c clang_getCursorSemanticParent()). They diverge when declarations or + * definitions are provided out-of-line. For example: + * + * \code + * class C { + * void f(); + * }; + * + * void C::f() { } + * \endcode + * + * In the out-of-line definition of \c C::f, the semantic parent is + * the class \c C, of which this function is a member. The lexical parent is + * the place where the declaration actually occurs in the source code; in this + * case, the definition occurs in the translation unit. In general, the + * lexical parent for a given entity can change without affecting the semantics + * of the program, and the lexical parent of different declarations of the + * same entity may be different. Changing the semantic parent of a declaration, + * on the other hand, can have a major impact on semantics, and redeclarations + * of a particular entity should all have the same semantic context. + * + * In the example above, both declarations of \c C::f have \c C as their + * semantic context, while the lexical context of the first \c C::f is \c C + * and the lexical context of the second \c C::f is the translation unit. + * + * For declarations written in the global scope, the lexical parent is + * the translation unit. + */ +CINDEX_LINKAGE CXCursor clang_getCursorLexicalParent(CXCursor cursor); + +/** + * \brief Determine the set of methods that are overridden by the given + * method. + * + * In both Objective-C and C++, a method (aka virtual member function, + * in C++) can override a virtual method in a base class. For + * Objective-C, a method is said to override any method in the class's + * base class, its protocols, or its categories' protocols, that has the same + * selector and is of the same kind (class or instance). + * If no such method exists, the search continues to the class's superclass, + * its protocols, and its categories, and so on. A method from an Objective-C + * implementation is considered to override the same methods as its + * corresponding method in the interface. + * + * For C++, a virtual member function overrides any virtual member + * function with the same signature that occurs in its base + * classes. With multiple inheritance, a virtual member function can + * override several virtual member functions coming from different + * base classes. + * + * In all cases, this function determines the immediate overridden + * method, rather than all of the overridden methods. For example, if + * a method is originally declared in a class A, then overridden in B + * (which in inherits from A) and also in C (which inherited from B), + * then the only overridden method returned from this function when + * invoked on C's method will be B's method. The client may then + * invoke this function again, given the previously-found overridden + * methods, to map out the complete method-override set. + * + * \param cursor A cursor representing an Objective-C or C++ + * method. This routine will compute the set of methods that this + * method overrides. + * + * \param overridden A pointer whose pointee will be replaced with a + * pointer to an array of cursors, representing the set of overridden + * methods. If there are no overridden methods, the pointee will be + * set to NULL. The pointee must be freed via a call to + * \c clang_disposeOverriddenCursors(). + * + * \param num_overridden A pointer to the number of overridden + * functions, will be set to the number of overridden functions in the + * array pointed to by \p overridden. + */ +CINDEX_LINKAGE void clang_getOverriddenCursors(CXCursor cursor, + CXCursor **overridden, + unsigned *num_overridden); + +/** + * \brief Free the set of overridden cursors returned by \c + * clang_getOverriddenCursors(). + */ +CINDEX_LINKAGE void clang_disposeOverriddenCursors(CXCursor *overridden); + +/** + * \brief Retrieve the file that is included by the given inclusion directive + * cursor. + */ +CINDEX_LINKAGE CXFile clang_getIncludedFile(CXCursor cursor); + +/** + * @} + */ + +/** + * \defgroup CINDEX_CURSOR_SOURCE Mapping between cursors and source code + * + * Cursors represent a location within the Abstract Syntax Tree (AST). These + * routines help map between cursors and the physical locations where the + * described entities occur in the source code. The mapping is provided in + * both directions, so one can map from source code to the AST and back. + * + * @{ + */ + +/** + * \brief Map a source location to the cursor that describes the entity at that + * location in the source code. + * + * clang_getCursor() maps an arbitrary source location within a translation + * unit down to the most specific cursor that describes the entity at that + * location. For example, given an expression \c x + y, invoking + * clang_getCursor() with a source location pointing to "x" will return the + * cursor for "x"; similarly for "y". If the cursor points anywhere between + * "x" or "y" (e.g., on the + or the whitespace around it), clang_getCursor() + * will return a cursor referring to the "+" expression. + * + * \returns a cursor representing the entity at the given source location, or + * a NULL cursor if no such entity can be found. + */ +CINDEX_LINKAGE CXCursor clang_getCursor(CXTranslationUnit, CXSourceLocation); + +/** + * \brief Retrieve the physical location of the source constructor referenced + * by the given cursor. + * + * The location of a declaration is typically the location of the name of that + * declaration, where the name of that declaration would occur if it is + * unnamed, or some keyword that introduces that particular declaration. + * The location of a reference is where that reference occurs within the + * source code. + */ +CINDEX_LINKAGE CXSourceLocation clang_getCursorLocation(CXCursor); + +/** + * \brief Retrieve the physical extent of the source construct referenced by + * the given cursor. + * + * The extent of a cursor starts with the file/line/column pointing at the + * first character within the source construct that the cursor refers to and + * ends with the last character within that source construct. For a + * declaration, the extent covers the declaration itself. For a reference, + * the extent covers the location of the reference (e.g., where the referenced + * entity was actually used). + */ +CINDEX_LINKAGE CXSourceRange clang_getCursorExtent(CXCursor); + +/** + * @} + */ + +/** + * \defgroup CINDEX_TYPES Type information for CXCursors + * + * @{ + */ + +/** + * \brief Describes the kind of type + */ +enum CXTypeKind { + /** + * \brief Represents an invalid type (e.g., where no type is available). + */ + CXType_Invalid = 0, + + /** + * \brief A type whose specific kind is not exposed via this + * interface. + */ + CXType_Unexposed = 1, + + /* Builtin types */ + CXType_Void = 2, + CXType_Bool = 3, + CXType_Char_U = 4, + CXType_UChar = 5, + CXType_Char16 = 6, + CXType_Char32 = 7, + CXType_UShort = 8, + CXType_UInt = 9, + CXType_ULong = 10, + CXType_ULongLong = 11, + CXType_UInt128 = 12, + CXType_Char_S = 13, + CXType_SChar = 14, + CXType_WChar = 15, + CXType_Short = 16, + CXType_Int = 17, + CXType_Long = 18, + CXType_LongLong = 19, + CXType_Int128 = 20, + CXType_Float = 21, + CXType_Double = 22, + CXType_LongDouble = 23, + CXType_NullPtr = 24, + CXType_Overload = 25, + CXType_Dependent = 26, + CXType_ObjCId = 27, + CXType_ObjCClass = 28, + CXType_ObjCSel = 29, + CXType_FirstBuiltin = CXType_Void, + CXType_LastBuiltin = CXType_ObjCSel, + + CXType_Complex = 100, + CXType_Pointer = 101, + CXType_BlockPointer = 102, + CXType_LValueReference = 103, + CXType_RValueReference = 104, + CXType_Record = 105, + CXType_Enum = 106, + CXType_Typedef = 107, + CXType_ObjCInterface = 108, + CXType_ObjCObjectPointer = 109, + CXType_FunctionNoProto = 110, + CXType_FunctionProto = 111, + CXType_ConstantArray = 112, + CXType_Vector = 113, + CXType_IncompleteArray = 114, + CXType_VariableArray = 115, + CXType_DependentSizedArray = 116, + CXType_MemberPointer = 117 +}; + +/** + * \brief Describes the calling convention of a function type + */ +enum CXCallingConv { + CXCallingConv_Default = 0, + CXCallingConv_C = 1, + CXCallingConv_X86StdCall = 2, + CXCallingConv_X86FastCall = 3, + CXCallingConv_X86ThisCall = 4, + CXCallingConv_X86Pascal = 5, + CXCallingConv_AAPCS = 6, + CXCallingConv_AAPCS_VFP = 7, + /* Value 8 was PnaclCall, but it was never used, so it could safely be re-used. */ + CXCallingConv_IntelOclBicc = 9, + CXCallingConv_X86_64Win64 = 10, + CXCallingConv_X86_64SysV = 11, + CXCallingConv_X86VectorCall = 12, + + CXCallingConv_Invalid = 100, + CXCallingConv_Unexposed = 200 +}; + + +/** + * \brief The type of an element in the abstract syntax tree. + * + */ +typedef struct { + enum CXTypeKind kind; + void *data[2]; +} CXType; + +/** + * \brief Retrieve the type of a CXCursor (if any). + */ +CINDEX_LINKAGE CXType clang_getCursorType(CXCursor C); + +/** + * \brief Pretty-print the underlying type using the rules of the + * language of the translation unit from which it came. + * + * If the type is invalid, an empty string is returned. + */ +CINDEX_LINKAGE CXString clang_getTypeSpelling(CXType CT); + +/** + * \brief Retrieve the underlying type of a typedef declaration. + * + * If the cursor does not reference a typedef declaration, an invalid type is + * returned. + */ +CINDEX_LINKAGE CXType clang_getTypedefDeclUnderlyingType(CXCursor C); + +/** + * \brief Retrieve the integer type of an enum declaration. + * + * If the cursor does not reference an enum declaration, an invalid type is + * returned. + */ +CINDEX_LINKAGE CXType clang_getEnumDeclIntegerType(CXCursor C); + +/** + * \brief Retrieve the integer value of an enum constant declaration as a signed + * long long. + * + * If the cursor does not reference an enum constant declaration, LLONG_MIN is returned. + * Since this is also potentially a valid constant value, the kind of the cursor + * must be verified before calling this function. + */ +CINDEX_LINKAGE long long clang_getEnumConstantDeclValue(CXCursor C); + +/** + * \brief Retrieve the integer value of an enum constant declaration as an unsigned + * long long. + * + * If the cursor does not reference an enum constant declaration, ULLONG_MAX is returned. + * Since this is also potentially a valid constant value, the kind of the cursor + * must be verified before calling this function. + */ +CINDEX_LINKAGE unsigned long long clang_getEnumConstantDeclUnsignedValue(CXCursor C); + +/** + * \brief Retrieve the bit width of a bit field declaration as an integer. + * + * If a cursor that is not a bit field declaration is passed in, -1 is returned. + */ +CINDEX_LINKAGE int clang_getFieldDeclBitWidth(CXCursor C); + +/** + * \brief Retrieve the number of non-variadic arguments associated with a given + * cursor. + * + * The number of arguments can be determined for calls as well as for + * declarations of functions or methods. For other cursors -1 is returned. + */ +CINDEX_LINKAGE int clang_Cursor_getNumArguments(CXCursor C); + +/** + * \brief Retrieve the argument cursor of a function or method. + * + * The argument cursor can be determined for calls as well as for declarations + * of functions or methods. For other cursors and for invalid indices, an + * invalid cursor is returned. + */ +CINDEX_LINKAGE CXCursor clang_Cursor_getArgument(CXCursor C, unsigned i); + +/** + * \brief Describes the kind of a template argument. + * + * See the definition of llvm::clang::TemplateArgument::ArgKind for full + * element descriptions. + */ +enum CXTemplateArgumentKind { + CXTemplateArgumentKind_Null, + CXTemplateArgumentKind_Type, + CXTemplateArgumentKind_Declaration, + CXTemplateArgumentKind_NullPtr, + CXTemplateArgumentKind_Integral, + CXTemplateArgumentKind_Template, + CXTemplateArgumentKind_TemplateExpansion, + CXTemplateArgumentKind_Expression, + CXTemplateArgumentKind_Pack, + /* Indicates an error case, preventing the kind from being deduced. */ + CXTemplateArgumentKind_Invalid +}; + +/** + *\brief Returns the number of template args of a function decl representing a + * template specialization. + * + * If the argument cursor cannot be converted into a template function + * declaration, -1 is returned. + * + * For example, for the following declaration and specialization: + * template + * void foo() { ... } + * + * template <> + * void foo(); + * + * The value 3 would be returned from this call. + */ +CINDEX_LINKAGE int clang_Cursor_getNumTemplateArguments(CXCursor C); + +/** + * \brief Retrieve the kind of the I'th template argument of the CXCursor C. + * + * If the argument CXCursor does not represent a FunctionDecl, an invalid + * template argument kind is returned. + * + * For example, for the following declaration and specialization: + * template + * void foo() { ... } + * + * template <> + * void foo(); + * + * For I = 0, 1, and 2, Type, Integral, and Integral will be returned, + * respectively. + */ +CINDEX_LINKAGE enum CXTemplateArgumentKind clang_Cursor_getTemplateArgumentKind( + CXCursor C, unsigned I); + +/** + * \brief Retrieve a CXType representing the type of a TemplateArgument of a + * function decl representing a template specialization. + * + * If the argument CXCursor does not represent a FunctionDecl whose I'th + * template argument has a kind of CXTemplateArgKind_Integral, an invalid type + * is returned. + * + * For example, for the following declaration and specialization: + * template + * void foo() { ... } + * + * template <> + * void foo(); + * + * If called with I = 0, "float", will be returned. + * Invalid types will be returned for I == 1 or 2. + */ +CINDEX_LINKAGE CXType clang_Cursor_getTemplateArgumentType(CXCursor C, + unsigned I); + +/** + * \brief Retrieve the value of an Integral TemplateArgument (of a function + * decl representing a template specialization) as a signed long long. + * + * It is undefined to call this function on a CXCursor that does not represent a + * FunctionDecl or whose I'th template argument is not an integral value. + * + * For example, for the following declaration and specialization: + * template + * void foo() { ... } + * + * template <> + * void foo(); + * + * If called with I = 1 or 2, -7 or true will be returned, respectively. + * For I == 0, this function's behavior is undefined. + */ +CINDEX_LINKAGE long long clang_Cursor_getTemplateArgumentValue(CXCursor C, + unsigned I); + +/** + * \brief Retrieve the value of an Integral TemplateArgument (of a function + * decl representing a template specialization) as an unsigned long long. + * + * It is undefined to call this function on a CXCursor that does not represent a + * FunctionDecl or whose I'th template argument is not an integral value. + * + * For example, for the following declaration and specialization: + * template + * void foo() { ... } + * + * template <> + * void foo(); + * + * If called with I = 1 or 2, 2147483649 or true will be returned, respectively. + * For I == 0, this function's behavior is undefined. + */ +CINDEX_LINKAGE unsigned long long clang_Cursor_getTemplateArgumentUnsignedValue( + CXCursor C, unsigned I); + +/** + * \brief Determine whether two CXTypes represent the same type. + * + * \returns non-zero if the CXTypes represent the same type and + * zero otherwise. + */ +CINDEX_LINKAGE unsigned clang_equalTypes(CXType A, CXType B); + +/** + * \brief Return the canonical type for a CXType. + * + * Clang's type system explicitly models typedefs and all the ways + * a specific type can be represented. The canonical type is the underlying + * type with all the "sugar" removed. For example, if 'T' is a typedef + * for 'int', the canonical type for 'T' would be 'int'. + */ +CINDEX_LINKAGE CXType clang_getCanonicalType(CXType T); + +/** + * \brief Determine whether a CXType has the "const" qualifier set, + * without looking through typedefs that may have added "const" at a + * different level. + */ +CINDEX_LINKAGE unsigned clang_isConstQualifiedType(CXType T); + +/** + * \brief Determine whether a CXType has the "volatile" qualifier set, + * without looking through typedefs that may have added "volatile" at + * a different level. + */ +CINDEX_LINKAGE unsigned clang_isVolatileQualifiedType(CXType T); + +/** + * \brief Determine whether a CXType has the "restrict" qualifier set, + * without looking through typedefs that may have added "restrict" at a + * different level. + */ +CINDEX_LINKAGE unsigned clang_isRestrictQualifiedType(CXType T); + +/** + * \brief For pointer types, returns the type of the pointee. + */ +CINDEX_LINKAGE CXType clang_getPointeeType(CXType T); + +/** + * \brief Return the cursor for the declaration of the given type. + */ +CINDEX_LINKAGE CXCursor clang_getTypeDeclaration(CXType T); + +/** + * Returns the Objective-C type encoding for the specified declaration. + */ +CINDEX_LINKAGE CXString clang_getDeclObjCTypeEncoding(CXCursor C); + +/** + * \brief Retrieve the spelling of a given CXTypeKind. + */ +CINDEX_LINKAGE CXString clang_getTypeKindSpelling(enum CXTypeKind K); + +/** + * \brief Retrieve the calling convention associated with a function type. + * + * If a non-function type is passed in, CXCallingConv_Invalid is returned. + */ +CINDEX_LINKAGE enum CXCallingConv clang_getFunctionTypeCallingConv(CXType T); + +/** + * \brief Retrieve the return type associated with a function type. + * + * If a non-function type is passed in, an invalid type is returned. + */ +CINDEX_LINKAGE CXType clang_getResultType(CXType T); + +/** + * \brief Retrieve the number of non-variadic parameters associated with a + * function type. + * + * If a non-function type is passed in, -1 is returned. + */ +CINDEX_LINKAGE int clang_getNumArgTypes(CXType T); + +/** + * \brief Retrieve the type of a parameter of a function type. + * + * If a non-function type is passed in or the function does not have enough + * parameters, an invalid type is returned. + */ +CINDEX_LINKAGE CXType clang_getArgType(CXType T, unsigned i); + +/** + * \brief Return 1 if the CXType is a variadic function type, and 0 otherwise. + */ +CINDEX_LINKAGE unsigned clang_isFunctionTypeVariadic(CXType T); + +/** + * \brief Retrieve the return type associated with a given cursor. + * + * This only returns a valid type if the cursor refers to a function or method. + */ +CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C); + +/** + * \brief Return 1 if the CXType is a POD (plain old data) type, and 0 + * otherwise. + */ +CINDEX_LINKAGE unsigned clang_isPODType(CXType T); + +/** + * \brief Return the element type of an array, complex, or vector type. + * + * If a type is passed in that is not an array, complex, or vector type, + * an invalid type is returned. + */ +CINDEX_LINKAGE CXType clang_getElementType(CXType T); + +/** + * \brief Return the number of elements of an array or vector type. + * + * If a type is passed in that is not an array or vector type, + * -1 is returned. + */ +CINDEX_LINKAGE long long clang_getNumElements(CXType T); + +/** + * \brief Return the element type of an array type. + * + * If a non-array type is passed in, an invalid type is returned. + */ +CINDEX_LINKAGE CXType clang_getArrayElementType(CXType T); + +/** + * \brief Return the array size of a constant array. + * + * If a non-array type is passed in, -1 is returned. + */ +CINDEX_LINKAGE long long clang_getArraySize(CXType T); + +/** + * \brief List the possible error codes for \c clang_Type_getSizeOf, + * \c clang_Type_getAlignOf, \c clang_Type_getOffsetOf and + * \c clang_Cursor_getOffsetOf. + * + * A value of this enumeration type can be returned if the target type is not + * a valid argument to sizeof, alignof or offsetof. + */ +enum CXTypeLayoutError { + /** + * \brief Type is of kind CXType_Invalid. + */ + CXTypeLayoutError_Invalid = -1, + /** + * \brief The type is an incomplete Type. + */ + CXTypeLayoutError_Incomplete = -2, + /** + * \brief The type is a dependent Type. + */ + CXTypeLayoutError_Dependent = -3, + /** + * \brief The type is not a constant size type. + */ + CXTypeLayoutError_NotConstantSize = -4, + /** + * \brief The Field name is not valid for this record. + */ + CXTypeLayoutError_InvalidFieldName = -5 +}; + +/** + * \brief Return the alignment of a type in bytes as per C++[expr.alignof] + * standard. + * + * If the type declaration is invalid, CXTypeLayoutError_Invalid is returned. + * If the type declaration is an incomplete type, CXTypeLayoutError_Incomplete + * is returned. + * If the type declaration is a dependent type, CXTypeLayoutError_Dependent is + * returned. + * If the type declaration is not a constant size type, + * CXTypeLayoutError_NotConstantSize is returned. + */ +CINDEX_LINKAGE long long clang_Type_getAlignOf(CXType T); + +/** + * \brief Return the class type of an member pointer type. + * + * If a non-member-pointer type is passed in, an invalid type is returned. + */ +CINDEX_LINKAGE CXType clang_Type_getClassType(CXType T); + +/** + * \brief Return the size of a type in bytes as per C++[expr.sizeof] standard. + * + * If the type declaration is invalid, CXTypeLayoutError_Invalid is returned. + * If the type declaration is an incomplete type, CXTypeLayoutError_Incomplete + * is returned. + * If the type declaration is a dependent type, CXTypeLayoutError_Dependent is + * returned. + */ +CINDEX_LINKAGE long long clang_Type_getSizeOf(CXType T); + +/** + * \brief Return the offset of a field named S in a record of type T in bits + * as it would be returned by __offsetof__ as per C++11[18.2p4] + * + * If the cursor is not a record field declaration, CXTypeLayoutError_Invalid + * is returned. + * If the field's type declaration is an incomplete type, + * CXTypeLayoutError_Incomplete is returned. + * If the field's type declaration is a dependent type, + * CXTypeLayoutError_Dependent is returned. + * If the field's name S is not found, + * CXTypeLayoutError_InvalidFieldName is returned. + */ +CINDEX_LINKAGE long long clang_Type_getOffsetOf(CXType T, const char *S); + +/** + * \brief Return the offset of the field represented by the Cursor. + * + * If the cursor is not a field declaration, -1 is returned. + * If the cursor semantic parent is not a record field declaration, + * CXTypeLayoutError_Invalid is returned. + * If the field's type declaration is an incomplete type, + * CXTypeLayoutError_Incomplete is returned. + * If the field's type declaration is a dependent type, + * CXTypeLayoutError_Dependent is returned. + * If the field's name S is not found, + * CXTypeLayoutError_InvalidFieldName is returned. + */ +CINDEX_LINKAGE long long clang_Cursor_getOffsetOfField(CXCursor C); + +/** + * \brief Determine whether the given cursor represents an anonymous record + * declaration. + */ +CINDEX_LINKAGE unsigned clang_Cursor_isAnonymous(CXCursor C); + + +enum CXRefQualifierKind { + /** \brief No ref-qualifier was provided. */ + CXRefQualifier_None = 0, + /** \brief An lvalue ref-qualifier was provided (\c &). */ + CXRefQualifier_LValue, + /** \brief An rvalue ref-qualifier was provided (\c &&). */ + CXRefQualifier_RValue +}; + +/** + * \brief Returns the number of template arguments for given class template + * specialization, or -1 if type \c T is not a class template specialization. + * + * Variadic argument packs count as only one argument, and can not be inspected + * further. + */ +CINDEX_LINKAGE int clang_Type_getNumTemplateArguments(CXType T); + +/** + * \brief Returns the type template argument of a template class specialization + * at given index. + * + * This function only returns template type arguments and does not handle + * template template arguments or variadic packs. + */ +CINDEX_LINKAGE CXType clang_Type_getTemplateArgumentAsType(CXType T, unsigned i); + +/** + * \brief Retrieve the ref-qualifier kind of a function or method. + * + * The ref-qualifier is returned for C++ functions or methods. For other types + * or non-C++ declarations, CXRefQualifier_None is returned. + */ +CINDEX_LINKAGE enum CXRefQualifierKind clang_Type_getCXXRefQualifier(CXType T); + +/** + * \brief Returns non-zero if the cursor specifies a Record member that is a + * bitfield. + */ +CINDEX_LINKAGE unsigned clang_Cursor_isBitField(CXCursor C); + +/** + * \brief Returns 1 if the base class specified by the cursor with kind + * CX_CXXBaseSpecifier is virtual. + */ +CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor); + +/** + * \brief Represents the C++ access control level to a base class for a + * cursor with kind CX_CXXBaseSpecifier. + */ +enum CX_CXXAccessSpecifier { + CX_CXXInvalidAccessSpecifier, + CX_CXXPublic, + CX_CXXProtected, + CX_CXXPrivate +}; + +/** + * \brief Returns the access control level for the referenced object. + * + * If the cursor refers to a C++ declaration, its access control level within its + * parent scope is returned. Otherwise, if the cursor refers to a base specifier or + * access specifier, the specifier itself is returned. + */ +CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor); + +/** + * \brief Represents the storage classes as declared in the source. CX_SC_Invalid + * was added for the case that the passed cursor in not a declaration. + */ +enum CX_StorageClass { + CX_SC_Invalid, + CX_SC_None, + CX_SC_Extern, + CX_SC_Static, + CX_SC_PrivateExtern, + CX_SC_OpenCLWorkGroupLocal, + CX_SC_Auto, + CX_SC_Register +}; + +/** + * \brief Returns the storage class for a function or variable declaration. + * + * If the passed in Cursor is not a function or variable declaration, + * CX_SC_Invalid is returned else the storage class. + */ +CINDEX_LINKAGE enum CX_StorageClass clang_Cursor_getStorageClass(CXCursor); + +/** + * \brief Determine the number of overloaded declarations referenced by a + * \c CXCursor_OverloadedDeclRef cursor. + * + * \param cursor The cursor whose overloaded declarations are being queried. + * + * \returns The number of overloaded declarations referenced by \c cursor. If it + * is not a \c CXCursor_OverloadedDeclRef cursor, returns 0. + */ +CINDEX_LINKAGE unsigned clang_getNumOverloadedDecls(CXCursor cursor); + +/** + * \brief Retrieve a cursor for one of the overloaded declarations referenced + * by a \c CXCursor_OverloadedDeclRef cursor. + * + * \param cursor The cursor whose overloaded declarations are being queried. + * + * \param index The zero-based index into the set of overloaded declarations in + * the cursor. + * + * \returns A cursor representing the declaration referenced by the given + * \c cursor at the specified \c index. If the cursor does not have an + * associated set of overloaded declarations, or if the index is out of bounds, + * returns \c clang_getNullCursor(); + */ +CINDEX_LINKAGE CXCursor clang_getOverloadedDecl(CXCursor cursor, + unsigned index); + +/** + * @} + */ + +/** + * \defgroup CINDEX_ATTRIBUTES Information for attributes + * + * @{ + */ + + +/** + * \brief For cursors representing an iboutletcollection attribute, + * this function returns the collection element type. + * + */ +CINDEX_LINKAGE CXType clang_getIBOutletCollectionType(CXCursor); + +/** + * @} + */ + +/** + * \defgroup CINDEX_CURSOR_TRAVERSAL Traversing the AST with cursors + * + * These routines provide the ability to traverse the abstract syntax tree + * using cursors. + * + * @{ + */ + +/** + * \brief Describes how the traversal of the children of a particular + * cursor should proceed after visiting a particular child cursor. + * + * A value of this enumeration type should be returned by each + * \c CXCursorVisitor to indicate how clang_visitChildren() proceed. + */ +enum CXChildVisitResult { + /** + * \brief Terminates the cursor traversal. + */ + CXChildVisit_Break, + /** + * \brief Continues the cursor traversal with the next sibling of + * the cursor just visited, without visiting its children. + */ + CXChildVisit_Continue, + /** + * \brief Recursively traverse the children of this cursor, using + * the same visitor and client data. + */ + CXChildVisit_Recurse +}; + +/** + * \brief Visitor invoked for each cursor found by a traversal. + * + * This visitor function will be invoked for each cursor found by + * clang_visitCursorChildren(). Its first argument is the cursor being + * visited, its second argument is the parent visitor for that cursor, + * and its third argument is the client data provided to + * clang_visitCursorChildren(). + * + * The visitor should return one of the \c CXChildVisitResult values + * to direct clang_visitCursorChildren(). + */ +typedef enum CXChildVisitResult (*CXCursorVisitor)(CXCursor cursor, + CXCursor parent, + CXClientData client_data); + +/** + * \brief Visit the children of a particular cursor. + * + * This function visits all the direct children of the given cursor, + * invoking the given \p visitor function with the cursors of each + * visited child. The traversal may be recursive, if the visitor returns + * \c CXChildVisit_Recurse. The traversal may also be ended prematurely, if + * the visitor returns \c CXChildVisit_Break. + * + * \param parent the cursor whose child may be visited. All kinds of + * cursors can be visited, including invalid cursors (which, by + * definition, have no children). + * + * \param visitor the visitor function that will be invoked for each + * child of \p parent. + * + * \param client_data pointer data supplied by the client, which will + * be passed to the visitor each time it is invoked. + * + * \returns a non-zero value if the traversal was terminated + * prematurely by the visitor returning \c CXChildVisit_Break. + */ +CINDEX_LINKAGE unsigned clang_visitChildren(CXCursor parent, + CXCursorVisitor visitor, + CXClientData client_data); +#ifdef __has_feature +# if __has_feature(blocks) +/** + * \brief Visitor invoked for each cursor found by a traversal. + * + * This visitor block will be invoked for each cursor found by + * clang_visitChildrenWithBlock(). Its first argument is the cursor being + * visited, its second argument is the parent visitor for that cursor. + * + * The visitor should return one of the \c CXChildVisitResult values + * to direct clang_visitChildrenWithBlock(). + */ +typedef enum CXChildVisitResult + (^CXCursorVisitorBlock)(CXCursor cursor, CXCursor parent); + +/** + * Visits the children of a cursor using the specified block. Behaves + * identically to clang_visitChildren() in all other respects. + */ +unsigned clang_visitChildrenWithBlock(CXCursor parent, + CXCursorVisitorBlock block); +# endif +#endif + +/** + * @} + */ + +/** + * \defgroup CINDEX_CURSOR_XREF Cross-referencing in the AST + * + * These routines provide the ability to determine references within and + * across translation units, by providing the names of the entities referenced + * by cursors, follow reference cursors to the declarations they reference, + * and associate declarations with their definitions. + * + * @{ + */ + +/** + * \brief Retrieve a Unified Symbol Resolution (USR) for the entity referenced + * by the given cursor. + * + * A Unified Symbol Resolution (USR) is a string that identifies a particular + * entity (function, class, variable, etc.) within a program. USRs can be + * compared across translation units to determine, e.g., when references in + * one translation refer to an entity defined in another translation unit. + */ +CINDEX_LINKAGE CXString clang_getCursorUSR(CXCursor); + +/** + * \brief Construct a USR for a specified Objective-C class. + */ +CINDEX_LINKAGE CXString clang_constructUSR_ObjCClass(const char *class_name); + +/** + * \brief Construct a USR for a specified Objective-C category. + */ +CINDEX_LINKAGE CXString + clang_constructUSR_ObjCCategory(const char *class_name, + const char *category_name); + +/** + * \brief Construct a USR for a specified Objective-C protocol. + */ +CINDEX_LINKAGE CXString + clang_constructUSR_ObjCProtocol(const char *protocol_name); + + +/** + * \brief Construct a USR for a specified Objective-C instance variable and + * the USR for its containing class. + */ +CINDEX_LINKAGE CXString clang_constructUSR_ObjCIvar(const char *name, + CXString classUSR); + +/** + * \brief Construct a USR for a specified Objective-C method and + * the USR for its containing class. + */ +CINDEX_LINKAGE CXString clang_constructUSR_ObjCMethod(const char *name, + unsigned isInstanceMethod, + CXString classUSR); + +/** + * \brief Construct a USR for a specified Objective-C property and the USR + * for its containing class. + */ +CINDEX_LINKAGE CXString clang_constructUSR_ObjCProperty(const char *property, + CXString classUSR); + +/** + * \brief Retrieve a name for the entity referenced by this cursor. + */ +CINDEX_LINKAGE CXString clang_getCursorSpelling(CXCursor); + +/** + * \brief Retrieve a range for a piece that forms the cursors spelling name. + * Most of the times there is only one range for the complete spelling but for + * Objective-C methods and Objective-C message expressions, there are multiple + * pieces for each selector identifier. + * + * \param pieceIndex the index of the spelling name piece. If this is greater + * than the actual number of pieces, it will return a NULL (invalid) range. + * + * \param options Reserved. + */ +CINDEX_LINKAGE CXSourceRange clang_Cursor_getSpellingNameRange(CXCursor, + unsigned pieceIndex, + unsigned options); + +/** + * \brief Retrieve the display name for the entity referenced by this cursor. + * + * The display name contains extra information that helps identify the cursor, + * such as the parameters of a function or template or the arguments of a + * class template specialization. + */ +CINDEX_LINKAGE CXString clang_getCursorDisplayName(CXCursor); + +/** \brief For a cursor that is a reference, retrieve a cursor representing the + * entity that it references. + * + * Reference cursors refer to other entities in the AST. For example, an + * Objective-C superclass reference cursor refers to an Objective-C class. + * This function produces the cursor for the Objective-C class from the + * cursor for the superclass reference. If the input cursor is a declaration or + * definition, it returns that declaration or definition unchanged. + * Otherwise, returns the NULL cursor. + */ +CINDEX_LINKAGE CXCursor clang_getCursorReferenced(CXCursor); + +/** + * \brief For a cursor that is either a reference to or a declaration + * of some entity, retrieve a cursor that describes the definition of + * that entity. + * + * Some entities can be declared multiple times within a translation + * unit, but only one of those declarations can also be a + * definition. For example, given: + * + * \code + * int f(int, int); + * int g(int x, int y) { return f(x, y); } + * int f(int a, int b) { return a + b; } + * int f(int, int); + * \endcode + * + * there are three declarations of the function "f", but only the + * second one is a definition. The clang_getCursorDefinition() + * function will take any cursor pointing to a declaration of "f" + * (the first or fourth lines of the example) or a cursor referenced + * that uses "f" (the call to "f' inside "g") and will return a + * declaration cursor pointing to the definition (the second "f" + * declaration). + * + * If given a cursor for which there is no corresponding definition, + * e.g., because there is no definition of that entity within this + * translation unit, returns a NULL cursor. + */ +CINDEX_LINKAGE CXCursor clang_getCursorDefinition(CXCursor); + +/** + * \brief Determine whether the declaration pointed to by this cursor + * is also a definition of that entity. + */ +CINDEX_LINKAGE unsigned clang_isCursorDefinition(CXCursor); + +/** + * \brief Retrieve the canonical cursor corresponding to the given cursor. + * + * In the C family of languages, many kinds of entities can be declared several + * times within a single translation unit. For example, a structure type can + * be forward-declared (possibly multiple times) and later defined: + * + * \code + * struct X; + * struct X; + * struct X { + * int member; + * }; + * \endcode + * + * The declarations and the definition of \c X are represented by three + * different cursors, all of which are declarations of the same underlying + * entity. One of these cursor is considered the "canonical" cursor, which + * is effectively the representative for the underlying entity. One can + * determine if two cursors are declarations of the same underlying entity by + * comparing their canonical cursors. + * + * \returns The canonical cursor for the entity referred to by the given cursor. + */ +CINDEX_LINKAGE CXCursor clang_getCanonicalCursor(CXCursor); + + +/** + * \brief If the cursor points to a selector identifier in an Objective-C + * method or message expression, this returns the selector index. + * + * After getting a cursor with #clang_getCursor, this can be called to + * determine if the location points to a selector identifier. + * + * \returns The selector index if the cursor is an Objective-C method or message + * expression and the cursor is pointing to a selector identifier, or -1 + * otherwise. + */ +CINDEX_LINKAGE int clang_Cursor_getObjCSelectorIndex(CXCursor); + +/** + * \brief Given a cursor pointing to a C++ method call or an Objective-C + * message, returns non-zero if the method/message is "dynamic", meaning: + * + * For a C++ method: the call is virtual. + * For an Objective-C message: the receiver is an object instance, not 'super' + * or a specific class. + * + * If the method/message is "static" or the cursor does not point to a + * method/message, it will return zero. + */ +CINDEX_LINKAGE int clang_Cursor_isDynamicCall(CXCursor C); + +/** + * \brief Given a cursor pointing to an Objective-C message, returns the CXType + * of the receiver. + */ +CINDEX_LINKAGE CXType clang_Cursor_getReceiverType(CXCursor C); + +/** + * \brief Property attributes for a \c CXCursor_ObjCPropertyDecl. + */ +typedef enum { + CXObjCPropertyAttr_noattr = 0x00, + CXObjCPropertyAttr_readonly = 0x01, + CXObjCPropertyAttr_getter = 0x02, + CXObjCPropertyAttr_assign = 0x04, + CXObjCPropertyAttr_readwrite = 0x08, + CXObjCPropertyAttr_retain = 0x10, + CXObjCPropertyAttr_copy = 0x20, + CXObjCPropertyAttr_nonatomic = 0x40, + CXObjCPropertyAttr_setter = 0x80, + CXObjCPropertyAttr_atomic = 0x100, + CXObjCPropertyAttr_weak = 0x200, + CXObjCPropertyAttr_strong = 0x400, + CXObjCPropertyAttr_unsafe_unretained = 0x800 +} CXObjCPropertyAttrKind; + +/** + * \brief Given a cursor that represents a property declaration, return the + * associated property attributes. The bits are formed from + * \c CXObjCPropertyAttrKind. + * + * \param reserved Reserved for future use, pass 0. + */ +CINDEX_LINKAGE unsigned clang_Cursor_getObjCPropertyAttributes(CXCursor C, + unsigned reserved); + +/** + * \brief 'Qualifiers' written next to the return and parameter types in + * Objective-C method declarations. + */ +typedef enum { + CXObjCDeclQualifier_None = 0x0, + CXObjCDeclQualifier_In = 0x1, + CXObjCDeclQualifier_Inout = 0x2, + CXObjCDeclQualifier_Out = 0x4, + CXObjCDeclQualifier_Bycopy = 0x8, + CXObjCDeclQualifier_Byref = 0x10, + CXObjCDeclQualifier_Oneway = 0x20 +} CXObjCDeclQualifierKind; + +/** + * \brief Given a cursor that represents an Objective-C method or parameter + * declaration, return the associated Objective-C qualifiers for the return + * type or the parameter respectively. The bits are formed from + * CXObjCDeclQualifierKind. + */ +CINDEX_LINKAGE unsigned clang_Cursor_getObjCDeclQualifiers(CXCursor C); + +/** + * \brief Given a cursor that represents an Objective-C method or property + * declaration, return non-zero if the declaration was affected by "@optional". + * Returns zero if the cursor is not such a declaration or it is "@required". + */ +CINDEX_LINKAGE unsigned clang_Cursor_isObjCOptional(CXCursor C); + +/** + * \brief Returns non-zero if the given cursor is a variadic function or method. + */ +CINDEX_LINKAGE unsigned clang_Cursor_isVariadic(CXCursor C); + +/** + * \brief Given a cursor that represents a declaration, return the associated + * comment's source range. The range may include multiple consecutive comments + * with whitespace in between. + */ +CINDEX_LINKAGE CXSourceRange clang_Cursor_getCommentRange(CXCursor C); + +/** + * \brief Given a cursor that represents a declaration, return the associated + * comment text, including comment markers. + */ +CINDEX_LINKAGE CXString clang_Cursor_getRawCommentText(CXCursor C); + +/** + * \brief Given a cursor that represents a documentable entity (e.g., + * declaration), return the associated \\brief paragraph; otherwise return the + * first paragraph. + */ +CINDEX_LINKAGE CXString clang_Cursor_getBriefCommentText(CXCursor C); + +/** + * @} + */ + +/** \defgroup CINDEX_MANGLE Name Mangling API Functions + * + * @{ + */ + +/** + * \brief Retrieve the CXString representing the mangled name of the cursor. + */ +CINDEX_LINKAGE CXString clang_Cursor_getMangling(CXCursor); + +/** + * @} + */ + +/** + * \defgroup CINDEX_MODULE Module introspection + * + * The functions in this group provide access to information about modules. + * + * @{ + */ + +typedef void *CXModule; + +/** + * \brief Given a CXCursor_ModuleImportDecl cursor, return the associated module. + */ +CINDEX_LINKAGE CXModule clang_Cursor_getModule(CXCursor C); + +/** + * \brief Given a CXFile header file, return the module that contains it, if one + * exists. + */ +CINDEX_LINKAGE CXModule clang_getModuleForFile(CXTranslationUnit, CXFile); + +/** + * \param Module a module object. + * + * \returns the module file where the provided module object came from. + */ +CINDEX_LINKAGE CXFile clang_Module_getASTFile(CXModule Module); + +/** + * \param Module a module object. + * + * \returns the parent of a sub-module or NULL if the given module is top-level, + * e.g. for 'std.vector' it will return the 'std' module. + */ +CINDEX_LINKAGE CXModule clang_Module_getParent(CXModule Module); + +/** + * \param Module a module object. + * + * \returns the name of the module, e.g. for the 'std.vector' sub-module it + * will return "vector". + */ +CINDEX_LINKAGE CXString clang_Module_getName(CXModule Module); + +/** + * \param Module a module object. + * + * \returns the full name of the module, e.g. "std.vector". + */ +CINDEX_LINKAGE CXString clang_Module_getFullName(CXModule Module); + +/** + * \param Module a module object. + * + * \returns non-zero if the module is a system one. + */ +CINDEX_LINKAGE int clang_Module_isSystem(CXModule Module); + +/** + * \param Module a module object. + * + * \returns the number of top level headers associated with this module. + */ +CINDEX_LINKAGE unsigned clang_Module_getNumTopLevelHeaders(CXTranslationUnit, + CXModule Module); + +/** + * \param Module a module object. + * + * \param Index top level header index (zero-based). + * + * \returns the specified top level header associated with the module. + */ +CINDEX_LINKAGE +CXFile clang_Module_getTopLevelHeader(CXTranslationUnit, + CXModule Module, unsigned Index); + +/** + * @} + */ + +/** + * \defgroup CINDEX_CPP C++ AST introspection + * + * The routines in this group provide access information in the ASTs specific + * to C++ language features. + * + * @{ + */ + +/** + * \brief Determine if a C++ member function or member function template is + * pure virtual. + */ +CINDEX_LINKAGE unsigned clang_CXXMethod_isPureVirtual(CXCursor C); + +/** + * \brief Determine if a C++ member function or member function template is + * declared 'static'. + */ +CINDEX_LINKAGE unsigned clang_CXXMethod_isStatic(CXCursor C); + +/** + * \brief Determine if a C++ member function or member function template is + * explicitly declared 'virtual' or if it overrides a virtual method from + * one of the base classes. + */ +CINDEX_LINKAGE unsigned clang_CXXMethod_isVirtual(CXCursor C); + +/** + * \brief Determine if a C++ member function or member function template is + * declared 'const'. + */ +CINDEX_LINKAGE unsigned clang_CXXMethod_isConst(CXCursor C); + +/** + * \brief Given a cursor that represents a template, determine + * the cursor kind of the specializations would be generated by instantiating + * the template. + * + * This routine can be used to determine what flavor of function template, + * class template, or class template partial specialization is stored in the + * cursor. For example, it can describe whether a class template cursor is + * declared with "struct", "class" or "union". + * + * \param C The cursor to query. This cursor should represent a template + * declaration. + * + * \returns The cursor kind of the specializations that would be generated + * by instantiating the template \p C. If \p C is not a template, returns + * \c CXCursor_NoDeclFound. + */ +CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C); + +/** + * \brief Given a cursor that may represent a specialization or instantiation + * of a template, retrieve the cursor that represents the template that it + * specializes or from which it was instantiated. + * + * This routine determines the template involved both for explicit + * specializations of templates and for implicit instantiations of the template, + * both of which are referred to as "specializations". For a class template + * specialization (e.g., \c std::vector), this routine will return + * either the primary template (\c std::vector) or, if the specialization was + * instantiated from a class template partial specialization, the class template + * partial specialization. For a class template partial specialization and a + * function template specialization (including instantiations), this + * this routine will return the specialized template. + * + * For members of a class template (e.g., member functions, member classes, or + * static data members), returns the specialized or instantiated member. + * Although not strictly "templates" in the C++ language, members of class + * templates have the same notions of specializations and instantiations that + * templates do, so this routine treats them similarly. + * + * \param C A cursor that may be a specialization of a template or a member + * of a template. + * + * \returns If the given cursor is a specialization or instantiation of a + * template or a member thereof, the template or member that it specializes or + * from which it was instantiated. Otherwise, returns a NULL cursor. + */ +CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C); + +/** + * \brief Given a cursor that references something else, return the source range + * covering that reference. + * + * \param C A cursor pointing to a member reference, a declaration reference, or + * an operator call. + * \param NameFlags A bitset with three independent flags: + * CXNameRange_WantQualifier, CXNameRange_WantTemplateArgs, and + * CXNameRange_WantSinglePiece. + * \param PieceIndex For contiguous names or when passing the flag + * CXNameRange_WantSinglePiece, only one piece with index 0 is + * available. When the CXNameRange_WantSinglePiece flag is not passed for a + * non-contiguous names, this index can be used to retrieve the individual + * pieces of the name. See also CXNameRange_WantSinglePiece. + * + * \returns The piece of the name pointed to by the given cursor. If there is no + * name, or if the PieceIndex is out-of-range, a null-cursor will be returned. + */ +CINDEX_LINKAGE CXSourceRange clang_getCursorReferenceNameRange(CXCursor C, + unsigned NameFlags, + unsigned PieceIndex); + +enum CXNameRefFlags { + /** + * \brief Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the + * range. + */ + CXNameRange_WantQualifier = 0x1, + + /** + * \brief Include the explicit template arguments, e.g. \ in x.f, + * in the range. + */ + CXNameRange_WantTemplateArgs = 0x2, + + /** + * \brief If the name is non-contiguous, return the full spanning range. + * + * Non-contiguous names occur in Objective-C when a selector with two or more + * parameters is used, or in C++ when using an operator: + * \code + * [object doSomething:here withValue:there]; // Objective-C + * return some_vector[1]; // C++ + * \endcode + */ + CXNameRange_WantSinglePiece = 0x4 +}; + +/** + * @} + */ + +/** + * \defgroup CINDEX_LEX Token extraction and manipulation + * + * The routines in this group provide access to the tokens within a + * translation unit, along with a semantic mapping of those tokens to + * their corresponding cursors. + * + * @{ + */ + +/** + * \brief Describes a kind of token. + */ +typedef enum CXTokenKind { + /** + * \brief A token that contains some kind of punctuation. + */ + CXToken_Punctuation, + + /** + * \brief A language keyword. + */ + CXToken_Keyword, + + /** + * \brief An identifier (that is not a keyword). + */ + CXToken_Identifier, + + /** + * \brief A numeric, string, or character literal. + */ + CXToken_Literal, + + /** + * \brief A comment. + */ + CXToken_Comment +} CXTokenKind; + +/** + * \brief Describes a single preprocessing token. + */ +typedef struct { + unsigned int_data[4]; + void *ptr_data; +} CXToken; + +/** + * \brief Determine the kind of the given token. + */ +CINDEX_LINKAGE CXTokenKind clang_getTokenKind(CXToken); + +/** + * \brief Determine the spelling of the given token. + * + * The spelling of a token is the textual representation of that token, e.g., + * the text of an identifier or keyword. + */ +CINDEX_LINKAGE CXString clang_getTokenSpelling(CXTranslationUnit, CXToken); + +/** + * \brief Retrieve the source location of the given token. + */ +CINDEX_LINKAGE CXSourceLocation clang_getTokenLocation(CXTranslationUnit, + CXToken); + +/** + * \brief Retrieve a source range that covers the given token. + */ +CINDEX_LINKAGE CXSourceRange clang_getTokenExtent(CXTranslationUnit, CXToken); + +/** + * \brief Tokenize the source code described by the given range into raw + * lexical tokens. + * + * \param TU the translation unit whose text is being tokenized. + * + * \param Range the source range in which text should be tokenized. All of the + * tokens produced by tokenization will fall within this source range, + * + * \param Tokens this pointer will be set to point to the array of tokens + * that occur within the given source range. The returned pointer must be + * freed with clang_disposeTokens() before the translation unit is destroyed. + * + * \param NumTokens will be set to the number of tokens in the \c *Tokens + * array. + * + */ +CINDEX_LINKAGE void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range, + CXToken **Tokens, unsigned *NumTokens); + +/** + * \brief Annotate the given set of tokens by providing cursors for each token + * that can be mapped to a specific entity within the abstract syntax tree. + * + * This token-annotation routine is equivalent to invoking + * clang_getCursor() for the source locations of each of the + * tokens. The cursors provided are filtered, so that only those + * cursors that have a direct correspondence to the token are + * accepted. For example, given a function call \c f(x), + * clang_getCursor() would provide the following cursors: + * + * * when the cursor is over the 'f', a DeclRefExpr cursor referring to 'f'. + * * when the cursor is over the '(' or the ')', a CallExpr referring to 'f'. + * * when the cursor is over the 'x', a DeclRefExpr cursor referring to 'x'. + * + * Only the first and last of these cursors will occur within the + * annotate, since the tokens "f" and "x' directly refer to a function + * and a variable, respectively, but the parentheses are just a small + * part of the full syntax of the function call expression, which is + * not provided as an annotation. + * + * \param TU the translation unit that owns the given tokens. + * + * \param Tokens the set of tokens to annotate. + * + * \param NumTokens the number of tokens in \p Tokens. + * + * \param Cursors an array of \p NumTokens cursors, whose contents will be + * replaced with the cursors corresponding to each token. + */ +CINDEX_LINKAGE void clang_annotateTokens(CXTranslationUnit TU, + CXToken *Tokens, unsigned NumTokens, + CXCursor *Cursors); + +/** + * \brief Free the given set of tokens. + */ +CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU, + CXToken *Tokens, unsigned NumTokens); + +/** + * @} + */ + +/** + * \defgroup CINDEX_DEBUG Debugging facilities + * + * These routines are used for testing and debugging, only, and should not + * be relied upon. + * + * @{ + */ + +/* for debug/testing */ +CINDEX_LINKAGE CXString clang_getCursorKindSpelling(enum CXCursorKind Kind); +CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent(CXCursor, + const char **startBuf, + const char **endBuf, + unsigned *startLine, + unsigned *startColumn, + unsigned *endLine, + unsigned *endColumn); +CINDEX_LINKAGE void clang_enableStackTraces(void); +CINDEX_LINKAGE void clang_executeOnThread(void (*fn)(void*), void *user_data, + unsigned stack_size); + +/** + * @} + */ + +/** + * \defgroup CINDEX_CODE_COMPLET Code completion + * + * Code completion involves taking an (incomplete) source file, along with + * knowledge of where the user is actively editing that file, and suggesting + * syntactically- and semantically-valid constructs that the user might want to + * use at that particular point in the source code. These data structures and + * routines provide support for code completion. + * + * @{ + */ + +/** + * \brief A semantic string that describes a code-completion result. + * + * A semantic string that describes the formatting of a code-completion + * result as a single "template" of text that should be inserted into the + * source buffer when a particular code-completion result is selected. + * Each semantic string is made up of some number of "chunks", each of which + * contains some text along with a description of what that text means, e.g., + * the name of the entity being referenced, whether the text chunk is part of + * the template, or whether it is a "placeholder" that the user should replace + * with actual code,of a specific kind. See \c CXCompletionChunkKind for a + * description of the different kinds of chunks. + */ +typedef void *CXCompletionString; + +/** + * \brief A single result of code completion. + */ +typedef struct { + /** + * \brief The kind of entity that this completion refers to. + * + * The cursor kind will be a macro, keyword, or a declaration (one of the + * *Decl cursor kinds), describing the entity that the completion is + * referring to. + * + * \todo In the future, we would like to provide a full cursor, to allow + * the client to extract additional information from declaration. + */ + enum CXCursorKind CursorKind; + + /** + * \brief The code-completion string that describes how to insert this + * code-completion result into the editing buffer. + */ + CXCompletionString CompletionString; +} CXCompletionResult; + +/** + * \brief Describes a single piece of text within a code-completion string. + * + * Each "chunk" within a code-completion string (\c CXCompletionString) is + * either a piece of text with a specific "kind" that describes how that text + * should be interpreted by the client or is another completion string. + */ +enum CXCompletionChunkKind { + /** + * \brief A code-completion string that describes "optional" text that + * could be a part of the template (but is not required). + * + * The Optional chunk is the only kind of chunk that has a code-completion + * string for its representation, which is accessible via + * \c clang_getCompletionChunkCompletionString(). The code-completion string + * describes an additional part of the template that is completely optional. + * For example, optional chunks can be used to describe the placeholders for + * arguments that match up with defaulted function parameters, e.g. given: + * + * \code + * void f(int x, float y = 3.14, double z = 2.71828); + * \endcode + * + * The code-completion string for this function would contain: + * - a TypedText chunk for "f". + * - a LeftParen chunk for "(". + * - a Placeholder chunk for "int x" + * - an Optional chunk containing the remaining defaulted arguments, e.g., + * - a Comma chunk for "," + * - a Placeholder chunk for "float y" + * - an Optional chunk containing the last defaulted argument: + * - a Comma chunk for "," + * - a Placeholder chunk for "double z" + * - a RightParen chunk for ")" + * + * There are many ways to handle Optional chunks. Two simple approaches are: + * - Completely ignore optional chunks, in which case the template for the + * function "f" would only include the first parameter ("int x"). + * - Fully expand all optional chunks, in which case the template for the + * function "f" would have all of the parameters. + */ + CXCompletionChunk_Optional, + /** + * \brief Text that a user would be expected to type to get this + * code-completion result. + * + * There will be exactly one "typed text" chunk in a semantic string, which + * will typically provide the spelling of a keyword or the name of a + * declaration that could be used at the current code point. Clients are + * expected to filter the code-completion results based on the text in this + * chunk. + */ + CXCompletionChunk_TypedText, + /** + * \brief Text that should be inserted as part of a code-completion result. + * + * A "text" chunk represents text that is part of the template to be + * inserted into user code should this particular code-completion result + * be selected. + */ + CXCompletionChunk_Text, + /** + * \brief Placeholder text that should be replaced by the user. + * + * A "placeholder" chunk marks a place where the user should insert text + * into the code-completion template. For example, placeholders might mark + * the function parameters for a function declaration, to indicate that the + * user should provide arguments for each of those parameters. The actual + * text in a placeholder is a suggestion for the text to display before + * the user replaces the placeholder with real code. + */ + CXCompletionChunk_Placeholder, + /** + * \brief Informative text that should be displayed but never inserted as + * part of the template. + * + * An "informative" chunk contains annotations that can be displayed to + * help the user decide whether a particular code-completion result is the + * right option, but which is not part of the actual template to be inserted + * by code completion. + */ + CXCompletionChunk_Informative, + /** + * \brief Text that describes the current parameter when code-completion is + * referring to function call, message send, or template specialization. + * + * A "current parameter" chunk occurs when code-completion is providing + * information about a parameter corresponding to the argument at the + * code-completion point. For example, given a function + * + * \code + * int add(int x, int y); + * \endcode + * + * and the source code \c add(, where the code-completion point is after the + * "(", the code-completion string will contain a "current parameter" chunk + * for "int x", indicating that the current argument will initialize that + * parameter. After typing further, to \c add(17, (where the code-completion + * point is after the ","), the code-completion string will contain a + * "current paremeter" chunk to "int y". + */ + CXCompletionChunk_CurrentParameter, + /** + * \brief A left parenthesis ('('), used to initiate a function call or + * signal the beginning of a function parameter list. + */ + CXCompletionChunk_LeftParen, + /** + * \brief A right parenthesis (')'), used to finish a function call or + * signal the end of a function parameter list. + */ + CXCompletionChunk_RightParen, + /** + * \brief A left bracket ('['). + */ + CXCompletionChunk_LeftBracket, + /** + * \brief A right bracket (']'). + */ + CXCompletionChunk_RightBracket, + /** + * \brief A left brace ('{'). + */ + CXCompletionChunk_LeftBrace, + /** + * \brief A right brace ('}'). + */ + CXCompletionChunk_RightBrace, + /** + * \brief A left angle bracket ('<'). + */ + CXCompletionChunk_LeftAngle, + /** + * \brief A right angle bracket ('>'). + */ + CXCompletionChunk_RightAngle, + /** + * \brief A comma separator (','). + */ + CXCompletionChunk_Comma, + /** + * \brief Text that specifies the result type of a given result. + * + * This special kind of informative chunk is not meant to be inserted into + * the text buffer. Rather, it is meant to illustrate the type that an + * expression using the given completion string would have. + */ + CXCompletionChunk_ResultType, + /** + * \brief A colon (':'). + */ + CXCompletionChunk_Colon, + /** + * \brief A semicolon (';'). + */ + CXCompletionChunk_SemiColon, + /** + * \brief An '=' sign. + */ + CXCompletionChunk_Equal, + /** + * Horizontal space (' '). + */ + CXCompletionChunk_HorizontalSpace, + /** + * Vertical space ('\n'), after which it is generally a good idea to + * perform indentation. + */ + CXCompletionChunk_VerticalSpace +}; + +/** + * \brief Determine the kind of a particular chunk within a completion string. + * + * \param completion_string the completion string to query. + * + * \param chunk_number the 0-based index of the chunk in the completion string. + * + * \returns the kind of the chunk at the index \c chunk_number. + */ +CINDEX_LINKAGE enum CXCompletionChunkKind +clang_getCompletionChunkKind(CXCompletionString completion_string, + unsigned chunk_number); + +/** + * \brief Retrieve the text associated with a particular chunk within a + * completion string. + * + * \param completion_string the completion string to query. + * + * \param chunk_number the 0-based index of the chunk in the completion string. + * + * \returns the text associated with the chunk at index \c chunk_number. + */ +CINDEX_LINKAGE CXString +clang_getCompletionChunkText(CXCompletionString completion_string, + unsigned chunk_number); + +/** + * \brief Retrieve the completion string associated with a particular chunk + * within a completion string. + * + * \param completion_string the completion string to query. + * + * \param chunk_number the 0-based index of the chunk in the completion string. + * + * \returns the completion string associated with the chunk at index + * \c chunk_number. + */ +CINDEX_LINKAGE CXCompletionString +clang_getCompletionChunkCompletionString(CXCompletionString completion_string, + unsigned chunk_number); + +/** + * \brief Retrieve the number of chunks in the given code-completion string. + */ +CINDEX_LINKAGE unsigned +clang_getNumCompletionChunks(CXCompletionString completion_string); + +/** + * \brief Determine the priority of this code completion. + * + * The priority of a code completion indicates how likely it is that this + * particular completion is the completion that the user will select. The + * priority is selected by various internal heuristics. + * + * \param completion_string The completion string to query. + * + * \returns The priority of this completion string. Smaller values indicate + * higher-priority (more likely) completions. + */ +CINDEX_LINKAGE unsigned +clang_getCompletionPriority(CXCompletionString completion_string); + +/** + * \brief Determine the availability of the entity that this code-completion + * string refers to. + * + * \param completion_string The completion string to query. + * + * \returns The availability of the completion string. + */ +CINDEX_LINKAGE enum CXAvailabilityKind +clang_getCompletionAvailability(CXCompletionString completion_string); + +/** + * \brief Retrieve the number of annotations associated with the given + * completion string. + * + * \param completion_string the completion string to query. + * + * \returns the number of annotations associated with the given completion + * string. + */ +CINDEX_LINKAGE unsigned +clang_getCompletionNumAnnotations(CXCompletionString completion_string); + +/** + * \brief Retrieve the annotation associated with the given completion string. + * + * \param completion_string the completion string to query. + * + * \param annotation_number the 0-based index of the annotation of the + * completion string. + * + * \returns annotation string associated with the completion at index + * \c annotation_number, or a NULL string if that annotation is not available. + */ +CINDEX_LINKAGE CXString +clang_getCompletionAnnotation(CXCompletionString completion_string, + unsigned annotation_number); + +/** + * \brief Retrieve the parent context of the given completion string. + * + * The parent context of a completion string is the semantic parent of + * the declaration (if any) that the code completion represents. For example, + * a code completion for an Objective-C method would have the method's class + * or protocol as its context. + * + * \param completion_string The code completion string whose parent is + * being queried. + * + * \param kind DEPRECATED: always set to CXCursor_NotImplemented if non-NULL. + * + * \returns The name of the completion parent, e.g., "NSObject" if + * the completion string represents a method in the NSObject class. + */ +CINDEX_LINKAGE CXString +clang_getCompletionParent(CXCompletionString completion_string, + enum CXCursorKind *kind); + +/** + * \brief Retrieve the brief documentation comment attached to the declaration + * that corresponds to the given completion string. + */ +CINDEX_LINKAGE CXString +clang_getCompletionBriefComment(CXCompletionString completion_string); + +/** + * \brief Retrieve a completion string for an arbitrary declaration or macro + * definition cursor. + * + * \param cursor The cursor to query. + * + * \returns A non-context-sensitive completion string for declaration and macro + * definition cursors, or NULL for other kinds of cursors. + */ +CINDEX_LINKAGE CXCompletionString +clang_getCursorCompletionString(CXCursor cursor); + +/** + * \brief Contains the results of code-completion. + * + * This data structure contains the results of code completion, as + * produced by \c clang_codeCompleteAt(). Its contents must be freed by + * \c clang_disposeCodeCompleteResults. + */ +typedef struct { + /** + * \brief The code-completion results. + */ + CXCompletionResult *Results; + + /** + * \brief The number of code-completion results stored in the + * \c Results array. + */ + unsigned NumResults; +} CXCodeCompleteResults; + +/** + * \brief Flags that can be passed to \c clang_codeCompleteAt() to + * modify its behavior. + * + * The enumerators in this enumeration can be bitwise-OR'd together to + * provide multiple options to \c clang_codeCompleteAt(). + */ +enum CXCodeComplete_Flags { + /** + * \brief Whether to include macros within the set of code + * completions returned. + */ + CXCodeComplete_IncludeMacros = 0x01, + + /** + * \brief Whether to include code patterns for language constructs + * within the set of code completions, e.g., for loops. + */ + CXCodeComplete_IncludeCodePatterns = 0x02, + + /** + * \brief Whether to include brief documentation within the set of code + * completions returned. + */ + CXCodeComplete_IncludeBriefComments = 0x04 +}; + +/** + * \brief Bits that represent the context under which completion is occurring. + * + * The enumerators in this enumeration may be bitwise-OR'd together if multiple + * contexts are occurring simultaneously. + */ +enum CXCompletionContext { + /** + * \brief The context for completions is unexposed, as only Clang results + * should be included. (This is equivalent to having no context bits set.) + */ + CXCompletionContext_Unexposed = 0, + + /** + * \brief Completions for any possible type should be included in the results. + */ + CXCompletionContext_AnyType = 1 << 0, + + /** + * \brief Completions for any possible value (variables, function calls, etc.) + * should be included in the results. + */ + CXCompletionContext_AnyValue = 1 << 1, + /** + * \brief Completions for values that resolve to an Objective-C object should + * be included in the results. + */ + CXCompletionContext_ObjCObjectValue = 1 << 2, + /** + * \brief Completions for values that resolve to an Objective-C selector + * should be included in the results. + */ + CXCompletionContext_ObjCSelectorValue = 1 << 3, + /** + * \brief Completions for values that resolve to a C++ class type should be + * included in the results. + */ + CXCompletionContext_CXXClassTypeValue = 1 << 4, + + /** + * \brief Completions for fields of the member being accessed using the dot + * operator should be included in the results. + */ + CXCompletionContext_DotMemberAccess = 1 << 5, + /** + * \brief Completions for fields of the member being accessed using the arrow + * operator should be included in the results. + */ + CXCompletionContext_ArrowMemberAccess = 1 << 6, + /** + * \brief Completions for properties of the Objective-C object being accessed + * using the dot operator should be included in the results. + */ + CXCompletionContext_ObjCPropertyAccess = 1 << 7, + + /** + * \brief Completions for enum tags should be included in the results. + */ + CXCompletionContext_EnumTag = 1 << 8, + /** + * \brief Completions for union tags should be included in the results. + */ + CXCompletionContext_UnionTag = 1 << 9, + /** + * \brief Completions for struct tags should be included in the results. + */ + CXCompletionContext_StructTag = 1 << 10, + + /** + * \brief Completions for C++ class names should be included in the results. + */ + CXCompletionContext_ClassTag = 1 << 11, + /** + * \brief Completions for C++ namespaces and namespace aliases should be + * included in the results. + */ + CXCompletionContext_Namespace = 1 << 12, + /** + * \brief Completions for C++ nested name specifiers should be included in + * the results. + */ + CXCompletionContext_NestedNameSpecifier = 1 << 13, + + /** + * \brief Completions for Objective-C interfaces (classes) should be included + * in the results. + */ + CXCompletionContext_ObjCInterface = 1 << 14, + /** + * \brief Completions for Objective-C protocols should be included in + * the results. + */ + CXCompletionContext_ObjCProtocol = 1 << 15, + /** + * \brief Completions for Objective-C categories should be included in + * the results. + */ + CXCompletionContext_ObjCCategory = 1 << 16, + /** + * \brief Completions for Objective-C instance messages should be included + * in the results. + */ + CXCompletionContext_ObjCInstanceMessage = 1 << 17, + /** + * \brief Completions for Objective-C class messages should be included in + * the results. + */ + CXCompletionContext_ObjCClassMessage = 1 << 18, + /** + * \brief Completions for Objective-C selector names should be included in + * the results. + */ + CXCompletionContext_ObjCSelectorName = 1 << 19, + + /** + * \brief Completions for preprocessor macro names should be included in + * the results. + */ + CXCompletionContext_MacroName = 1 << 20, + + /** + * \brief Natural language completions should be included in the results. + */ + CXCompletionContext_NaturalLanguage = 1 << 21, + + /** + * \brief The current context is unknown, so set all contexts. + */ + CXCompletionContext_Unknown = ((1 << 22) - 1) +}; + +/** + * \brief Returns a default set of code-completion options that can be + * passed to\c clang_codeCompleteAt(). + */ +CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void); + +/** + * \brief Perform code completion at a given location in a translation unit. + * + * This function performs code completion at a particular file, line, and + * column within source code, providing results that suggest potential + * code snippets based on the context of the completion. The basic model + * for code completion is that Clang will parse a complete source file, + * performing syntax checking up to the location where code-completion has + * been requested. At that point, a special code-completion token is passed + * to the parser, which recognizes this token and determines, based on the + * current location in the C/Objective-C/C++ grammar and the state of + * semantic analysis, what completions to provide. These completions are + * returned via a new \c CXCodeCompleteResults structure. + * + * Code completion itself is meant to be triggered by the client when the + * user types punctuation characters or whitespace, at which point the + * code-completion location will coincide with the cursor. For example, if \c p + * is a pointer, code-completion might be triggered after the "-" and then + * after the ">" in \c p->. When the code-completion location is afer the ">", + * the completion results will provide, e.g., the members of the struct that + * "p" points to. The client is responsible for placing the cursor at the + * beginning of the token currently being typed, then filtering the results + * based on the contents of the token. For example, when code-completing for + * the expression \c p->get, the client should provide the location just after + * the ">" (e.g., pointing at the "g") to this code-completion hook. Then, the + * client can filter the results based on the current token text ("get"), only + * showing those results that start with "get". The intent of this interface + * is to separate the relatively high-latency acquisition of code-completion + * results from the filtering of results on a per-character basis, which must + * have a lower latency. + * + * \param TU The translation unit in which code-completion should + * occur. The source files for this translation unit need not be + * completely up-to-date (and the contents of those source files may + * be overridden via \p unsaved_files). Cursors referring into the + * translation unit may be invalidated by this invocation. + * + * \param complete_filename The name of the source file where code + * completion should be performed. This filename may be any file + * included in the translation unit. + * + * \param complete_line The line at which code-completion should occur. + * + * \param complete_column The column at which code-completion should occur. + * Note that the column should point just after the syntactic construct that + * initiated code completion, and not in the middle of a lexical token. + * + * \param unsaved_files the Tiles that have not yet been saved to disk + * but may be required for parsing or code completion, including the + * contents of those files. The contents and name of these files (as + * specified by CXUnsavedFile) are copied when necessary, so the + * client only needs to guarantee their validity until the call to + * this function returns. + * + * \param num_unsaved_files The number of unsaved file entries in \p + * unsaved_files. + * + * \param options Extra options that control the behavior of code + * completion, expressed as a bitwise OR of the enumerators of the + * CXCodeComplete_Flags enumeration. The + * \c clang_defaultCodeCompleteOptions() function returns a default set + * of code-completion options. + * + * \returns If successful, a new \c CXCodeCompleteResults structure + * containing code-completion results, which should eventually be + * freed with \c clang_disposeCodeCompleteResults(). If code + * completion fails, returns NULL. + */ +CINDEX_LINKAGE +CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU, + const char *complete_filename, + unsigned complete_line, + unsigned complete_column, + struct CXUnsavedFile *unsaved_files, + unsigned num_unsaved_files, + unsigned options); + +/** + * \brief Sort the code-completion results in case-insensitive alphabetical + * order. + * + * \param Results The set of results to sort. + * \param NumResults The number of results in \p Results. + */ +CINDEX_LINKAGE +void clang_sortCodeCompletionResults(CXCompletionResult *Results, + unsigned NumResults); + +/** + * \brief Free the given set of code-completion results. + */ +CINDEX_LINKAGE +void clang_disposeCodeCompleteResults(CXCodeCompleteResults *Results); + +/** + * \brief Determine the number of diagnostics produced prior to the + * location where code completion was performed. + */ +CINDEX_LINKAGE +unsigned clang_codeCompleteGetNumDiagnostics(CXCodeCompleteResults *Results); + +/** + * \brief Retrieve a diagnostic associated with the given code completion. + * + * \param Results the code completion results to query. + * \param Index the zero-based diagnostic number to retrieve. + * + * \returns the requested diagnostic. This diagnostic must be freed + * via a call to \c clang_disposeDiagnostic(). + */ +CINDEX_LINKAGE +CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *Results, + unsigned Index); + +/** + * \brief Determines what completions are appropriate for the context + * the given code completion. + * + * \param Results the code completion results to query + * + * \returns the kinds of completions that are appropriate for use + * along with the given code completion results. + */ +CINDEX_LINKAGE +unsigned long long clang_codeCompleteGetContexts( + CXCodeCompleteResults *Results); + +/** + * \brief Returns the cursor kind for the container for the current code + * completion context. The container is only guaranteed to be set for + * contexts where a container exists (i.e. member accesses or Objective-C + * message sends); if there is not a container, this function will return + * CXCursor_InvalidCode. + * + * \param Results the code completion results to query + * + * \param IsIncomplete on return, this value will be false if Clang has complete + * information about the container. If Clang does not have complete + * information, this value will be true. + * + * \returns the container kind, or CXCursor_InvalidCode if there is not a + * container + */ +CINDEX_LINKAGE +enum CXCursorKind clang_codeCompleteGetContainerKind( + CXCodeCompleteResults *Results, + unsigned *IsIncomplete); + +/** + * \brief Returns the USR for the container for the current code completion + * context. If there is not a container for the current context, this + * function will return the empty string. + * + * \param Results the code completion results to query + * + * \returns the USR for the container + */ +CINDEX_LINKAGE +CXString clang_codeCompleteGetContainerUSR(CXCodeCompleteResults *Results); + + +/** + * \brief Returns the currently-entered selector for an Objective-C message + * send, formatted like "initWithFoo:bar:". Only guaranteed to return a + * non-empty string for CXCompletionContext_ObjCInstanceMessage and + * CXCompletionContext_ObjCClassMessage. + * + * \param Results the code completion results to query + * + * \returns the selector (or partial selector) that has been entered thus far + * for an Objective-C message send. + */ +CINDEX_LINKAGE +CXString clang_codeCompleteGetObjCSelector(CXCodeCompleteResults *Results); + +/** + * @} + */ + + +/** + * \defgroup CINDEX_MISC Miscellaneous utility functions + * + * @{ + */ + +/** + * \brief Return a version string, suitable for showing to a user, but not + * intended to be parsed (the format is not guaranteed to be stable). + */ +CINDEX_LINKAGE CXString clang_getClangVersion(void); + + +/** + * \brief Enable/disable crash recovery. + * + * \param isEnabled Flag to indicate if crash recovery is enabled. A non-zero + * value enables crash recovery, while 0 disables it. + */ +CINDEX_LINKAGE void clang_toggleCrashRecovery(unsigned isEnabled); + + /** + * \brief Visitor invoked for each file in a translation unit + * (used with clang_getInclusions()). + * + * This visitor function will be invoked by clang_getInclusions() for each + * file included (either at the top-level or by \#include directives) within + * a translation unit. The first argument is the file being included, and + * the second and third arguments provide the inclusion stack. The + * array is sorted in order of immediate inclusion. For example, + * the first element refers to the location that included 'included_file'. + */ +typedef void (*CXInclusionVisitor)(CXFile included_file, + CXSourceLocation* inclusion_stack, + unsigned include_len, + CXClientData client_data); + +/** + * \brief Visit the set of preprocessor inclusions in a translation unit. + * The visitor function is called with the provided data for every included + * file. This does not include headers included by the PCH file (unless one + * is inspecting the inclusions in the PCH file itself). + */ +CINDEX_LINKAGE void clang_getInclusions(CXTranslationUnit tu, + CXInclusionVisitor visitor, + CXClientData client_data); + +/** + * @} + */ + +/** \defgroup CINDEX_REMAPPING Remapping functions + * + * @{ + */ + +/** + * \brief A remapping of original source files and their translated files. + */ +typedef void *CXRemapping; + +/** + * \brief Retrieve a remapping. + * + * \param path the path that contains metadata about remappings. + * + * \returns the requested remapping. This remapping must be freed + * via a call to \c clang_remap_dispose(). Can return NULL if an error occurred. + */ +CINDEX_LINKAGE CXRemapping clang_getRemappings(const char *path); + +/** + * \brief Retrieve a remapping. + * + * \param filePaths pointer to an array of file paths containing remapping info. + * + * \param numFiles number of file paths. + * + * \returns the requested remapping. This remapping must be freed + * via a call to \c clang_remap_dispose(). Can return NULL if an error occurred. + */ +CINDEX_LINKAGE +CXRemapping clang_getRemappingsFromFileList(const char **filePaths, + unsigned numFiles); + +/** + * \brief Determine the number of remappings. + */ +CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping); + +/** + * \brief Get the original and the associated filename from the remapping. + * + * \param original If non-NULL, will be set to the original filename. + * + * \param transformed If non-NULL, will be set to the filename that the original + * is associated with. + */ +CINDEX_LINKAGE void clang_remap_getFilenames(CXRemapping, unsigned index, + CXString *original, CXString *transformed); + +/** + * \brief Dispose the remapping. + */ +CINDEX_LINKAGE void clang_remap_dispose(CXRemapping); + +/** + * @} + */ + +/** \defgroup CINDEX_HIGH Higher level API functions + * + * @{ + */ + +enum CXVisitorResult { + CXVisit_Break, + CXVisit_Continue +}; + +typedef struct { + void *context; + enum CXVisitorResult (*visit)(void *context, CXCursor, CXSourceRange); +} CXCursorAndRangeVisitor; + +typedef enum { + /** + * \brief Function returned successfully. + */ + CXResult_Success = 0, + /** + * \brief One of the parameters was invalid for the function. + */ + CXResult_Invalid = 1, + /** + * \brief The function was terminated by a callback (e.g. it returned + * CXVisit_Break) + */ + CXResult_VisitBreak = 2 + +} CXResult; + +/** + * \brief Find references of a declaration in a specific file. + * + * \param cursor pointing to a declaration or a reference of one. + * + * \param file to search for references. + * + * \param visitor callback that will receive pairs of CXCursor/CXSourceRange for + * each reference found. + * The CXSourceRange will point inside the file; if the reference is inside + * a macro (and not a macro argument) the CXSourceRange will be invalid. + * + * \returns one of the CXResult enumerators. + */ +CINDEX_LINKAGE CXResult clang_findReferencesInFile(CXCursor cursor, CXFile file, + CXCursorAndRangeVisitor visitor); + +/** + * \brief Find #import/#include directives in a specific file. + * + * \param TU translation unit containing the file to query. + * + * \param file to search for #import/#include directives. + * + * \param visitor callback that will receive pairs of CXCursor/CXSourceRange for + * each directive found. + * + * \returns one of the CXResult enumerators. + */ +CINDEX_LINKAGE CXResult clang_findIncludesInFile(CXTranslationUnit TU, + CXFile file, + CXCursorAndRangeVisitor visitor); + +#ifdef __has_feature +# if __has_feature(blocks) + +typedef enum CXVisitorResult + (^CXCursorAndRangeVisitorBlock)(CXCursor, CXSourceRange); + +CINDEX_LINKAGE +CXResult clang_findReferencesInFileWithBlock(CXCursor, CXFile, + CXCursorAndRangeVisitorBlock); + +CINDEX_LINKAGE +CXResult clang_findIncludesInFileWithBlock(CXTranslationUnit, CXFile, + CXCursorAndRangeVisitorBlock); + +# endif +#endif + +/** + * \brief The client's data object that is associated with a CXFile. + */ +typedef void *CXIdxClientFile; + +/** + * \brief The client's data object that is associated with a semantic entity. + */ +typedef void *CXIdxClientEntity; + +/** + * \brief The client's data object that is associated with a semantic container + * of entities. + */ +typedef void *CXIdxClientContainer; + +/** + * \brief The client's data object that is associated with an AST file (PCH + * or module). + */ +typedef void *CXIdxClientASTFile; + +/** + * \brief Source location passed to index callbacks. + */ +typedef struct { + void *ptr_data[2]; + unsigned int_data; +} CXIdxLoc; + +/** + * \brief Data for ppIncludedFile callback. + */ +typedef struct { + /** + * \brief Location of '#' in the \#include/\#import directive. + */ + CXIdxLoc hashLoc; + /** + * \brief Filename as written in the \#include/\#import directive. + */ + const char *filename; + /** + * \brief The actual file that the \#include/\#import directive resolved to. + */ + CXFile file; + int isImport; + int isAngled; + /** + * \brief Non-zero if the directive was automatically turned into a module + * import. + */ + int isModuleImport; +} CXIdxIncludedFileInfo; + +/** + * \brief Data for IndexerCallbacks#importedASTFile. + */ +typedef struct { + /** + * \brief Top level AST file containing the imported PCH, module or submodule. + */ + CXFile file; + /** + * \brief The imported module or NULL if the AST file is a PCH. + */ + CXModule module; + /** + * \brief Location where the file is imported. Applicable only for modules. + */ + CXIdxLoc loc; + /** + * \brief Non-zero if an inclusion directive was automatically turned into + * a module import. Applicable only for modules. + */ + int isImplicit; + +} CXIdxImportedASTFileInfo; + +typedef enum { + CXIdxEntity_Unexposed = 0, + CXIdxEntity_Typedef = 1, + CXIdxEntity_Function = 2, + CXIdxEntity_Variable = 3, + CXIdxEntity_Field = 4, + CXIdxEntity_EnumConstant = 5, + + CXIdxEntity_ObjCClass = 6, + CXIdxEntity_ObjCProtocol = 7, + CXIdxEntity_ObjCCategory = 8, + + CXIdxEntity_ObjCInstanceMethod = 9, + CXIdxEntity_ObjCClassMethod = 10, + CXIdxEntity_ObjCProperty = 11, + CXIdxEntity_ObjCIvar = 12, + + CXIdxEntity_Enum = 13, + CXIdxEntity_Struct = 14, + CXIdxEntity_Union = 15, + + CXIdxEntity_CXXClass = 16, + CXIdxEntity_CXXNamespace = 17, + CXIdxEntity_CXXNamespaceAlias = 18, + CXIdxEntity_CXXStaticVariable = 19, + CXIdxEntity_CXXStaticMethod = 20, + CXIdxEntity_CXXInstanceMethod = 21, + CXIdxEntity_CXXConstructor = 22, + CXIdxEntity_CXXDestructor = 23, + CXIdxEntity_CXXConversionFunction = 24, + CXIdxEntity_CXXTypeAlias = 25, + CXIdxEntity_CXXInterface = 26 + +} CXIdxEntityKind; + +typedef enum { + CXIdxEntityLang_None = 0, + CXIdxEntityLang_C = 1, + CXIdxEntityLang_ObjC = 2, + CXIdxEntityLang_CXX = 3 +} CXIdxEntityLanguage; + +/** + * \brief Extra C++ template information for an entity. This can apply to: + * CXIdxEntity_Function + * CXIdxEntity_CXXClass + * CXIdxEntity_CXXStaticMethod + * CXIdxEntity_CXXInstanceMethod + * CXIdxEntity_CXXConstructor + * CXIdxEntity_CXXConversionFunction + * CXIdxEntity_CXXTypeAlias + */ +typedef enum { + CXIdxEntity_NonTemplate = 0, + CXIdxEntity_Template = 1, + CXIdxEntity_TemplatePartialSpecialization = 2, + CXIdxEntity_TemplateSpecialization = 3 +} CXIdxEntityCXXTemplateKind; + +typedef enum { + CXIdxAttr_Unexposed = 0, + CXIdxAttr_IBAction = 1, + CXIdxAttr_IBOutlet = 2, + CXIdxAttr_IBOutletCollection = 3 +} CXIdxAttrKind; + +typedef struct { + CXIdxAttrKind kind; + CXCursor cursor; + CXIdxLoc loc; +} CXIdxAttrInfo; + +typedef struct { + CXIdxEntityKind kind; + CXIdxEntityCXXTemplateKind templateKind; + CXIdxEntityLanguage lang; + const char *name; + const char *USR; + CXCursor cursor; + const CXIdxAttrInfo *const *attributes; + unsigned numAttributes; +} CXIdxEntityInfo; + +typedef struct { + CXCursor cursor; +} CXIdxContainerInfo; + +typedef struct { + const CXIdxAttrInfo *attrInfo; + const CXIdxEntityInfo *objcClass; + CXCursor classCursor; + CXIdxLoc classLoc; +} CXIdxIBOutletCollectionAttrInfo; + +typedef enum { + CXIdxDeclFlag_Skipped = 0x1 +} CXIdxDeclInfoFlags; + +typedef struct { + const CXIdxEntityInfo *entityInfo; + CXCursor cursor; + CXIdxLoc loc; + const CXIdxContainerInfo *semanticContainer; + /** + * \brief Generally same as #semanticContainer but can be different in + * cases like out-of-line C++ member functions. + */ + const CXIdxContainerInfo *lexicalContainer; + int isRedeclaration; + int isDefinition; + int isContainer; + const CXIdxContainerInfo *declAsContainer; + /** + * \brief Whether the declaration exists in code or was created implicitly + * by the compiler, e.g. implicit Objective-C methods for properties. + */ + int isImplicit; + const CXIdxAttrInfo *const *attributes; + unsigned numAttributes; + + unsigned flags; + +} CXIdxDeclInfo; + +typedef enum { + CXIdxObjCContainer_ForwardRef = 0, + CXIdxObjCContainer_Interface = 1, + CXIdxObjCContainer_Implementation = 2 +} CXIdxObjCContainerKind; + +typedef struct { + const CXIdxDeclInfo *declInfo; + CXIdxObjCContainerKind kind; +} CXIdxObjCContainerDeclInfo; + +typedef struct { + const CXIdxEntityInfo *base; + CXCursor cursor; + CXIdxLoc loc; +} CXIdxBaseClassInfo; + +typedef struct { + const CXIdxEntityInfo *protocol; + CXCursor cursor; + CXIdxLoc loc; +} CXIdxObjCProtocolRefInfo; + +typedef struct { + const CXIdxObjCProtocolRefInfo *const *protocols; + unsigned numProtocols; +} CXIdxObjCProtocolRefListInfo; + +typedef struct { + const CXIdxObjCContainerDeclInfo *containerInfo; + const CXIdxBaseClassInfo *superInfo; + const CXIdxObjCProtocolRefListInfo *protocols; +} CXIdxObjCInterfaceDeclInfo; + +typedef struct { + const CXIdxObjCContainerDeclInfo *containerInfo; + const CXIdxEntityInfo *objcClass; + CXCursor classCursor; + CXIdxLoc classLoc; + const CXIdxObjCProtocolRefListInfo *protocols; +} CXIdxObjCCategoryDeclInfo; + +typedef struct { + const CXIdxDeclInfo *declInfo; + const CXIdxEntityInfo *getter; + const CXIdxEntityInfo *setter; +} CXIdxObjCPropertyDeclInfo; + +typedef struct { + const CXIdxDeclInfo *declInfo; + const CXIdxBaseClassInfo *const *bases; + unsigned numBases; +} CXIdxCXXClassDeclInfo; + +/** + * \brief Data for IndexerCallbacks#indexEntityReference. + */ +typedef enum { + /** + * \brief The entity is referenced directly in user's code. + */ + CXIdxEntityRef_Direct = 1, + /** + * \brief An implicit reference, e.g. a reference of an Objective-C method + * via the dot syntax. + */ + CXIdxEntityRef_Implicit = 2 +} CXIdxEntityRefKind; + +/** + * \brief Data for IndexerCallbacks#indexEntityReference. + */ +typedef struct { + CXIdxEntityRefKind kind; + /** + * \brief Reference cursor. + */ + CXCursor cursor; + CXIdxLoc loc; + /** + * \brief The entity that gets referenced. + */ + const CXIdxEntityInfo *referencedEntity; + /** + * \brief Immediate "parent" of the reference. For example: + * + * \code + * Foo *var; + * \endcode + * + * The parent of reference of type 'Foo' is the variable 'var'. + * For references inside statement bodies of functions/methods, + * the parentEntity will be the function/method. + */ + const CXIdxEntityInfo *parentEntity; + /** + * \brief Lexical container context of the reference. + */ + const CXIdxContainerInfo *container; +} CXIdxEntityRefInfo; + +/** + * \brief A group of callbacks used by #clang_indexSourceFile and + * #clang_indexTranslationUnit. + */ +typedef struct { + /** + * \brief Called periodically to check whether indexing should be aborted. + * Should return 0 to continue, and non-zero to abort. + */ + int (*abortQuery)(CXClientData client_data, void *reserved); + + /** + * \brief Called at the end of indexing; passes the complete diagnostic set. + */ + void (*diagnostic)(CXClientData client_data, + CXDiagnosticSet, void *reserved); + + CXIdxClientFile (*enteredMainFile)(CXClientData client_data, + CXFile mainFile, void *reserved); + + /** + * \brief Called when a file gets \#included/\#imported. + */ + CXIdxClientFile (*ppIncludedFile)(CXClientData client_data, + const CXIdxIncludedFileInfo *); + + /** + * \brief Called when a AST file (PCH or module) gets imported. + * + * AST files will not get indexed (there will not be callbacks to index all + * the entities in an AST file). The recommended action is that, if the AST + * file is not already indexed, to initiate a new indexing job specific to + * the AST file. + */ + CXIdxClientASTFile (*importedASTFile)(CXClientData client_data, + const CXIdxImportedASTFileInfo *); + + /** + * \brief Called at the beginning of indexing a translation unit. + */ + CXIdxClientContainer (*startedTranslationUnit)(CXClientData client_data, + void *reserved); + + void (*indexDeclaration)(CXClientData client_data, + const CXIdxDeclInfo *); + + /** + * \brief Called to index a reference of an entity. + */ + void (*indexEntityReference)(CXClientData client_data, + const CXIdxEntityRefInfo *); + +} IndexerCallbacks; + +CINDEX_LINKAGE int clang_index_isEntityObjCContainerKind(CXIdxEntityKind); +CINDEX_LINKAGE const CXIdxObjCContainerDeclInfo * +clang_index_getObjCContainerDeclInfo(const CXIdxDeclInfo *); + +CINDEX_LINKAGE const CXIdxObjCInterfaceDeclInfo * +clang_index_getObjCInterfaceDeclInfo(const CXIdxDeclInfo *); + +CINDEX_LINKAGE +const CXIdxObjCCategoryDeclInfo * +clang_index_getObjCCategoryDeclInfo(const CXIdxDeclInfo *); + +CINDEX_LINKAGE const CXIdxObjCProtocolRefListInfo * +clang_index_getObjCProtocolRefListInfo(const CXIdxDeclInfo *); + +CINDEX_LINKAGE const CXIdxObjCPropertyDeclInfo * +clang_index_getObjCPropertyDeclInfo(const CXIdxDeclInfo *); + +CINDEX_LINKAGE const CXIdxIBOutletCollectionAttrInfo * +clang_index_getIBOutletCollectionAttrInfo(const CXIdxAttrInfo *); + +CINDEX_LINKAGE const CXIdxCXXClassDeclInfo * +clang_index_getCXXClassDeclInfo(const CXIdxDeclInfo *); + +/** + * \brief For retrieving a custom CXIdxClientContainer attached to a + * container. + */ +CINDEX_LINKAGE CXIdxClientContainer +clang_index_getClientContainer(const CXIdxContainerInfo *); + +/** + * \brief For setting a custom CXIdxClientContainer attached to a + * container. + */ +CINDEX_LINKAGE void +clang_index_setClientContainer(const CXIdxContainerInfo *,CXIdxClientContainer); + +/** + * \brief For retrieving a custom CXIdxClientEntity attached to an entity. + */ +CINDEX_LINKAGE CXIdxClientEntity +clang_index_getClientEntity(const CXIdxEntityInfo *); + +/** + * \brief For setting a custom CXIdxClientEntity attached to an entity. + */ +CINDEX_LINKAGE void +clang_index_setClientEntity(const CXIdxEntityInfo *, CXIdxClientEntity); + +/** + * \brief An indexing action/session, to be applied to one or multiple + * translation units. + */ +typedef void *CXIndexAction; + +/** + * \brief An indexing action/session, to be applied to one or multiple + * translation units. + * + * \param CIdx The index object with which the index action will be associated. + */ +CINDEX_LINKAGE CXIndexAction clang_IndexAction_create(CXIndex CIdx); + +/** + * \brief Destroy the given index action. + * + * The index action must not be destroyed until all of the translation units + * created within that index action have been destroyed. + */ +CINDEX_LINKAGE void clang_IndexAction_dispose(CXIndexAction); + +typedef enum { + /** + * \brief Used to indicate that no special indexing options are needed. + */ + CXIndexOpt_None = 0x0, + + /** + * \brief Used to indicate that IndexerCallbacks#indexEntityReference should + * be invoked for only one reference of an entity per source file that does + * not also include a declaration/definition of the entity. + */ + CXIndexOpt_SuppressRedundantRefs = 0x1, + + /** + * \brief Function-local symbols should be indexed. If this is not set + * function-local symbols will be ignored. + */ + CXIndexOpt_IndexFunctionLocalSymbols = 0x2, + + /** + * \brief Implicit function/class template instantiations should be indexed. + * If this is not set, implicit instantiations will be ignored. + */ + CXIndexOpt_IndexImplicitTemplateInstantiations = 0x4, + + /** + * \brief Suppress all compiler warnings when parsing for indexing. + */ + CXIndexOpt_SuppressWarnings = 0x8, + + /** + * \brief Skip a function/method body that was already parsed during an + * indexing session associated with a \c CXIndexAction object. + * Bodies in system headers are always skipped. + */ + CXIndexOpt_SkipParsedBodiesInSession = 0x10 + +} CXIndexOptFlags; + +/** + * \brief Index the given source file and the translation unit corresponding + * to that file via callbacks implemented through #IndexerCallbacks. + * + * \param client_data pointer data supplied by the client, which will + * be passed to the invoked callbacks. + * + * \param index_callbacks Pointer to indexing callbacks that the client + * implements. + * + * \param index_callbacks_size Size of #IndexerCallbacks structure that gets + * passed in index_callbacks. + * + * \param index_options A bitmask of options that affects how indexing is + * performed. This should be a bitwise OR of the CXIndexOpt_XXX flags. + * + * \param[out] out_TU pointer to store a \c CXTranslationUnit that can be + * reused after indexing is finished. Set to \c NULL if you do not require it. + * + * \returns 0 on success or if there were errors from which the compiler could + * recover. If there is a failure from which there is no recovery, returns + * a non-zero \c CXErrorCode. + * + * The rest of the parameters are the same as #clang_parseTranslationUnit. + */ +CINDEX_LINKAGE int clang_indexSourceFile(CXIndexAction, + CXClientData client_data, + IndexerCallbacks *index_callbacks, + unsigned index_callbacks_size, + unsigned index_options, + const char *source_filename, + const char * const *command_line_args, + int num_command_line_args, + struct CXUnsavedFile *unsaved_files, + unsigned num_unsaved_files, + CXTranslationUnit *out_TU, + unsigned TU_options); + +/** + * \brief Index the given translation unit via callbacks implemented through + * #IndexerCallbacks. + * + * The order of callback invocations is not guaranteed to be the same as + * when indexing a source file. The high level order will be: + * + * -Preprocessor callbacks invocations + * -Declaration/reference callbacks invocations + * -Diagnostic callback invocations + * + * The parameters are the same as #clang_indexSourceFile. + * + * \returns If there is a failure from which there is no recovery, returns + * non-zero, otherwise returns 0. + */ +CINDEX_LINKAGE int clang_indexTranslationUnit(CXIndexAction, + CXClientData client_data, + IndexerCallbacks *index_callbacks, + unsigned index_callbacks_size, + unsigned index_options, + CXTranslationUnit); + +/** + * \brief Retrieve the CXIdxFile, file, line, column, and offset represented by + * the given CXIdxLoc. + * + * If the location refers into a macro expansion, retrieves the + * location of the macro expansion and if it refers into a macro argument + * retrieves the location of the argument. + */ +CINDEX_LINKAGE void clang_indexLoc_getFileLocation(CXIdxLoc loc, + CXIdxClientFile *indexFile, + CXFile *file, + unsigned *line, + unsigned *column, + unsigned *offset); + +/** + * \brief Retrieve the CXSourceLocation represented by the given CXIdxLoc. + */ +CINDEX_LINKAGE +CXSourceLocation clang_indexLoc_getCXSourceLocation(CXIdxLoc loc); + +/** + * \brief Visitor invoked for each field found by a traversal. + * + * This visitor function will be invoked for each field found by + * \c clang_Type_visitFields. Its first argument is the cursor being + * visited, its second argument is the client data provided to + * \c clang_Type_visitFields. + * + * The visitor should return one of the \c CXVisitorResult values + * to direct \c clang_Type_visitFields. + */ +typedef enum CXVisitorResult (*CXFieldVisitor)(CXCursor C, + CXClientData client_data); + +/** + * \brief Visit the fields of a particular type. + * + * This function visits all the direct fields of the given cursor, + * invoking the given \p visitor function with the cursors of each + * visited field. The traversal may be ended prematurely, if + * the visitor returns \c CXFieldVisit_Break. + * + * \param T the record type whose field may be visited. + * + * \param visitor the visitor function that will be invoked for each + * field of \p T. + * + * \param client_data pointer data supplied by the client, which will + * be passed to the visitor each time it is invoked. + * + * \returns a non-zero value if the traversal was terminated + * prematurely by the visitor returning \c CXFieldVisit_Break. + */ +CINDEX_LINKAGE unsigned clang_Type_visitFields(CXType T, + CXFieldVisitor visitor, + CXClientData client_data); + + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif +#endif + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Makefile b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Makefile new file mode 100644 index 0000000..b29e29e --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Makefile @@ -0,0 +1,38 @@ +CLANG_LEVEL := ../.. +DIRS := + +include $(CLANG_LEVEL)/Makefile + +IntIncludeDir = $(DESTDIR)$(PROJ_internal_prefix)/include + +install-local:: + $(Echo) Installing Clang C API include files + $(Verb) $(MKDIR) $(IntIncludeDir) + $(Verb) if test -d "$(PROJ_SRC_DIR)" ; then \ + cd $(PROJ_SRC_DIR)/.. && \ + for hdr in `find clang-c -type f '!' '(' -name '*~' \ + -o -name '.#*' -o -name '*.in' -o -name '*.txt' \ + -o -name 'Makefile' -o -name '*.td' ')' -print \ + | grep -v CVS | grep -v .svn | grep -v .dir` ; do \ + instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \ + if test \! -d "$$instdir" ; then \ + $(EchoCmd) Making install directory $$instdir ; \ + $(MKDIR) $$instdir ;\ + fi ; \ + $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \ + done ; \ + fi +ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) + $(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include/clang-c" ; then \ + cd $(PROJ_OBJ_ROOT)/tools/clang/include && \ + for hdr in `find clang-c -type f '!' '(' -name 'Makefile' ')' -print \ + | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \ + instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \ + if test \! -d "$$instdir" ; then \ + $(EchoCmd) Making install directory $$instdir ; \ + $(MKDIR) $$instdir ;\ + fi ; \ + $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \ + done ; \ + fi +endif diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Platform.h b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Platform.h new file mode 100644 index 0000000..e2a4dcc --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Platform.h @@ -0,0 +1,45 @@ +/*===-- clang-c/Platform.h - C Index platform decls -------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides platform specific macros (dllimport, deprecated, ...) *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_CLANG_C_PLATFORM_H +#define LLVM_CLANG_C_PLATFORM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* MSVC DLL import/export. */ +#ifdef _MSC_VER + #ifdef _CINDEX_LIB_ + #define CINDEX_LINKAGE __declspec(dllexport) + #else + #define CINDEX_LINKAGE __declspec(dllimport) + #endif +#else + #define CINDEX_LINKAGE +#endif + +#ifdef __GNUC__ + #define CINDEX_DEPRECATED __attribute__((deprecated)) +#else + #ifdef _MSC_VER + #define CINDEX_DEPRECATED __declspec(deprecated) + #else + #define CINDEX_DEPRECATED + #endif +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/module.modulemap b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/module.modulemap new file mode 100644 index 0000000..95a59d6 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/module.modulemap @@ -0,0 +1,4 @@ +module Clang_C { + umbrella "." + module * { export * } +} diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/library/x86_32/debug/.gitkeep b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/library/x86_32/debug/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/library/x86_32/release/.gitkeep b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/library/x86_32/release/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/library/x86_64/debug/.gitkeep b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/library/x86_64/debug/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/library/x86_64/release/.gitkeep b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/library/x86_64/release/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/main.cpp b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/main.cpp new file mode 100644 index 0000000..f3f7fcd --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/main.cpp @@ -0,0 +1,176 @@ +/* -*- mode: c++ ; coding: utf-8-unix -*- */ +/* last updated : 2015/05/25.01:59:31 */ + +/* + * Copyright (c) 2013-2015 yaruopooner [https://github.com/yaruopooner] + * + * This file is part of ac-clang. + * + * 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 . + */ + + + +/*================================================================================================*/ +/* Include Files */ +/*================================================================================================*/ + + +#include "CommandLine.hpp" +#include "ClangServer.hpp" + + + +/*================================================================================================*/ +/* Global Function Definitions Section */ +/*================================================================================================*/ + + +enum +{ + kStreamBuffer_UnitSize = 1 * 1024 * 1024, + kStreamBuffer_MinMB = 1, + kStreamBuffer_MaxMB = 5, +}; + +enum +{ + kOption_Help, + kOption_Version, + kOption_LogFile, + kOption_STDIN_BufferSize, + kOption_STDOUT_BufferSize, +}; + + +namespace +{ + +std::string GetClangVersion( void ) +{ + CXString version_text = clang_getClangVersion(); + const std::string clang_version = clang_getCString( version_text ); + + clang_disposeString( version_text ); + + return clang_version; +} + +} + + + +int main( int argc, char *argv[] ) +{ + std::ios_base::sync_with_stdio( false ); + + // parse options + const std::string server_version = CLANG_SERVER_VERSION; + const std::string clang_version = ::GetClangVersion(); + const std::string generate = CMAKE_GENERATOR "/" CMAKE_HOST_SYSTEM_PROCESSOR; + std::string logfile; + size_t stdin_buffer_size = kStreamBuffer_MinMB; + size_t stdout_buffer_size = kStreamBuffer_MinMB; + + { + CommandLine::Parser declare_options; + + declare_options.AddOption( kOption_Help, "help", "h", "Display available options.", + CommandLine::IOptionDetail::kFlag_Once ); + declare_options.AddOption( kOption_Version, "version", "v", "Display current version.", + CommandLine::IOptionDetail::kFlag_Once ); + // declare_options.AddOption< std::string >( kOption_LogFile, "logfile", "l", "Enable IPC records output.(for debug)", + // ( CommandLine::IOptionDetail::kFlag_Once | CommandLine::IOptionDetail::kFlag_HasValue ), "file path" ); + declare_options.AddOption< uint32_t >( kOption_STDIN_BufferSize, "stdin-buffer-size", "sibs", "STDIN buffer size. is 1 - 5 MB", + ( CommandLine::IOptionDetail::kFlag_Once | CommandLine::IOptionDetail::kFlag_HasValue ), "size", + CommandLine::RangeReader< uint32_t >( kStreamBuffer_MinMB, kStreamBuffer_MaxMB ) ); + declare_options.AddOption< uint32_t >( kOption_STDOUT_BufferSize, "stdout-buffer-size", "sobs", "STDOUT buffer size. is 1 - 5 MB", + ( CommandLine::IOptionDetail::kFlag_Once | CommandLine::IOptionDetail::kFlag_HasValue ), "size", + CommandLine::RangeReader< uint32_t >( kStreamBuffer_MinMB, kStreamBuffer_MaxMB ) ); + + if ( declare_options.Parse( argc, argv ) ) + { + for ( const auto& option_value : declare_options.GetOptionWithValueArray() ) + { + switch ( option_value->GetId() ) + { + case kOption_Help: + declare_options.PrintUsage( "clang-server [options] " ); + return 0; + case kOption_Version: + std::cout << server_version << " (" << generate << ")" << std::endl; + std::cout << clang_version << std::endl; + return 0; + case kOption_LogFile: + if ( option_value->IsValid() ) + { + const std::string result = declare_options.GetValue< std::string >( option_value ); + + logfile = result; + } + break; + case kOption_STDIN_BufferSize: + if ( option_value->IsValid() ) + { + const uint32_t result = declare_options.GetValue< uint32_t >( option_value ); + + stdin_buffer_size = result; + } + break; + case kOption_STDOUT_BufferSize: + if ( option_value->IsValid() ) + { + const uint32_t result = declare_options.GetValue< uint32_t >( option_value ); + + stdout_buffer_size = result; + } + break; + } + } + declare_options.PrintWarnings(); + } + else + { + declare_options.PrintErrors(); + return 1; + } + } + + + // stream buffer expand + // std::shared_ptr< char > stdin_buffer( new char[ kStreamBuffer_UnitSize ], std::default_delete< char[] >() ); + // std::shared_ptr< char > stdout_buffer( new char[ kStreamBuffer_UnitSize ], std::default_delete< char[] >() ); + + stdin_buffer_size *= kStreamBuffer_UnitSize; + stdout_buffer_size *= kStreamBuffer_UnitSize; + + + // server instance + ClangFlagConverters flag_converter; + ClangServer::Specification initial_spec( stdin_buffer_size, stdout_buffer_size, logfile ); + ClangServer server( initial_spec ); + + + server.ParseCommand(); + + + return 0; +} + + + + +/*================================================================================================*/ +/* EOF */ +/*================================================================================================*/ diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/patch/invalidate-mmap.patch b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/patch/invalidate-mmap.patch new file mode 100644 index 0000000..d01b811 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/patch/invalidate-mmap.patch @@ -0,0 +1,22 @@ +Index: lib/Support/MemoryBuffer.cpp +=================================================================== +--- lib/Support/MemoryBuffer.cpp (revision 226551) ++++ lib/Support/MemoryBuffer.cpp (working copy) +@@ -267,6 +267,9 @@ + bool RequiresNullTerminator, + int PageSize, + bool IsVolatileSize) { ++#if 1 ++ return false; ++#else + // mmap may leave the buffer without null terminator if the file size changed + // by the time the last page is mapped in, so avoid it if the file size is + // likely to change. +@@ -306,6 +309,7 @@ + return false; + + return true; ++#endif + } + + static ErrorOr> diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/patch/libclang-x86_64.patch b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/patch/libclang-x86_64.patch new file mode 100644 index 0000000..12fa1c6 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/patch/libclang-x86_64.patch @@ -0,0 +1,29 @@ +Index: tools/libclang/CMakeLists.txt +=================================================================== +--- tools/libclang/CMakeLists.txt (revision 226551) ++++ tools/libclang/CMakeLists.txt (working copy) +@@ -72,9 +72,9 @@ + endif() + + if(WIN32) +- set(output_name "libclang") ++ set(output_name "libclang-x86_64") + else() +- set(output_name "clang") ++ set(output_name "clang-x86_64") + endif() + + add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC} +Index: tools/libclang/Makefile +=================================================================== +--- tools/libclang/Makefile (revision 226551) ++++ tools/libclang/Makefile (working copy) +@@ -8,7 +8,7 @@ + ##===----------------------------------------------------------------------===## + + CLANG_LEVEL := ../.. +-LIBRARYNAME = clang ++LIBRARYNAME = clang-x86_64 + + EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.ja.md b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.ja.md new file mode 100644 index 0000000..d8abdf7 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.ja.md @@ -0,0 +1,381 @@ + + + +[English Manual](./readme.md) + +# このドキュメントについて + +clang-serverのセルフビルドについて説明します。 +※Windows環境で付属の実行ファイルを利用する場合は読まなくても問題ありません。 + +# セルフビルド手順 + +clang-serverのビルドにはLLVMのlibclangが必要になります。 +ですのでLLVM libclangをセルフビルドしてからclang-serverをセルフビルドします。 + +## LLVMセルフビルド + +以下の4つを行います。 +この作業を簡略化するスクリプトもあります。 +- LLVMのチェックアウト +- パッチの適用 +- CMake or configureによるプロジェクトファイル生成 +- ビルド + +## clang-serverセルフビルド + +LLVMセルフビルドで生成したパッチ適用済みのライブラリ libclang を使用します。 +- CMakeによるプロジェクトファイル生成 +- ビルド +- インストール + +# セルフビルドに必要なソフトウェア + +## Windows + +以下が必要になります。 + +### LLVM + +ビルド済みライブラリ +libclang.lib or libclang.imp +libclang.dll +が必要です。 + +### Visual Studio 2015/2013/2012/2010 + +どれでもOK + +### CMake + + + +Windows ZIPをダウンロードして何処かへ展開。 +Visual Studio ソリューション&プロジェクトファイル生成と、ビルド&インストールのmsbuild呼び出しで使用されます。 + +## Linux + +以下が必要になります。 + +### LLVM + +ビルド済みライブラリ +libclang.so +が必要です。 + +### CMake + + $ sudo apt-get install cmake + +最新版の場合は↓からダウンロード + + + +cmake-3.1.3.tar.gzをダウンロードし解凍、ビルド、インストールを行う。 + + $ tar -xf cmake-3.1.3.tar.gz . + $ cd cmake-3.1.3 + $ ./configure && make + $ make install + +# セルフビルド + +## Windows + +### LLVM + +LLVMのセルフビルドが必要になります。 +またセルフビルド時にパッチを適用する必要があります。 +セルフビルド後のパッケージはインストールする必要はありません。 +ビルド後に生成されたバイナリを指すパスを +CMakeによるプロジェクト生成時に設定すればビルド可能です。 +LLVMがインストール済みであればインストールされているディレクトリを指定します。 + +LLVMセルフビルドを行う場合は +自前でチェックアウトし、CMakeでLLVMソリューションファイルを生成するか、以下のshell scriptを使用してください。 + + +1. スクリプトでLLVMパッチを適用する方法 + + builderShell の引数に -tasks を指定し、-tasks パラメーターに PATCH を追加、 + パッチを適用するパスとパッチファイルを記述したテーブルを -patchInfos パラメーターとして与えます。 + 詳しくはllvm-build-shellsのsample.ps1を参考にしてください。 + +2. LLVMパッチの内容 + + mmapの使用が常時無効化されます。 + +### clang-server + +ac-clang/build/builder\_sample.bat +を使用します。 +必要に応じてbuilder\_sample.batを編集してください。 +コマンドラインかエクスプローラーから実行します。 + +- example + + cmake -G "Visual Studio 12 2013 Win64" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-360/build/msvc-64/" -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" + +- オプション解説 + - `-DLIBRARY_PATHS` + セルフビルドしたLLVMが配置されているディレクトリを指定します。 + LLVMのトップディレクトリである必要があります。 + 省略した場合は ac-clang/clang-server が使われます。 + - `-DCMAKE_INSTALL_PREFIX` + clang-serverのインストールパスを指定します。 + 省略した場合は + `C:/Program Files/clang-server` + になります。 + +## Linux + +### LLVM + +LLVMのセルフビルドが必要になります。 +またセルフビルド時にパッチを適用する必要があります。 +セルフビルド後のパッケージはインストールする必要はありません。 +ビルド後に生成されたバイナリを指すパスを +CMakeによるプロジェクト生成時に設定すればビルド可能です。 +LLVMがインストール済みであればインストールされているディレクトリを指定します。 + +LLVMセルフビルドを行う場合は +自前でチェックアウトし、CMakeでLLVMソリューションファイルを生成するか、以下のshell scriptを使用してください。 + + +1. スクリプトでLLVMパッチを適用する方法 + + executeBuilder の引数に -patch を追加し、 + パッチを適用するパスを-patchApplyLocation、 + パッチファイルを-patchPathに記述して引数として与えます。 + -patchApplyLocation,-patchPathはペアになっており、複数回指定可能です。 + 詳しくはllvm-build-shellsのsample.shを参考にしてください。 + +2. LLVMパッチの内容 + + mmapの使用が常時無効化されます。 + +### clang-server + +ac-clang/build/builder\_sample.sh +を使用します。 +必要に応じてbuilder\_sample.shを編集してください。 +builder\_sample.shを実行します。 + +- example + + cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="/home/yaruopooner/work/llvm-build-shells/sh/clang-350/build" -DCMAKE_INSTALL_PREFIX="~/work/clang-server" + +- オプション解説 + - `-DLIBRARY_PATHS` + セルフビルドしたLLVMが配置されているディレクトリを指定します。 + LLVMのトップディレクトリである必要があります。 + 省略した場合は ac-clang/clang-server が使われます。 + - `-DCMAKE_INSTALL_PREFIX` + clang-serverのインストールパスを指定します。 + 省略した場合は + `/usr/local/bin` + になります。 + +# パッチ適用済みバイナリ(Windows Only) + + + +上記に置いてあるclang-server-X.X.X.zipは +パッチ適用済みのバイナリとライブラリファイル +- clang-server.exe +- libclang.dll +- libclang.lib or libclang.imp + +の3ファイルが格納されています。 + +LLVMはセルフビルドせずにclang-serverのみをセルフビルドする場合は +clang-server-X.X.X.zipをac-clangに解凍します。 +すると以下のように配置されます。 +ac-clang/clang-server/binary/clang-server.exe +ac-clang/clang-server/library/x86\_64/release/libclang.dll +ac-clang/clang-server/library/x86\_64/release/libclang.lib + +# パッチを適用せずLLVMオフィシャルのlibclangを使用する場合の制限事項 + +## 特定ファイルがロックされセーブできなくなる + +編集したヘッダファイルをセーブしようとすると "basic-save-buffer-2: Opening output file: invalid argument \`HEADER-FILE-NAME\`" となりセーブできない。 +必ず発生するわけではなく特定の条件を満たしたファイルサイズが16kBを越えるヘッダファイルで発生する。 +16kB以下のヘッダファイルではまったく発生しない。 +libclang の TranslationUnit(以下TU) の問題。 +libclang の TU がinclude対象のファイルをロックしている。 +ac-clang側で暫定対処パッチを施してあるので多少は緩和されているが完全に回避はできない。 +発生した場合はマニュアル対処する以外ない。 + +### emacs側での対処方法 + +include対象なので大抵は foo.cpp/foo.hpp という構成だとおもわれます。 +foo.hpp(modified)がセーブできない場合、大抵foo.cppが(modified)になっているのでfoo.cppをセーブしましょう。 +これによりfoo.hppはセーブ可能になるはずです。 +これでもセーブできない場合は、foo.cpp以外のソースでfoo.hppをインクルードしており(modified)になっているバッファがあるはずなので +それもセーブしましょう。 +また、定義へのジャンプ機能で該当ソースがアクティブ化されている場合は、未編集バッファであってもアクティブ化されています。 +該当バッファを削除してみるか、そのバッファへスイッチして (ac-clang-deactivate) を実行してください。 +これ以外でも16kBを越えるヘッダを編集しようとした際に、そのファイルのcppはオープンしてもいないのにセーブできない場合、 +該当ヘッダファイルを何処か遠いモジュールでインクルードしている場合なども同様の症状になります。 +ライブラリモジュールやフレームワークなどを開発している場合は発生しやすいかもしれません。 +※ライブラリ・フレームワークはアプリ側からよくincludeされるため。 + +### 原因(実装上の問題説明、解決案求む) + +foo.cpp(modified)のとき foo.cppのセッションで +TUが foo.cpp パース後もincludeされているファイルのロックを保持しつづけている。 +この状態で foo.hpp を編集してセーブしようとするとロックでエラーになる。 +ロックを解除するには、 foo.cpp のTUをリリースする。 +なので foo.cpp セーブ時にセッションは保持した状態で TU だけをリリースして、 +foo.cpp が再び modified になったときに TU を生成するように修正。 +これにより foo.cpp セーブ後であればincludeロックでが全解除されるので foo.hpp がセーブ可能になる。 +当然 foo.cpp 以外に foo.hpp をinclude しているソースでかつ、編集中のバッファがある場合は、 +それら全てを保存しないとロックでは解除されない。 + +Windows環境において、 +このロックはI/Oのopen関数によるロックはではなくWindowsAPIのCreateFileMappingによるロックである。 +libclang FileManagerは16kB以上のファイルをメモリマップドファイルとしてアロケーションする。 +TUがリリースされるとUnmapViewOfFileによりメモリマップドファイルがリリースされるようになりファイルに対して書き込み可能になる。 + +Linux環境においても発現する不具合はWindows環境と若干異なるものの mmap/munmapによる問題は発生する。 +foo.cppのTUを保持している状態でfoo.hppにおいてclass fooのメソッドを追加・削除し保存する。 +foo.hpp更新後にfoo.cppにおいてclass fooのメソッドを補間しようとするとTUがクラッシュする。 +libclangがSTDOUTに "libclang: crash detected in code completion" を出力する。 +clang-serverのプロセスは生きており、セッションを破棄して再生成すれば補間続行は可能。 + +## その他 + +上記の問題はlibclangにパッチを適用して改善している。 + +パッチを適用したリリースバイナリのlibclang-x86\_XX.(dll or so)を使用している場合は発生しない。 +パッチを適用していないLLVMセルフビルドおよび、LLVMオフィシャルバイナリを使用する場合にのみ問題が発生します。 +clang側の仕様バグなので現在LLVM bugzilla に報告済み。対応待ち中。 + + +# パッチ解説 + +## パッチ + +ac-clang/clang-server/patch/invalidate-mmap.patch +を使用。 + + cd llvm/ + svn patch ac-clang/clang-server/patch/invalidate-mmap.patch + +## パッチ(invalidate-mmap.patch)で行っている事 + +mmapを使わないようにパッチを適用している +適用するのは以下のソース +clang-trunk/llvm/lib/Support/MemoryBuffer.cpp + + static error_code getOpenFileImpl(int FD, const char *Filename, + OwningPtr &result, + uint64_t FileSize, uint64_t MapSize, + int64_t Offset, bool RequiresNullTerminator) { + +↑の関数内で呼ばれる shouldUseMmap によりファイルに対するmmapの使用可否が判断される + + static bool shouldUseMmap(int FD, + size_t FileSize, + size_t MapSize, + off_t Offset, + bool RequiresNullTerminator, + int PageSize) { + +この関数のresultが常時falseであればmmapは恒久的に使用されない。 +よってこの関数の先頭で + + return false; + +とすればよい。 +以降のコードは#if 0 end するなりすればよい。 + +## LLVM3.5の追加仕様 + +shouldUseMmap,getOpenFileImplに引数IsVolatileSizeが追加された。 +これはshouldUseMmapまで加工なしでパスされ、 +shouldUseMmap先頭において、 + + if (IsVolatileSize) + return false; + +される。 +コメントがついていた + + // mmap may leave the buffer without null terminator if the file size changed + // by the time the last page is mapped in, so avoid it if the file size is + // likely to change. + +mmapはファイルサイズが最後のページがマップされたされた時点で変更された場合はnull終端せずにバッファを残すので、ファイルサイズが変更される可能性がある場合は、それを回避することができる。 + +とは言っているものの、想定されていない事態がいろいろあるようで仕様抜けの模様。 +またバッファ確保系関数の上流で IsVolatileSize が指定されていなかったりコンストラクタのデフォルト値のまま運用されている箇所が何箇所か見受けられた。 +そういった箇所を自前で修正してみたところ従来よりマシになったものの、他にも問題があるようで想定通りにmmapを制御は出来なかった。 +LLVMのファイルシステム・メモリ周りの仕様を完全に把握していないと、ここら辺の修正は厳しいのかもしれない。 +よって現時点においては上記パッチ適用が一番無難なやり方となる。 diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.ja.org b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.ja.org new file mode 100644 index 0000000..77a3ede --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.ja.org @@ -0,0 +1,297 @@ +# -*- mode: org ; coding: utf-8-unix -*- +# last updated : 2015/07/21.00:46:00 + + +#+TITLE: Clang Server Manual +#+AUTHOR: yaruopooner +#+EMAIL: [https://github.com/yaruopooner] +#+OPTIONS: author:nil timestamp:t |:t \n:t ^:nil + + +[[./readme.org][English Manual]] + +* このドキュメントについて + clang-serverのセルフビルドについて説明します。 + ※Windows環境で付属の実行ファイルを利用する場合は読まなくても問題ありません。 + +* セルフビルド手順 + clang-serverのビルドにはLLVMのlibclangが必要になります。 + ですのでLLVM libclangをセルフビルドしてからclang-serverをセルフビルドします。 + +** LLVMセルフビルド + 以下の4つを行います。 + この作業を簡略化するスクリプトもあります。 + - LLVMのチェックアウト + - パッチの適用 + - CMake or configureによるプロジェクトファイル生成 + - ビルド + +** clang-serverセルフビルド + LLVMセルフビルドで生成したパッチ適用済みのライブラリ libclang を使用します。 + - CMakeによるプロジェクトファイル生成 + - ビルド + - インストール + +* セルフビルドに必要なソフトウェア +** Windows + 以下が必要になります。 +*** LLVM + ビルド済みライブラリ + libclang.lib or libclang.imp + libclang.dll + が必要です。 + +*** Visual Studio 2015/2013/2012/2010 + どれでもOK + +*** CMake + http://www.cmake.org/ + + Windows ZIPをダウンロードして何処かへ展開。 + Visual Studio ソリューション&プロジェクトファイル生成と、ビルド&インストールのmsbuild呼び出しで使用されます。 + +** Linux + 以下が必要になります。 +*** LLVM + ビルド済みライブラリ + libclang.so + が必要です。 + +*** CMake + #+begin_src shell + $ sudo apt-get install cmake + #+end_src + + 最新版の場合は↓からダウンロード + + http://www.cmake.org/ + + cmake-3.1.3.tar.gzをダウンロードし解凍、ビルド、インストールを行う。 + #+begin_src shell + $ tar -xf cmake-3.1.3.tar.gz . + $ cd cmake-3.1.3 + $ ./configure && make + $ make install + #+end_src + +* セルフビルド +** Windows +*** LLVM + LLVMのセルフビルドが必要になります。 + またセルフビルド時にパッチを適用する必要があります。 + セルフビルド後のパッケージはインストールする必要はありません。 + ビルド後に生成されたバイナリを指すパスを + CMakeによるプロジェクト生成時に設定すればビルド可能です。 + LLVMがインストール済みであればインストールされているディレクトリを指定します。 + + LLVMセルフビルドを行う場合は + 自前でチェックアウトし、CMakeでLLVMソリューションファイルを生成するか、以下のshell scriptを使用してください。 + https://github.com/yaruopooner/llvm-build-shells + +**** スクリプトでLLVMパッチを適用する方法 + builderShell の引数に -tasks を指定し、-tasks パラメーターに PATCH を追加、 + パッチを適用するパスとパッチファイルを記述したテーブルを -patchInfos パラメーターとして与えます。 + 詳しくはllvm-build-shellsのsample.ps1を参考にしてください。 + +**** LLVMパッチの内容 + mmapの使用が常時無効化されます。 + +*** clang-server + ac-clang/build/builder_sample.bat + を使用します。 + 必要に応じてbuilder_sample.batを編集してください。 + コマンドラインかエクスプローラーから実行します。 + + - example + #+begin_src bat + cmake -G "Visual Studio 12 2013 Win64" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-360/build/msvc-64/" -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" + #+end_src + + - オプション解説 + - =-DLIBRARY_PATHS= + セルフビルドしたLLVMが配置されているディレクトリを指定します。 + LLVMのトップディレクトリである必要があります。 + 省略した場合は ac-clang/clang-server が使われます。 + - =-DCMAKE_INSTALL_PREFIX= + clang-serverのインストールパスを指定します。 + 省略した場合は + =C:/Program Files/clang-server= + になります。 + +** Linux +*** LLVM + LLVMのセルフビルドが必要になります。 + またセルフビルド時にパッチを適用する必要があります。 + セルフビルド後のパッケージはインストールする必要はありません。 + ビルド後に生成されたバイナリを指すパスを + CMakeによるプロジェクト生成時に設定すればビルド可能です。 + LLVMがインストール済みであればインストールされているディレクトリを指定します。 + + LLVMセルフビルドを行う場合は + 自前でチェックアウトし、CMakeでLLVMソリューションファイルを生成するか、以下のshell scriptを使用してください。 + https://github.com/yaruopooner/llvm-build-shells + +**** スクリプトでLLVMパッチを適用する方法 + executeBuilder の引数に -patch を追加し、 + パッチを適用するパスを-patchApplyLocation、 + パッチファイルを-patchPathに記述して引数として与えます。 + -patchApplyLocation,-patchPathはペアになっており、複数回指定可能です。 + 詳しくはllvm-build-shellsのsample.shを参考にしてください。 + +**** LLVMパッチの内容 + mmapの使用が常時無効化されます。 + +*** clang-server + ac-clang/build/builder_sample.sh + を使用します。 + 必要に応じてbuilder_sample.shを編集してください。 + builder_sample.shを実行します。 + + - example + #+begin_src shell-script + cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="/home/yaruopooner/work/llvm-build-shells/sh/clang-350/build" -DCMAKE_INSTALL_PREFIX="~/work/clang-server" + #+end_src + + - オプション解説 + - =-DLIBRARY_PATHS= + セルフビルドしたLLVMが配置されているディレクトリを指定します。 + LLVMのトップディレクトリである必要があります。 + 省略した場合は ac-clang/clang-server が使われます。 + - =-DCMAKE_INSTALL_PREFIX= + clang-serverのインストールパスを指定します。 + 省略した場合は + =/usr/local/bin= + になります。 + +* パッチ適用済みバイナリ(Windows Only) + https://github.com/yaruopooner/ac-clang/releases + + 上記に置いてあるclang-server-X.X.X.zipは + パッチ適用済みのバイナリとライブラリファイル + - clang-server.exe + - libclang.dll + - libclang.lib or libclang.imp + の3ファイルが格納されています。 + + LLVMはセルフビルドせずにclang-serverのみをセルフビルドする場合は + clang-server-X.X.X.zipをac-clangに解凍します。 + すると以下のように配置されます。 + ac-clang/clang-server/binary/clang-server.exe + ac-clang/clang-server/library/x86_64/release/libclang.dll + ac-clang/clang-server/library/x86_64/release/libclang.lib + +* パッチを適用せずLLVMオフィシャルのlibclangを使用する場合の制限事項 +** 特定ファイルがロックされセーブできなくなる + 編集したヘッダファイルをセーブしようとすると "basic-save-buffer-2: Opening output file: invalid argument `HEADER-FILE-NAME`" となりセーブできない。 + 必ず発生するわけではなく特定の条件を満たしたファイルサイズが16kBを越えるヘッダファイルで発生する。 + 16kB以下のヘッダファイルではまったく発生しない。 + libclang の TranslationUnit(以下TU) の問題。 + libclang の TU がinclude対象のファイルをロックしている。 + ac-clang側で暫定対処パッチを施してあるので多少は緩和されているが完全に回避はできない。 + 発生した場合はマニュアル対処する以外ない。 + +*** emacs側での対処方法 + include対象なので大抵は foo.cpp/foo.hpp という構成だとおもわれます。 + foo.hpp(modified)がセーブできない場合、大抵foo.cppが(modified)になっているのでfoo.cppをセーブしましょう。 + これによりfoo.hppはセーブ可能になるはずです。 + これでもセーブできない場合は、foo.cpp以外のソースでfoo.hppをインクルードしており(modified)になっているバッファがあるはずなので + それもセーブしましょう。 + また、定義へのジャンプ機能で該当ソースがアクティブ化されている場合は、未編集バッファであってもアクティブ化されています。 + 該当バッファを削除してみるか、そのバッファへスイッチして (ac-clang-deactivate) を実行してください。 + これ以外でも16kBを越えるヘッダを編集しようとした際に、そのファイルのcppはオープンしてもいないのにセーブできない場合、 + 該当ヘッダファイルを何処か遠いモジュールでインクルードしている場合なども同様の症状になります。 + ライブラリモジュールやフレームワークなどを開発している場合は発生しやすいかもしれません。 + ※ライブラリ・フレームワークはアプリ側からよくincludeされるため。 + +*** 原因(実装上の問題説明、解決案求む) + foo.cpp(modified)のとき foo.cppのセッションで + TUが foo.cpp パース後もincludeされているファイルのロックを保持しつづけている。 + この状態で foo.hpp を編集してセーブしようとするとロックでエラーになる。 + ロックを解除するには、 foo.cpp のTUをリリースする。 + なので foo.cpp セーブ時にセッションは保持した状態で TU だけをリリースして、 + foo.cpp が再び modified になったときに TU を生成するように修正。 + これにより foo.cpp セーブ後であればincludeロックでが全解除されるので foo.hpp がセーブ可能になる。 + 当然 foo.cpp 以外に foo.hpp をinclude しているソースでかつ、編集中のバッファがある場合は、 + それら全てを保存しないとロックでは解除されない。 + + Windows環境において、 + このロックはI/Oのopen関数によるロックはではなくWindowsAPIのCreateFileMappingによるロックである。 + libclang FileManagerは16kB以上のファイルをメモリマップドファイルとしてアロケーションする。 + TUがリリースされるとUnmapViewOfFileによりメモリマップドファイルがリリースされるようになりファイルに対して書き込み可能になる。 + + Linux環境においても発現する不具合はWindows環境と若干異なるものの mmap/munmapによる問題は発生する。 + foo.cppのTUを保持している状態でfoo.hppにおいてclass fooのメソッドを追加・削除し保存する。 + foo.hpp更新後にfoo.cppにおいてclass fooのメソッドを補間しようとするとTUがクラッシュする。 + libclangがSTDOUTに "libclang: crash detected in code completion" を出力する。 + clang-serverのプロセスは生きており、セッションを破棄して再生成すれば補間続行は可能。 + +** その他 + 上記の問題はlibclangにパッチを適用して改善している。 + + パッチを適用したリリースバイナリのlibclang-x86_XX.(dll or so)を使用している場合は発生しない。 + パッチを適用していないLLVMセルフビルドおよび、LLVMオフィシャルバイナリを使用する場合にのみ問題が発生します。 + clang側の仕様バグなので現在LLVM bugzilla に報告済み。対応待ち中。 + http://llvm.org/bugs/show_bug.cgi?id=20880 + +* パッチ解説 +** パッチ + ac-clang/clang-server/patch/invalidate-mmap.patch + を使用。 + #+begin_src shell-script + cd llvm/ + svn patch ac-clang/clang-server/patch/invalidate-mmap.patch + #+end_src + +** パッチ(invalidate-mmap.patch)で行っている事 + mmapを使わないようにパッチを適用している + 適用するのは以下のソース + clang-trunk/llvm/lib/Support/MemoryBuffer.cpp + +#+begin_src C++ + static error_code getOpenFileImpl(int FD, const char *Filename, + OwningPtr &result, + uint64_t FileSize, uint64_t MapSize, + int64_t Offset, bool RequiresNullTerminator) { +#+end_src + + ↑の関数内で呼ばれる shouldUseMmap によりファイルに対するmmapの使用可否が判断される +#+begin_src C++ + static bool shouldUseMmap(int FD, + size_t FileSize, + size_t MapSize, + off_t Offset, + bool RequiresNullTerminator, + int PageSize) { +#+end_src + この関数のresultが常時falseであればmmapは恒久的に使用されない。 + よってこの関数の先頭で +#+begin_src C++ + return false; +#+end_src + とすればよい。 + 以降のコードは#if 0 end するなりすればよい。 + +** LLVM3.5の追加仕様 + shouldUseMmap,getOpenFileImplに引数IsVolatileSizeが追加された。 + これはshouldUseMmapまで加工なしでパスされ、 + shouldUseMmap先頭において、 +#+begin_src C++ + if (IsVolatileSize) + return false; +#+end_src + される。 + コメントがついていた +#+begin_src C++ + // mmap may leave the buffer without null terminator if the file size changed + // by the time the last page is mapped in, so avoid it if the file size is + // likely to change. +#+end_src + + mmapはファイルサイズが最後のページがマップされたされた時点で変更された場合はnull終端せずにバッファを残すので、ファイルサイズが変更される可能性がある場合は、それを回避することができる。 + + とは言っているものの、想定されていない事態がいろいろあるようで仕様抜けの模様。 + またバッファ確保系関数の上流で IsVolatileSize が指定されていなかったりコンストラクタのデフォルト値のまま運用されている箇所が何箇所か見受けられた。 + そういった箇所を自前で修正してみたところ従来よりマシになったものの、他にも問題があるようで想定通りにmmapを制御は出来なかった。 + LLVMのファイルシステム・メモリ周りの仕様を完全に把握していないと、ここら辺の修正は厳しいのかもしれない。 + よって現時点においては上記パッチ適用が一番無難なやり方となる。 + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.md b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.md new file mode 100755 index 0000000..9925e17 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.md @@ -0,0 +1,392 @@ + + + +[Japanese Manual](./readme.ja.md) + +# About this document + +This is explained about self-build of clang-server. +When you use clang-server binary for distribution on Windows environment, it is not necessary to read this document. + +# Step of self-build + +A build of clang-server requires libclang of LLVM. +Therefore, first self-build is LLVM libclang, next self-build is clang-server. + +## LLVM self-build + +You have to do four step of following. +There is also a script which simplify this work. +- Checkout LLVM +- Apply patch to LLVM for libclang +- Project file generation by CMAKE or configure +- Build + +## clang-server self-build + +Patch applied libclang library use by LLVM self-build +Use the patch applied libclang library +- Project file generation by CMAKE +- Build +- Installation + +# Software required for self-build + +## Windows + +The following is required. + +### LLVM + +The following built library is required. +libclang.lib or libclang.imp +libclang.dll + +### Visual Studio 2015/2013/2012/2010 + +any OK + +### CMake + + + +Download cmake archive, and decompress to any location. +CMake is used for Visual Studio Solution File generation and build and installation. + +## Linux + +The following is required. + +### LLVM + +The following built library is required. +libclang.so + +### CMake + + $ sudo apt-get install cmake + +If you want to use latest version, download from following + + + +e.g. +Download cmake-3.1.3.tar.gz, and decompress to work directory. +You perform a build and installation. + + $ tar -xf cmake-3.1.3.tar.gz . + $ cd cmake-3.1.3 + $ ./configure && make + $ make install + +# Self-Build + +## Windows + +### LLVM + +Required process for LLVM self-build. +And you must apply patch to LLVM before build. +It isn't necessary install a package after self-build. +You must designate generated binary PATH after LLVM self-build at CMake project generation argument. +Therefore clang-server is able to build. +When LLVM is already installed, you must designate installed directory of LLVM. + +When you want to self-build, +Checkout from SVN by yourself, and perform the LLVM Solution File generation and build by cmake. +Or, use following script. + + +1. How to designate the LLVM patch in the script + + You will designate -tasks to the argument of builderShell, + and designate PATCH to the parameter of -tasks, + It will gives a table that describes the path to apply the patch and patch file to parameter of -patchInfos. + Please refer to the sample.ps1 of llvm-build-shells for details. + +2. The contents of the LLVM patch + + Use of mmap always invalidation. + +### clang-server + +Use the ac-clang/build/builder\_sample.bat +Please edit the builder\_sample.bat as necessary. +It's necessary to execute in the command line or Windows Explorer. + +- example + + cmake -G "Visual Studio 12 2013 Win64" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-360/build/msvc-64/" -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" + +- Option commentary + - `-DLIBRARY_PATHS` + You have to designate location of LLVM self-build completed directory. + It is necessary to designate the directory that a binary was generated.(e.g. {LLVM output path}/Release/) + If you omit this option, value will be use `ac-clang/clang-server` . + - `-DCMAKE_INSTALL_PREFIX` + You have to designate installation location of clang-server. + If you omit this option, value will be use `C:/Program Files/clang-server` . + +## Linux + +### LLVM + +Required process for LLVM self-build. +And you must apply patch to LLVM before build. +It isn't necessary install a package after self-build. +You must designate generated binary PATH after LLVM self-build at CMake project generation argument. +Therefore clang-server is able to build. +When LLVM is already installed, you must designate installed directory of LLVM. + +When you want to self-build, +Checkout from SVN by yourself, and perform the LLVM Solution File generation and build by cmake. +Or, use following script. + + +1. How to designate the LLVM patch in the script + + You will designate -patch to the argument of executeBuilder. + Add to -patchApplyLocation the path where you want to apply the patch. + You write the patch file to -patchPath gives as an parameter. + -patchApplyLocation,-patchPath becomes the pair, it is possible to multiple times designate. + Please refer to the sample.sh of llvm-build-shells for details. + +2. The contents of the LLVM patch + + Use of mmap always invalidation. + +### clang-server + +Use the ac-clang/build/builder\_sample.sh +Please edit the builder\_sample.sh as necessary. +Execute the builder\_sample.sh + +- example + + cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="/home/yaruopooner/work/llvm-build-shells/sh/clang-350/build" -DCMAKE_INSTALL_PREFIX="~/work/clang-server" + +- Option commentary + - `-DLIBRARY_PATHS` + You have to designate location of LLVM self-build completed directory. + It is necessary to designate the directory that a binary was generated.(e.g. {LLVM output path}/Release/) + If you omit this option, value will be use `ac-clang/clang-server` . + - `-DCMAKE_INSTALL_PREFIX` + You have to designate installation location of clang-server. + If you omit this option, value will be use `/usr/local/bin` . + +# Patch was applied binary(Windows Only) + + + +clang-server-X.X.X.zip is you can download from the above +The archive is 3 files contain, these file applied patch. +- clang-server.exe +- libclang.dll +- libclang.lib or libclang.imp + +When you want to self-build only clang-server without LLVM, +clang-server-X.X.X.zip decompress to ac-clang directory. +Then, it will be placed in the following. +ac-clang/clang-server/binary/clang-server.exe +ac-clang/clang-server/library/x86\_64/release/libclang.dll +ac-clang/clang-server/library/x86\_64/release/libclang.lib + +# Restrictions when you use LLVM official libclang without applying a patch + +## A specific file is locked and cannot save it + +When you try to save the edited header file, +it will be "basic-save-buffer-2: Opening output file: invalid argument \`HEADER-FILE-NAME\`", +and you can't save. +This occur if it meets certain conditions. +This condition is met when the header file size is larger than 16kB. +It is not at all occur when header file size is smaller than 16kB. +This issue belong to TranslationUnit(TU) of libclang. +The inclusion target file is locked by TU of libclang. +By performing a provisional transaction in ac-clang side, the more or less is erased, but it can't be avoided perfectly. +When this issue is occurring, only manual handle can be avoided. + +### Solution in Emacs side + +I suppose that combination of source file is foo.cpp/foo.hpp. +When foo.hpp(modified) can't save, foo.cpp is (modified) often, so foo.cpp have to saved. +Therefore, foo.hpp should be possible to save. +When this can't save, +foo.hpp is included by source files besides foo.cpp, and it has (modified) status. +You have to save those. +And, when corresponding source is activated by definition jump feature, even if buffer don't modified that buffer is activated. +You try remove corresponding buffer, or (ac-clang-deactivate) must be execute in buffer. +In other cases, when you try save header file that file size larger than 16kB +When you save a header file of larger than 16kB, if it fails. +And that header file does not opened. +In this case, header file is included by a far module from current source file. +When you having developed a library module framework, it may be easy to occur. +because library and framework is included from application side. + +### Issue(Implementation issues explanation, it wanted suggested solutions) + +When session of "foo.cpp" is edited in the buffer, +TU continue locking to included header file after parsed "foo.cpp". + +When you edit and save to "foo.hpp" in this state, it occur error, because file is locked by mmap. + +Therefore I modified a server as follows. +So while maintaining the session when "foo.cpp" saving, +TU is generated when "foo.cpp" is edited after TU released. + +Therefore "foo.hpp" is possible to save that the included header file is unlocked after "foo.cpp" saved. + +When a "foo.hpp" is included buffer where exist in buffer editing group without buffer of "foo.cpp", +the lock is not released when you does not save all them. + +In the Windows environment, +This lock is not open function of I/O, is a lock by CreateFileMapping of WindowsAPI. +libclang FileManager does allocation to memory mapped file for the files larger than 16kB. +When TU is released, memory mapped file is released by UnmapViewOfFile, these becomes writable to file. + +In the Linux environment, +problems with mmap/munmap bug differ slightly from the Windows environment, but also occurred in Linux environment. +The method add to "class Foo" in "foo.hpp" in the state that holds TU of "foo.cpp", and save to file. +After "foo.hpp" update, when you try complete method of "class Foo" in the "foo.cpp", TU will crash. +in this case, libclang output to STDOUT that "libclang: crash detected in code completion" +libclang output "libclang: crash detected in code completion" to STDOUT. +The process of clang-server is living in this situation. +Completion is possible after deletion of session and creation of session. + +## Miscellaneous + +The above problems are solved by patching for libclang. + +When you use the patch applied release binary(libclang.dll or so) it is not occur. +When you use the patch does not applied to LLVM self-build and LLVM official binary, this problem is occur. +I think specification bug of clang side. This problem has been reported to LLVM bugzilla. in the corresponding waitting. + + +# Patch commentary + +## Patch + +Use the ac-clang/clang-server/patch/invalidate-mmap.patch + + cd llvm/ + svn patch ac-clang/clang-server/patch/invalidate-mmap.patch + +## The contents of the LLVM patch(invalidate-mmap.patch) + +Patch is applied so as not to use mmap. +Apply to the following source code to +`clang-trunk/llvm/lib/Support/MemoryBuffer.cpp` + + static error_code getOpenFileImpl(int FD, const char *Filename, + OwningPtr &result, + uint64_t FileSize, uint64_t MapSize, + int64_t Offset, bool RequiresNullTerminator) { + +It is determined availability of mmap for file by shouldUseMmap call from the above function. + + static bool shouldUseMmap(int FD, + size_t FileSize, + size_t MapSize, + off_t Offset, + bool RequiresNullTerminator, + int PageSize) { + +When the result of function is always false, mmap is not never used. +Therefore, the following modify has been applied to the top of this function. + + #if 1 + return false; + #else + /* original codes */ + #endif + +## TODO Additional Specification of LLVM3.5 + +IsVolatileSize has been added to arguments of shouldUseMmap and getOpenFileImpl. +This will be passed unchanged to shouldUseMmap. + +It is executed as follows in the shouldUseMmap top. + + if (IsVolatileSize) + return false; + +Following comments had been attached + + // mmap may leave the buffer without null terminator if the file size changed + // by the time the last page is mapped in, so avoid it if the file size is + // likely to change. + +Although that said, there is a situation which isn't assumed Variously, I'm supposing that mistake of specification. +Moreover, upstream function of buffer association function +I was found some place where is not designated value of IsVolatileSize and is used default value of constructor argument. +I tried modified it. +Result was become more better than conventional. +But it seem to have a problem, because I was not able to control mmap like a assumption. +I'm not enough understand the specification of around the file system and memory of LLVM. +For that reason that the rightly correction is difficult. +Therefore, the above patching becomes the most safe way at present. diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.org b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.org new file mode 100755 index 0000000..8dd6b62 --- /dev/null +++ b/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/readme.org @@ -0,0 +1,314 @@ +# -*- mode: org ; coding: utf-8-unix -*- +# last updated : 2015/07/21.00:46:31 + + +#+TITLE: Clang Server Manual +#+AUTHOR: yaruopooner +#+EMAIL: [https://github.com/yaruopooner] +#+OPTIONS: author:nil timestamp:t |:t \n:t ^:nil + + +[[./readme.ja.org][Japanese Manual]] + +* About this document + This is explained about self-build of clang-server. + When you use clang-server binary for distribution on Windows environment, it is not necessary to read this document. + +* Step of self-build + A build of clang-server requires libclang of LLVM. + Therefore, first self-build is LLVM libclang, next self-build is clang-server. + +** LLVM self-build + You have to do four step of following. + There is also a script which simplify this work. + - Checkout LLVM + - Apply patch to LLVM for libclang + - Project file generation by CMAKE or configure + - Build + +** clang-server self-build + Patch applied libclang library use by LLVM self-build + Use the patch applied libclang library + - Project file generation by CMAKE + - Build + - Installation + +* Software required for self-build +** Windows + The following is required. +*** LLVM + The following built library is required. + libclang.lib or libclang.imp + libclang.dll + +*** Visual Studio 2015/2013/2012/2010 + any OK + +*** CMake + http://www.cmake.org/ + + Download cmake archive, and decompress to any location. + CMake is used for Visual Studio Solution File generation and build and installation. + +** Linux + The following is required. +*** LLVM + The following built library is required. + libclang.so + +*** CMake + #+begin_src shell + $ sudo apt-get install cmake + #+end_src + + If you want to use latest version, download from following + + http://www.cmake.org/ + + e.g. + Download cmake-3.1.3.tar.gz, and decompress to work directory. + You perform a build and installation. + #+begin_src shell + $ tar -xf cmake-3.1.3.tar.gz . + $ cd cmake-3.1.3 + $ ./configure && make + $ make install + #+end_src + +* Self-Build +** Windows +*** LLVM + Required process for LLVM self-build. + And you must apply patch to LLVM before build. + It isn't necessary install a package after self-build. + You must designate generated binary PATH after LLVM self-build at CMake project generation argument. + Therefore clang-server is able to build. + When LLVM is already installed, you must designate installed directory of LLVM. + + When you want to self-build, + Checkout from SVN by yourself, and perform the LLVM Solution File generation and build by cmake. + Or, use following script. + https://github.com/yaruopooner/llvm-build-shells + +**** How to designate the LLVM patch in the script + You will designate -tasks to the argument of builderShell, + and designate PATCH to the parameter of -tasks, + It will gives a table that describes the path to apply the patch and patch file to parameter of -patchInfos. + Please refer to the sample.ps1 of llvm-build-shells for details. + +**** The contents of the LLVM patch + Use of mmap always invalidation. + +*** clang-server + Use the ac-clang/build/builder_sample.bat + Please edit the builder_sample.bat as necessary. + It's necessary to execute in the command line or Windows Explorer. + + - example + #+begin_src bat + cmake -G "Visual Studio 12 2013 Win64" ../clang-server -DLIBRARY_PATHS="c:/cygwin-x86_64/tmp/llvm-build-shells/ps1/clang-360/build/msvc-64/" -DCMAKE_INSTALL_PREFIX="c:/cygwin-x86_64/usr/local/bin/" + #+end_src + + - Option commentary + - =-DLIBRARY_PATHS= + You have to designate location of LLVM self-build completed directory. + It is necessary to designate the directory that a binary was generated.(e.g. {LLVM output path}/Release/) + If you omit this option, value will be use =ac-clang/clang-server= . + - =-DCMAKE_INSTALL_PREFIX= + You have to designate installation location of clang-server. + If you omit this option, value will be use =C:/Program Files/clang-server= . + +** Linux +*** LLVM + Required process for LLVM self-build. + And you must apply patch to LLVM before build. + It isn't necessary install a package after self-build. + You must designate generated binary PATH after LLVM self-build at CMake project generation argument. + Therefore clang-server is able to build. + When LLVM is already installed, you must designate installed directory of LLVM. + + When you want to self-build, + Checkout from SVN by yourself, and perform the LLVM Solution File generation and build by cmake. + Or, use following script. + https://github.com/yaruopooner/llvm-build-shells + +**** How to designate the LLVM patch in the script + You will designate -patch to the argument of executeBuilder. + Add to -patchApplyLocation the path where you want to apply the patch. + You write the patch file to -patchPath gives as an parameter. + -patchApplyLocation,-patchPath becomes the pair, it is possible to multiple times designate. + Please refer to the sample.sh of llvm-build-shells for details. + +**** The contents of the LLVM patch + Use of mmap always invalidation. + +*** clang-server + Use the ac-clang/build/builder_sample.sh + Please edit the builder_sample.sh as necessary. + Execute the builder_sample.sh + + - example + #+begin_src shell-script + cmake -G "Unix Makefiles" ../clang-server -DLIBRARY_PATHS="/home/yaruopooner/work/llvm-build-shells/sh/clang-350/build" -DCMAKE_INSTALL_PREFIX="~/work/clang-server" + #+end_src + + - Option commentary + - =-DLIBRARY_PATHS= + You have to designate location of LLVM self-build completed directory. + It is necessary to designate the directory that a binary was generated.(e.g. {LLVM output path}/Release/) + If you omit this option, value will be use =ac-clang/clang-server= . + - =-DCMAKE_INSTALL_PREFIX= + You have to designate installation location of clang-server. + If you omit this option, value will be use =/usr/local/bin= . + +* Patch was applied binary(Windows Only) + https://github.com/yaruopooner/ac-clang/releases + + clang-server-X.X.X.zip is you can download from the above + The archive is 3 files contain, these file applied patch. + - clang-server.exe + - libclang.dll + - libclang.lib or libclang.imp + + When you want to self-build only clang-server without LLVM, + clang-server-X.X.X.zip decompress to ac-clang directory. + Then, it will be placed in the following. + ac-clang/clang-server/binary/clang-server.exe + ac-clang/clang-server/library/x86_64/release/libclang.dll + ac-clang/clang-server/library/x86_64/release/libclang.lib + +* Restrictions when you use LLVM official libclang without applying a patch +** A specific file is locked and cannot save it + When you try to save the edited header file, + it will be "basic-save-buffer-2: Opening output file: invalid argument `HEADER-FILE-NAME`", + and you can't save. + This occur if it meets certain conditions. + This condition is met when the header file size is larger than 16kB. + It is not at all occur when header file size is smaller than 16kB. + This issue belong to TranslationUnit(TU) of libclang. + The inclusion target file is locked by TU of libclang. + By performing a provisional transaction in ac-clang side, the more or less is erased, but it can't be avoided perfectly. + When this issue is occurring, only manual handle can be avoided. + +*** Solution in Emacs side + I suppose that combination of source file is foo.cpp/foo.hpp. + When foo.hpp(modified) can't save, foo.cpp is (modified) often, so foo.cpp have to saved. + Therefore, foo.hpp should be possible to save. + When this can't save, + foo.hpp is included by source files besides foo.cpp, and it has (modified) status. + You have to save those. + And, when corresponding source is activated by definition jump feature, even if buffer don't modified that buffer is activated. + You try remove corresponding buffer, or (ac-clang-deactivate) must be execute in buffer. + In other cases, when you try save header file that file size larger than 16kB + When you save a header file of larger than 16kB, if it fails. + And that header file does not opened. + In this case, header file is included by a far module from current source file. + When you having developed a library module framework, it may be easy to occur. + because library and framework is included from application side. + +*** Issue(Implementation issues explanation, it wanted suggested solutions) + When session of "foo.cpp" is edited in the buffer, + TU continue locking to included header file after parsed "foo.cpp". + + When you edit and save to "foo.hpp" in this state, it occur error, because file is locked by mmap. + + Therefore I modified a server as follows. + So while maintaining the session when "foo.cpp" saving, + TU is generated when "foo.cpp" is edited after TU released. + + Therefore "foo.hpp" is possible to save that the included header file is unlocked after "foo.cpp" saved. + + When a "foo.hpp" is included buffer where exist in buffer editing group without buffer of "foo.cpp", + the lock is not released when you does not save all them. + + + In the Windows environment, + This lock is not open function of I/O, is a lock by CreateFileMapping of WindowsAPI. + libclang FileManager does allocation to memory mapped file for the files larger than 16kB. + When TU is released, memory mapped file is released by UnmapViewOfFile, these becomes writable to file. + + In the Linux environment, + problems with mmap/munmap bug differ slightly from the Windows environment, but also occurred in Linux environment. + The method add to "class Foo" in "foo.hpp" in the state that holds TU of "foo.cpp", and save to file. + After "foo.hpp" update, when you try complete method of "class Foo" in the "foo.cpp", TU will crash. + in this case, libclang output to STDOUT that "libclang: crash detected in code completion" + libclang output "libclang: crash detected in code completion" to STDOUT. + The process of clang-server is living in this situation. + Completion is possible after deletion of session and creation of session. + +** Miscellaneous + The above problems are solved by patching for libclang. + + When you use the patch applied release binary(libclang.dll or so) it is not occur. + When you use the patch does not applied to LLVM self-build and LLVM official binary, this problem is occur. + I think specification bug of clang side. This problem has been reported to LLVM bugzilla. in the corresponding waitting. + http://llvm.org/bugs/show_bug.cgi?id=20880 + +* Patch commentary +** Patch + Use the ac-clang/clang-server/patch/invalidate-mmap.patch + #+begin_src shell-script + cd llvm/ + svn patch ac-clang/clang-server/patch/invalidate-mmap.patch + #+end_src + +** The contents of the LLVM patch(invalidate-mmap.patch) + Patch is applied so as not to use mmap. + Apply to the following source code to + =clang-trunk/llvm/lib/Support/MemoryBuffer.cpp= + +#+begin_src C++ + static error_code getOpenFileImpl(int FD, const char *Filename, + OwningPtr &result, + uint64_t FileSize, uint64_t MapSize, + int64_t Offset, bool RequiresNullTerminator) { +#+end_src + + It is determined availability of mmap for file by shouldUseMmap call from the above function. + +#+begin_src C++ + static bool shouldUseMmap(int FD, + size_t FileSize, + size_t MapSize, + off_t Offset, + bool RequiresNullTerminator, + int PageSize) { +#+end_src + When the result of function is always false, mmap is not never used. + Therefore, the following modify has been applied to the top of this function. +#+begin_src C++ + #if 1 + return false; + #else + /* original codes */ + #endif +#+end_src + +** TODO Additional Specification of LLVM3.5 + IsVolatileSize has been added to arguments of shouldUseMmap and getOpenFileImpl. + This will be passed unchanged to shouldUseMmap. + + It is executed as follows in the shouldUseMmap top. +#+begin_src C++ + if (IsVolatileSize) + return false; +#+end_src + + Following comments had been attached +#+begin_src C++ + // mmap may leave the buffer without null terminator if the file size changed + // by the time the last page is mapped in, so avoid it if the file size is + // likely to change. +#+end_src + + Although that said, there is a situation which isn't assumed Variously, I'm supposing that mistake of specification. + Moreover, upstream function of buffer association function + I was found some place where is not designated value of IsVolatileSize and is used default value of constructor argument. + I tried modified it. + Result was become more better than conventional. + But it seem to have a problem, because I was not able to control mmap like a assumption. + I'm not enough understand the specification of around the file system and memory of LLVM. + For that reason that the rightly correction is difficult. + Therefore, the above patching becomes the most safe way at present. + + diff --git a/.emacs.d/elpa/ac-clang-20150906.1008/sample-pic-complete.png b/.emacs.d/elpa/ac-clang-20150906.1008/sample-pic-complete.png new file mode 100644 index 0000000..9077f03 Binary files /dev/null and b/.emacs.d/elpa/ac-clang-20150906.1008/sample-pic-complete.png differ diff --git a/.emacs.d/elpa/ac-math-20141116.1327/ac-math-autoloads.el b/.emacs.d/elpa/ac-math-20141116.1327/ac-math-autoloads.el new file mode 100644 index 0000000..95e592b --- /dev/null +++ b/.emacs.d/elpa/ac-math-20141116.1327/ac-math-autoloads.el @@ -0,0 +1,23 @@ +;;; ac-math-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;;;### (autoloads nil "ac-math" "ac-math.el" (22209 45670 549621 +;;;;;; 0)) +;;; Generated autoloads from ac-math.el + +(defvar ac-source-latex-commands '((candidates . math-symbol-list-latex-commands) (symbol . "c") (prefix . ac-math-prefix))) + +(defvar ac-source-math-latex '((candidates . ac-math-candidates-latex) (symbol . "l") (prefix . ac-math-prefix) (action . ac-math-action-latex))) + +(defvar ac-source-math-unicode '((candidates . ac-math-candidates-unicode) (symbol . "u") (prefix . ac-math-prefix) (action . ac-math-action-unicode))) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; ac-math-autoloads.el ends here diff --git a/.emacs.d/elpa/ac-math-20141116.1327/ac-math-autoloads.el~ b/.emacs.d/elpa/ac-math-20141116.1327/ac-math-autoloads.el~ new file mode 100644 index 0000000..81f41d8 --- /dev/null +++ b/.emacs.d/elpa/ac-math-20141116.1327/ac-math-autoloads.el~ @@ -0,0 +1,11 @@ +;;; ac-math-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; ac-math-autoloads.el ends here diff --git a/.emacs.d/elpa/ac-math-20141116.1327/ac-math-pkg.el b/.emacs.d/elpa/ac-math-20141116.1327/ac-math-pkg.el new file mode 100644 index 0000000..43a7be3 --- /dev/null +++ b/.emacs.d/elpa/ac-math-20141116.1327/ac-math-pkg.el @@ -0,0 +1 @@ +(define-package "ac-math" "20141116.1327" "Auto-complete sources for input of mathematical symbols and latex tags" '((auto-complete "1.4") (math-symbol-lists "1.0")) :url "https://github.com/vitoshka/ac-math" :keywords '("latex" "auto-complete" "unicode" "symbols")) diff --git a/.emacs.d/elpa/ac-math-20141116.1327/ac-math-pkg.elc b/.emacs.d/elpa/ac-math-20141116.1327/ac-math-pkg.elc new file mode 100644 index 0000000..2a64871 Binary files /dev/null and b/.emacs.d/elpa/ac-math-20141116.1327/ac-math-pkg.elc differ diff --git a/.emacs.d/elpa/ac-math-20141116.1327/ac-math.el b/.emacs.d/elpa/ac-math-20141116.1327/ac-math.el new file mode 100644 index 0000000..e23777b --- /dev/null +++ b/.emacs.d/elpa/ac-math-20141116.1327/ac-math.el @@ -0,0 +1,173 @@ +;;; ac-math.el --- Auto-complete sources for input of mathematical symbols and latex tags +;; +;; Copyright (C) 2011-2013, Vitalie Spinu +;; Author: Vitalie Spinu +;; URL: https://github.com/vitoshka/ac-math +;; Package-Version: 20141116.1327 +;; Keywords: latex, auto-complete, Unicode, symbols +;; Version: 1.1 +;; Package-Requires: ((auto-complete "1.4") (math-symbol-lists "1.0")) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; 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 3, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth +;; Floor, Boston, MA 02110-1301, USA. +;; +;; Features that might be required by this library: +;; +;; auto-complete http://cx4a.org/software/auto-complete/ +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; +;; This add-on defines three ac-sources for the +;; *[auto-complete](https://github.com/auto-complete)* package: +;; +;; * ac-source-latex-commands - input latex commands +;; * ac-source-math-latex - input math latex tags (by default, active only in math environments in latex modes) +;; * ac-source-math-unicode - input of unicode symbols (by default, active everywhere except math environments) +;; +;; Start math completion by typing the prefix "\" key. Select the completion +;; type RET (`ac-complete`). Completion on TAB (`ac-expand`) is not that great +;; as you will see dummy characters, but it's usable. +;; +;; (See https://github.com/vitoshka/ac-math#readme for more) +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Code: + +(require 'math-symbol-lists) +(require 'auto-complete) + +(defgroup ac-math nil + "Auto completion." + :group 'auto-complete + :prefix "ac-math") + +(defcustom ac-math-unicode-in-math-p nil + "Set this to t if unicode in math latex environments is needed." + :group 'ac-math) + +(defcustom ac-math-prefix-regexp "\\\\\\(.*\\)" + "Regexp matching the prefix of the ac-math symbol." + :group 'ac-math) + +(defvar ac-math--dummy " ") + +(defun ac-math--make-candidates (alist &optional unicode) + "Build a list of math symbols ready to be used in ac source. +Each element is a cons cell (SYMB . VALUE) where SYMB is the +string to be displayed during the completion and the VALUE is the +actually value inserted on RET completion. If UNICODE is non-nil +the value of VALUE is the unicode character else it's the latex +command." + (delq nil + (mapcar + #'(lambda (el) + (let* ((symb (substring (nth 1 el) 1)) + ;; (sep (propertize ac-math--dummy 'display "")) + (sep ac-math--dummy) + (ch (and (nth 2 el) (decode-char 'ucs (nth 2 el)))) + (uni-symb (and ch (char-to-string ch))) + (uni-string (concat sep uni-symb))) + (unless (and unicode (null uni-symb)) + (cons (concat symb uni-string) + (if unicode + uni-symb + symb))))) + alist))) + +(defconst ac-math-symbols-latex + (delete-dups + (append (ac-math--make-candidates math-symbol-list-basic) + (ac-math--make-candidates math-symbol-list-extended))) + "List of math completion candidates.") + +(defconst ac-math-symbols-unicode + (delete-dups + (append (ac-math--make-candidates math-symbol-list-basic t) + (ac-math--make-candidates math-symbol-list-extended t))) + "List of math completion candidates.") + +(defun ac-math-action-latex (&optional del-backward) + "Function to be used in ac action property. +Deletes the unicode symbol from the end of the completed +string. If DEL-BACKWARD is non-nil, delete the name of the symbol +instead." + (let ((pos (point)) + (start-dummy (save-excursion + (re-search-backward ac-math--dummy (point-at-bol) 'no-error))) + (end-dummy (match-end 0)) + (inhibit-point-motion-hooks t)) + (when start-dummy + (if del-backward + (when end-dummy + (goto-char start-dummy) + (when (re-search-backward ac-math-prefix-regexp) + (delete-region (match-beginning 0) end-dummy)) + (forward-word 1)) + (delete-region start-dummy (point)))))) + +(defun ac-math-action-unicode () + (ac-math-action-latex 'backward)) + +(defun ac-math-latex-math-face-p () + (let ((face (get-text-property (point) 'face))) + (if (consp face) + (eq (car face) 'font-latex-math-face) + (eq face 'font-latex-math-face)))) + +(defun ac-math-candidates-latex () + (when (ac-math-latex-math-face-p) + ac-math-symbols-latex)) + +(defun ac-math-candidates-unicode () + (when (or ac-math-unicode-in-math-p + (not (ac-math-latex-math-face-p))) + ac-math-symbols-unicode)) + +(defun ac-math-prefix () + "Return the location of the start of the current symbol. +Uses `ac-math-prefix-regexp'." + (when (re-search-backward ac-math-prefix-regexp (point-at-bol) 'no-error) + (match-beginning 1))) + +;;;###autoload +(defvar ac-source-latex-commands + '((candidates . math-symbol-list-latex-commands) + (symbol . "c") + (prefix . ac-math-prefix))) + +;;;###autoload +(defvar ac-source-math-latex + '((candidates . ac-math-candidates-latex) + (symbol . "l") + (prefix . ac-math-prefix) + (action . ac-math-action-latex))) + +;;;###autoload +(defvar ac-source-math-unicode + '((candidates . ac-math-candidates-unicode) + (symbol . "u") + (prefix . ac-math-prefix) + (action . ac-math-action-unicode))) + +(provide 'ac-math) + +;;; ac-math.el ends here diff --git a/.emacs.d/elpa/ac-math-20141116.1327/ac-math.elc b/.emacs.d/elpa/ac-math-20141116.1327/ac-math.elc new file mode 100644 index 0000000..e8bf42d Binary files /dev/null and b/.emacs.d/elpa/ac-math-20141116.1327/ac-math.elc differ diff --git a/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-autoloads.el b/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-autoloads.el new file mode 100644 index 0000000..9fa70cb --- /dev/null +++ b/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-autoloads.el @@ -0,0 +1,15 @@ +;;; ac-octave-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;;;### (autoloads nil nil ("ac-octave.el") (22213 40578 597292 452000)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; ac-octave-autoloads.el ends here diff --git a/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-autoloads.el~ b/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-autoloads.el~ new file mode 100644 index 0000000..b889f68 --- /dev/null +++ b/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-autoloads.el~ @@ -0,0 +1,11 @@ +;;; ac-octave-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; ac-octave-autoloads.el ends here diff --git a/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-pkg.el b/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-pkg.el new file mode 100644 index 0000000..e4472a9 --- /dev/null +++ b/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave-pkg.el @@ -0,0 +1 @@ +(define-package "ac-octave" "20150111.1708" "An auto-complete source for Octave" '((auto-complete "1.4.0")) :url "https://github.com/coldnew/ac-octave" :keywords '("octave" "auto-complete" "completion")) diff --git a/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave.el b/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave.el new file mode 100644 index 0000000..2933d2a --- /dev/null +++ b/.emacs.d/elpa/ac-octave-20150111.1708/ac-octave.el @@ -0,0 +1,139 @@ +;;; ac-octave.el --- An auto-complete source for Octave + +;; Copyright (c) 2012 - 2014 coldnew +;; +;; Author: coldnew +;; Keywords: Octave, auto-complete, completion +;; Package-Version: 20150111.1708 +;; Package-Requires: ((auto-complete "1.4.0")) +;; URL: https://github.com/coldnew/ac-octave +;; Version: 0.4 + +;; 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, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program; if not, write to the Free Software +;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Commentary: + +;;; Installation: + +;; If you have `melpa' and `emacs24' installed, simply type: +;; +;; M-x package-install ac-octave +;; +;; Add following lines to your init file: +;; +;; (require 'ac-octave) +;; (defun ac-octave-mode-setup () +;; (setq ac-sources '(ac-source-octave))) +;; (add-hook 'octave-mode-hook +;; '(lambda () (ac-octave-mode-setup))) +;; + +;;; Note: + +;; If you can't use ac-octave in octave-mode, +;; check whether `auto-complete-mode' is running or not. + +;;; Code: + +(eval-when-compile (require 'cl)) +(require 'auto-complete) + +;; octave-inf.el merge to octave.el since emacs version 24.3.1 +;; see issue #6: Error when require octave-inf +(if (or (and (= emacs-major-version 24) (> emacs-minor-version 3)) + (>= emacs-major-version 25)) + (require 'octave) + ;; for emacs 24.3 or below + (require 'octave-inf)) + +;;;;########################################################################## +;;;; User Options, Variables +;;;;########################################################################## + + +;;;;;;;; faces +(defface ac-octave-candidate-face + '((t (:inherit ac-candidate-face))) + "face for octave candidate" + :group 'auto-complete) + +(defface ac-octave-selection-face + '((t (:inherit ac-selection-face))) + "face for the octave selected candidate." + :group 'auto-complete) + + +;;;;;;;; local variables + +(defvar ac-octave-complete-list nil) + +;;;;;;;; functions + +(defun ac-octave-init () + "Start inferior-octave in background before use ac-octave." + (run-octave t) + ;; Update current directory of inferior octave whenever completion starts. + ;; This allows local functions to be completed when user switches + ;; between octave buffers that are located in different directories. + (when (file-readable-p default-directory) + (inferior-octave-send-list-and-digest + (list (concat "cd " default-directory ";\n"))))) + +(defun ac-octave-do-complete () + (interactive) + (let* ((end (point)) + (command (save-excursion + (skip-syntax-backward "w_") + (buffer-substring-no-properties (point) end)))) + + (inferior-octave-send-list-and-digest + (list (concat "completion_matches (\"" command "\");\n"))) + + (setq ac-octave-complete-list + (sort inferior-octave-output-list 'string-lessp)) + + ;; remove dulpicates lists + (delete-dups ac-octave-complete-list))) + +(defun ac-octave-candidate () + (let (table) + (ac-octave-do-complete) + (dolist (s ac-octave-complete-list) + (push s table)) + table)) + +(defun ac-octave-documentation (symbol) + (with-local-quit + (ignore-errors + (inferior-octave-send-list-and-digest + (list (concat "help " symbol ";\n"))) + (mapconcat #'identity + inferior-octave-output-list + "\n")))) + +(ac-define-source octave + '((candidates . ac-octave-candidate) + (document . ac-octave-documentation) + (candidate-face . ac-octave-candidate-face) + (selection-face . ac-octave-selection-face) + (init . ac-octave-init) + (requires . 0) + (cache) + (symbol . "f"))) + +(provide 'ac-octave) +;;; ac-octave.el ends here diff --git a/.emacs.d/elpa/archives/gnu/archive-contents b/.emacs.d/elpa/archives/gnu/archive-contents new file mode 100644 index 0000000..a60ec47 --- /dev/null +++ b/.emacs.d/elpa/archives/gnu/archive-contents @@ -0,0 +1,863 @@ +(1 + (ace-window . + [(0 9 0) + ((avy + (0 2 0))) + "Quickly switch windows." single + ((:url . "https://github.com/abo-abo/ace-window") + (:keywords "window" "location"))]) + (ack . + [(1 5) + nil "interface to ack-like tools" tar + ((:keywords "tools" "processes" "convenience") + (:url . "https://github.com/leoliu/ack-el"))]) + (ada-mode . + [(5 1 9) + ((wisi + (1 1 2)) + (cl-lib + (0 4)) + (emacs + (24 2))) + "major-mode for editing Ada sources" tar + ((:keywords "languages" "ada") + (:url . "http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html"))]) + (ada-ref-man . + [(2012 0) + nil "Ada Reference Manual 2012" tar + ((:keywords "languages" "ada") + (:url . "http://stephe-leake.org/ada/arm.html"))]) + (adaptive-wrap . + [(0 5) + nil "Smart line-wrapping with wrap-prefix" single + ((:url . "http://elpa.gnu.org/packages/adaptive-wrap.html") + (:keywords))]) + (adjust-parens . + [(3 0) + nil "Indent and dedent Lisp code, automatically adjust close parens" tar + ((:url . "http://elpa.gnu.org/packages/adjust-parens.html"))]) + (aggressive-indent . + [(1 5) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "Minor mode to aggressively keep your code always indented" single + ((:url . "https://github.com/Malabarba/aggressive-indent-mode") + (:keywords "indent" "lisp" "maint" "tools"))]) + (ahungry-theme . + [(1 1 0) + ((emacs + (24))) + "Ahungry color theme for Emacs. Make sure to (load-theme 'ahungry)." tar + ((:keywords "ahungry" "palette" "color" "theme" "emacs" "color-theme" "deftheme") + (:url . "https://github.com/ahungry/color-theme-ahungry"))]) + (all . + [(1 0) + nil "Edit all lines matching a given regexp" single + ((:url . "http://elpa.gnu.org/packages/all.html") + (:keywords "matching"))]) + (ampc . + [(0 2) + nil "Asynchronous Music Player Controller" single + ((:url . "http://elpa.gnu.org/packages/ampc.html") + (:keywords "ampc" "mpc" "mpd"))]) + (ascii-art-to-unicode . + [(1 9) + nil "a small artist adjunct" single + ((:url . "http://www.gnuvola.org/software/aa2u/") + (:keywords "ascii" "unicode" "box-drawing"))]) + (async . + [(1 6) + nil "Asynchronous processing in Emacs" tar + ((:keywords "async") + (:url . "http://elpa.gnu.org/packages/async.html"))]) + (auctex . + [(11 89 1) + nil "Integrated environment for *TeX*" tar + ((:url . "http://www.gnu.org/software/auctex/"))]) + (aumix-mode . + [(7) + nil "run the aumix program in a buffer" single + ((:url . "http://user42.tuxfamily.org/aumix-mode/index.html") + (:keywords "multimedia" "mixer" "aumix"))]) + (auto-overlays . + [(0 10 9) + nil "Automatic regexp-delimited overlays" tar + ((:keywords "extensions") + (:url . "http://www.dr-qubit.org/emacs.php"))]) + (avy . + [(0 4 0) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "tree-based completion" tar + ((:keywords "point" "location") + (:url . "https://github.com/abo-abo/avy"))]) + (beacon . + [(1 0) + ((seq + (1 11))) + "Highlight the cursor whenever the window scrolls" single + ((:url . "https://github.com/Malabarba/beacon") + (:keywords "convenience"))]) + (bug-hunter . + [(1 1) + ((seq + (1 3)) + (cl-lib + (0 5))) + "Hunt down errors by bisecting elisp files" single + ((:url . "https://github.com/Malabarba/elisp-bug-hunter") + (:keywords "lisp"))]) + (caps-lock . + [(1 0) + nil "Caps-lock as a minor mode" single + ((:url . "http://elpa.gnu.org/packages/caps-lock.html") + (:keywords))]) + (chess . + [(2 0 4) + ((cl-lib + (0 5))) + "Play chess in GNU Emacs" tar + ((:keywords "games") + (:url . "http://elpa.gnu.org/packages/chess.html"))]) + (cl-generic . + [(0 2) + nil "Forward cl-generic compatibility for Emacs<25" single + ((:url . "http://elpa.gnu.org/packages/cl-generic.html") + (:keywords))]) + (cl-lib . + [(0 5) + nil "Properly prefixed CL functions and macros" single + ((:url . "http://elpa.gnu.org/packages/cl-lib.html") + (:keywords))]) + (coffee-mode . + [(0 4 1 1) + nil "Major mode for CoffeeScript files" single + ((:url . "http://github.com/defunkt/coffee-mode") + (:keywords "coffeescript" "major" "mode"))]) + (company . + [(0 8 12) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "Modular text completion framework" tar + ((:keywords "abbrev" "convenience" "matching") + (:url . "http://company-mode.github.io/"))]) + (company-math . + [(1 0 1) + ((company + (0 8 0)) + (math-symbol-lists + (1 0))) + "Completion backends for unicode math symbols and latex tags" single + ((:url . "https://github.com/vspinu/company-math") + (:keywords "unicode" "symbols" "completion"))]) + (company-statistics . + [(0 2 2) + ((emacs + (24 3)) + (company + (0 8 5))) + "Sort candidates using completion history" tar + ((:keywords "abbrev" "convenience" "matching") + (:url . "https://github.com/company-mode/company-statistics"))]) + (context-coloring . + [(7 2 0) + ((emacs + (24 3)) + (js2-mode + (20150713))) + "Highlight by scope" single + ((:url . "https://github.com/jacksonrayhamilton/context-coloring") + (:keywords "convenience" "faces" "tools"))]) + (crisp . + [(1 3 4) + nil "CRiSP/Brief Emacs emulator" single + ((:url . "http://elpa.gnu.org/packages/crisp.html") + (:keywords "emulations" "brief" "crisp"))]) + (csv-mode . + [(1 5) + nil "Major mode for editing comma/char separated values" single + ((:url . "http://centaur.maths.qmul.ac.uk/Emacs/") + (:keywords "convenience"))]) + (darkroom . + [(0 1) + ((cl-lib + (0 5))) + "Remove visual distractions and focus on writing" single + ((:url . "http://elpa.gnu.org/packages/darkroom.html") + (:keywords "convenience" "emulations"))]) + (dash . + [(2 12 0) + nil "A modern list library for Emacs" tar + ((:keywords "lists") + (:url . "http://elpa.gnu.org/packages/dash.html"))]) + (dbus-codegen . + [(0 1) + ((cl-lib + (0 5))) + "Lisp code generation for D-Bus." single + ((:url . "http://elpa.gnu.org/packages/dbus-codegen.html") + (:keywords "comm" "dbus" "convenience"))]) + (debbugs . + [(0 9) + ((async + (1 6))) + "SOAP library to access debbugs servers" tar + ((:keywords "comm" "hypermedia") + (:url . "http://elpa.gnu.org/packages/debbugs.html"))]) + (dict-tree . + [(0 12 8) + ((trie + (0 2 5)) + (tNFA + (0 1 1)) + (heap + (0 3))) + "Dictionary data structure" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "matching" "data structures trie" "tree" "dictionary" "completion" "regexp"))]) + (diff-hl . + [(1 8 3) + ((cl-lib + (0 2))) + "Highlight uncommitted changes using VC" tar + ((:keywords "vc" "diff") + (:url . "https://github.com/dgutov/diff-hl"))]) + (dismal . + [(1 5) + ((cl-lib + (0))) + "Dis Mode Ain't Lotus: Spreadsheet program Emacs" tar + ((:url . "http://elpa.gnu.org/packages/dismal.html"))]) + (djvu . + [(0 5) + nil "Edit and view Djvu files via djvused" single + ((:url . "http://elpa.gnu.org/packages/djvu.html") + (:keywords "files" "wp"))]) + (docbook . + [(0 1) + nil "Info-like viewer for DocBook" single + ((:url . "http://elpa.gnu.org/packages/docbook.html") + (:keywords "docs" "help"))]) + (dts-mode . + [(0 1 0) + nil "Major mode for Device Tree source files" single + ((:url . "http://elpa.gnu.org/packages/dts-mode.html") + (:keywords "languages"))]) + (easy-kill . + [(0 9 3) + ((emacs + (24)) + (cl-lib + (0 5))) + "kill & mark things easily" tar + ((:keywords "killing" "convenience") + (:url . "https://github.com/leoliu/easy-kill"))]) + (ediprolog . + [(1 1) + nil "Emacs Does Interactive Prolog" single + ((:url . "http://elpa.gnu.org/packages/ediprolog.html") + (:keywords "languages" "processes"))]) + (el-search . + [(0 1 3) + ((emacs + (25))) + "Expression based incremental search for emacs-lisp-mode" single + ((:url . "http://elpa.gnu.org/packages/el-search.html") + (:keywords "lisp"))]) + (eldoc-eval . + [(0 1) + nil "Enable eldoc support when minibuffer is in use." single + ((:url . "http://elpa.gnu.org/packages/eldoc-eval.html") + (:keywords))]) + (electric-spacing . + [(5 0) + nil "Insert operators with surrounding spaces smartly" single + ((:url . "http://elpa.gnu.org/packages/electric-spacing.html") + (:keywords))]) + (enwc . + [(1 0) + nil "The Emacs Network Client" tar + ((:keywords "enwc" "network" "wicd" "manager" "nm") + (:url . "http://elpa.gnu.org/packages/enwc.html"))]) + (epoch-view . + [(0 0 1) + nil "Minor mode to visualize epoch timestamps" single + ((:url . "http://elpa.gnu.org/packages/epoch-view.html") + (:keywords "data" "timestamp" "epoch" "unix"))]) + (ergoemacs-mode . + [(5 14 7 3) + ((emacs + (24 1)) + (undo-tree + (0 6 5))) + "Emacs mode based on common modern interface and ergonomics." tar + ((:keywords "convenience") + (:url . "https://github.com/ergoemacs/ergoemacs-mode"))]) + (exwm . + [(0 2) + ((xelb + (0 5))) + "Emacs X Window Manager" tar + ((:keywords "unix") + (:url . "https://github.com/ch11ng/exwm"))]) + (f90-interface-browser . + [(1 1) + nil "Parse and browse f90 interfaces" single + ((:url . "http://github.com/wence-/f90-iface/") + (:keywords))]) + (flylisp . + [(0 2) + ((emacs + (24 1)) + (cl-lib + (0 4))) + "Color unbalanced parentheses and parentheses inconsistent with indentation" single + ((:url . "http://elpa.gnu.org/packages/flylisp.html") + (:keywords))]) + (fsm . + [(0 2) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "state machine library" single + ((:url . "http://elpa.gnu.org/packages/fsm.html") + (:keywords "extensions"))]) + (ggtags . + [(0 8 11) + ((emacs + (24)) + (cl-lib + (0 5))) + "emacs frontend to GNU Global source code tagging system" single + ((:url . "https://github.com/leoliu/ggtags") + (:keywords "tools" "convenience"))]) + (gnome-c-style . + [(0 1) + nil "minor mode for editing GNOME-style C source code" tar + ((:keywords "gnome" "c" "coding style") + (:url . "http://elpa.gnu.org/packages/gnome-c-style.html"))]) + (gnorb . + [(1 1 2) + ((cl-lib + (0 5))) + "Glue code between Gnus, Org, and BBDB" tar + ((:keywords "mail" "org" "gnus" "bbdb" "todo" "task") + (:url . "https://github.com/girzel/gnorb"))]) + (gnugo . + [(3 0 0) + ((ascii-art-to-unicode + (1 5)) + (xpm + (1 0 1)) + (cl-lib + (0 5))) + "play GNU Go in a buffer" tar + ((:keywords "games" "processes") + (:url . "http://www.gnuvola.org/software/gnugo/"))]) + (heap . + [(0 3) + nil "Heap (a.k.a. priority queue) data structure" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "data structures" "heap" "priority queue"))]) + (html5-schema . + [(0 1) + nil "Add HTML5 schemas for use by nXML" tar + ((:keywords "html" "xml") + (:url . "https://github.com/validator/validator"))]) + (hydra . + [(0 13 4) + ((cl-lib + (0 5))) + "Make bindings that stick around." tar + ((:keywords "bindings") + (:url . "https://github.com/abo-abo/hydra"))]) + (ioccur . + [(2 4) + nil "Incremental occur" single + ((:url . "http://elpa.gnu.org/packages/ioccur.html") + (:keywords))]) + (iterators . + [(0 1) + ((emacs + (25))) + "Functions for working with iterators" single + ((:url . "http://elpa.gnu.org/packages/iterators.html") + (:keywords "extensions" "elisp"))]) + (javaimp . + [(0 6) + nil "Add and reorder Java import statements in Maven projects" single + ((:url . "http://elpa.gnu.org/packages/javaimp.html") + (:keywords "java" "maven" "programming"))]) + (jgraph-mode . + [(1 1) + ((cl-lib + (0 5))) + "Major mode for Jgraph files" single + ((:url . "http://elpa.gnu.org/packages/jgraph-mode.html") + (:keywords "tex" "wp"))]) + (js2-mode . + [(20150909) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "Improved JavaScript editing mode" tar + ((:keywords "languages" "javascript") + (:url . "https://github.com/mooz/js2-mode/"))]) + (jumpc . + [(3 0) + nil "jump to previous insertion points" single + ((:url . "http://elpa.gnu.org/packages/jumpc.html") + (:keywords))]) + (landmark . + [(1 0) + nil "Neural-network robot that learns landmarks" single + ((:url . "http://elpa.gnu.org/packages/landmark.html") + (:keywords "games" "neural network" "adaptive search" "chemotaxis"))]) + (let-alist . + [(1 0 4) + nil "Easily let-bind values of an assoc-list by their names" single + ((:url . "http://elpa.gnu.org/packages/let-alist.html") + (:keywords "extensions" "lisp"))]) + (lex . + [(1 1) + nil "Lexical analyser construction" tar + ((:url . "http://elpa.gnu.org/packages/lex.html"))]) + (lmc . + [(1 3) + nil "Little Man Computer in Elisp" single + ((:url . "http://elpa.gnu.org/packages/lmc.html") + (:keywords))]) + (load-dir . + [(0 0 3) + nil "Load all Emacs Lisp files in a given directory" single + ((:url . "http://elpa.gnu.org/packages/load-dir.html") + (:keywords "lisp" "files" "convenience"))]) + (load-relative . + [(1 2) + nil "relative file load (within a multi-file Emacs package)" single + ((:url . "http://github.com/rocky/emacs-load-relative") + (:keywords "internal"))]) + (loc-changes . + [(1 2) + nil "keep track of positions even after buffer changes" single + ((:url . "http://github.com/rocky/emacs-loc-changes") + (:keywords))]) + (loccur . + [(1 2 2) + ((cl-lib + (0))) + "Perform an occur-like folding in current buffer" single + ((:url . "https://github.com/fourier/loccur") + (:keywords "matching"))]) + (markchars . + [(0 2 0) + nil "Mark chars fitting certain characteristics" single + ((:url . "http://elpa.gnu.org/packages/markchars.html") + (:keywords))]) + (math-symbol-lists . + [(1 0) + nil "Lists of Unicode math symbols and latex commands" single + ((:url . "https://github.com/vspinu/math-symbol-lists") + (:keywords "unicode" "symbols" "mathematics"))]) + (memory-usage . + [(0 2) + nil "Analyze the memory usage of Emacs in various ways" single + ((:url . "http://elpa.gnu.org/packages/memory-usage.html") + (:keywords "maint"))]) + (metar . + [(0 1) + ((cl-lib + (0 5))) + "Retrieve and decode METAR weather information" single + ((:url . "http://elpa.gnu.org/packages/metar.html") + (:keywords "comm"))]) + (midi-kbd . + [(0 2) + ((emacs + (25))) + "Create keyboard events from Midi input" single + ((:url . "http://elpa.gnu.org/packages/midi-kbd.html") + (:keywords "convenience" "hardware" "multimedia"))]) + (minibuffer-line . + [(0 1) + nil "Display status info in the minibuffer window" single + ((:url . "http://elpa.gnu.org/packages/minibuffer-line.html") + (:keywords))]) + (minimap . + [(1 2) + nil "Sidebar showing a \"mini-map\" of a buffer" single + ((:url . "http://elpa.gnu.org/packages/minimap.html") + (:keywords))]) + (multishell . + [(1 1 5) + nil "Easily use multiple shell buffers, local and remote." tar + ((:keywords "processes") + (:url . "https://github.com/kenmanheimer/EmacsMultishell"))]) + (muse . + [(3 20) + nil "Authoring and publishing tool for Emacs" tar + ((:keywords "hypermedia") + (:url . "http://mwolson.org/projects/EmacsMuse.html"))]) + (nameless . + [(0 5 1) + ((emacs + (24 4))) + "Hide package namespace in your emacs-lisp code" single + ((:url . "https://github.com/Malabarba/nameless") + (:keywords "convenience" "lisp"))]) + (names . + [(20151201 0) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "Namespaces for emacs-lisp. Avoid name clobbering without hiding symbols." tar + ((:keywords "extensions" "lisp") + (:url . "https://github.com/Malabarba/names"))]) + (nhexl-mode . + [(0 1) + nil "Minor mode to edit files via hex-dump format" single + ((:url . "http://elpa.gnu.org/packages/nhexl-mode.html") + (:keywords "data"))]) + (nlinum . + [(1 6) + nil "Show line numbers in the margin" single + ((:url . "http://elpa.gnu.org/packages/nlinum.html") + (:keywords "convenience"))]) + (notes-mode . + [(1 30) + nil "Indexing system for on-line note-taking" tar + ((:url . "http://elpa.gnu.org/packages/notes-mode.html"))]) + (ntlm . + [(2 0 0) + nil "NTLM (NT LanManager) authentication support" single + ((:url . "http://elpa.gnu.org/packages/ntlm.html") + (:keywords "ntlm" "sasl" "comm"))]) + (num3-mode . + [(1 2) + nil "highlight groups of digits in long numbers" single + ((:url . "http://elpa.gnu.org/packages/num3-mode.html") + (:keywords "faces" "minor-mode"))]) + (oauth2 . + [(0 10) + nil "OAuth 2.0 Authorization Protocol" single + ((:url . "http://elpa.gnu.org/packages/oauth2.html") + (:keywords "comm"))]) + (omn-mode . + [(1 2) + nil "Support for OWL Manchester Notation" single + ((:url . "http://elpa.gnu.org/packages/omn-mode.html") + (:keywords))]) + (on-screen . + [(1 3 2) + ((cl-lib + (0))) + "guide your eyes while scrolling" single + ((:url . "https://github.com/michael-heerdegen/on-screen.el") + (:keywords "convenience"))]) + (org . + [(20160215) + nil "Outline-based notes management and organizer" tar nil]) + (osc . + [(0 1) + nil "Open Sound Control protocol library" single + ((:url . "http://elpa.gnu.org/packages/osc.html") + (:keywords "comm" "processes" "multimedia"))]) + (other-frame-window . + [(1 0 2) + ((emacs + (24 4))) + "Minor mode to enable global prefix keys for other frame/window buffer placement" single + ((:url . "http://elpa.gnu.org/packages/other-frame-window.html") + (:keywords "frame" "window"))]) + (pabbrev . + [(4 2 1) + nil "Predictive abbreviation expansion" single + ((:url . "http://elpa.gnu.org/packages/pabbrev.html") + (:keywords))]) + (pinentry . + [(0 1) + nil "GnuPG Pinentry server implementation" single + ((:url . "http://elpa.gnu.org/packages/pinentry.html") + (:keywords "gnupg"))]) + (poker . + [(0 1) + nil "Texas hold'em poker" single + ((:url . "http://elpa.gnu.org/packages/poker.html") + (:keywords "games"))]) + (python . + [(0 25 1) + ((emacs + (24 1)) + (cl-lib + (1 0))) + "Python's flying circus support for Emacs" single + ((:url . "https://github.com/fgallina/python.el") + (:keywords "languages"))]) + (quarter-plane . + [(0 1) + nil "Minor mode for quarter-plane style editing" single + ((:url . "http://elpa.gnu.org/packages/quarter-plane.html") + (:keywords "convenience" "wp"))]) + (queue . + [(0 1 1) + nil "Queue data structure" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "data structures" "queue"))]) + (rainbow-mode . + [(0 12) + nil "Colorize color names in buffers" single + ((:url . "http://elpa.gnu.org/packages/rainbow-mode.html") + (:keywords "faces"))]) + (register-list . + [(0 1) + nil "Interactively list/edit registers" single + ((:url . "http://elpa.gnu.org/packages/register-list.html") + (:keywords "register"))]) + (rich-minority . + [(1 0 1) + ((cl-lib + (0 5))) + "Clean-up and Beautify the list of minor-modes." single + ((:url . "https://github.com/Malabarba/rich-minority") + (:keywords "mode-line" "faces"))]) + (rnc-mode . + [(0 1) + nil "Emacs mode to edit Relax-NG Compact files" single + ((:url . "http://elpa.gnu.org/packages/rnc-mode.html") + (:keywords "xml" "relaxng"))]) + (rudel . + [(0 3) + nil "A collaborative editing framework for Emacs" tar + ((:keywords "rudel" "collaboration") + (:url . "http://rudel.sourceforge.net/"))]) + (scroll-restore . + [(1 0) + nil "restore original position after scrolling" single + ((:url . "http://elpa.gnu.org/packages/scroll-restore.html") + (:keywords "scrolling"))]) + (seq . + [(1 11) + nil "Sequence manipulation functions" single + ((:url . "http://elpa.gnu.org/packages/seq.html") + (:keywords "sequences"))]) + (shen-mode . + [(0 1) + nil "A major mode for editing shen source code" tar + ((:keywords "languages" "shen") + (:url . "http://elpa.gnu.org/packages/shen-mode.html"))]) + (sisu-mode . + [(3 0 3) + nil "Major mode for SiSU markup text" single + ((:url . "http://elpa.gnu.org/packages/sisu-mode.html") + (:keywords "text" "processes" "tools"))]) + (sml-mode . + [(6 7) + nil "Major mode for editing (Standard) ML" single + ((:url . "http://elpa.gnu.org/packages/sml-mode.html") + (:keywords "sml"))]) + (soap-client . + [(3 0 2) + ((cl-lib + (0 5))) + "Access SOAP web services" tar + ((:keywords "soap" "web-services" "comm" "hypermedia") + (:url . "http://elpa.gnu.org/packages/soap-client.html"))]) + (sokoban . + [(1 4) + nil "Implementation of Sokoban for Emacs." tar + ((:keywords "games") + (:url . "http://elpa.gnu.org/packages/sokoban.html"))]) + (sotlisp . + [(1 4 1) + ((emacs + (24 1))) + "Write lisp at the speed of thought." single + ((:url . "https://github.com/Malabarba/speed-of-thought-lisp") + (:keywords "convenience" "lisp"))]) + (spinner . + [(1 7) + nil "Add spinners and progress-bars to the mode-line for ongoing operations" single + ((:url . "https://github.com/Malabarba/spinner.el") + (:keywords "processes" "mode-line"))]) + (stream . + [(2 1 0) + ((emacs + (25))) + "Implementation of streams" single + ((:url . "http://elpa.gnu.org/packages/stream.html") + (:keywords "stream" "laziness" "sequences"))]) + (svg . + [(0 1) + ((emacs + (25))) + "svg image creation functions" single + ((:url . "http://elpa.gnu.org/packages/svg.html") + (:keywords "image"))]) + (svg-clock . + [(1 0) + ((svg + (0 1)) + (emacs + (25 0))) + "Analog clock using Scalable Vector Graphics" single + ((:url . "http://elpa.gnu.org/packages/svg-clock.html") + (:keywords "demo" "svg" "clock"))]) + (swiper . + [(0 7 0) + ((emacs + (24 1))) + "Isearch with an overview. Oh, man!" tar + ((:keywords "matching") + (:url . "https://github.com/abo-abo/swiper"))]) + (tNFA . + [(0 1 1) + ((queue + (0 1))) + "Tagged non-deterministic finite-state automata" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "matching" "data structures tnfa" "nfa" "dfa" "finite state automata" "automata" "regexp"))]) + (temp-buffer-browse . + [(1 4) + nil "temp buffer browse mode" single + ((:url . "http://elpa.gnu.org/packages/temp-buffer-browse.html") + (:keywords "convenience"))]) + (test-simple . + [(1 1) + ((cl-lib + (0))) + "Simple Unit Test Framework for Emacs Lisp" single + ((:url . "http://github.com/rocky/emacs-test-simple") + (:keywords "unit-test"))]) + (timerfunctions . + [(1 4 2) + ((cl-lib + (0 5))) + "Enhanced versions of some timer.el functions" single + ((:url . "http://elpa.gnu.org/packages/timerfunctions.html") + (:keywords))]) + (tiny . + [(0 1 1) + nil "Quickly generate linear ranges in Emacs" tar + ((:keywords "convenience") + (:url . "https://github.com/abo-abo/tiny"))]) + (tramp-theme . + [(0 1) + nil "Custom theme for remote buffers" single + ((:url . "http://elpa.gnu.org/packages/tramp-theme.html") + (:keywords))]) + (transcribe . + [(1 0 2) + nil "Package for audio transcriptions" single + ((:url . "http://elpa.gnu.org/packages/transcribe.html") + (:keywords))]) + (trie . + [(0 2 6) + ((tNFA + (0 1 1)) + (heap + (0 3))) + "Trie data structure" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "matching" "data structures trie" "ternary search tree" "tree" "completion" "regexp"))]) + (undo-tree . + [(0 6 5) + nil "Treat undo history as a tree" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "convenience" "files" "undo" "redo" "history" "tree"))]) + (uni-confusables . + [(0 1) + nil "Unicode confusables table" tar + ((:url . "http://elpa.gnu.org/packages/uni-confusables.html"))]) + (vlf . + [(1 7) + nil "View Large Files" tar + ((:keywords "large files" "utilities") + (:url . "https://github.com/m00natic/vlfi"))]) + (w3 . + [(4 0 49) + nil "Fully customizable, largely undocumented web browser for Emacs" tar + ((:keywords "faces" "help" "comm" "news" "mail" "processes" "mouse" "hypermedia") + (:url . "http://elpa.gnu.org/packages/w3.html"))]) + (wcheck-mode . + [(2016 1 30) + nil "General interface for text checkers" single + ((:url . "https://github.com/tlikonen/wcheck-mode") + (:keywords "text" "spell" "check" "languages" "ispell"))]) + (wconf . + [(0 2 0) + ((emacs + (24 4))) + "Minimal window layout manager" single + ((:url . "https://github.com/ilohmar/wconf") + (:keywords "windows" "frames" "layout"))]) + (web-server . + [(0 1 1) + ((emacs + (24 3))) + "Emacs Web Server" tar + ((:keywords "http" "server" "network") + (:url . "https://github.com/eschulte/emacs-web-server"))]) + (websocket . + [(1 5) + nil "Emacs WebSocket client and server" tar + ((:keywords "communication" "websocket" "server") + (:url . "http://elpa.gnu.org/packages/websocket.html"))]) + (windresize . + [(0 1) + nil "Resize windows interactively" single + ((:url . "http://elpa.gnu.org/packages/windresize.html") + (:keywords "window"))]) + (wisi . + [(1 1 2) + ((cl-lib + (0 4)) + (emacs + (24 2))) + "Utilities for implementing an indentation/navigation engine using a generalized LALR parser" tar + ((:keywords "parser" "indentation" "navigation") + (:url . "http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html"))]) + (wpuzzle . + [(1 1) + nil "find as many word in a given time" single + ((:url . "http://elpa.gnu.org/packages/wpuzzle.html") + (:keywords))]) + (xclip . + [(1 3) + nil "use xclip to copy&paste" single + ((:url . "http://elpa.gnu.org/packages/xclip.html") + (:keywords "convenience" "tools"))]) + (xelb . + [(0 5) + ((emacs + (24 4)) + (cl-generic + (0 2))) + "X protocol Emacs Lisp Binding" tar + ((:keywords "unix") + (:url . "https://github.com/ch11ng/xelb"))]) + (xpm . + [(1 0 3) + nil "edit XPM images" tar + ((:keywords "multimedia" "xpm") + (:url . "http://www.gnuvola.org/software/xpm/"))]) + (yasnippet . + [(0 8 0) + nil "Yet another snippet extension for Emacs." tar + ((:keywords "convenience" "emulation") + (:url . "http://github.com/capitaomorte/yasnippet"))]) + (ztree . + [(1 0 3) + ((cl-lib + (0))) + "Text mode directory tree" tar + ((:keywords "files" "tools") + (:url . "https://github.com/fourier/ztree"))])) diff --git a/.emacs.d/elpa/archives/gnu/archive-contents.signed b/.emacs.d/elpa/archives/gnu/archive-contents.signed new file mode 100644 index 0000000..0824603 --- /dev/null +++ b/.emacs.d/elpa/archives/gnu/archive-contents.signed @@ -0,0 +1 @@ +Good signature from 474F05837FBDEF9B GNU ELPA Signing Agent (trust undefined) created at 2016-02-17T11:10:03+0100 using DSA \ No newline at end of file diff --git a/.emacs.d/elpa/archives/gnu/archive-contents~ b/.emacs.d/elpa/archives/gnu/archive-contents~ new file mode 100644 index 0000000..81979bc --- /dev/null +++ b/.emacs.d/elpa/archives/gnu/archive-contents~ @@ -0,0 +1,858 @@ +(1 + (ace-window . + [(0 9 0) + ((avy + (0 2 0))) + "Quickly switch windows." single + ((:url . "https://github.com/abo-abo/ace-window") + (:keywords "window" "location"))]) + (ack . + [(1 5) + nil "interface to ack-like tools" tar + ((:keywords "tools" "processes" "convenience") + (:url . "https://github.com/leoliu/ack-el"))]) + (ada-mode . + [(5 1 9) + ((wisi + (1 1 2)) + (cl-lib + (0 4)) + (emacs + (24 2))) + "major-mode for editing Ada sources" tar + ((:keywords "languages" "ada") + (:url . "http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html"))]) + (ada-ref-man . + [(2012 0) + nil "Ada Reference Manual 2012" tar + ((:keywords "languages" "ada") + (:url . "http://stephe-leake.org/ada/arm.html"))]) + (adaptive-wrap . + [(0 5) + nil "Smart line-wrapping with wrap-prefix" single + ((:url . "http://elpa.gnu.org/packages/adaptive-wrap.html") + (:keywords))]) + (adjust-parens . + [(3 0) + nil "Indent and dedent Lisp code, automatically adjust close parens" tar + ((:url . "http://elpa.gnu.org/packages/adjust-parens.html"))]) + (aggressive-indent . + [(1 5) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "Minor mode to aggressively keep your code always indented" single + ((:url . "https://github.com/Malabarba/aggressive-indent-mode") + (:keywords "indent" "lisp" "maint" "tools"))]) + (ahungry-theme . + [(1 1 0) + ((emacs + (24))) + "Ahungry color theme for Emacs. Make sure to (load-theme 'ahungry)." tar + ((:keywords "ahungry" "palette" "color" "theme" "emacs" "color-theme" "deftheme") + (:url . "https://github.com/ahungry/color-theme-ahungry"))]) + (all . + [(1 0) + nil "Edit all lines matching a given regexp" single + ((:url . "http://elpa.gnu.org/packages/all.html") + (:keywords "matching"))]) + (ampc . + [(0 2) + nil "Asynchronous Music Player Controller" single + ((:url . "http://elpa.gnu.org/packages/ampc.html") + (:keywords "ampc" "mpc" "mpd"))]) + (ascii-art-to-unicode . + [(1 9) + nil "a small artist adjunct" single + ((:url . "http://www.gnuvola.org/software/aa2u/") + (:keywords "ascii" "unicode" "box-drawing"))]) + (async . + [(1 6) + nil "Asynchronous processing in Emacs" tar + ((:keywords "async") + (:url . "http://elpa.gnu.org/packages/async.html"))]) + (auctex . + [(11 89 1) + nil "Integrated environment for *TeX*" tar + ((:url . "http://www.gnu.org/software/auctex/"))]) + (aumix-mode . + [(7) + nil "run the aumix program in a buffer" single + ((:url . "http://user42.tuxfamily.org/aumix-mode/index.html") + (:keywords "multimedia" "mixer" "aumix"))]) + (auto-overlays . + [(0 10 9) + nil "Automatic regexp-delimited overlays" tar + ((:keywords "extensions") + (:url . "http://www.dr-qubit.org/emacs.php"))]) + (avy . + [(0 4 0) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "tree-based completion" tar + ((:keywords "point" "location") + (:url . "https://github.com/abo-abo/avy"))]) + (beacon . + [(1 0) + ((seq + (1 11))) + "Highlight the cursor whenever the window scrolls" single + ((:url . "https://github.com/Malabarba/beacon") + (:keywords "convenience"))]) + (bug-hunter . + [(1 1) + ((seq + (1 3)) + (cl-lib + (0 5))) + "Hunt down errors by bisecting elisp files" single + ((:url . "https://github.com/Malabarba/elisp-bug-hunter") + (:keywords "lisp"))]) + (caps-lock . + [(1 0) + nil "Caps-lock as a minor mode" single + ((:url . "http://elpa.gnu.org/packages/caps-lock.html") + (:keywords))]) + (chess . + [(2 0 4) + ((cl-lib + (0 5))) + "Play chess in GNU Emacs" tar + ((:keywords "games") + (:url . "http://elpa.gnu.org/packages/chess.html"))]) + (cl-generic . + [(0 2) + nil "Forward cl-generic compatibility for Emacs<25" single + ((:url . "http://elpa.gnu.org/packages/cl-generic.html") + (:keywords))]) + (cl-lib . + [(0 5) + nil "Properly prefixed CL functions and macros" single + ((:url . "http://elpa.gnu.org/packages/cl-lib.html") + (:keywords))]) + (coffee-mode . + [(0 4 1 1) + nil "Major mode for CoffeeScript files" single + ((:url . "http://github.com/defunkt/coffee-mode") + (:keywords "coffeescript" "major" "mode"))]) + (company . + [(0 8 12) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "Modular text completion framework" tar + ((:keywords "abbrev" "convenience" "matching") + (:url . "http://company-mode.github.io/"))]) + (company-math . + [(1 0 1) + ((company + (0 8 0)) + (math-symbol-lists + (1 0))) + "Completion backends for unicode math symbols and latex tags" single + ((:url . "https://github.com/vspinu/company-math") + (:keywords "unicode" "symbols" "completion"))]) + (company-statistics . + [(0 2 2) + ((emacs + (24 3)) + (company + (0 8 5))) + "Sort candidates using completion history" tar + ((:keywords "abbrev" "convenience" "matching") + (:url . "https://github.com/company-mode/company-statistics"))]) + (context-coloring . + [(7 2 0) + ((emacs + (24 3)) + (js2-mode + (20150713))) + "Highlight by scope" single + ((:url . "https://github.com/jacksonrayhamilton/context-coloring") + (:keywords "convenience" "faces" "tools"))]) + (crisp . + [(1 3 4) + nil "CRiSP/Brief Emacs emulator" single + ((:url . "http://elpa.gnu.org/packages/crisp.html") + (:keywords "emulations" "brief" "crisp"))]) + (csv-mode . + [(1 5) + nil "Major mode for editing comma/char separated values" single + ((:url . "http://centaur.maths.qmul.ac.uk/Emacs/") + (:keywords "convenience"))]) + (darkroom . + [(0 1) + ((cl-lib + (0 5))) + "Remove visual distractions and focus on writing" single + ((:url . "http://elpa.gnu.org/packages/darkroom.html") + (:keywords "convenience" "emulations"))]) + (dash . + [(2 12 0) + nil "A modern list library for Emacs" tar + ((:keywords "lists") + (:url . "http://elpa.gnu.org/packages/dash.html"))]) + (dbus-codegen . + [(0 1) + ((cl-lib + (0 5))) + "Lisp code generation for D-Bus." single + ((:url . "http://elpa.gnu.org/packages/dbus-codegen.html") + (:keywords "comm" "dbus" "convenience"))]) + (debbugs . + [(0 9) + ((async + (1 6))) + "SOAP library to access debbugs servers" tar + ((:keywords "comm" "hypermedia") + (:url . "http://elpa.gnu.org/packages/debbugs.html"))]) + (dict-tree . + [(0 12 8) + ((trie + (0 2 5)) + (tNFA + (0 1 1)) + (heap + (0 3))) + "Dictionary data structure" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "matching" "data structures trie" "tree" "dictionary" "completion" "regexp"))]) + (diff-hl . + [(1 8 3) + ((cl-lib + (0 2))) + "Highlight uncommitted changes using VC" tar + ((:keywords "vc" "diff") + (:url . "https://github.com/dgutov/diff-hl"))]) + (dismal . + [(1 5) + ((cl-lib + (0))) + "Dis Mode Ain't Lotus: Spreadsheet program Emacs" tar + ((:url . "http://elpa.gnu.org/packages/dismal.html"))]) + (djvu . + [(0 5) + nil "Edit and view Djvu files via djvused" single + ((:url . "http://elpa.gnu.org/packages/djvu.html") + (:keywords "files" "wp"))]) + (docbook . + [(0 1) + nil "Info-like viewer for DocBook" single + ((:url . "http://elpa.gnu.org/packages/docbook.html") + (:keywords "docs" "help"))]) + (dts-mode . + [(0 1 0) + nil "Major mode for Device Tree source files" single + ((:url . "http://elpa.gnu.org/packages/dts-mode.html") + (:keywords "languages"))]) + (easy-kill . + [(0 9 3) + ((emacs + (24)) + (cl-lib + (0 5))) + "kill & mark things easily" tar + ((:keywords "killing" "convenience") + (:url . "https://github.com/leoliu/easy-kill"))]) + (ediprolog . + [(1 1) + nil "Emacs Does Interactive Prolog" single + ((:url . "http://elpa.gnu.org/packages/ediprolog.html") + (:keywords "languages" "processes"))]) + (el-search . + [(0 1 3) + ((emacs + (25))) + "Expression based incremental search for emacs-lisp-mode" single + ((:url . "http://elpa.gnu.org/packages/el-search.html") + (:keywords "lisp"))]) + (eldoc-eval . + [(0 1) + nil "Enable eldoc support when minibuffer is in use." single + ((:url . "http://elpa.gnu.org/packages/eldoc-eval.html") + (:keywords))]) + (electric-spacing . + [(5 0) + nil "Insert operators with surrounding spaces smartly" single + ((:url . "http://elpa.gnu.org/packages/electric-spacing.html") + (:keywords))]) + (enwc . + [(1 0) + nil "The Emacs Network Client" tar + ((:keywords "enwc" "network" "wicd" "manager" "nm") + (:url . "http://elpa.gnu.org/packages/enwc.html"))]) + (epoch-view . + [(0 0 1) + nil "Minor mode to visualize epoch timestamps" single + ((:url . "http://elpa.gnu.org/packages/epoch-view.html") + (:keywords "data" "timestamp" "epoch" "unix"))]) + (ergoemacs-mode . + [(5 14 7 3) + ((emacs + (24 1)) + (undo-tree + (0 6 5))) + "Emacs mode based on common modern interface and ergonomics." tar + ((:keywords "convenience") + (:url . "https://github.com/ergoemacs/ergoemacs-mode"))]) + (exwm . + [(0 2) + ((xelb + (0 5))) + "Emacs X Window Manager" tar + ((:keywords "unix") + (:url . "https://github.com/ch11ng/exwm"))]) + (f90-interface-browser . + [(1 1) + nil "Parse and browse f90 interfaces" single + ((:url . "http://github.com/wence-/f90-iface/") + (:keywords))]) + (flylisp . + [(0 2) + ((emacs + (24 1)) + (cl-lib + (0 4))) + "Color unbalanced parentheses and parentheses inconsistent with indentation" single + ((:url . "http://elpa.gnu.org/packages/flylisp.html") + (:keywords))]) + (fsm . + [(0 2) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "state machine library" single + ((:url . "http://elpa.gnu.org/packages/fsm.html") + (:keywords "extensions"))]) + (ggtags . + [(0 8 11) + ((emacs + (24)) + (cl-lib + (0 5))) + "emacs frontend to GNU Global source code tagging system" single + ((:url . "https://github.com/leoliu/ggtags") + (:keywords "tools" "convenience"))]) + (gnome-c-style . + [(0 1) + nil "minor mode for editing GNOME-style C source code" tar + ((:keywords "gnome" "c" "coding style") + (:url . "http://elpa.gnu.org/packages/gnome-c-style.html"))]) + (gnorb . + [(1 1 2) + ((cl-lib + (0 5))) + "Glue code between Gnus, Org, and BBDB" tar + ((:keywords "mail" "org" "gnus" "bbdb" "todo" "task") + (:url . "https://github.com/girzel/gnorb"))]) + (gnugo . + [(3 0 0) + ((ascii-art-to-unicode + (1 5)) + (xpm + (1 0 1)) + (cl-lib + (0 5))) + "play GNU Go in a buffer" tar + ((:keywords "games" "processes") + (:url . "http://www.gnuvola.org/software/gnugo/"))]) + (heap . + [(0 3) + nil "Heap (a.k.a. priority queue) data structure" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "data structures" "heap" "priority queue"))]) + (html5-schema . + [(0 1) + nil "Add HTML5 schemas for use by nXML" tar + ((:keywords "html" "xml") + (:url . "https://github.com/validator/validator"))]) + (hydra . + [(0 13 4) + ((cl-lib + (0 5))) + "Make bindings that stick around." tar + ((:keywords "bindings") + (:url . "https://github.com/abo-abo/hydra"))]) + (ioccur . + [(2 4) + nil "Incremental occur" single + ((:url . "http://elpa.gnu.org/packages/ioccur.html") + (:keywords))]) + (iterators . + [(0 1) + ((emacs + (25))) + "Functions for working with iterators" single + ((:url . "http://elpa.gnu.org/packages/iterators.html") + (:keywords "extensions" "elisp"))]) + (javaimp . + [(0 6) + nil "Add and reorder Java import statements in Maven projects" single + ((:url . "http://elpa.gnu.org/packages/javaimp.html") + (:keywords "java" "maven" "programming"))]) + (jgraph-mode . + [(1 1) + ((cl-lib + (0 5))) + "Major mode for Jgraph files" single + ((:url . "http://elpa.gnu.org/packages/jgraph-mode.html") + (:keywords "tex" "wp"))]) + (js2-mode . + [(20150909) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "Improved JavaScript editing mode" tar + ((:keywords "languages" "javascript") + (:url . "https://github.com/mooz/js2-mode/"))]) + (jumpc . + [(3 0) + nil "jump to previous insertion points" single + ((:url . "http://elpa.gnu.org/packages/jumpc.html") + (:keywords))]) + (landmark . + [(1 0) + nil "Neural-network robot that learns landmarks" single + ((:url . "http://elpa.gnu.org/packages/landmark.html") + (:keywords "games" "neural network" "adaptive search" "chemotaxis"))]) + (let-alist . + [(1 0 4) + nil "Easily let-bind values of an assoc-list by their names" single + ((:url . "http://elpa.gnu.org/packages/let-alist.html") + (:keywords "extensions" "lisp"))]) + (lex . + [(1 1) + nil "Lexical analyser construction" tar + ((:url . "http://elpa.gnu.org/packages/lex.html"))]) + (lmc . + [(1 3) + nil "Little Man Computer in Elisp" single + ((:url . "http://elpa.gnu.org/packages/lmc.html") + (:keywords))]) + (load-dir . + [(0 0 3) + nil "Load all Emacs Lisp files in a given directory" single + ((:url . "http://elpa.gnu.org/packages/load-dir.html") + (:keywords "lisp" "files" "convenience"))]) + (load-relative . + [(1 2) + nil "relative file load (within a multi-file Emacs package)" single + ((:url . "http://github.com/rocky/emacs-load-relative") + (:keywords "internal"))]) + (loc-changes . + [(1 2) + nil "keep track of positions even after buffer changes" single + ((:url . "http://github.com/rocky/emacs-loc-changes") + (:keywords))]) + (loccur . + [(1 2 2) + ((cl-lib + (0))) + "Perform an occur-like folding in current buffer" single + ((:url . "https://github.com/fourier/loccur") + (:keywords "matching"))]) + (markchars . + [(0 2 0) + nil "Mark chars fitting certain characteristics" single + ((:url . "http://elpa.gnu.org/packages/markchars.html") + (:keywords))]) + (math-symbol-lists . + [(1 0) + nil "Lists of Unicode math symbols and latex commands" single + ((:url . "https://github.com/vspinu/math-symbol-lists") + (:keywords "unicode" "symbols" "mathematics"))]) + (memory-usage . + [(0 2) + nil "Analyze the memory usage of Emacs in various ways" single + ((:url . "http://elpa.gnu.org/packages/memory-usage.html") + (:keywords "maint"))]) + (metar . + [(0 1) + ((cl-lib + (0 5))) + "Retrieve and decode METAR weather information" single + ((:url . "http://elpa.gnu.org/packages/metar.html") + (:keywords "comm"))]) + (midi-kbd . + [(0 2) + ((emacs + (25))) + "Create keyboard events from Midi input" single + ((:url . "http://elpa.gnu.org/packages/midi-kbd.html") + (:keywords "convenience" "hardware" "multimedia"))]) + (minibuffer-line . + [(0 1) + nil "Display status info in the minibuffer window" single + ((:url . "http://elpa.gnu.org/packages/minibuffer-line.html") + (:keywords))]) + (minimap . + [(1 2) + nil "Sidebar showing a \"mini-map\" of a buffer" single + ((:url . "http://elpa.gnu.org/packages/minimap.html") + (:keywords))]) + (multishell . + [(1 1 5) + nil "Easily use multiple shell buffers, local and remote." tar + ((:keywords "processes") + (:url . "https://github.com/kenmanheimer/EmacsMultishell"))]) + (muse . + [(3 20) + nil "Authoring and publishing tool for Emacs" tar + ((:keywords "hypermedia") + (:url . "http://mwolson.org/projects/EmacsMuse.html"))]) + (nameless . + [(0 5 1) + ((emacs + (24 4))) + "Hide package namespace in your emacs-lisp code" single + ((:url . "https://github.com/Malabarba/nameless") + (:keywords "convenience" "lisp"))]) + (names . + [(20151201 0) + ((emacs + (24 1)) + (cl-lib + (0 5))) + "Namespaces for emacs-lisp. Avoid name clobbering without hiding symbols." tar + ((:keywords "extensions" "lisp") + (:url . "https://github.com/Malabarba/names"))]) + (nhexl-mode . + [(0 1) + nil "Minor mode to edit files via hex-dump format" single + ((:url . "http://elpa.gnu.org/packages/nhexl-mode.html") + (:keywords "data"))]) + (nlinum . + [(1 6) + nil "Show line numbers in the margin" single + ((:url . "http://elpa.gnu.org/packages/nlinum.html") + (:keywords "convenience"))]) + (notes-mode . + [(1 30) + nil "Indexing system for on-line note-taking" tar + ((:url . "http://elpa.gnu.org/packages/notes-mode.html"))]) + (ntlm . + [(2 0 0) + nil "NTLM (NT LanManager) authentication support" single + ((:url . "http://elpa.gnu.org/packages/ntlm.html") + (:keywords "ntlm" "sasl" "comm"))]) + (num3-mode . + [(1 2) + nil "highlight groups of digits in long numbers" single + ((:url . "http://elpa.gnu.org/packages/num3-mode.html") + (:keywords "faces" "minor-mode"))]) + (oauth2 . + [(0 10) + nil "OAuth 2.0 Authorization Protocol" single + ((:url . "http://elpa.gnu.org/packages/oauth2.html") + (:keywords "comm"))]) + (omn-mode . + [(1 2) + nil "Support for OWL Manchester Notation" single + ((:url . "http://elpa.gnu.org/packages/omn-mode.html") + (:keywords))]) + (on-screen . + [(1 3 2) + ((cl-lib + (0))) + "guide your eyes while scrolling" single + ((:url . "https://github.com/michael-heerdegen/on-screen.el") + (:keywords "convenience"))]) + (org . + [(20160208) + nil "Outline-based notes management and organizer" tar nil]) + (osc . + [(0 1) + nil "Open Sound Control protocol library" single + ((:url . "http://elpa.gnu.org/packages/osc.html") + (:keywords "comm" "processes" "multimedia"))]) + (other-frame-window . + [(1 0 2) + ((emacs + (24 4))) + "Minor mode to enable global prefix keys for other frame/window buffer placement" single + ((:url . "http://elpa.gnu.org/packages/other-frame-window.html") + (:keywords "frame" "window"))]) + (pabbrev . + [(4 2 1) + nil "Predictive abbreviation expansion" single + ((:url . "http://elpa.gnu.org/packages/pabbrev.html") + (:keywords))]) + (pinentry . + [(0 1) + nil "GnuPG Pinentry server implementation" single + ((:url . "http://elpa.gnu.org/packages/pinentry.html") + (:keywords "gnupg"))]) + (poker . + [(0 1) + nil "Texas hold'em poker" single + ((:url . "http://elpa.gnu.org/packages/poker.html") + (:keywords "games"))]) + (python . + [(0 25 1) + ((emacs + (24 1)) + (cl-lib + (1 0))) + "Python's flying circus support for Emacs" single + ((:url . "https://github.com/fgallina/python.el") + (:keywords "languages"))]) + (quarter-plane . + [(0 1) + nil "Minor mode for quarter-plane style editing" single + ((:url . "http://elpa.gnu.org/packages/quarter-plane.html") + (:keywords "convenience" "wp"))]) + (queue . + [(0 1 1) + nil "Queue data structure" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "data structures" "queue"))]) + (rainbow-mode . + [(0 12) + nil "Colorize color names in buffers" single + ((:url . "http://elpa.gnu.org/packages/rainbow-mode.html") + (:keywords "faces"))]) + (register-list . + [(0 1) + nil "Interactively list/edit registers" single + ((:url . "http://elpa.gnu.org/packages/register-list.html") + (:keywords "register"))]) + (rich-minority . + [(1 0 1) + ((cl-lib + (0 5))) + "Clean-up and Beautify the list of minor-modes." single + ((:url . "https://github.com/Malabarba/rich-minority") + (:keywords "mode-line" "faces"))]) + (rnc-mode . + [(0 1) + nil "Emacs mode to edit Relax-NG Compact files" single + ((:url . "http://elpa.gnu.org/packages/rnc-mode.html") + (:keywords "xml" "relaxng"))]) + (rudel . + [(0 3) + nil "A collaborative editing framework for Emacs" tar + ((:keywords "rudel" "collaboration") + (:url . "http://rudel.sourceforge.net/"))]) + (scroll-restore . + [(1 0) + nil "restore original position after scrolling" single + ((:url . "http://elpa.gnu.org/packages/scroll-restore.html") + (:keywords "scrolling"))]) + (seq . + [(1 11) + nil "Sequence manipulation functions" single + ((:url . "http://elpa.gnu.org/packages/seq.html") + (:keywords "sequences"))]) + (shen-mode . + [(0 1) + nil "A major mode for editing shen source code" tar + ((:keywords "languages" "shen") + (:url . "http://elpa.gnu.org/packages/shen-mode.html"))]) + (sisu-mode . + [(3 0 3) + nil "Major mode for SiSU markup text" single + ((:url . "http://elpa.gnu.org/packages/sisu-mode.html") + (:keywords "text" "processes" "tools"))]) + (sml-mode . + [(6 7) + nil "Major mode for editing (Standard) ML" single + ((:url . "http://elpa.gnu.org/packages/sml-mode.html") + (:keywords "sml"))]) + (soap-client . + [(3 0 2) + ((cl-lib + (0 5))) + "Access SOAP web services" tar + ((:keywords "soap" "web-services" "comm" "hypermedia") + (:url . "http://elpa.gnu.org/packages/soap-client.html"))]) + (sokoban . + [(1 4) + nil "Implementation of Sokoban for Emacs." tar + ((:keywords "games") + (:url . "http://elpa.gnu.org/packages/sokoban.html"))]) + (sotlisp . + [(1 4 1) + ((emacs + (24 1))) + "Write lisp at the speed of thought." single + ((:url . "https://github.com/Malabarba/speed-of-thought-lisp") + (:keywords "convenience" "lisp"))]) + (spinner . + [(1 7) + nil "Add spinners and progress-bars to the mode-line for ongoing operations" single + ((:url . "https://github.com/Malabarba/spinner.el") + (:keywords "processes" "mode-line"))]) + (stream . + [(2 1 0) + ((emacs + (25))) + "Implementation of streams" single + ((:url . "http://elpa.gnu.org/packages/stream.html") + (:keywords "stream" "laziness" "sequences"))]) + (svg . + [(0 1) + ((emacs + (25))) + "svg image creation functions" single + ((:url . "http://elpa.gnu.org/packages/svg.html") + (:keywords "image"))]) + (svg-clock . + [(1 0) + ((svg + (0 1)) + (emacs + (25 0))) + "Analog clock using Scalable Vector Graphics" single + ((:url . "http://elpa.gnu.org/packages/svg-clock.html") + (:keywords "demo" "svg" "clock"))]) + (swiper . + [(0 7 0) + ((emacs + (24 1))) + "Isearch with an overview. Oh, man!" tar + ((:keywords "matching") + (:url . "https://github.com/abo-abo/swiper"))]) + (tNFA . + [(0 1 1) + ((queue + (0 1))) + "Tagged non-deterministic finite-state automata" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "matching" "data structures tnfa" "nfa" "dfa" "finite state automata" "automata" "regexp"))]) + (temp-buffer-browse . + [(1 4) + nil "temp buffer browse mode" single + ((:url . "http://elpa.gnu.org/packages/temp-buffer-browse.html") + (:keywords "convenience"))]) + (test-simple . + [(1 1) + ((cl-lib + (0))) + "Simple Unit Test Framework for Emacs Lisp" single + ((:url . "http://github.com/rocky/emacs-test-simple") + (:keywords "unit-test"))]) + (timerfunctions . + [(1 4 2) + ((cl-lib + (0 5))) + "Enhanced versions of some timer.el functions" single + ((:url . "http://elpa.gnu.org/packages/timerfunctions.html") + (:keywords))]) + (tiny . + [(0 1 1) + nil "Quickly generate linear ranges in Emacs" tar + ((:keywords "convenience") + (:url . "https://github.com/abo-abo/tiny"))]) + (transcribe . + [(1 0 2) + nil "Package for audio transcriptions" single + ((:url . "http://elpa.gnu.org/packages/transcribe.html") + (:keywords))]) + (trie . + [(0 2 6) + ((tNFA + (0 1 1)) + (heap + (0 3))) + "Trie data structure" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "extensions" "matching" "data structures trie" "ternary search tree" "tree" "completion" "regexp"))]) + (undo-tree . + [(0 6 5) + nil "Treat undo history as a tree" single + ((:url . "http://www.dr-qubit.org/emacs.php") + (:keywords "convenience" "files" "undo" "redo" "history" "tree"))]) + (uni-confusables . + [(0 1) + nil "Unicode confusables table" tar + ((:url . "http://elpa.gnu.org/packages/uni-confusables.html"))]) + (vlf . + [(1 7) + nil "View Large Files" tar + ((:keywords "large files" "utilities") + (:url . "https://github.com/m00natic/vlfi"))]) + (w3 . + [(4 0 49) + nil "Fully customizable, largely undocumented web browser for Emacs" tar + ((:keywords "faces" "help" "comm" "news" "mail" "processes" "mouse" "hypermedia") + (:url . "http://elpa.gnu.org/packages/w3.html"))]) + (wcheck-mode . + [(2016 1 30) + nil "General interface for text checkers" single + ((:url . "https://github.com/tlikonen/wcheck-mode") + (:keywords "text" "spell" "check" "languages" "ispell"))]) + (wconf . + [(0 2 0) + ((emacs + (24 4))) + "Minimal window layout manager" single + ((:url . "https://github.com/ilohmar/wconf") + (:keywords "windows" "frames" "layout"))]) + (web-server . + [(0 1 1) + ((emacs + (24 3))) + "Emacs Web Server" tar + ((:keywords "http" "server" "network") + (:url . "https://github.com/eschulte/emacs-web-server"))]) + (websocket . + [(1 5) + nil "Emacs WebSocket client and server" tar + ((:keywords "communication" "websocket" "server") + (:url . "http://elpa.gnu.org/packages/websocket.html"))]) + (windresize . + [(0 1) + nil "Resize windows interactively" single + ((:url . "http://elpa.gnu.org/packages/windresize.html") + (:keywords "window"))]) + (wisi . + [(1 1 2) + ((cl-lib + (0 4)) + (emacs + (24 2))) + "Utilities for implementing an indentation/navigation engine using a generalized LALR parser" tar + ((:keywords "parser" "indentation" "navigation") + (:url . "http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html"))]) + (wpuzzle . + [(1 1) + nil "find as many word in a given time" single + ((:url . "http://elpa.gnu.org/packages/wpuzzle.html") + (:keywords))]) + (xclip . + [(1 3) + nil "use xclip to copy&paste" single + ((:url . "http://elpa.gnu.org/packages/xclip.html") + (:keywords "convenience" "tools"))]) + (xelb . + [(0 5) + ((emacs + (24 4)) + (cl-generic + (0 2))) + "X protocol Emacs Lisp Binding" tar + ((:keywords "unix") + (:url . "https://github.com/ch11ng/xelb"))]) + (xpm . + [(1 0 3) + nil "edit XPM images" tar + ((:keywords "multimedia" "xpm") + (:url . "http://www.gnuvola.org/software/xpm/"))]) + (yasnippet . + [(0 8 0) + nil "Yet another snippet extension for Emacs." tar + ((:keywords "convenience" "emulation") + (:url . "http://github.com/capitaomorte/yasnippet"))]) + (ztree . + [(1 0 3) + ((cl-lib + (0))) + "Text mode directory tree" tar + ((:keywords "files" "tools") + (:url . "https://github.com/fourier/ztree"))])) diff --git a/.emacs.d/elpa/archives/melpa/archive-contents b/.emacs.d/elpa/archives/melpa/archive-contents new file mode 100644 index 0000000..396545c --- /dev/null +++ b/.emacs.d/elpa/archives/melpa/archive-contents @@ -0,0 +1,2 @@ + +(1 (zzz-to-char . [(20160122 440) ((emacs (24 4)) (cl-lib (0 5)) (avy (0 3 0))) "Fancy version of `zap-to-char' command" single ((:url . "https://github.com/mrkkrp/zzz-to-char") (:keywords "convenience"))]) (zygospore . [(20140703 152) nil "reversible C-x 1 (delete-other-windows)" single ((:url . "https://github.com/louiskottmann/zygospore.el"))]) (ztree . [(20160127 1542) ((cl-lib (0))) "Text mode directory tree" tar ((:url . "https://github.com/fourier/ztree") (:keywords "files" "tools"))]) (zotxt . [(20151031 959) ((request-deferred (0 2 0))) "Tools to integrate emacs with Zotero via the zotxt plugin." tar nil]) (zotelo . [(20160118 2045) ((cl-lib (0 5))) "Manage Zotero collections from emacs" single ((:url . "https://github.com/vitoshka/zotelo") (:keywords "zotero" "emacs" "reftex" "bibtex" "mozrepl" "bibliography manager"))]) (zossima . [(20121123 1635) ((inf-ruby (2 2 3))) "Ruby from Emacs" tar ((:url . "https://github.com/technomancy/zossima") (:keywords "ruby" "convenience"))]) (zop-to-char . [(20160212 108) ((cl-lib (0 5))) "A replacement of zap-to-char." single ((:url . "https://github.com/thierryvolpiatto/zop-to-char"))]) (zoom-window . [(20151206 2105) nil "Zoom window like tmux" single ((:url . "https://github.com/syohex/emacs-zoom-window"))]) (zoom-frm . [(20151231 1625) ((frame-fns (0)) (frame-cmds (0))) "Commands to zoom frame font size." single ((:url . "http://www.emacswiki.org/zoom-frm.el") (:keywords "frames" "extensions" "convenience"))]) (zonokai-theme . [(20150408 2002) nil "No description available." tar nil]) (zones . [(20160209 920) nil "Zones of text - like multiple regions" single ((:url . "http://www.emacswiki.org/zones.el") (:keywords "narrow" "restriction" "widen" "region" "zone"))]) (zone-sl . [(20160201 410) ((emacs (24 3))) "Zone out with steam locomotives." single ((:url . "https://github.com/kawabata/zone-sl") (:keywords "games"))]) (zone-select . [(20160118 619) ((emacs (24 3)) (dash (2 8))) "Select zone programs." single ((:url . "https://github.com/kawabata/zone-select") (:keywords "games"))]) (zone-rainbow . [(20160120 534) ((emacs (24 3))) "Zone out with rainbow." single ((:url . "https://github.com/kawabata/zone-rainbow") (:keywords "games"))]) (zone-nyan . [(20160102 1456) ((esxml (0 3 1))) "Zone out with nyan cat" single ((:url . "https://github.com/wasamasa/zone-nyan") (:keywords "zone"))]) (zombie-trellys-mode . [(20150304 648) ((emacs (24)) (cl-lib (0 5)) (haskell-mode (1 5))) "A minor mode for interaction with Zombie Trellys" single ((:keywords "languages"))]) (zombie . [(20141222 816) nil "major mode for editing ZOMBIE programs" single ((:url . "http://hins11.yu-yake.com/"))]) (znc . [(20140722 1421) ((cl-lib (0 2)) (erc (5 3))) "ZNC + ERC" single ((:url . "https://github.com/sshirokov/ZNC.el"))]) (zlc . [(20151010 1857) nil "Provides zsh like completion system to Emacs" single ((:keywords "matching" "convenience"))]) (zerodark-theme . [(20160216 711) nil "A dark, medium contrast theme for Emacs" single ((:url . "https://github.com/NicolasPetton/zerodark-theme") (:keywords "themes"))]) (zencoding-mode . [(20140213 22) nil "Unfold CSS-selector-like expressions to markup" single ((:url . "https://github.com/rooney/zencoding") (:keywords "convenience"))]) (zenburn-theme . [(20160204 1216) nil "A low contrast color theme for Emacs." single ((:url . "http://github.com/bbatsov/zenburn-emacs"))]) (zen-and-art-theme . [(20120622 737) nil "zen and art color theme for GNU Emacs 24" single nil]) (zeitgeist . [(20131228 1009) nil "No description available." single nil]) (zeal-at-point . [(20151231 48) nil "Search the word at point with Zeal" single ((:url . "https://github.com/jinzhu/zeal-at-point"))]) (z3-mode . [(20151120 1455) ((flycheck (0 23)) (emacs (24))) "A z3/SMTLIBv2 interactive development environment" single ((:url . "https://github.com/zv/z3-mode") (:keywords "z3" "yices" "mathsat" "smt" "beaver"))]) (youdao-dictionary . [(20150913 2344) ((popup (0 5 0)) (chinese-word-at-point (0 2)) (names (0 5)) (emacs (24))) "Youdao Dictionary interface for Emacs" single ((:url . "https://github.com/xuchunyang/youdao-dictionary.el") (:keywords "convenience" "chinese" "dictionary"))]) (yesql-ghosts . [(20150220 437) ((s (1 9 0)) (dash (2 10 0)) (cider (0 8 0))) "Display ghostly yesql defqueries inline" single nil]) (ycmd . [(20160214 2344) ((emacs (24)) (f (0 17 1)) (dash (1 2 0)) (deferred (0 3 2)) (popup (0 5 0)) (cl-lib (0 5))) "emacs bindings to the ycmd completion server" tar ((:url . "https://github.com/abingham/emacs-ycmd"))]) (ycm . [(20150822 1136) nil "Emacs client for the YouCompleteMe auto-completion server." single ((:keywords "c" "abbrev"))]) (yaxception . [(20150105 652) nil "Provide framework about exception like Java for Elisp" single ((:url . "https://github.com/aki2o/yaxception") (:keywords "exception" "error" "signal"))]) (yatex . [(20160107 1519) nil "Yet Another tex-mode for emacs //野鳥//" tar nil]) (yatemplate . [(20151124 2307) ((yasnippet (0 8 1))) "File templates with yasnippet" single ((:url . "https://github.com/mineo/yatemplate") (:keywords "files" "convenience"))]) (yasnippet . [(20160131 948) nil "Yet another snippet extension for Emacs." tar ((:url . "http://github.com/capitaomorte/yasnippet") (:keywords "convenience" "emulation"))]) (yascroll . [(20150315 605) ((cl-lib (0 3))) "Yet Another Scroll Bar Mode" single ((:keywords "convenience"))]) (yari . [(20151127 2339) nil "Yet Another RI interface for Emacs" single ((:keywords "tools"))]) (yard-mode . [(20140816 1044) nil "Minor mode for Ruby YARD comments" single ((:url . "https://github.com/pd/yard-mode.el"))]) (yaoddmuse . [(20150712 421) nil "Major mode for EmacsWiki and other Oddmuse wikis" single ((:url . "http://www.emacswiki.org/emacs/download/yaoddmuse.el") (:keywords "yaoddmuse" "oddmuse"))]) (yandex-weather . [(20150821 414) nil "No description available." tar nil]) (yaml-tomato . [(20151122 2353) ((s (1 9))) "copy or show the yaml path currently under cursor." single ((:keywords "yaml"))]) (yaml-mode . [(20160217 653) ((emacs (24 1))) "Major mode for editing YAML files" single ((:keywords "data" "yaml"))]) (yalinum . [(20130217 243) nil "yet another display line numbers." single ((:keywords "convenience" "tools"))]) (yahoo-weather . [(20160111 439) ((emacs (24))) "Displays weather information in mode-line" single ((:url . "https://github.com/lujun9972/yahoo-weather-mode") (:keywords "weather" "mode-line"))]) (yagist . [(20150425 551) ((cl-lib (0 3))) "Yet Another Emacs integration for gist.github.com" single ((:url . "https://github.com/mhayashi1120/yagist.el") (:keywords "tools"))]) (yafolding . [(20141202 2056) nil "Yet another folding extension for Emacs" single ((:keywords "folding"))]) (yabin . [(20140205 1951) nil "Yet Another Bignum package (A thin wrapper of calc.el)." single ((:keywords "data"))]) (xtest . [(20141214 906) ((cl-lib (0 5))) "Simple Testing with Emacs & ERT" single ((:url . "https://github.com/promethial/xtest") (:keywords "testing" "ert"))]) (xterm-title . [(20091203 1023) nil "Update xterm titles" single nil]) (xterm-keybinder . [(20151210 2301) ((emacs (24 3)) (cl-lib (0 5)) (let-alist (1 0 1))) "Let you extra keybinds in xterm/urxvt" tar ((:keywords "convenient"))]) (xterm-frobs . [(20091211 1555) nil "manipulate xterm when running emacs in tty mode" single nil]) (xterm-color . [(20150823 646) nil "ANSI & XTERM 256 color support" single nil]) (xresources-theme . [(20141219 917) nil "Use your .Xresources as your emacs theme" single ((:keywords "xresources" "theme"))]) (xquery-tool . [(20160203 953) nil "A simple interface to saxonb's xquery." single ((:url . "https://github.com/paddymcall/xquery-tool.el") (:keywords "xml" "xquery" "emacs"))]) (xquery-mode . [(20140121 943) nil "A simple mode for editing xquery programs" tar nil]) (xmlunicode . [(20160130 909) nil "Unicode support for XML" tar ((:keywords "utf-8" "unicode" "xml" "characters"))]) (xmlgen . [(20130219 219) nil "A DSL for generating XML." single nil]) (xml-rpc . [(20150902 1827) nil "An elisp implementation of clientside XML-RPC" single ((:url . "http://github.com/hexmode/xml-rpc-el") (:keywords "xml" "rpc" "network"))]) (xml-quotes . [(20151230 1449) nil "read quotations from an XML document" tar ((:url . "https://github.com/ndw/xml-quotes") (:keywords "xml" "quotations"))]) (xml+ . [(20160210 1942) ((emacs (24 4)) (dash (2 12 0))) "Utilities for xml and html trees" single ((:url . "https://github.com/bddean/xml-plus") (:keywords "xml" "html"))]) (xkcd . [(20151016 2153) ((json (1 3))) "View xkcd from Emacs" single ((:url . "https://github.com/vibhavp/emacs-xkcd") (:keywords "xkcd" "webcomic"))]) (xcscope . [(20160201 1926) nil "cscope interface for (X)Emacs" single ((:url . "https://github.com/dkogan/xcscope.el") (:keywords "languages" "c"))]) (xbm-life . [(20160103 217) nil "A XBM version of Conway's Game of Life" single ((:url . "https://github.com/wasamasa/xbm-life") (:keywords "games"))]) (xahk-mode . [(20150504 1611) nil "Major mode for editing AutoHotkey scripts." single ((:url . "http://xahlee.info/mswin/emacs_autohotkey_mode.html") (:keywords "languages"))]) (xah-replace-pairs . [(20150522 333) nil "Multi-pair find/replace in strings and region." single ((:url . "http://ergoemacs.org/emacs/elisp_replace_string_region.html") (:keywords "lisp" "tools" "find replace"))]) (xah-math-input . [(20160127 1408) nil "a minor mode for inputting math and Unicode symbols." single ((:url . "http://ergoemacs.org/emacs/xmsi-math-symbols-input.html") (:keywords "abbrev" "convenience" "unicode" "math" "latex"))]) (xah-lookup . [(20150602 1146) nil "look up word on internet" single ((:url . "http://ergoemacs.org/emacs/emacs_lookup_ref.html") (:keywords "help" "docs" "convenience"))]) (xah-get-thing . [(20150712 1430) nil "get thing or selection at point." single ((:url . "http://ergoemacs.org/emacs/elisp_get-selection-or-unit.html") (:keywords "extensions" "lisp" "tools"))]) (xah-fly-keys . [(20160214 5) nil "A efficient modal keybinding set minor mode based on ergonomics." single ((:url . "http://ergoemacs.org/misc/ergoemacs_vi_mode.html") (:keywords "convenience" "emulations" "vim" "ergoemacs"))]) (xah-find . [(20160210 1902) nil "find replace in pure emacs lisp. Purpose similar to unix grep/sed." single ((:url . "http://ergoemacs.org/emacs/elisp-xah-find-text.html") (:keywords "convenience" "extensions" "files" "tools" "unix"))]) (xah-elisp-mode . [(20160211 1310) nil "Major mode for editing emacs lisp." single ((:url . "http://ergoemacs.org/emacs/xah-elisp-mode.html") (:keywords "lisp" "languages"))]) (x86-lookup . [(20160113 1403) ((emacs (24 3)) (cl-lib (0 3))) "jump to x86 instruction documentation" single ((:url . "https://github.com/skeeto/x86-lookup"))]) (x-dict . [(20091203 1023) nil "emacs interface for several online dictionaries" single nil]) (wwtime . [(20151122 810) nil "Insert a time of day with appropriate world-wide localization" single ((:keywords "time"))]) (wsd-mode . [(20160213 1217) nil "Emacs major-mode for www.websequencediagrams.com" tar ((:url . "https://github.com/josteink/wsd-mode") (:keywords "wsd" "diagrams" "design" "process" "modelling" "uml"))]) (ws-butler . [(20150126 759) nil "Unobtrusively remove trailing whitespace." single ((:url . "https://github.com/lewang/ws-butler"))]) (writeroom-mode . [(20151111 101) ((emacs (24 1)) (visual-fill-column (1 4))) "Minor mode for distraction-free writing" tar ((:keywords "text"))]) (writegood-mode . [(20150325 1115) nil "Polish up poor writing on the fly" single ((:url . "http://github.com/bnbeckwith/writegood-mode") (:keywords "writing" "weasel-words" "grammar"))]) (wrap-region . [(20140116 2320) ((dash (1 0 3))) "Wrap text with punctation or tag" single ((:url . "http://github.com/rejeep/wrap-region") (:keywords "speed" "convenience"))]) (world-time-mode . [(20140627 107) nil "show whole days of world-time diffs" single ((:keywords "tools" "calendar"))]) (workgroups2 . [(20141102 1122) ((cl-lib (0 4)) (dash (2 8 0)) (anaphora (1 0 0)) (f (0 17))) "New workspaces for Emacs" single ((:url . "https://github.com/pashinin/workgroups2") (:keywords "session" "management" "window-configuration" "persistence"))]) (workgroups . [(20110726 941) nil "workgroups for windows (for Emacs)" single ((:keywords "session" "management" "window-configuration" "persistence"))]) (worf . [(20160207 648) ((swiper (0 7 0)) (ace-link (0 1 0)) (hydra (0 13 0))) "A warrior does not press so many keys! (in org-mode)" single ((:url . "https://github.com/abo-abo/worf") (:keywords "lisp"))]) (wordsmith-mode . [(20151117 236) nil "Syntax analysis and NLP text-processing in Emacs (OSX-only)" single nil]) (wordnut . [(20151002 1457) ((emacs (24 4))) "Major mode interface to WordNet" tar nil]) (wonderland . [(20130912 1819) ((dash (2 0 0)) (dash-functional (1 0 0)) (multi (2 0 0)) (emacs (24))) "declarative configuration for Emacsen" single ((:url . "http://github.com/kurisuwhyte/emacs-wonderland") (:keywords "configuration" "profile" "wonderland"))]) (wolfram-mode . [(20140118 757) ((emacs (24 3))) "Mathematica editing and inferior mode." single ((:url . "https://github.com/kawabata/wolfram-mode/") (:keywords "languages" "processes" "tools"))]) (wn-mode . [(20151109 2152) ((emacs (24))) "numeric window switching shortcuts" single ((:url . "https://github.com/luismbo/wn-mode") (:keywords "buffers" "windows" "switching-windows"))]) (with-namespace . [(20130407 1122) ((dash (1 1 0)) (loop (1 1))) "interoperable elisp namespaces" single ((:keywords "namespaces"))]) (with-editor . [(20160128 1201) ((emacs (24 4)) (async (1 5)) (dash (2 12 1))) "Use the Emacsclient as $EDITOR" tar ((:url . "https://github.com/magit/with-editor") (:keywords "tools"))]) (wispjs-mode . [(20140103 1432) ((clojure-mode (0))) "Major mode for Wisp code." single ((:url . "https://github.com/krisajenkins/wispjs-mode"))]) (wisp-mode . [(20150623 1034) nil "Tools for wisp: the Whitespace-to-Lisp preprocessor" single ((:keywords "languages" "lisp"))]) (winpoint . [(20131023 1013) nil "Remember buffer positions per-window, not per buffer" single ((:url . "https://github.com/jorgenschaefer/winpoint") (:keywords "convenience"))]) (windsize . [(20151121 540) nil "Simple, intuitive window resizing" single ((:url . "http://github.com/grammati/windsize") (:keywords "window" "resizing" "convenience"))]) (window-purpose . [(20160217 932) ((emacs (24)) (cl-lib (0 5)) (let-alist (1 0 3)) (imenu-list (0 1))) "Purpose-based window management for Emacs" tar ((:url . "https://github.com/bmag/emacs-purpose") (:keywords "frames"))]) (window-numbering . [(20150228 1247) nil "Numbered window shortcuts" single ((:url . "http://nschum.de/src/emacs/window-numbering-mode/") (:keywords "faces" "matching"))]) (window-number . [(20140123 1902) nil "Select windows by numbers." single ((:url . "http://www.emacswiki.org/emacs/download/window-number.el"))]) (window-layout . [(20150716 2207) nil "window layout manager" single ((:keywords "window" "layout"))]) (window-jump . [(20150213 1236) nil "Move left/right/up/down through your windows." single ((:url . "https://github.com/chumpage/chumpy-windows") (:keywords "frames" "convenience"))]) (window-end-visible . [(20140508 1341) nil "Find the last visible point in a window" single ((:url . "http://github.com/rolandwalker/window-end-visible") (:keywords "extensions"))]) (window+ . [(20151231 1624) nil "Extensions to `window.el'." single ((:url . "http://www.emacswiki.org/window%2b.el") (:keywords "internal" "window"))]) (windata . [(20080412 755) nil "convert window configuration to list" single ((:keywords "convenience" "frames"))]) (win-switch . [(20150208 1911) nil "fast, dynamic bindings for window-switching/resizing" single ((:url . "http://www.stat.cmu.edu/~genovese/emacs/win-switch/") (:keywords "window" "switch" "key bindings" "ergonomic" "efficient"))]) (wimpy-del . [(20151231 1623) nil "Require confirmation for large region deletion." single ((:url . "http://www.emacswiki.org/wimpy-del.el") (:keywords "region" "cut" "kill" "copy"))]) (wilt . [(20151105 518) ((emacs (24 3)) (dash (2 12 0)) (s (1 10 0))) "An extensions for calculating WILT in a buffer." single ((:url . "https://github.com/sixty-north/emacs-wilt"))]) (wiki-summary . [(20150408 1422) ((emacs (24))) "View Wikipedia summaries in Emacs easily." single ((:url . "https://github.com/jozefg/wiki-summary.el") (:keywords "wikipedia" "utility"))]) (wiki-nav . [(20150223 554) ((button-lock (1 0 2)) (nav-flash (1 0 0))) "Simple file navigation using [[WikiStrings]]" single ((:url . "http://github.com/rolandwalker/button-lock") (:keywords "mouse" "button" "hypermedia" "navigation"))]) (widget-mvc . [(20150101 2006) nil "MVC framework for the emacs widgets" single ((:keywords "lisp" "widget"))]) (wide-column . [(20120814 112) nil "Calls functions dependant on column position." single ((:keywords "minor mode" "cursor colour" "column width"))]) (wid-edit+ . [(20151231 1622) nil "Extensions to standard library `wid-edit.el'." single ((:url . "http://www.emacswiki.org/wid-edit%2b.el") (:keywords "widget" "color"))]) (whole-line-or-region . [(20110901 130) nil "operate on current line if region undefined" single ((:keywords "kill" "yank" "cut" "copy" "paste" "whole" "lines"))]) (whitespace-cleanup-mode . [(20150603 447) nil "Intelligently call whitespace-cleanup on save" single ((:url . "https://github.com/purcell/whitespace-cleanup-mode") (:keywords "convenience"))]) (white-sand-theme . [(20151117 848) ((emacs (24))) "Emacs theme with a light background." single nil]) (whitaker . [(20150814 422) ((dash (2 10 0))) "Comint interface for Whitaker's Words" single ((:keywords "processes"))]) (which-key . [(20160213 654) ((emacs (24 3))) "Display available keybindings in popup" single ((:url . "https://github.com/justbur/emacs-which-key"))]) (what-the-commit . [(20150901 616) nil "Random commit message generator" single ((:url . "http://barbarito.me/") (:keywords "git" "commit" "message"))]) (wgrep-pt . [(20140510 1531) ((wgrep (2 1 5))) "Writable pt buffer and apply the changes to files" single ((:url . "http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep-pt.el") (:keywords "grep" "edit" "extensions"))]) (wgrep-helm . [(20140528 1427) ((wgrep (2 1 1))) "Writable helm-grep-mode buffer and apply the changes to files" single ((:url . "http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep-helm.el") (:keywords "grep" "edit" "extensions"))]) (wgrep-ag . [(20141012 311) ((wgrep (2 1 5))) "Writable ag buffer and apply the changes to files" single ((:url . "http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep-ag.el") (:keywords "grep" "edit" "extensions"))]) (wgrep-ack . [(20141012 311) ((wgrep (2 1 1))) "Writable ack-and-a-half buffer and apply the changes to files" single ((:url . "http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep-ack.el") (:keywords "grep" "edit" "extensions"))]) (wgrep . [(20141016 1656) nil "Writable grep buffer and apply the changes to files" single ((:url . "http://github.com/mhayashi1120/Emacs-wgrep/raw/master/wgrep.el") (:keywords "grep" "edit" "extensions"))]) (weibo . [(20150307 1442) ((cl-lib (0 5))) "Weibo client for Emacs" tar ((:url . "https://github.com/austin-----/weibo.emacs") (:keywords "weibo"))]) (weechat . [(20151206 447) ((s (1 3 1)) (cl-lib (0 2)) (emacs (24)) (tracking (1 2))) "Chat via WeeChat's relay protocol in Emacs" tar nil]) (wedge-ws . [(20140714 1449) nil "Wedge whitespace between columns in text" single ((:keywords "formatting" "indentation"))]) (websocket . [(20160124 2020) nil "Emacs WebSocket client and server" single ((:keywords "communication" "websocket" "server"))]) (weblogger . [(20110926 918) ((xml-rpc (1 6 8))) "Weblog maintenance via XML-RPC APIs" single ((:url . "http://launchpad.net/weblogger-el") (:keywords "weblog" "blogger" "cms" "movable" "type" "openweblog" "blog"))]) (web-server . [(20140905 1706) ((emacs (24 3))) "Emacs Web Server" tar ((:url . "https://github.com/eschulte/emacs-web-server") (:keywords "http" "server" "network"))]) (web-mode . [(20160212 538) nil "major mode for editing web templates" single ((:url . "http://web-mode.org") (:keywords "languages"))]) (web-completion-data . [(20150623 333) nil "Shared completion data for ac-html and company-web" tar ((:url . "https://github.com/osv/web-completion-data") (:keywords "html" "auto-complete" "company"))]) (web-beautify . [(20131118 226) nil "Format HTML, CSS and JavaScript/JSON by js-beautify" single ((:url . "https://github.com/yasuyk/web-beautify"))]) (web . [(20141231 1201) ((dash (2 9 0)) (s (1 5 0))) "useful HTTP client" single ((:url . "http://github.com/nicferrier/emacs-web") (:keywords "lisp" "http" "hypermedia"))]) (weather-metno . [(20150831 1807) ((emacs (24)) (cl-lib (0 3))) "Weather data from met.no in Emacs" tar nil]) (wcheck-mode . [(20160208 1136) nil "General interface for text checkers" tar nil]) (wc-mode . [(20150116 2102) nil "show wc-like information in status bar" single ((:url . "http://www.dr-qubit.org/emacs.php") (:keywords "length" "characters" "words" "lines" "mode line"))]) (wc-goal-mode . [(20140829 659) nil "Running word count with goals (minor mode)" single ((:url . "https://github.com/bnbeckwith/wc-goal-mode"))]) (wavefront-obj-mode . [(20150501 1116) nil "Major mode for Wavefront obj files" single ((:url . "http://github.com/abend/wavefront-obj-mode"))]) (watch-buffer . [(20120331 1344) nil "run a shell command when saving a buffer" single ((:url . "https://github.com/mjsteger/watch-buffer") (:keywords "automation" "convenience"))]) (warm-night-theme . [(20150607 741) ((emacs (24))) "Emacs 24 theme with a dark background." single nil]) (wanderlust . [(20160129 1536) ((semi (1 14 7))) "Yet Another Message Interface on Emacsen" tar nil]) (wandbox . [(20160124 840) ((emacs (24)) (json (1 3))) "Wandbox API Library for Emacs" single ((:url . "https://github.com/kosh04/emacs-wandbox") (:keywords "c" "programming" "tools"))]) (wand . [(20141104 1645) ((dash (2 5 0))) "Magic wand for Emacs - Selecting and executing" tar ((:url . "https://github.com/cmpitg/wand") (:keywords "extensions" "tools"))]) (wakatime-mode . [(20151117 1630) nil "Automatic time tracking extension for WakaTime" single ((:keywords "calendar" "comm"))]) (waher-theme . [(20141115 430) ((emacs (24 1))) "Emacs 24 theme based on waher for st2 by dduckster" single ((:url . "https://github.com/jasonm23/emacs-waher-theme"))]) (wacspace . [(20140826 2232) ((dash (1 2 0)) (cl-lib (0 2))) "The WACky WorkSPACE manager for emACS" tar nil]) (w3m . [(20121224 1747) nil "an Emacs interface to w3m" tar ((:keywords "w3m" "www" "hypermedia"))]) (w32browser-dlgopen . [(20151231 1621) nil "Use w32browser with standard Windows Open File box." single ((:url . "http://www.emacswiki.org/w32browser-dlgopen.el") (:keywords "files" "extensions" "convenience" "dialog"))]) (w32-browser . [(20151231 1620) nil "Run Windows application associated with a file." single ((:url . "http://www.emacswiki.org/w32-browser.el") (:keywords "mouse" "dired" "w32" "explorer"))]) (volume . [(20150718 1309) nil "tweak your sound card volume from Emacs" single ((:url . "http://www.brockman.se/software/volume-el/"))]) (volatile-highlights . [(20141004 2240) nil "Minor mode for visual feedback on some operations." single ((:url . "http://www.emacswiki.org/emacs/download/volatile-highlights.el") (:keywords "emulations" "convenience" "wp"))]) (voca-builder . [(20150625 1133) nil "No description available." single nil]) (vline . [(20120108 445) nil "show vertical line (column highlighting) mode." single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/vline.el") (:keywords "faces" "editing" "emulating"))]) (vlf . [(20150101 718) nil "View Large Files" tar ((:url . "https://github.com/m00natic/vlfi") (:keywords "large files" "utilities"))]) (vkill . [(20091203 1022) nil "view and kill Unix processes from within Emacs" single nil]) (visual-regexp-steroids . [(20150411 416) ((visual-regexp (0 8))) "Extends visual-regexp to support other regexp engines" tar ((:url . "https://github.com/benma/visual-regexp-steroids.el/") (:keywords "external" "foreign" "regexp" "replace" "python" "visual" "feedback"))]) (visual-regexp . [(20151206 519) ((cl-lib (0 2))) "A regexp/replace command for Emacs with interactive visual feedback" single ((:url . "https://github.com/benma/visual-regexp.el/") (:keywords "regexp" "replace" "visual" "feedback"))]) (visual-fill-column . [(20151121 1551) ((emacs (24 3))) "fill-column for visual-line-mode" single nil]) (visual-ascii-mode . [(20150129 246) nil "Visualize ascii code (small integer) on buffer." single ((:url . "https://github.com/Dewdrops/visual-ascii-mode") (:keywords "presentation"))]) (visible-mark . [(20150623 2150) nil "Make marks visible." single ((:url . "https://gitlab.com/iankelling/visible-mark") (:keywords "marking" "color" "faces"))]) (virtualenvwrapper . [(20151127 621) ((dash (1 5 0)) (s (1 6 1))) "a featureful virtualenv tool for Emacs" single ((:url . "http://github.com/porterjamesj/virtualenvwrapper.el") (:keywords "python" "virtualenv" "virtualenvwrapper"))]) (virtualenv . [(20140220 1501) nil "Virtualenv for Python" single ((:keywords "python" "virtualenv"))]) (vimrc-mode . [(20150607 913) nil "Major mode for vimrc files" single ((:url . "https://github.com/mcandre/vimrc-mode") (:keywords "languages" "vim"))]) (vimish-fold . [(20160111 102) ((emacs (24 4)) (cl-lib (0 5)) (f (0 18 0))) "Fold text like in Vim" single ((:url . "https://github.com/mrkkrp/vimish-fold") (:keywords "convenience"))]) (vimgolf . [(20140814 1448) nil "VimGolf interface for the One True Editor" single ((:keywords "games" "vimgolf" "vim"))]) (vim-region . [(20140329 924) ((expand-region (20140127))) "Select region as vim" single ((:url . "https://github.com/ongaeshi/emacs-vim-region"))]) (vim-empty-lines-mode . [(20150110 2026) ((emacs (23))) "Vim-like empty line indicator at end of files." single ((:url . "https://github.com/jmickelin/vim-empty-lines-mode") (:keywords "emulations"))]) (viewer . [(20141021 1138) nil "View-mode extension" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/viewer.el") (:keywords "view" "extensions"))]) (vi-tilde-fringe . [(20141027 1942) ((emacs (24))) "Displays tildes in the fringe on empty lines a la Vi." single ((:url . "https://github.com/syl20bnr/vi-tilde-fringe") (:keywords "emulation"))]) (vhdl-tools . [(20160114 249) ((ggtags (0 8 11)) (emacs (24 3)) (outshine (2 0))) "Utilities for navigating vhdl sources." single ((:url . "https://github.com/csantosb/vhdl-tools") (:keywords "vhdl"))]) (vertigo . [(20151110 2013) ((dash (2 11 0))) "Jump across lines using the home row." single ((:url . "https://github.com/noctuid/vertigo.el") (:keywords "vim" "vertigo"))]) (vertica . [(20131217 711) ((sql (3 0))) "Vertica SQL mode extension" single ((:keywords "sql" "vertica"))]) (verify-url . [(20160202 2359) ((cl-lib (0 5))) "find out invalid urls in the buffer or region" single ((:url . "https://github.com/lujun9972/verify-url") (:keywords "convenience" "usability" "url"))]) (vector-utils . [(20140508 1341) nil "Vector-manipulation utility functions" single ((:url . "http://github.com/rolandwalker/vector-utils") (:keywords "extensions"))]) (vdirel . [(20151215 2255) ((emacs (24 4)) (org-vcard (0 1 0)) (helm (1 7 0)) (seq (1 11))) "Manipulate vdir (i.e., vCard) repositories" single ((:keywords "vdirsyncer" "vdir" "vcard" "carddav" "contact" "addressbook" "helm"))]) (vcomp . [(20140906 1508) nil "compare version strings" single ((:url . "https://github.com/tarsius/vcomp") (:keywords "versions"))]) (vcl-mode . [(20151213 1123) nil "Syntax highlighting for Varnish Command Language" single nil]) (vc-osc . [(20120910 211) nil "non-resident support for osc version-control" single nil]) (vc-fossil . [(20141031 22) nil "VC backend for the fossil sofware configuraiton management system" tar nil]) (vc-darcs . [(20151225 1228) nil "a VC backend for darcs" single ((:keywords "vc"))]) (vc-check-status . [(20160108 216) nil "Warn you when quitting emacs and leaving repo dirty." tar ((:url . "https://github.com/thisirs/vc-check-status") (:keywords "vc" "convenience"))]) (vc-auto-commit . [(20160108 215) nil "Auto-committing feature for your repository" tar ((:url . "http://github.com/thisirs/vc-auto-commit.git") (:keywords "vc" "convenience"))]) (vbasense . [(20140221 1553) ((auto-complete (1 4 0)) (log4e (0 2 0)) (yaxception (0 1))) "provide a environment like Visual Basic Editor." tar ((:url . "https://github.com/aki2o/emacs-vbasense") (:keywords "vba" "completion"))]) (vala-snippets . [(20150428 2052) ((yasnippet (0 8 0))) "Yasnippets for Vala" tar ((:url . "https://github.com/gopar/vala-snippets"))]) (vala-mode . [(20150324 1525) nil "Vala mode derived mode" single ((:keywords "vala" "languages" "oop"))]) (vagrant-tramp . [(20160120 1632) ((dash (2 12 0))) "Vagrant method for TRAMP" tar ((:url . "https://github.com/dougm/vagrant-tramp") (:keywords "vagrant"))]) (vagrant . [(20141125 1959) nil "Manage a vagrant box from emacs" single ((:url . "https://github.com/ottbot/vagrant.el") (:keywords "vagrant" "chef"))]) (uzumaki . [(20150119 1706) ((cl-lib (0 5))) "A simple buffer cycler" single ((:url . "http://github.com/geyslan/uzumaki") (:keywords "buffer" "convenience"))]) (uuidgen . [(20140918 1601) nil "Provides various UUID generating functions" single ((:keywords "extensions" "lisp" "tools"))]) (uuid . [(20120910 151) nil "UUID's for EmacsLisp" single ((:keywords "lisp"))]) (utop . [(20151105 247) ((emacs (24))) "Universal toplevel for OCaml" single ((:url . "https://github.com/diml/utop") (:keywords "ocaml" "languages"))]) (use-package-chords . [(20160107 854) ((use-package (2 0)) (bind-key (1 0)) (bind-chord (0 1))) "key-chord keyword for use-package" single ((:url . "https://github.com/waymondo/use-package-chords") (:keywords "convenience" "tools" "extensions"))]) (use-package . [(20160209 1633) ((bind-key (1 0)) (diminish (0 44))) "A use-package declaration for simplifying your .emacs" single ((:url . "https://github.com/jwiegley/use-package") (:keywords "dotemacs" "startup" "speed" "config" "package"))]) (usage-memo . [(20110722 851) nil "integration of Emacs help system and memo" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/usage-memo.el") (:keywords "convenience" "languages" "lisp" "help" "tools" "docs"))]) (urlenc . [(20140116 656) nil "URL encoding/decoding utility for Emacs." single ((:url . "https://github.com/buzztaiki/urlenc-el") (:keywords "url"))]) (url-shortener . [(20150805 2313) nil "shorten long url and expand tinyurl" single ((:url . "https://github.com/yuyang0/url-shortener"))]) (unkillable-scratch . [(20150327 2318) nil "Disallow buffers from being killed by regexp -- default is *scratch* buffer" single ((:keywords "scratch"))]) (unison-mode . [(20150104 414) nil "Syntax highlighting for unison file synchronization program" single ((:url . "https://github.com/impaktor/unison-mode") (:keywords "symchronization" "unison"))]) (unipoint . [(20140113 1424) nil "a simple way to insert unicode characters by TeX name" single ((:url . "https://github.com/apgwoz/unipoint"))]) (unify-opening . [(20151116 1648) ((emacs (24 4))) "Make everything use the same mechanism to open files" single ((:url . "https://github.com/DamienCassou/unify-opening") (:keywords "dired" "org" "mu4e" "open" "runner" "extension" "file"))]) (unidecode . [(20140317 2118) ((cl-lib (0 4))) "Convert Unicode text into safe ASCII strings" tar nil]) (unicode-whitespace . [(20140508 1341) ((ucs-utils (0 7 6)) (list-utils (0 4 2)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "teach whitespace-mode about fancy characters" single ((:url . "http://github.com/rolandwalker/unicode-whitespace") (:keywords "faces" "wp" "interface"))]) (unicode-troll-stopper . [(20151023 1831) nil "Minor mode for Highlighting Unicode homoglyphs" single ((:url . "https://github.com/camsaul/emacs-unicode-troll-stopper") (:keywords "unicode"))]) (unicode-progress-reporter . [(20140508 1341) ((emacs (24 1 0)) (ucs-utils (0 7 6)) (list-utils (0 4 2)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "Progress-reporter with fancy characters" single ((:url . "http://github.com/rolandwalker/unicode-progress-reporter") (:keywords "interface"))]) (unicode-input . [(20141218 2320) nil "Support for unicode character input" single ((:keywords "unicode" "input"))]) (unicode-fonts . [(20150826 1532) ((font-utils (0 7 8)) (ucs-utils (0 8 2)) (list-utils (0 4 2)) (persistent-soft (0 8 10)) (pcache (0 3 1))) "Configure Unicode fonts" single ((:url . "http://github.com/rolandwalker/unicode-fonts") (:keywords "i18n" "faces" "frames" "wp" "interface"))]) (unicode-enbox . [(20140508 1341) ((string-utils (0 3 2)) (ucs-utils (0 7 6)) (list-utils (0 4 2)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "Surround a string with box-drawing characters" single ((:url . "http://github.com/rolandwalker/unicode-enbox") (:keywords "extensions" "interface"))]) (unicode-emoticons . [(20150204 308) nil "Shortcuts for common unicode emoticons" single ((:url . "https://github.com/hagleitn/unicode-emoticons") (:keywords "games" "entertainment" "comms"))]) (unfill . [(20131103 213) nil "The inverse of fill-paragraph and fill-region" single ((:keywords "utilities"))]) (undohist . [(20150315 542) ((cl-lib (1 0))) "Persistent undo history for GNU Emacs" single ((:keywords "convenience"))]) (undo-tree . [(20140509 522) nil "Treat undo history as a tree" single ((:url . "http://www.dr-qubit.org/emacs.php") (:keywords "convenience" "files" "undo" "redo" "history" "tree"))]) (underwater-theme . [(20131117 1602) nil "A gentle, deep blue color theme" single ((:keywords "faces"))]) (undercover . [(20150817 1010) ((emacs (24)) (dash (2 0 0)) (shut-up (0 3 2))) "Test coverage library for Emacs" single ((:url . "https://github.com/sviridov/undercover.el") (:keywords "lisp" "tests" "coverage" "tools"))]) (uncrustify-mode . [(20130707 659) nil "Minor mode to automatically uncrustify." single ((:keywords "uncrustify"))]) (unbound . [(20140307 128) nil "Find convenient unbound keystrokes" single ((:keywords "keyboard"))]) (ukrainian-holidays . [(20130720 649) nil "Ukrainian holidays for Emacs calendar." single ((:url . "https://github.com/abo-abo/ukrainian-holidays"))]) (ujelly-theme . [(20150807 2136) nil "Ujelly theme for GNU Emacs 24 (deftheme)" single ((:url . "http://github.com/marktran/color-theme-ujelly"))]) (uimage . [(20151012 604) nil "Url image minor mode." single ((:keywords "lisp" "url" "image"))]) (ucs-utils . [(20150826 714) ((persistent-soft (0 8 8)) (pcache (0 2 3)) (list-utils (0 4 2))) "Utilities for Unicode characters" tar ((:url . "http://github.com/rolandwalker/ucs-utils") (:keywords "i18n" "extensions"))]) (ucs-cmds . [(20151231 1616) nil "Macro to create commands that insert Unicode chars." single ((:url . "http://www.emacswiki.org/ucs-cmds.el") (:keywords "unicode" "characters" "encoding" "commands" "ucs-names"))]) (ubuntu-theme . [(20150805 806) nil "A theme inspired by the default terminal colors in Ubuntu" single ((:url . "http://github.com/rocher/ubuntu-theme"))]) (typo . [(20160121 330) nil "Minor mode for typographic editing" single ((:url . "https://github.com/jorgenschaefer/typoel") (:keywords "convenience" "wp"))]) (typing-game . [(20151111 740) nil "a simple typing game" single ((:keywords "lisp" "game"))]) (typing . [(20121026 1418) nil "The Typing Of Emacs" single ((:url . "http://www.emacswiki.org/emacs/TypingOfEmacs") (:keywords "games"))]) (typescript-mode . [(20160126 408) nil "Major mode for editing typescript" single ((:url . "http://github.com/ananthakumaran/typescript.el") (:keywords "typescript" "languages"))]) (typed-clojure-mode . [(20151003 1122) ((clojure-mode (2 1 1)) (cider (0 10 0 -3))) "Typed Clojure minor mode for Emacs" tar ((:url . "https://github.com/typedclojure/typed-clojure-mode"))]) (twittering-mode . [(20160207 156) nil "Major mode for Twitter" single ((:url . "http://twmode.sf.net/") (:keywords "twitter" "web"))]) (twilight-theme . [(20120412 603) nil "Twilight theme for GNU Emacs 24 (deftheme)" single nil]) (twilight-bright-theme . [(20130605 143) nil "A Emacs 24 faces port of the TextMate theme" single ((:url . "https://github.com/jimeh/twilight-bright-theme.el") (:keywords "themes"))]) (twilight-anti-bright-theme . [(20140810 34) nil "A soothing Emacs 24 light-on-dark theme" single ((:url . "https://github.com/jimeh/twilight-anti-bright-theme.el") (:keywords "themes"))]) (twig-mode . [(20130220 1050) nil "A major mode for twig" single nil]) (turnip . [(20150308 2329) ((dash (2 6 0)) (s (1 9 0))) "Interacting with tmux from Emacs" single ((:keywords "terminals" "tools"))]) (tup-mode . [(20140410 914) nil "Major mode for editing files for Tup" single ((:url . "https://github.com/ejmr/tup-mode"))]) (tumblesocks . [(20140215 1247) ((htmlize (1 39)) (oauth (1 0 3)) (markdown-mode (1 8 1))) "An Emacs tumblr client." tar nil]) (tumble . [(20160111 2329) ((http-post-simple (0)) (cl-lib (0 5))) "an Tumblr mode for Emacs" single ((:keywords "tumblr"))]) (tuareg . [(20160105 1024) ((caml (3 12 0 1))) "OCaml mode for Emacs." tar ((:url . "https://github.com/ocaml/tuareg") (:keywords "ocaml" "languages"))]) (ttrss . [(20130409 1049) ((emacs (23 1))) "Tiny Tiny RSS elisp bindings" single ((:url . "https://github.com/pedros/ttrss.el") (:keywords "news" "local"))]) (tt-mode . [(20130804 410) nil "Emacs major mode for editing Template Toolkit files." single nil]) (tss . [(20150913 708) ((auto-complete (1 4 0)) (json-mode (1 1 0)) (log4e (0 2 0)) (yaxception (0 1))) "provide a interface for auto-complete.el/flymake.el on typescript-mode." tar ((:url . "https://github.com/aki2o/emacs-tss") (:keywords "typescript" "completion"))]) (try . [(20160204 1055) ((emacs (24))) "Try out Emacs packages." single ((:url . "http://github.com/larstvei/try") (:keywords "packages"))]) (truthy . [(20140508 1341) ((list-utils (0 4 2))) "Test the content of a value" single ((:url . "http://github.com/rolandwalker/truthy") (:keywords "extensions"))]) (tronesque-theme . [(20150125 241) nil "Color Theme based on Tron universe." single ((:url . "https://github.com/aurelienbottazini/tronesque"))]) (trident-mode . [(20130726 1207) ((emacs (24)) (slime (20130526)) (skewer-mode (1 5 0)) (dash (1 0 3))) "Live Parenscript interaction" single ((:url . "https://github.com/johnmastro/trident-mode.el") (:keywords "languages" "lisp" "processes" "tools"))]) (tree-mode . [(20151104 531) nil "A mode to manage tree widgets" single ((:keywords "help" "convenience" "widget"))]) (travis . [(20150825 438) ((s (1 9 0)) (dash (2 9 0)) (pkg-info (0 5 0)) (request (0 1 0))) "Emacs client for Travis" tar ((:url . "https://github.com/nlamirault/emacs-travis") (:keywords "travis"))]) (transpose-mark . [(20150405 16) nil "Transpose data using the Emacs mark" single ((:keywords "transpose" "convenience"))]) (transpose-frame . [(20151126 626) nil "Transpose windows arrangement in a frame" single ((:keywords "window"))]) (transmission . [(20160214 2049) ((emacs (24 4)) (let-alist (1 0 3))) "Interface to a Transmission session" single ((:keywords "comm" "tools"))]) (tramp-term . [(20141104 1345) nil "Automatic setup of directory tracking in ssh sessions." single ((:url . "https://github.com/randymorris/tramp-term.el") (:keywords "tramp" "ssh"))]) (tramp-hdfs . [(20151028 2036) nil "Tramp extension to access hadoop/hdfs file system in Emacs" single ((:keywords "tramp" "emacs" "hdfs" "hadoop" "webhdfs" "rest"))]) (tracwiki-mode . [(20150119 821) ((xml-rpc (1 6 8))) "Emacs Major mode for working with Trac" single ((:keywords "trac" "wiki" "tickets"))]) (tracking . [(20151129 319) nil "Buffer modification tracking" tar ((:url . "https://github.com/jorgenschaefer/circe/wiki/Tracking"))]) (traad . [(20151225 2334) ((deferred (0 3 2)) (popup (0 5 0)) (request (0 2 0)) (request-deferred (0 2 0)) (python-environment (0 0 2))) "emacs interface to the traad refactoring server." single ((:url . "https://github.com/abingham/traad"))]) (toxi-theme . [(20130418 1239) ((emacs (24))) "A dark color theme by toxi" single ((:url . "http://hg.postspectacular.com/toxi-theme/"))]) (tox . [(20141004 1403) nil "Launch current python test with tox" single ((:url . "https://github.com/chmouel/tox.el") (:keywords "convenience" "tox" "python" "tests"))]) (totd . [(20150519 740) ((s (1 9 0)) (cl-lib (0 5))) "Display a random daily emacs command." single ((:keywords "help"))]) (tornado-template-mode . [(20141128 208) nil "A major mode for editing tornado templates" single nil]) (top-mode . [(20130605 1039) nil "run \"top\" from emacs" single ((:keywords "extensions" "processes"))]) (tool-bar+ . [(20151231 1615) nil "Extensions to standard library tool-bar.el" single ((:url . "http://www.emacswiki.org/tool-bar%2b.el") (:keywords "tool-bar" "convenience" "mouse" "button" "frame"))]) (tommyh-theme . [(20131004 1630) nil "A bright, bold-colored theme for emacs" single nil]) (toml-mode . [(20150818 120) nil "Mojor mode for editing TOML files" single ((:url . "https://github.com/dryman/toml-mode.el") (:keywords "data" "toml"))]) (toml . [(20130903 555) nil "TOML (Tom's Obvious, Minimal Language) parser" single ((:url . "https://github.com/gongo/emacs-toml") (:keywords "toml" "parser"))]) (tomatinho . [(20140120 1540) nil "Tomatinho" tar ((:keywords "time" "productivity" "pomodoro technique"))]) (toggle-window . [(20141207 748) nil "toggle current window size between half and full" single ((:url . "https://github.com/deadghost/toggle-window") (:keywords "hide" "window"))]) (toggle-test . [(20140722 2237) nil "Toggle between source and test files in various programming languages" single ((:url . "https://github.com/rags/toggle-test") (:keywords "tdd" "test" "toggle" "productivity"))]) (toggle-quotes . [(20140710 226) nil "Toggle between single and double quoted string" single ((:url . "https://github.com/toctan/toggle-quotes.el") (:keywords "convenience" "quotes"))]) (toggle . [(20151210 1527) nil "quickly open corresponding file (eg test vs impl)." single ((:keywords "files" "extensions" "convenience"))]) (togetherly . [(20150820 138) ((cl-lib (0 3))) "allow multiple clients to edit a single buffer online" single ((:url . "http://hins11.yu-yake.com/"))]) (todotxt-mode . [(20150424 704) nil "Major mode for editing todo.txt files" single ((:keywords "wp" "files"))]) (todotxt . [(20150513 1929) nil "A major mode for editing todo.txt files" single ((:url . "https://github.com/rpdillon/todotxt.el") (:keywords "todo.txt" "todotxt" "todotxt.el"))]) (todochiku . [(20150112 1254) nil "A mode for interfacing with Growl, Snarl, and the like." single nil]) (toc-org . [(20150921 705) nil "add table of contents to org-mode files (formerly, org-toc)" single ((:url . "https://github.com/snosov1/toc-org") (:keywords "org-mode" "org-toc" "toc-org" "org" "toc" "table" "of" "contents"))]) (tmmofl . [(20121025 401) nil "Calls functions dependant on font lock highlighting at point" single ((:keywords "minor mode" "font lock" "toggling."))]) (tldr . [(20160214 152) ((emacs (24 3))) "tldr client for Emacs" single ((:url . "https://github.com/kuanyui/tldr.el") (:keywords "tools" "docs"))]) (tj-mode . [(20150826 851) ((emacs (24)) (tern (0 0 1)) (js2-mode (20150514))) "Highlight JavaScript with Tern" single ((:url . "https://github.com/katspaugh/tj-mode") (:keywords "languages" "javascript"))]) (tinysegmenter . [(20141124 213) ((cl-lib (0 5))) "Super compact Japanese tokenizer in Javascript ported to emacs lisp" single ((:url . "https://github.com/myuhe/tinysegmenter.el") (:keywords "convenience"))]) (tiny . [(20151208 205) nil "Quickly generate linear ranges in Emacs" single ((:url . "https://github.com/abo-abo/tiny") (:keywords "convenience"))]) (tinkerer . [(20150219 2249) ((s (1 2 0))) "Elisp wrapper for Tinkerer Blogging Engine." single ((:url . "https://github.com/yyr/tinkerer.el") (:keywords "tinkerer" "blog" "wrapper"))]) (timesheet . [(20151107 604) ((s (1)) (org (7)) (auctex (11))) "Timesheet management add-on for org-mode" tar ((:url . "https://github.com/tmarble/timesheet.el") (:keywords "org" "timesheet"))]) (timer-revert . [(20150122 1232) nil "minor mode to revert buffer for a given time interval." tar nil]) (time-ext . [(20130130 1351) nil "more function for time/date" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/time-ext.el") (:keywords "lisp"))]) (tidy . [(20111222 956) nil "Interface to the HTML Tidy program" single ((:url . "http://www.emacswiki.org/elisp/tidy.el") (:keywords "languages"))]) (tide . [(20160130 43) ((typescript-mode (0 1)) (emacs (24 1)) (flycheck (0 23)) (dash (2 10 0))) "Typescript Interactive Development Environment" tar nil]) (thumb-through . [(20120118 2134) nil "Plain text reader of HTML documents" single ((:keywords "html"))]) (thumb-frm . [(20151231 1612) ((frame-fns (0)) (frame-cmds (0))) "Commands for thumbnail frames." single ((:url . "http://www.emacswiki.org/thumb-frm.el") (:keywords "frame" "icon"))]) (thrift . [(20140312 1348) nil "Major mode for Apache Thrift files" single ((:keywords "files"))]) (thread-dump . [(20130323 1025) nil "Java thread dump viewer" single ((:url . "http://github.com/nd/thread-dump.el"))]) (thingopt . [(20150315 523) nil "Thing at Point optional utilities" single ((:keywords "convenience"))]) (thingatpt+ . [(20151231 1610) nil "Extensions to `thingatpt.el'." single ((:url . "http://www.emacswiki.org/thingatpt%2b.el") (:keywords "extensions" "matching" "mouse"))]) (thing-cmds . [(20151231 1609) ((hide-comnt (0))) "Commands that use things, as defined by `thingatpt.el'." single ((:url . "http://www.emacswiki.org/thing-cmds.el") (:keywords "thingatpt" "thing" "region" "selection"))]) (thesaurus . [(20121125 1137) nil "replace a word with a synonym looked up in a web service." single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/thesaurus.el") (:keywords "thesaurus" "synonym"))]) (therapy . [(20151113 1153) ((emacs (24))) "Hooks for managing multiple Python major versions" single ((:url . "https://github.com/abingham/therapy"))]) (theme-looper . [(20150723 1104) ((cl-lib (0 5))) "Loop thru the available color-themes" single ((:url . "http://ismail.teamfluxion.com") (:keywords "convenience" "color-themes"))]) (theme-changer . [(20130725 1919) nil "Sunrise/Sunset Theme Changer for Emacs" single ((:url . "https://github.com/hadronzoo/theme-changer") (:keywords "color-theme" "deftheme" "solar" "sunrise" "sunset"))]) (tfs . [(20120508 1120) nil "MS Team Foundation Server commands for Emacs." single ((:url . "http://cheeso.members.winisp.net/srcview.aspx?dir=emacs&file=tfs.el"))]) (textmate-to-yas . [(20150914 546) nil "Import Textmate macros into yasnippet syntax" tar ((:url . "https://github.com/mlf176f2/textmate-to-yas.el/") (:keywords "yasnippet" "textmate"))]) (textmate . [(20110816 1446) nil "TextMate minor mode for Emacs" single ((:keywords "textmate" "osx" "mac"))]) (textile-mode . [(20151203 53) nil "Textile markup editing major mode" single nil]) (tex-smart-umlauts . [(20151110 417) nil "Smart umlaut conversion for TeX." single ((:url . "http://hub.darcs.net/lyro/tex-smart-umlauts") (:keywords "tex" "wp"))]) (test-simple . [(20151110 1943) nil "Simple Unit Test Framework for Emacs Lisp" single ((:url . "http://github.com/rocky/emacs-test-simple") (:keywords "unit-test"))]) (test-kitchen . [(20151027 427) nil "Run test-kitchen inside of emacs" single ((:url . "http://github.com/jjasghar/test-kitchen-el") (:keywords "chef" "ruby" "test-kitchen"))]) (test-case-mode . [(20130525 734) ((fringe-helper (0 1 1))) "unit test front-end" single ((:url . "http://nschum.de/src/emacs/test-case-mode/") (:keywords "tools"))]) (terraform-mode . [(20151226 457) ((hcl-mode (0 1)) (cl-lib (0 5))) "Major mode for terraform configuration file" single ((:url . "https://github.com/syohex/emacs-terraform-mode"))]) (tern-django . [(20150121 1127) ((emacs (24)) (tern (0 0 1)) (f (0 17 1))) "Create tern projects for django applications." tar ((:url . "https://github.com/proofit404/tern-django"))]) (tern-auto-complete . [(20151123 653) ((tern (0 0 1)) (auto-complete (1 4)) (cl-lib (0 5)) (emacs (24))) "Tern Completion by auto-complete.el" single nil]) (tern . [(20151228 511) ((json (1 2)) (cl-lib (0 5)) (emacs (24))) "Tern-powered JavaScript integration" single ((:url . "http://ternjs.net/"))]) (termbright-theme . [(20151030 1935) ((emacs (24 1))) "a more usable theme for white-on-black terminals" single ((:url . "https://github.com/bmastenbrook/termbright-theme-el") (:keywords "themes"))]) (term-run . [(20151228 105) nil "Run arbitrary command in terminal buffer" single ((:url . "https://github.com/10sr/term-run-el") (:keywords "utility" "shell" "command" "term-mode"))]) (term-cmd . [(20141114 1314) nil "Send commands to Emacs from programs running under term.el" single ((:url . "https://github.com/CallumCameron/term-cmd") (:keywords "processes"))]) (term-alert . [(20141121 1205) ((term-cmd (1 0)) (alert (1 1))) "Get notifications when commands complete in the Emacs terminal emulator" single ((:url . "https://github.com/CallumCameron/term-alert") (:keywords "notifications" "processes"))]) (term+mux . [(20140210 2349) ((term+ (0 1)) (tab-group (0 1))) "term+ terminal multiplexer and session management" single ((:url . "http://github.com/tarao/term+-el") (:keywords "terminal" "emulation"))]) (term+key-intercept . [(20140210 2350) ((term+ (0 1)) (key-intercept (0 1))) "term+ intercept key mapping" single ((:url . "http://github.com/tarao/term+-el") (:keywords "terminal" "emulation"))]) (term+ . [(20130612 652) nil "term-mode enhancement" tar ((:url . "http://github.com/tarao/term+-el") (:keywords "terminal" "emulation"))]) (telephone-line . [(20151116 442) ((emacs (24 3)) (cl-lib (0 5)) (eieio (1 4)) (s (1 9 0)) (seq (1 8))) "Rewrite of Powerline" tar ((:url . "https://github.com/dbordak/telephone-line") (:keywords "mode-line"))]) (telepathy . [(20131209 458) nil "Access Telepathy from Emacs" single ((:keywords "telepathy" "tools"))]) (tea-time . [(20120331 120) nil "Simple timer package, useful to make perfect tea." single ((:keywords "timer" "tea-time"))]) (tdd-status-mode-line . [(20131123 916) nil "TDD status on the mode-line" single ((:url . "https://github.com/algernon/tdd-status-mode-line") (:keywords "faces" "tdd"))]) (tco . [(20140412 612) ((dash (1 2 0)) (emacs (24))) "tail-call optimisation for Emacs lisp" single nil]) (tc . [(20150113 1926) nil "a Japanese input method with T-Code on Emacs" tar nil]) (tbx2org . [(20140224 759) ((dash (2 5 0)) (s (1 8 0)) (cl-lib (0 4))) "Tinderbox to org-mode conversion" single ((:url . "https://github.com/istib/tbx2org") (:keywords "org-mode"))]) (tao-theme . [(20151217 840) nil "Tao, light & dark themes for Emacs with greyscale palettes generated from the golden mean." tar nil]) (tangotango-theme . [(20150702 104) nil "Tango Palette color theme for Emacs 24." single ((:url . "https://github.com/juba/color-theme-tangotango") (:keywords "tango" "palette" "color" "theme" "emacs"))]) (tango-plus-theme . [(20140425 1511) nil "A color theme based on the tango palette" single ((:url . "https://github.com/tmalsburg/tango-plus-theme"))]) (tango-2-theme . [(20120312 1325) nil "Tango 2 color theme for GNU Emacs 24" single nil]) (take-off . [(20140531 217) ((emacs (24 3)) (web-server (0 1 0))) "Emacs remote web access" tar ((:url . "https://github.com/tburette/take-off"))]) (tagedit . [(20150727 224) ((s (1 3 1)) (dash (1 0 3))) "Some paredit-like features for html-mode" single ((:keywords "convenience"))]) (tabula-rasa . [(20141215 2147) ((emacs (24 4))) "Distraction free writing mode" single ((:url . "https://github.com/idomagal/Tabula-Rasa/blob/master/tabula-rasa.el") (:keywords "distraction free" "writing"))]) (tablist . [(20150618 2218) ((emacs (24 3))) "Extended tabulated-list-mode" tar ((:keywords "extensions" "lisp"))]) (tabbar-ruler . [(20160216 1932) ((tabbar (2 0 1)) (powerline (2 3)) (mode-icons (0 1 0))) "Pretty tabbar, autohide, use both tabbar/ruler" tar ((:url . "http://github.com/mlf176f2/tabbar-ruler.el") (:keywords "tabbar" "ruler mode" "menu" "tool bar."))]) (tabbar . [(20141109 143) nil "Display a tab bar in the header line" tar ((:keywords "convenience"))]) (tab-jump-out . [(20151005 1830) ((dash (2 10)) (emacs (24 4))) "Use tab to jump out of delimiter pairs." single ((:keywords "tab" "editing"))]) (tab-group . [(20140306 650) nil "Grouped tabs and their tabbar" single ((:url . "http://github.com/tarao/tab-group-el") (:keywords "convenience" "tabs"))]) (ta . [(20150604 1024) ((emacs (24 3)) (cl-lib (0 5))) "A tool to deal with Chinese homophonic characters" single ((:url . "http://github.com/kuanyui/ta.el") (:keywords "tools"))]) (systemtap-mode . [(20151122 1140) nil "A mode for SystemTap" single ((:url . "https://github.com/ruediger/systemtap-mode") (:keywords "tools" "languages"))]) (systemd . [(20151231 2334) ((emacs (24 4))) "Major mode for editing systemd units" tar ((:keywords "tools" "unix"))]) (system-specific-settings . [(20140818 757) nil "Apply settings only on certain systems" single ((:url . "https://github.com/DarwinAwardWinner/emacs-system-specific-settings") (:keywords "configuration"))]) (syslog-mode . [(20140217 1618) ((hide-lines (20130623))) "Major-mode for viewing log files" single ((:url . "https://github.com/vapniks/syslog-mode") (:keywords "unix"))]) (syntax-subword . [(20160205 1354) nil "make operations on words more fine-grained" single nil]) (syntactic-sugar . [(20140508 1341) nil "Effect-free forms such as if/then/else" single ((:url . "http://github.com/rolandwalker/syntactic-sugar") (:keywords "extensions"))]) (synosaurus . [(20151119 1049) ((cl-lib (0 5))) "An extensible thesaurus supporting lookup and substitution." tar ((:url . "https://github.com/rootzlevel/synosaurus"))]) (synonyms . [(20151231 1608) nil "Look up synonyms for a word or phrase in a thesaurus." single ((:url . "http://www.emacswiki.org/synonyms.el") (:keywords "text" "dictionary" "thesaurus" "spelling" "apropos" "help"))]) (synonymous . [(20150909 834) ((emacs (24)) (cl-lib (0 5)) (request (0 2 0))) "A thesaurus at your fingertips" single ((:url . "http://github.com/toroidal-code/synonymous.el") (:keywords "utility"))]) (sync-recentf . [(20151005 326) nil "Synchronize the recent files list between Emacs instances" single ((:url . "https://github.com/ffevotte/sync-recentf") (:keywords "recentf"))]) (symon-lingr . [(20150719 642) ((symon (1 1 2)) (cl-lib (0 5))) "A notification-based Lingr client powered by symon.el" single ((:url . "http://hins11.yu-yake.com/"))]) (symon . [(20151118 100) nil "tiny graphical system monitor" single ((:url . "http://hins11.yu-yake.com/"))]) (sx . [(20160125 1601) ((emacs (24 1)) (cl-lib (0 5)) (json (1 3)) (markdown-mode (2 0)) (let-alist (1 0 3))) "StackExchange client. Ask and answer questions on Stack Overflow, Super User, and the likes" tar ((:url . "https://github.com/vermiculus/sx.el/") (:keywords "help" "hypermedia" "tools"))]) (sws-mode . [(20150317 1245) nil "(S)ignificant (W)hite(S)pace mode" single ((:url . "https://github.com/brianc/jade-mode"))]) (swoop . [(20160120 915) ((ht (2 0)) (pcre2el (1 5)) (async (1 1)) (emacs (24))) "Peculiar buffer navigation for Emacs" tar ((:url . "https://github.com/ShingoFukuyama/emacs-swoop") (:keywords "swoop" "inner" "buffer" "search" "navigation"))]) (switch-window . [(20150114 215) nil "A *visual* way to choose a window to switch to" single ((:url . "http://tapoueh.org/emacs/switch-window.html") (:keywords "window" "navigation"))]) (swiper-helm . [(20151116 330) ((emacs (24 1)) (swiper (0 1 0)) (helm (1 5 3))) "Helm version of Swiper." single ((:url . "https://github.com/abo-abo/swiper-helm") (:keywords "matching"))]) (swiper . [(20160215 140) ((emacs (24 1))) "Isearch with an overview. Oh, man!" tar ((:url . "https://github.com/abo-abo/swiper") (:keywords "matching"))]) (swift-mode . [(20160124 236) ((emacs (24 4))) "Major-mode for Apple's Swift programming language." single ((:keywords "languages" "swift"))]) (sweetgreen . [(20151207 916) ((dash (2 12 1)) (helm (1 5 6)) (request (0 2 0)) (cl-lib (0 5))) "Order Salads from sweetgreen.com" single ((:url . "https://www.github.com/CestDiego/sweetgreen.el") (:keywords "salad" "food" "sweetgreen" "request"))]) (swbuff-x . [(20130607 314) ((swbuff (19991231 1800))) "Modifications to David Ponce's swbuff" single ((:url . "http://www.emacswiki.org/elisp/swbuff-x.el") (:keywords "files" "convenience"))]) (swbuff . [(20041012 718) nil "Quick switch between Emacs buffers." single ((:keywords "extensions" "convenience"))]) (swap-buffers . [(20150506 1439) nil "The quickest way to swap buffers between windows. Based on switch-window package." single ((:url . "https://github.com/ekazakov/swap-buffers") (:keywords "window" "swap" "buffer" "exchange"))]) (svg-mode-line-themes . [(20150425 1306) ((xmlgen (0 4))) "SVG-based themes for mode-line" tar ((:url . "https://github.com/sabof/svg-mode-line-themes"))]) (suscolors-theme . [(20160217 1034) nil "Colorful theme, inspired by Gruvbox." single ((:url . "https://github.com/TheSuspiciousWombat/SusColors-emacs"))]) (supergenpass . [(20130328 2248) nil "SuperGenPass for Emacs" single ((:keywords "supergenpass"))]) (super-save . [(20160211 256) ((emacs (24 4))) "Auto-save buffers, based on your activity." single ((:url . "https://github.com/bbatsov/super-save") (:keywords "convenience"))]) (suomalainen-kalenteri . [(20151129 304) nil "Finnish national and Christian holidays for calendar" tar nil]) (sunshine . [(20151013 614) ((cl-lib (0 5))) "Provide weather and forecast information." single ((:url . "https://github.com/aaronbieber/sunshine.el") (:keywords "tools" "weather"))]) (sunny-day-theme . [(20140413 1425) nil "Emacs24 theme with a light background." single ((:url . "http://github.com/mswift42/sunny-day-theme"))]) (summarye . [(20130328 327) nil "list up matched strings from a buffer, and display them in summary buffer" single nil]) (sudo-ext . [(20130130 1351) nil "sudo support" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/sudo-ext.el") (:keywords "unix"))]) (sudden-death . [(20140829 538) nil "Totsuzen-no-Shi" single ((:url . "https://github.com/yewton/sudden-death.el"))]) (subshell-proc . [(20130122 1322) nil "Functions for working with comints" single ((:url . "https://github.com/andrewmains12/subshell-proc"))]) (subr+ . [(20151231 1607) nil "Extensions to standard library `subr.el'." single ((:url . "http://www.emacswiki.org/simple%2b.el") (:keywords "strings" "text"))]) (sublimity . [(20151230 727) nil "smooth-scrolling, minimap and distraction-free mode" tar ((:url . "http://hins11.yu-yake.com/"))]) (sublime-themes . [(20160111 122) nil "A collection of themes based on Sublime Text" tar ((:keywords "faces"))]) (subemacs . [(20160105 359) nil "Evaluating expressions in a fresh Emacs subprocess" single ((:url . "https://github.com/kbauer/subemacs") (:keywords "extensions" "lisp" "multiprocessing"))]) (subatomic256-theme . [(20130620 1910) nil "Fork of subatomic-theme for terminals." single ((:url . "https://github.com/cryon/subatomic256"))]) (subatomic-theme . [(20160126 738) nil "Low contrast bluish color theme" single ((:url . "https://github.com/cryon/subatomic") (:keywords "color-theme" "blue" "low contrast"))]) (stylus-mode . [(20150313 812) ((sws-mode (0))) "Major mode for editing .jade files" single ((:url . "https://github.com/brianc/jade-mode"))]) (stupid-indent-mode . [(20130816 1354) nil "Plain stupid indentation minor mode" single nil]) (stumpwm-mode . [(20140130 1816) nil "special lisp mode for evaluating code into running stumpwm" single ((:keywords "comm" "lisp" "tools"))]) (stripe-buffer . [(20141208 708) ((cl-lib (1 0))) "Use a different background for even and odd lines" single ((:url . "https://github.com/sabof/stripe-buffer"))]) (strings . [(20151231 1607) nil "Miscellaneous string functions." single ((:url . "http://www.emacswiki.org/strings.el") (:keywords "internal" "strings" "text"))]) (string-utils . [(20140508 1341) ((list-utils (0 4 2))) "String-manipulation utilities" single ((:url . "http://github.com/rolandwalker/string-utils") (:keywords "extensions"))]) (string-inflection . [(20150805 256) nil "underscore -> UPCASE -> CamelCase -> lowerCamelCase conversion of names" single ((:keywords "elisp"))]) (string-edit . [(20151213 930) ((dash (1 2 0))) "Avoid escape nightmares by editing string in separate buffer" single nil]) (strie . [(20160211 1422) ((cl-lib (0 5))) "A simple trie data structure implementation" single nil]) (stock-ticker . [(20150204 252) ((s (1 9 0)) (request (0 2 0))) "Show stock prices in mode line" single ((:url . "https://github.com/hagleitn/stock-ticker") (:keywords "comms"))]) (stickyfunc-enhance . [(20150429 1114) ((emacs (24 3))) "An enhancement to stock `semantic-stickyfunc-mode'" single ((:url . "https://github.com/tuhdo/semantic-stickyfunc-enhance") (:keywords "c" "languages" "tools"))]) (sticky . [(20101129 1852) nil "Sticky key for capital letters" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/sticky.el") (:keywords "convenience"))]) (stgit . [(20140213 348) nil "major mode for StGit interaction" single ((:url . "http://www.procode.org/stgit"))]) (stem . [(20131102 409) nil "Routines for stemming" single ((:url . "https://github.com/yuutayamada/stem") (:keywords "stemming"))]) (stekene-theme . [(20141108 1211) ((emacs (24))) "Low-contrast (except for strings) theme, in light and dark versions." tar nil]) (status . [(20151230 608) nil "This package adds support for status icons to Emacs." tar nil]) (state . [(20160108 536) ((emacs (24))) "Quick navigation between workspaces" single ((:url . "https://github.com/thisirs/state.git") (:keywords "convenience" "workspaces"))]) (stash . [(20151117 627) nil "lightweight persistent caching" single ((:url . "https://www.github.com/vermiculus/stash.el/") (:keywords "extensions" "data" "internal" "lisp"))]) (start-menu . [(20160115 2139) ((cl-lib (0 5)) (config-parser (0 1))) "start-menu for executing external program like in windows" single ((:url . "https://github.com/lujun9972/el-start-menu") (:keywords "convenience" "menu"))]) (standoff-mode . [(20150628 1642) nil "Create stand-off markup, also called external markup." tar nil]) (stan-snippets . [(20160116 2247) ((stan-mode (9 0 5)) (yasnippet (0 8 0))) "Yasnippets for Stan" tar ((:url . "http://github.com/stan-dev/stan-mode") (:keywords "snippets"))]) (stan-mode . [(20160116 2247) nil "Major mode for editing Stan files" tar ((:url . "http://github.com/stan-dev/stan-mode") (:keywords "languanges"))]) (stack-mode . [(20150923 823) ((haskell-mode (13 14)) (cl-lib (0 5)) (flycheck (0 23))) "A minor mode enabling various features based on stack-ide." tar ((:url . "https://github.com/commercialhaskell/stack-ide") (:keywords "haskell" "stack"))]) (ssh-tunnels . [(20141219 318) ((cl-lib (0 5)) (emacs (24))) "Manage SSH tunnels" single ((:url . "http://github.com/death/ssh-tunnels") (:keywords "tools" "convenience"))]) (ssh-config-mode . [(20141219 846) nil "Mode for fontification of ~/.ssh/config" single ((:url . "http://www.mahalito.net/~harley/elisp/ssh-config-mode.el") (:keywords "ssh" "config" "emacs"))]) (ssh-agency . [(20160101 1435) ((emacs (24 4)) (dash (2 10 0))) "use ssh-agent on win32 from Emacs" single ((:url . "https://github.com/magit/ssh-agency"))]) (ssh . [(20120904 1342) nil "Support for remote logins using ssh." single ((:keywords "unix" "comm"))]) (srefactor . [(20151202 2004) ((emacs (24 4))) "A refactoring tool based on Semantic parser framework" tar ((:url . "https://github.com/tuhdo/semantic-refactor") (:keywords "c" "languages" "tools"))]) (sr-speedbar . [(20150804 951) nil "Same frame speedbar" single ((:url . "http://www.emacswiki.org/emacs/download/sr-speedbar.el") (:keywords "speedbar" "sr-speedbar.el"))]) (sqlup-mode . [(20151121 630) nil "Upcase SQL words for you" single ((:url . "https://github.com/trevoke/sqlup-mode.el") (:keywords "sql" "tools"))]) (sqlplus . [(20141009 739) nil "User friendly interface to SQL*Plus and support for PL/SQL compilation" single ((:keywords "sql" "sqlplus" "oracle" "plsql"))]) (sqlite . [(20150416 2215) nil "use sqlite via elisp" single nil]) (sql-indent . [(20150424 1716) nil "indentation of SQL statements" single ((:url . "https://github.com/bsvingen/sql-indent") (:keywords "languages"))]) (sproto-mode . [(20151115 1005) nil "Major mode for editing sproto." single ((:keywords "sproto"))]) (sprintly-mode . [(20121005 2234) ((furl (0 0 2))) "Major mode for dealing with sprint.ly" single ((:url . "https://github.com/sprintly/sprintly-mode"))]) (springboard . [(20150505 1011) ((helm (1 6 9))) "Temporarily change default-directory for one command" single ((:url . "https://github.com/jwiegley/springboard") (:keywords "helm"))]) (spray . [(20150625 2345) nil "a speed reading mode" single ((:url . "https://github.com/ian-kelling/spray") (:keywords "convenience"))]) (spotlight . [(20150929 55) ((emacs (24 1)) (swiper (0 6 0)) (counsel (0 6 0))) "search files with Mac OS X spotlight" single ((:url . "http://www.pragmaticemacs.com") (:keywords "search" "external"))]) (spotify . [(20160128 106) ((cl-lib (0 5))) "Control the spotify application from emacs" single ((:url . "https://github.com/remvee/spotify-el") (:keywords "convenience"))]) (splitter . [(20130705 50) nil "Manage window splits" single ((:url . "https://github.com/chumpage/chumpy-windows") (:keywords "frames" "convenience"))]) (splitjoin . [(20150505 732) ((cl-lib (0 5))) "Transition between multiline and single-line code" single ((:url . "https://github.com/syohex/emacs-splitjoin"))]) (sphinx-frontend . [(20151122 212) nil "Launch build process for rst documents via sphinx." single ((:url . "https://github.com/kostafey/sphinx-frontend") (:keywords "compile" "sphinx" "restructuredtext"))]) (sphinx-doc . [(20160116 317) ((s (1 9 0)) (cl-lib (0 5)) (dash (2 10 0))) "Sphinx friendly docstrings for Python functions" single ((:url . "https://github.com/naiquevin/sphinx-doc.el") (:keywords "sphinx" "python"))]) (speed-type . [(20150120 2034) ((cl-lib (0 3))) "Practice touch and speed typing" single ((:url . "https://github.com/hagleitn/speed-type") (:keywords "games"))]) (speechd-el . [(20141025 912) nil "Client to speech synthesizers and Braille displays." tar nil]) (speech-tagger . [(20160103 1512) ((cl-lib (0 5))) "tag parts of speech using coreNLP" tar ((:url . "https://github.com/cosmicexplorer/speech-tagger") (:keywords "speech" "tag" "nlp" "language" "corenlp" "parsing" "natural"))]) (speck . [(20140901 1135) nil "minor mode for spell checking" single ((:keywords "spell" "checking"))]) (sparql-mode . [(20151104 914) ((cl-lib (0 5))) "Edit and interactively evaluate SPARQL queries." tar ((:url . "https://github.com/ljos/sparql-mode"))]) (sparkline . [(20150101 519) ((cl-lib (0 3))) "Make sparkline images from a list of numbers" single ((:keywords "extensions"))]) (spaces . [(20130610 49) nil "Create and switch between named window configurations." single ((:url . "https://github.com/chumpage/chumpy-windows") (:keywords "frames" "convenience"))]) (spacemacs-theme . [(20160121 1243) nil "Color theme with a dark and light versions" tar ((:keywords "color" "theme") (:url . "https://github.com/nashamri/spacemacs-theme"))]) (spaceline . [(20160120 359) ((emacs (24 3)) (cl-lib (0 5)) (powerline (2 3)) (dash (2 11 0)) (s (1 10 0))) "Modeline configuration library for powerline" tar ((:url . "https://github.com/TheBB/spaceline") (:keywords "mode-line" "powerline" "spacemacs"))]) (spacegray-theme . [(20150719 1231) ((emacs (24 1))) "A Hyperminimal UI Theme" single ((:url . "http://github.com/bruce/emacs-spacegray-theme") (:keywords "themes"))]) (sourcetalk . [(20140823 739) ((request (0 2 0))) "SourceTalk (http://sourcetalk.net) plugin for Emacs" single ((:url . "https://github.com/malroc/sourcetalk_emacs") (:keywords "sourcetalk" "code" "discussion"))]) (sourcemap . [(20150418 700) ((cl-lib (0 5)) (emacs (24))) "Sourcemap parser" single ((:url . "https://github.com/syohex/emacs-sourcemap"))]) (sourcekit . [(20151209 514) ((emacs (24 3)) (dash (2 12 1)) (dash-functional (1 2 0))) "Library to interact with sourcekittendaemon" single ((:url . "https://github.com/nathankot/company-sourcekit") (:keywords "tools" "processes"))]) (sourcegraph . [(20150403 1927) ((emacs (24 3))) "Minor mode for srclib" single ((:url . "https://github.com/sourcegraph/emacs-sourcegraph-mode") (:keywords "sourcegraph"))]) (soundklaus . [(20160210 1317) ((dash (2 12 1)) (emacs (24)) (emms (4 0)) (s (1 10 0)) (pkg-info (0 4)) (cl-lib (0 5))) "Play SoundCloud music in Emacs via EMMS" tar ((:url . "https://github.com/r0man/soundklaus.el") (:keywords "soundcloud" "music" "emms"))]) (soundcloud . [(20150501 2026) ((emms (20131016)) (json (1 2)) (deferred (0 3 1)) (string-utils (0 3 2)) (request (20140316 417)) (request-deferred (20130526 1015))) "a SoundCloud client for Emacs" single ((:keywords "soundcloud" "music" "audio"))]) (sound-wav . [(20140303 457) ((deferred (0 3 1)) (cl-lib (0 5))) "Play wav file" single ((:url . "https://github.com/syohex/emacs-sound-wav"))]) (sotlisp . [(20151105 734) ((emacs (24 1))) "Write lisp at the speed of thought." single ((:url . "https://github.com/Malabarba/speed-of-thought-lisp") (:keywords "convenience" "lisp"))]) (sotclojure . [(20160121 1040) ((emacs (24 1)) (clojure-mode (4 0 0)) (cider (0 8)) (sotlisp (1 3))) "Write clojure at the speed of thought." single ((:url . "https://github.com/Malabarba/speed-of-thought-clojure") (:keywords "convenience" "clojure"))]) (sos . [(20141214 2003) ((org (7))) "StackOverflow Search" single ((:url . "https://github.com/omouse/emacs-sos") (:keywords "tools" "search" "questions"))]) (soothe-theme . [(20141027 741) ((emacs (24 1))) "a dark colorful theme for Emacs24." single ((:url . "https://github.com/jasonm23/emacs-soothe-theme"))]) (sonic-pi . [(20150919 330) ((cl-lib (0 5)) (osc (0 1)) (dash (2 2 0)) (emacs (24))) "A Emacs client for SonicPi" tar ((:url . "http://www.github.com/repl-electric/sonic-pi.el") (:keywords "sonicpi" "ruby"))]) (solidity-mode . [(20151124 911) nil "Major mode for ethereum's solidity language" single ((:keywords "languages"))]) (solarized-theme . [(20160106 15) ((cl-lib (0 5)) (dash (2 6 0))) "The Solarized color theme, ported to Emacs." tar nil]) (soft-stone-theme . [(20140614 135) ((emacs (24))) "Emacs 24 theme with a light background." single ((:url . "http://github.com/mswift42/soft-stone-theme"))]) (soft-morning-theme . [(20150918 1341) nil "Emacs24 theme with a light background." single ((:url . "http://github.com/mswift42/soft-morning-theme"))]) (soft-charcoal-theme . [(20140420 943) nil "Dark charcoal theme with soft colors" single ((:url . "http://github.com/mswift42/soft-charcoal-theme"))]) (snippet . [(20130210 1515) nil "Insert snippets of text into a buffer" single nil]) (snapshot-timemachine . [(20150501 1100) ((emacs (24 4)) (cl-lib (0 5))) "Step through (Btrfs, ZFS, ...) snapshots of files" single ((:url . "https://github.com/mrBliss/snapshot-timemachine"))]) (snakemake-mode . [(20160209 1827) ((emacs (24))) "Major mode for editing Snakemake files" tar ((:url . "https://github.com/kyleam/snakemake-mode") (:keywords "tools"))]) (smyx-theme . [(20141127 28) nil "smyx Color Theme" single ((:keywords "color" "theme" "smyx"))]) (smtpmail-multi . [(20130921 2042) nil "Use different smtp servers for sending mail" single ((:url . "https://github.com/vapniks/smtpmail-multi") (:keywords "comm"))]) (smotitah . [(20150218 230) nil "Modular emacs configuration framework" tar nil]) (smooth-scrolling . [(20131219 2039) nil "Make emacs scroll smoothly" single ((:url . "http://github.com/aspiers/smooth-scrolling/") (:keywords "convenience"))]) (smooth-scroll . [(20130321 2114) nil "Minor mode for smooth scrolling and in-place scrolling." single ((:url . "http://www.emacswiki.org/emacs/download/smooth-scroll.el") (:keywords "convenience" "emulations" "frames"))]) (sml-modeline . [(20120110 1240) nil "Show position in a scrollbar like way in mode-line" single ((:url . "http://bazaar.launchpad.net/~nxhtml/nxhtml/main/annotate/head%3A/util/sml-modeline.el"))]) (smex . [(20151212 1409) ((emacs (24))) "M-x interface with Ido-style fuzzy matching." single ((:url . "http://github.com/nonsequitur/smex/") (:keywords "convenience" "usability"))]) (smeargle . [(20151013 2242) ((cl-lib (0 5)) (emacs (24))) "Highlighting region by last updated time" single ((:url . "https://github.com/syohex/emacs-smeargle"))]) (smarty-mode . [(20100703 458) nil "major mode for editing smarty templates" single ((:url . "none yet") (:keywords "smarty" "php" "languages" "templates"))]) (smartwin . [(20151230 111) ((emacs (24 4))) "A minor mode shows shell like buffers." single ((:url . "https://github.com/jerryxgh/smartwin") (:keywords "convenience"))]) (smartscan . [(20131230 739) nil "Jumps between other symbols found at point" single ((:keywords "extensions"))]) (smartrep . [(20150508 1930) nil "Support sequential operation which omitted prefix keys." single ((:url . "https://github.com/myuhe/smartrep.el") (:keywords "convenience"))]) (smartparens . [(20160217 1102) ((cl-lib (0 3)) (dash (2 10 0))) "Automatic insertion, wrapping and paredit-like navigation with user defined pairs." tar nil]) (smart-window . [(20130214 1142) nil "vim-like window controlling plugin" single ((:url . "https://github.com/dryman/smart-window.el") (:keywords "window"))]) (smart-tabs-mode . [(20140331 1629) nil "Intelligently indent with tabs, align with spaces!" single ((:url . "http://www.emacswiki.org/emacs/SmartTabs") (:keywords "languages"))]) (smart-tab . [(20150703 917) nil "Intelligent tab completion and indentation." single ((:url . "http://github.com/genehack/smart-tab/tree/master") (:keywords "extensions"))]) (smart-shift . [(20150202 2325) nil "Smart shift text left/right." single ((:url . "https://github.com/hbin/smart-shift") (:keywords "convenience" "tools"))]) (smart-region . [(20150903 703) ((emacs (24 4)) (expand-region (0 10 0)) (multiple-cursors (1 3 0)) (cl-lib (0 5))) "Smartly select region, rectangle, multi cursors" single ((:url . "https://github.com/uk-ar/smart-region") (:keywords "marking" "region"))]) (smart-newline . [(20131207 1940) nil "Provide smart newline for one keybind." single nil]) (smart-mode-line-powerline-theme . [(20160111 932) ((emacs (24 3)) (powerline (2 2)) (smart-mode-line (2 5))) "smart-mode-line theme that mimics the powerline appearance." tar ((:url . "http://github.com/Bruce-Connor/smart-mode-line") (:keywords "mode-line" "faces" "themes"))]) (smart-mode-line . [(20160125 900) ((emacs (24 3)) (rich-minority (0 1 1))) "A color coded smart mode-line." tar ((:url . "http://github.com/Malabarba/smart-mode-line") (:keywords "mode-line" "faces" "themes"))]) (smart-mark . [(20150911 1910) nil "Restore point after C-g when mark" single ((:keywords "mark" "restore"))]) (smart-indent-rigidly . [(20141205 1615) nil "Smart rigid indenting" single ((:url . "https://github.com/re5et/smart-indent-rigidly") (:keywords "indenting" "coffee-mode" "haml-mode" "sass-mode"))]) (smart-forward . [(20140430 13) ((expand-region (0 8 0))) "Semantic navigation" single ((:keywords "navigation"))]) (smart-cursor-color . [(20141124 919) nil "Change cursor color dynamically" single ((:url . "https://github.com/7696122/smart-cursor-color/") (:keywords "cursor" "color" "face"))]) (smart-compile . [(20150519 947) nil "an interface to `compile'" single ((:keywords "tools" "unix"))]) (sly-repl-ansi-color . [(20160214 18) ((sly (0)) (cl-lib (0 5))) "Add ANSI colors support to the sly mrepl." single ((:url . "https://github.com/PuercoPop/sly-repl-ansi-color") (:keywords "sly"))]) (sly-named-readtables . [(20150817 816) ((sly (1 0 0 -2 2))) "Support named readtables in Common Lisp files" tar ((:url . "https://github.com/capitaomorte/sly-named-readtables") (:keywords "languages" "lisp" "sly"))]) (sly-macrostep . [(20160119 434) ((sly (1 0 0 -2 2)) (macrostep (0 9))) "fancy macro-expansion via macrostep.el" tar ((:url . "https://github.com/capitaomorte/sly-macrostep") (:keywords "languages" "lisp" "sly"))]) (sly-hello-world . [(20160119 636) ((sly (1 0 0 -2 2))) "A template SLY contrib" tar ((:url . "https://github.com/capitaomorte/sly-hello-world") (:keywords "languages" "lisp" "sly"))]) (sly-company . [(20151126 22) ((sly (1 0 0 -3)) (company (0 7)) (emacs (24 3))) "sly completion backend for company mode" single ((:keywords "convenience" "lisp" "abbrev"))]) (sly . [(20160122 224) ((emacs (24 3))) "Sylvester the Cat's Common Lisp IDE" tar ((:url . "https://github.com/capitaomorte/sly") (:keywords "languages" "lisp" "sly"))]) (slovak-holidays . [(20150418 155) nil "Adds a list of slovak holidays to Emacs calendar" single ((:keywords "calendar"))]) (slirm . [(20160201 625) ((emacs (24 4))) "Systematic Literature Review Mode for Emacs." single ((:url . "http://github.com/fbie/slirm"))]) (slime-volleyball . [(20140717 2141) nil "An SVG Slime Volleyball Game" tar ((:keywords "games"))]) (slime-theme . [(20141115 2302) ((emacs (24 0))) "an Emacs 24 theme based on Slime (tmTheme)" single ((:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) (slime-ritz . [(20130218 1537) nil "slime extensions for ritz" single ((:url . "https://github.com/pallet/ritz") (:keywords "languages" "lisp" "slime"))]) (slime-company . [(20151210 614) ((slime (2 13)) (company (0 9 0))) "slime completion backend for company mode" single ((:keywords "convenience" "lisp" "abbrev"))]) (slime-annot . [(20131230 1908) ((slime (0))) "cl-annot support for SLIME" single ((:url . "https://github.com/arielnetworks/cl-annot"))]) (slime . [(20160211 437) ((cl-lib (0 5)) (macrostep (0 9))) "Superior Lisp Interaction Mode for Emacs" tar ((:url . "https://github.com/slime/slime") (:keywords "languages" "lisp" "slime"))]) (slim-mode . [(20140611 950) nil "Major mode for editing Slim files" single ((:url . "http://github.com/slim-template/emacs-slim") (:keywords "markup" "language"))]) (slideview . [(20150324 1540) ((cl-lib (0 3))) "File slideshow" single ((:url . "https://github.com/mhayashi1120/Emacs-slideview") (:keywords "files"))]) (slamhound . [(20140506 1618) nil "Rip Clojure namespaces apart and rebuild them." single ((:url . "https://github.com/technomancy/slamhound") (:keywords "tools" "lisp"))]) (slack . [(20160201 1908) ((websocket (1 5)) (request (0 2 0)) (oauth2 (0 10)) (circe (2 2)) (alert (1 2)) (emojify (0 2))) "Slack client for Emacs" tar nil]) (skype . [(20131001 2118) nil "skype UI for emacs users.." tar ((:keywords "skype" "chat"))]) (skewer-reload-stylesheets . [(20150111 423) ((skewer-mode (1 5 3))) "live-edit CSS stylesheets." tar nil]) (skewer-mode . [(20150914 1304) ((simple-httpd (1 4 0)) (js2-mode (20090723)) (emacs (24))) "live browser JavaScript, CSS, and HTML interaction" tar nil]) (skewer-less . [(20131015 622) ((skewer-mode (1 5 3))) "Skewer support for live LESS stylesheet updates" single ((:keywords "languages" "tools"))]) (skeletor . [(20151220 2054) ((s (1 7 0)) (f (0 14 0)) (dash (2 2 0)) (cl-lib (0 3)) (let-alist (1 0 3)) (emacs (24 1))) "Provides project skeletons for Emacs" tar nil]) (sisyphus . [(20160126 1419) ((emacs (24 4)) (m-buffer (0 14)) (dash (2 12 0))) "Test support functions" tar nil]) (simplezen . [(20130421 300) ((s (1 4 0)) (dash (1 1 0))) "A simple subset of zencoding-mode for Emacs." single nil]) (simplenote2 . [(20150630 716) ((request-deferred (0 2 0))) "Interact with simple-note.appspot.com" single ((:keywords "simplenote"))]) (simplenote . [(20141118 640) nil "Interact with simple-note.appspot.com" single ((:keywords "simplenote"))]) (simpleclip . [(20150804 1010) nil "Simplified access to the system clipboard" single ((:url . "http://github.com/rolandwalker/simpleclip") (:keywords "convenience"))]) (simple-screen . [(20141023 758) nil "Simple screen configuration manager" single ((:url . "https://github.com/wachikun/simple-screen") (:keywords "tools"))]) (simple-rtm . [(20160118 1011) ((rtm (0 1))) "Interactive Emacs mode for Remember The Milk" tar ((:keywords "remember" "the" "milk" "productivity" "todo"))]) (simple-mpc . [(20151227 1034) nil "provides a simple interface to mpc" tar ((:keywords "multimedia" "mpd" "mpc"))]) (simple-httpd . [(20150430 1755) ((cl-lib (0 3))) "pure elisp HTTP server" single ((:url . "https://github.com/skeeto/emacs-http-server"))]) (simple-call-tree . [(20151203 1425) nil "analyze source code based on font-lock text-properties" single ((:url . "http://www.emacswiki.org/emacs/download/simple-call-tree.el") (:keywords "programming"))]) (simple+ . [(20151231 1600) ((strings (0))) "Extensions to standard library `simple.el'." single ((:url . "http://www.emacswiki.org/simple%2b.el") (:keywords "internal" "lisp" "extensions" "abbrev"))]) (simp . [(20150427 932) nil "Simple project definition, chiefly for file finding, and grepping" tar ((:url . "https://github.com/re5et/simp") (:keywords "project" "grep" "find"))]) (signature . [(20140730 1249) nil "Signature Survey" tar nil]) (sift . [(20160107 215) nil "Front-end for sift, a fast and powerful grep alternative" single ((:url . "https://github.com/nlamirault/sift.el") (:keywords "sift" "ack" "pt" "ag" "grep" "search"))]) (sicp . [(20151130 757) nil "Structure and Interpretation of Computer Programs in info format" tar ((:url . "https://mitpress.mit.edu/sicp"))]) (sibilant-mode . [(20151119 1345) nil "Support for the Sibilant programming language" single ((:url . "http://sibilantjs.info") (:keywords "languages"))]) (shut-up . [(20150423 522) ((cl-lib (0 3)) (emacs (24))) "Shut up would you!" single ((:url . "http://github.com/rejeep/shut-up.el"))]) (shrink-whitespace . [(20150916 1215) nil "Whitespace removal DWIM key" single ((:url . "https://github.com/jcpetkovich/shrink-whitespace.el") (:keywords "editing"))]) (shpec-mode . [(20150530 222) nil "Minor mode for shpec specification" single ((:url . "http://github.com/shpec/shpec-mode") (:keywords "languages" "tools"))]) (showtip . [(20080329 1959) nil "Show tip at cursor" single ((:keywords "help"))]) (showkey . [(20151231 1559) nil "Show keys as you use them." single ((:url . "http://www.emacswiki.org/showkey.el") (:keywords "help" "keys" "mouse"))]) (show-marks . [(20130805 749) ((fm (1 0))) "Navigate and visualize the mark-ring" single ((:url . "https://github.com/vapniks/mark") (:keywords "convenience"))]) (show-css . [(20160210 608) ((doom (1 3)) (s (1 10 0))) "Show the css of the html attribute the cursor is on" tar ((:url . "https://github.com/smmcg/showcss-mode") (:keywords "hypermedia"))]) (shoulda . [(20140616 1133) ((cl-lib (0 5))) "Shoulda test support for ruby" single ((:keywords "ruby" "tests" "shoulda"))]) (shm . [(20160211 1154) nil "Structured Haskell Mode" tar ((:keywords "development" "haskell" "structured"))]) (shimbun . [(20120718 2038) nil "interfacing with web newspapers" tar ((:keywords "news"))]) (shift-text . [(20130831 955) ((cl-lib (1 0)) (es-lib (0 3))) "Move the region in 4 directions, in a way similar to Eclipse's" single ((:url . "https://github.com/sabof/shift-text"))]) (shelltest-mode . [(20141227 248) nil "Major mode for shelltestrunner" single ((:url . "https://github.com/rtrn/shelltest-mode") (:keywords "languages"))]) (shelldoc . [(20151114 1925) ((cl-lib (0 3)) (s (1 9 0))) "shell command editing support with man page." single ((:url . "http://github.com/mhayashi1120/Emacs-shelldoc") (:keywords "applications"))]) (shell-toggle . [(20150226 611) nil "Toggle to and from the shell buffer" single ((:url . "https://github.com/knu/shell-toggle.el") (:keywords "processes"))]) (shell-switcher . [(20160111 2335) ((emacs (24))) "Provide fast switching between shell buffers." tar nil]) (shell-split-string . [(20151224 208) nil "Split strings using shell-like syntax" single ((:url . "https://github.com/10sr/shell-split-string-el") (:keywords "utility" "library" "shell" "string"))]) (shell-pop . [(20160208 148) ((emacs (24))) "helps you to use shell easily on Emacs. Only one key action to work." single ((:url . "http://github.com/kyagi/shell-pop-el") (:keywords "shell" "terminal" "tools"))]) (shell-history . [(20100504 150) nil "integration with shell history" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/shell-history.el") (:keywords "processes" "convenience"))]) (shell-here . [(20150728 1004) nil "Open a shell relative to the working directory" single ((:keywords "unix" "tools" "processes"))]) (shell-current-directory . [(20140101 1554) nil "create new shell based on buffer directory" single ((:keywords "shell" "comint"))]) (shell-command . [(20090621 632) nil "enables tab-completion for `shell-command'" single ((:keywords "shell"))]) (shampoo . [(20131230 219) nil "A remote Smalltalk development mode" tar nil]) (shakespeare-mode . [(20150708 712) nil "A major mode for editing Shakespearean templates." single ((:url . "http://github.com/CodyReichert/shakespeare-mode") (:keywords "shakespeare" "hamlet" "lucius" "julius" "mode"))]) (shader-mode . [(20151030 704) ((emacs (24))) "Major mode for shader" single ((:url . "https://github.com/midnightSuyama/shader-mode"))]) (shadchen . [(20141102 1039) nil "pattern matching for elisp" single nil]) (shackle . [(20160102 1501) ((cl-lib (0 5))) "Enforce rules for popups" single ((:url . "https://github.com/wasamasa/shackle") (:keywords "convenience"))]) (sexp-move . [(20150915 1030) nil "Improved S-Expression Movement" single ((:url . "https://gitlab.com/elzair/sexp-move") (:keywords "sexp"))]) (seti-theme . [(20150314 122) nil "A dark colored theme, inspired by Seti Atom Theme" single ((:url . "https://github.com/caisah/seti-theme") (:keywords "themes"))]) (session . [(20120510 1700) nil "use variables, registers and buffer places across sessions" single ((:url . "http://emacs-session.sourceforge.net/") (:keywords "session" "session management" "desktop" "data" "tools"))]) (serverspec . [(20150623 455) ((dash (2 6 0)) (s (1 9 0)) (f (0 16 2)) (helm (1 6 1))) "Serverspec minor mode" tar ((:url . "http://101000lab.org"))]) (servant . [(20140216 419) ((s (1 8 0)) (dash (2 2 0)) (f (0 11 0)) (ansi (0 3 0)) (commander (0 5 0)) (epl (0 2)) (shut-up (0 2 1)) (web-server (0 0 1))) "ELPA server written in Emacs Lisp" tar ((:url . "http://github.com/rejeep/servant.el") (:keywords "elpa" "server"))]) (sequential-command . [(20151207 1403) nil "Many commands into one command" tar ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/sequential-command.el") (:keywords "convenience" "lisp"))]) (sequences . [(20130908 1122) ((emacs (24))) "Ports of some Clojure sequence functions." single ((:keywords "convenience"))]) (seoul256-theme . [(20150714 1535) nil "No description available." single nil]) (sentence-navigation . [(20150914 2146) ((ample-regexps (0 1)) (emacs (24 4))) "Commands to navigate one-spaced sentences." single ((:url . "https://github.com/noctuid/emacs-sentence-navigation") (:keywords "sentence" "evil"))]) (sentence-highlight . [(20121026 750) nil "highlight the current sentence" single ((:keywords "plain text" "writing" "highlight" "editing" "focus"))]) (sensitive . [(20131015 635) ((emacs (24)) (sequences (0 1 0))) "A dead simple way to load sensitive information" single ((:keywords "convenience"))]) (semi . [(20160211 55) ((flim (1 14 9))) "A library to provide MIME features." tar nil]) (selectric-mode . [(20151201 718) nil "IBM Selectric mode for Emacs" tar ((:keywords "multimedia" "convenience" "typewriter" "selectric"))]) (sekka . [(20150708 459) ((cl-lib (0 3)) (concurrent (0 3 1)) (popup (0 5 2))) "A client for Sekka IME server" single ((:url . "https://github.com/kiyoka/sekka") (:keywords "ime" "skk" "japanese"))]) (seethru . [(20150218 1029) ((shadchen (1 4))) "Easily change Emacs' transparency" single ((:url . "http://github.com/benaiah/seethru") (:keywords "lisp" "tools" "alpha" "transparency"))]) (seeing-is-believing . [(20151010 1029) nil "minor mode for running the seeing-is-believing ruby gem" single nil]) (second-sel . [(20151231 1553) nil "Secondary selection commands" single ((:url . "http://www.emacswiki.org/second-sel.el") (:keywords "region" "selection" "yank" "paste" "edit"))]) (seclusion-mode . [(20121118 1553) nil "Edit in seclusion. A Dark Room mode." single ((:url . "http://github.com/dleslie/seclusion-mode"))]) (searchq . [(20150829 511) ((emacs (24 3))) "Framework of queued search tasks using GREP, ACK, AG and more." tar nil]) (search-web . [(20150312 403) nil "Post web search queries using `browse-url'." single nil]) (scss-mode . [(20150107 1400) nil "Major mode for editing SCSS files" single ((:url . "https://github.com/antonj/scss-mode") (:keywords "scss" "css" "mode"))]) (screenshot . [(20120509 405) nil "Take a screenshot in Emacs" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/screenshot.el") (:keywords "images" "hypermedia"))]) (scratches . [(20151005 2116) ((dash (2 11 0)) (f (0 17 0))) "Multiple scratches in any language" single ((:keywords "scratch"))]) (scratch-pop . [(20150820 139) ((popwin (0 7 0 -3))) "Generate, popup (& optionally backup) scratch buffer(s)." single ((:url . "http://hins11.yu-yake.com/"))]) (scratch-palette . [(20150225 42) ((popwin (0 7 0 -3))) "make scratch buffer for each files" single ((:url . "http://hins11.yu-yake.com/"))]) (scratch-log . [(20141114 2343) nil "Utility for *scratch* buffer." single nil]) (scratch-ext . [(20140103 2116) nil "Extensions for *scratch*" single ((:url . "https://github.com/kyanagi/scratch-ext-el"))]) (scratch . [(20120830 1028) nil "Mode-specific scratch buffers" tar ((:keywords "editing"))]) (scpaste . [(20151208 1735) ((htmlize (1 39))) "Paste to the web via scp." single ((:url . "https://github.com/technomancy/scpaste") (:keywords "convenience" "hypermedia"))]) (sclang-snippets . [(20130513 51) ((yasnippet (0 8 0))) "Snippets for the SuperCollider Emacs mode" tar ((:keywords "snippets"))]) (sclang-extensions . [(20131117 1439) ((auto-complete (1 4 0)) (s (1 3 1)) (dash (1 2 0)) (emacs (24 1))) "Extensions for the SuperCollider Emacs mode." tar ((:keywords "sclang" "supercollider" "languages" "tools"))]) (scion . [(20130315 555) nil "Haskell Minor Mode for Interacting with the Scion Library" single ((:url . "https://code.google.com/p/scion-lib/"))]) (scheme-here . [(20141028 18) nil "cmuscheme extension for multiple inferior processes" single ((:url . "https://github.com/kaihaosw/scheme-here") (:keywords "scheme"))]) (scheme-complete . [(20130220 403) nil "Smart tab completion for Scheme in Emacs" single nil]) (scf-mode . [(20151121 1848) nil "shorten file-names in compilation type buffers" single ((:url . "https://github.com/lewang/scf-mode") (:keywords "compilation"))]) (scala-outline-popup . [(20150702 937) ((dash (2 9 0)) (popup (0 5 3)) (scala-mode2 (0 22)) (flx-ido (0 5))) "scala file summary popup" single ((:url . "https://github.com/ancane/scala-outline-popup.el") (:keywords "scala" "structure" "summary"))]) (scala-mode2 . [(20151226 1048) nil "Major mode for editing Scala >= 2.9" tar nil]) (scala-mode . [(20141205 1251) nil "Major mode for editing Scala code." tar ((:keywords "scala" "languages" "oop"))]) (scad-preview . [(20160206 536) ((scad-mode (91 0))) "Preview SCAD models in real-time within Emacs" single ((:url . "http://hins11.yu-yake.com/"))]) (scad-mode . [(20160205 1043) nil "A major mode for editing OpenSCAD code" single ((:url . "https://raw.github.com/openscad/openscad/master/contrib/scad-mode.el") (:keywords "languages"))]) (sbt-mode . [(20160217 534) ((scala-mode2 (0 22))) "Major mode for sbt >= 0.12 with scala >= 2.9" tar nil]) (savekill . [(20140417 1934) nil "Save kill ring to disk" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/savekill.el") (:keywords "tools"))]) (save-visited-files . [(20151021 1043) nil "save opened files across sessions" single ((:url . "http://github.com/nflath/save-visited-files"))]) (save-load-path . [(20131228 1152) nil "save load-path and reuse it to test" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/save-load-path.el") (:keywords "lisp"))]) (sauron . [(20160101 224) nil "Track (erc/org/dbus/...) events and react to them." tar nil]) (sass-mode . [(20150508 2012) ((haml-mode (3 0 15)) (cl-lib (0 5))) "Major mode for editing Sass files" single ((:url . "http://github.com/nex3/haml/tree/master") (:keywords "markup" "language" "css"))]) (sane-term . [(20150917 1602) ((emacs (24 1))) "Multi Term is crazy. This is not." single ((:url . "http://github.com/adamrt/sane-term"))]) (salt-mode . [(20150904 1113) ((yaml-mode (0 0 12)) (mmm-mode (0 5 4)) (mmm-jinja2 (0 0 1))) "Major mode for Salt States" single ((:url . "https://github.com/beardedprojamz/salt-mode") (:keywords "languages"))]) (sage-shell-mode . [(20151024 113) ((cl-lib (0 5)) (deferred (0 3 1))) "A front-end for Sage Math" tar ((:url . "https://github.com/stakemori/sage-shell-mode") (:keywords "sage" "math"))]) (sackspace . [(20130719 256) nil "A better backspace" single ((:url . "http://github.com/cofi/sackspace.el") (:keywords "delete" "convenience"))]) (s-buffer . [(20130605 1424) ((s (1 6 0)) (noflet (0 0 3))) "s operations for buffers" single ((:url . "http://github.com/nicferrier/emacs-s-buffer") (:keywords "lisp"))]) (s . [(20160115 58) nil "The long lost Emacs string manipulation library." single ((:keywords "strings"))]) (rvm . [(20150402 742) nil "Emacs integration for rvm" single ((:url . "http://www.emacswiki.org/emacs/RvmEl") (:keywords "ruby" "rvm"))]) (rustfmt . [(20160217 542) ((emacs (24))) "Format rust code using rustfmt" single ((:url . "https://github.com/fbergroth/emacs-rustfmt") (:keywords "convenience"))]) (rust-mode . [(20160216 1734) nil "A major emacs mode for editing Rust source code" single ((:url . "https://github.com/rust-lang/rust-mode") (:keywords "languages"))]) (runtests . [(20150807 131) nil "Run unit tests from Emacs" single ((:url . "https://github.com/sunesimonsen/emacs-runtests") (:keywords "test"))]) (runner . [(20151118 216) nil "Improved \"open with\" suggestions for dired" single ((:url . "https://github.com/thamer/runner") (:keywords "shell command" "dired" "file extension" "open with"))]) (ruby-tools . [(20151209 815) nil "Collection of handy functions for ruby-mode." tar nil]) (ruby-test-mode . [(20151127 18) ((ruby-mode (1 0))) "Minor mode for Behaviour and Test Driven" single ((:keywords "ruby" "unit" "test" "rspec"))]) (ruby-refactor . [(20160214 850) ((ruby-mode (1 2))) "A minor mode which presents various Ruby refactoring helpers." single ((:url . "https://github.com/ajvargo/ruby-refactor") (:keywords "refactor" "ruby"))]) (ruby-interpolation . [(20131112 852) nil "Ruby string interpolation helpers" single ((:url . "http://github.com/leoc/ruby-interpolation.el"))]) (ruby-hash-syntax . [(20141010 839) nil "Toggle ruby hash syntax between classic and 1.9 styles" single ((:url . "https://github.com/purcell/ruby-hash-syntax") (:keywords "languages"))]) (ruby-guard . [(20160131 1752) nil "Launching guard directly inside emacs." single ((:url . "https://github.com/cheunghy/ruby-guard") (:keywords "ruby" "guard" "rails"))]) (ruby-factory . [(20160101 2321) ((inflections (1 1))) "Minor mode for Ruby test object generation libraries" tar ((:url . "http://github.com/sshaw/ruby-factory-mode") (:keywords "ruby" "rails" "convenience"))]) (ruby-end . [(20141215 423) nil "Automatic insertion of end blocks for Ruby" single ((:url . "http://github.com/rejeep/ruby-end") (:keywords "speed" "convenience" "ruby"))]) (ruby-electric . [(20150424 752) nil "Minor mode for electrically editing ruby code" single ((:url . "https://github.com/knu/ruby-electric.el") (:keywords "languages" "ruby"))]) (ruby-dev . [(20130811 151) nil "Interactive developement environment for Ruby." tar nil]) (ruby-compilation . [(20150708 2340) ((inf-ruby (2 2 1))) "run a ruby process in a compilation buffer" single ((:url . "https://github.com/eschulte/rinari") (:keywords "test" "convenience"))]) (ruby-block . [(20131210 1931) nil "highlight matching block" single ((:keywords "languages" "faces" "ruby"))]) (ruby-additional . [(20091002 345) ((emacs (24 3)) (ruby-mode (1 2))) "ruby-mode extensions yet to be merged into Emacs" tar ((:url . "http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/misc/") (:keywords "ruby" "languages"))]) (rubocop . [(20151123 2137) ((dash (1 0 0)) (emacs (24))) "An Emacs interface for RuboCop" single ((:url . "https://github.com/bbatsov/rubocop-emacs") (:keywords "project" "convenience"))]) (rtm . [(20160116 927) ((cl-lib (1 0))) "An elisp implementation of the Remember The Milk API" single ((:url . "https://github.com/pmiddend/emacs-rtm") (:keywords "remember" "the" "milk" "productivity" "todo"))]) (rtags . [(20160213 546) nil "A front-end for rtags" tar ((:url . "http://rtags.net"))]) (rspec-mode . [(20160124 1407) ((ruby-mode (1 0)) (cl-lib (0 4))) "Enhance ruby-mode for RSpec" tar ((:url . "http://github.com/pezra/rspec-mode") (:keywords "rspec" "ruby"))]) (rsense . [(20100510 2105) nil "RSense client for Emacs" single ((:keywords "convenience"))]) (rpn-calc . [(20150302 534) ((popup (0 4))) "quick RPN calculator for hackers" single ((:url . "http://hins11.yu-yake.com/"))]) (rpm-spec-mode . [(20150411 855) nil "RPM spec file editing commands for Emacs/XEmacs" single ((:keywords "unix" "languages"))]) (roy-mode . [(20121208 358) nil "Roy major mode" single ((:url . "https://github.com/folone/roy-mode") (:keywords "extensions"))]) (rotate . [(20160214 2318) nil "Rotate the layout of emacs" single ((:url . "https://github.com/daic-h/emacs-rotate") (:keywords "window" "layout"))]) (rope-read-mode . [(20160208 1510) nil "Rearrange lines to read text smoothly" single ((:url . "https://github.com/marcowahl/rope-read-mode") (:keywords "reading" "convenience" "chill"))]) (roguel-ike . [(20160119 1902) ((popup (0 5 0))) "A coffee-break roguelike" tar nil]) (robe . [(20160121 1551) ((inf-ruby (2 3 0))) "Code navigation, documentation lookup and completion for Ruby" tar ((:url . "https://github.com/dgutov/robe") (:keywords "ruby" "convenience" "rails"))]) (rnc-mode . [(20121227 1502) nil "A major mode for editing RELAX NG Compact syntax." single nil]) (rings . [(20140102 1536) nil "Buffer rings. Like tabs, but better." single ((:url . "http://github.com/konr/rings") (:keywords "utilities" "productivity"))]) (rinari . [(20150708 2340) ((ruby-mode (1 0)) (inf-ruby (2 2 5)) (ruby-compilation (0 16)) (jump (2 0))) "Rinari Is Not A Rails IDE" single ((:url . "https://github.com/eschulte/rinari") (:keywords "ruby" "rails" "project" "convenience" "web"))]) (rigid-tabs . [(20150807 856) ((emacs (24 3))) "Rigidify and adjust the visual alignment of TABs" single ((:url . "https://github.com/wavexx/rigid-tabs.el") (:keywords "diff" "whitespace" "version control" "magit"))]) (rich-minority . [(20151201 400) ((cl-lib (0 5))) "Clean-up and Beautify the list of minor-modes." single ((:url . "https://github.com/Malabarba/rich-minority") (:keywords "mode-line" "faces"))]) (rhtml-mode . [(20130422 611) nil "major mode for editing RHTML files" tar nil]) (rfringe . [(20110405 820) nil "display the relative location of the region, in the fringe." single ((:url . "http://www.emacswiki.org/emacs/rfringe.el") (:keywords "fringe" "bitmap"))]) (reykjavik-theme . [(20160109 0) ((emacs (24))) "Theme with a dark background." single nil]) (revive . [(20150417 1555) nil "Resume Emacs" single nil]) (review-mode . [(20150110 612) nil "major mode for ReVIEW" single ((:url . "https://github.com/kmuto/review-el"))]) (reverse-theme . [(20141204 1745) nil "Reverse theme for Emacs" single ((:url . "https://github.com/syohex/emacs-reverse-theme"))]) (reveal-next . [(20151231 1550) nil "Progressively reveal text after the cursor." single ((:url . "http://www.emacswiki.org/reveal-next.el") (:keywords "hide" "show" "invisible" "learning"))]) (reveal-in-osx-finder . [(20150802 957) nil "Reveal file associated with buffer in OS X Finder" single ((:url . "https://github.com/kaz-yos/reveal-in-osx-finder") (:keywords "os x" "finder"))]) (restclient . [(20151128 1512) nil "An interactive HTTP client for Emacs" single ((:keywords "http"))]) (restart-emacs . [(20151203 835) nil "Restart emacs from within emacs" single ((:url . "https://github.com/iqbalansari/restart-emacs") (:keywords "convenience"))]) (resize-window . [(20151126 2029) ((emacs (24))) "easily resize windows" single ((:url . "https://github.com/dpsutton/resize-mode") (:keywords "window" "resize"))]) (requirejs-mode . [(20130215 1304) nil "Improved AMD module management" single ((:keywords "javascript" "amd" "requirejs"))]) (requirejs . [(20151203 2319) ((js2-mode (20150713)) (popup (0 5 3)) (s (1 9 0)) (cl-lib (0 5)) (yasnippet (20151011 1823))) "Requirejs import manipulation and source traversal." tar ((:url . "https://github.com/joeheyming/requirejs-emacs") (:keywords "javascript" "requirejs"))]) (request-deferred . [(20130526 1015) ((deferred (0 3 1)) (request (0 2 0))) "Wrap request.el by deferred" single nil]) (request . [(20160108 33) ((cl-lib (0 5))) "Compatible layer for URL request in Emacs" single nil]) (req-package . [(20151220 54) ((use-package (1 0)) (dash (2 7 0)) (log4e (0 2 0)) (ht (0))) "A use-package wrapper for package runtime dependencies management" tar ((:url . "https://github.com/edvorg/req-package") (:keywords "dotemacs" "startup" "speed" "config" "package"))]) (repo . [(20160114 1114) ((emacs (24 3))) "Running repo from Emacs" single ((:url . "https://github.com/canatella/repo-el") (:keywords "convenience"))]) (replace-symbol . [(20151030 1657) nil "Rename symbols in expressions or buffers" single ((:url . "https://github.com/bmastenbrook/replace-symbol-el"))]) (replace-pairs . [(20160207 451) ((emacs (24 4))) "Query-replace pairs of things" single ((:url . "https://github.com/davidshepherd7/replace-pairs"))]) (replace-from-region . [(20150406 1730) nil "Replace commands whose query is from region" single ((:url . "http://www.emacswiki.org/emacs/download/replace-from-region.el") (:keywords "replace" "search" "region"))]) (replace+ . [(20151231 1549) nil "Extensions to `replace.el'." single ((:url . "http://www.emacswiki.org/replace%2b.el") (:keywords "matching" "help" "internal" "tools" "local"))]) (repl-toggle . [(20160119 421) ((fullframe (0 0 5))) "Switch to/from repl buffer for current major-mode" single ((:keywords "repl" "buffers" "toggle"))]) (repeatable-motion . [(20150629 1112) ((emacs (24))) "Make repeatable versions of motions" tar ((:url . "https://github.com/willghatch/emacs-repeatable-motion") (:keywords "motion" "repeatable"))]) (remark-mode . [(20151004 955) ((markdown-mode (2 0))) "Major mode for the remark slideshow tool" tar ((:keywords "remark" "slideshow" "markdown"))]) (relax . [(20131029 1434) ((json (1 2))) "For browsing and interacting with CouchDB" single ((:url . "http://github.com/technomancy/relax.el") (:keywords "database" "http"))]) (relative-line-numbers . [(20151006 1446) ((emacs (24))) "Display relative line numbers on the margin" single ((:url . "https://github.com/Fanael/relative-line-numbers"))]) (relative-buffers . [(20150115 1101) ((cl-lib (0 5)) (dash (2 6 0)) (s (1 9 0)) (f (0 16 2))) "Emacs buffers naming convention" single ((:url . "https://github.com/proofit404/relative-buffers"))]) (register-channel . [(20150513 2059) nil "Jump around fast using registers" single ((:keywords "convenience"))]) (region-state . [(20151128 238) nil "Show the number of chars/lines or rows/columns in the region" single ((:url . "https://github.com/xuchunyang/region-state.el") (:keywords "convenience"))]) (region-bindings-mode . [(20140407 1514) nil "Enable custom bindings when mark is active." single ((:url . "https://github.com/fgallina/region-bindings-mode") (:keywords "convenience"))]) (regex-tool . [(20131104 1434) nil "A regular expression evaluation tool for programmers" single ((:url . "http://www.newartisans.com/") (:keywords "regex" "languages" "programming" "development"))]) (regex-dsl . [(20100124 228) nil "lisp syntax for regexps" single nil]) (refheap . [(20140902 1402) ((json (1 2))) "A library for pasting to https://refheap.com" single ((:url . "https://github.com/Raynes/refheap.el"))]) (redshank . [(20120510 1230) nil "No description available." tar nil]) (redpen-paragraph . [(20151206 741) ((emacs (24)) (cl-lib (0 5))) "RedPen interface." single ((:url . "https://github.com/karronoli/redpen-paragraph.el") (:keywords "document" "proofreading" "help"))]) (redo+ . [(20131117 351) nil "Redo/undo system for Emacs" single ((:keywords "lisp" "extensions"))]) (redis . [(20150531 1248) ((emacs (24)) (cl-lib (0 5))) "Redis integration" single ((:url . "https://github.com/emacs-pe/redis.el") (:keywords "convenience"))]) (recursive-narrow . [(20140902 1027) nil "narrow-to-region that operates recursively" single ((:url . "http://github.com/nflath/recursive-narrow"))]) (rectangle-utils . [(20150528 1228) ((emacs (24)) (cl-lib (0 5))) "Some useful rectangle functions." single ((:url . "https://github.com/thierryvolpiatto/rectangle-utils"))]) (rect+ . [(20150620 1744) nil "Extensions to rect.el" single ((:url . "https://github.com/mhayashi1120/Emacs-rectplus") (:keywords "extensions" "data" "tools"))]) (recover-buffers . [(20150812 5) nil "revisit all buffers from an auto-save file" tar nil]) (recompile-on-save . [(20151126 646) ((dash (1 1 0)) (cl-lib (0 5))) "Trigger recompilation on file save." single ((:url . "https://github.com/maio/recompile-on-save.el") (:keywords "convenience" "files" "processes" "tools"))]) (recentf-ext . [(20130130 1350) nil "Recentf extensions" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/recentf-ext.el") (:keywords "convenience" "files"))]) (rebox2 . [(20121113 500) nil "Handling of comment boxes in various styles." single ((:url . "https://github.com/lewang/rebox2"))]) (realgud . [(20160214 1626) ((load-relative (1 0)) (list-utils (0 4 2)) (loc-changes (1 1)) (test-simple (1 0))) "A modular front-end for interacting with external debuggers" tar ((:url . "http://github.com/rocky/emacs-dbgr"))]) (real-auto-save . [(20150701 815) nil "Automatically save your all your buffers/files at regular intervals." single nil]) (readline-complete . [(20150708 737) nil "offers completions in shell mode" single nil]) (readability . [(20140715 1727) ((oauth (1 4)) (ov (1 0)) (emacs (24 3))) "Read articles from Readability in Emacs" single ((:url . "https://github.com/ShingoFukuyama/emacs-readability") (:keywords "readability" "oauth"))]) (react-snippets . [(20151104 1540) ((yasnippet (0 7 0))) "Yasnippets for React" tar nil]) (rdp . [(20120928 1854) nil "Recursive Descent Parser library" single ((:url . "https://github.com/skeeto/rdp"))]) (rdf-prefix . [(20151205 616) nil "Prefix lookup for RDF" single ((:keywords "convenience" "abbrev"))]) (rcirc-styles . [(20160206 1850) ((cl-lib (0 5))) "support mIRC-style color and attribute codes" single nil]) (rcirc-notify . [(20150219 1404) nil "libnotify popups" single ((:keywords "lisp" "rcirc" "irc" "notify" "growl"))]) (rcirc-groups . [(20160115 431) nil "an emacs buffer in rcirc-groups major mode" single ((:url . "http://tapoueh.org/emacs/rcirc-groups.html") (:keywords "comm" "convenience"))]) (rcirc-color . [(20151130 758) nil "color nicks" single ((:keywords "comm"))]) (rcirc-alertify . [(20140406 1819) ((alert (20140406 1353))) "Cross platform notifications for rcirc" single ((:keywords "comm" "convenience"))]) (rcirc-alert . [(20141127 247) nil "Configurable alert messages on top of RCIRC" tar ((:keywords "lisp" "rcirc" "irc" "alert" "awesome"))]) (rbt . [(20160129 1051) nil "No description available." single nil]) (rbenv . [(20141119 2349) nil "Emacs integration for rbenv" single ((:url . "https://github.com/senny/rbenv.el") (:keywords "ruby" "rbenv"))]) (rase . [(20120928 1345) nil "Run At Sun Event daemon" single ((:url . "https://github.com/m00natic/rase/") (:keywords "solar" "sunrise" "sunset" "midday" "midnight"))]) (ranger . [(20160203 501) ((emacs (24 4))) "Make dired more like ranger" single ((:url . "https://github.com/ralesi/ranger") (:keywords "files" "convenience"))]) (random-splash-image . [(20151002 1830) nil "Randomly sets splash image to *GNU Emacs* buffer on startup." single ((:url . "https://github.com/kakakaya/random-splash-image") (:keywords "games"))]) (rand-theme . [(20151219 1535) ((cl-lib (0 5))) "Random Emacs theme at start-up!" single ((:url . "https://github.com/gopar/rand-theme"))]) (rake . [(20150831 158) ((f (0 13 0)) (dash (1 5 0)) (cl-lib (0 5))) "Run rake commands" single ((:url . "https://github.com/asok/rake.el") (:keywords "rake" "ruby"))]) (rainbow-identifiers . [(20141102 726) ((emacs (24))) "Highlight identifiers according to their names" single ((:url . "https://github.com/Fanael/rainbow-identifiers"))]) (rainbow-delimiters . [(20150320 17) nil "Highlight brackets according to their depth" single ((:url . "https://github.com/Fanael/rainbow-delimiters") (:keywords "faces" "convenience" "lisp" "tools"))]) (rainbow-blocks . [(20140306 1033) nil "Block syntax highlighting for lisp code" single ((:url . "https://github.com/istib/rainbow-blocks"))]) (railscasts-theme . [(20150219 725) nil "Railscasts color theme for GNU Emacs." single ((:url . "https://github.com/mikenichols/railscasts-theme") (:keywords "railscasts" "color" "theme"))]) (rails-new . [(20141221 49) nil "Handy emacs command for generating rails application." single ((:url . "https://github.com/cheunghy/rails-new") (:keywords "rails" "ruby"))]) (rails-log-mode . [(20140407 2125) nil "Major mode for viewing Rails log files" single ((:keywords "rails" "log"))]) (railgun . [(20121016 2257) nil "No description available." single nil]) (racket-mode . [(20160213 904) ((emacs (24 3)) (faceup (0 0 2)) (s (1 9 0))) "Major mode for Racket language." tar ((:url . "https://github.com/greghendershott/racket-mode"))]) (racer . [(20160120 1229) ((emacs (24 3)) (rust-mode (0 2 0)) (dash (2 11 0)) (s (1 10 0))) "Rust completion and code navigation via racer" single ((:url . "https://github.com/racer-rust/emacs-racer") (:keywords "abbrev" "convenience" "matching" "rust" "tools"))]) (r-autoyas . [(20140101 710) ((ess (0)) (yasnippet (0 8 0))) "Provides automatically created yasnippets for R function argument lists." tar ((:url . "https://github.com/mlf176f2/r-autoyas.el") (:keywords "r" "yasnippet"))]) (quickrun . [(20160216 616) ((emacs (24)) (cl-lib (0 5))) "Run commands quickly" single ((:url . "https://github.com/syohex/emacs-quickrun"))]) (quickref . [(20130113 1500) ((dash (1 0 3)) (s (1 0 0))) "Display relevant notes-to-self in the echo area" single ((:url . "https://github.com/pd/quickref.el"))]) (quick-preview . [(20150828 2139) nil "quick preview using GNOME sushi, gloobus or quick look" single ((:url . "https://github.com/myuhe/quick-preview.el") (:keywords "files" "hypermedia"))]) (quick-buffer-switch . [(20151007 1508) nil "Quick switch to file or dir buffers." single ((:keywords "emacs" "configuration"))]) (quelpa-use-package . [(20150805 328) ((emacs (24 3)) (quelpa (0)) (use-package (2))) "quelpa handler for use-package" single ((:url . "https://github.com/quelpa/quelpa-use-package") (:keywords "package" "management" "elpa" "use-package"))]) (quelpa . [(20160208 28) ((package-build (0)) (emacs (24 3))) "Emacs Lisp packages built directly from source" tar ((:url . "https://github.com/quelpa/quelpa") (:keywords "package" "management" "build" "source" "elpa"))]) (quasi-monochrome-theme . [(20150801 1325) nil "High contrast quasi monochrome color theme" single ((:url . "https://github.com/lbolla/emacs-quasi-monochrome") (:keywords "color-theme" "monochrome" "high contrast"))]) (quack . [(20130126 1623) nil "No description available." single nil]) (qml-mode . [(20160108 704) nil "Major mode for editing QT Declarative (QML) code." single ((:url . "https://github.com/coldnew/qml-mode") (:keywords "qml" "qt" "qt declarative"))]) (qiita . [(20140118 44) ((helm (1 5 9)) (markdown-mode (2 0))) "Qiita API Library for emacs" single ((:url . "https://github.com/gongo/qiita-el") (:keywords "qiita"))]) (pyvenv . [(20160108 28) nil "Python virtual environment interface" single ((:url . "http://github.com/jorgenschaefer/pyvenv") (:keywords "python" "virtualenv" "tools"))]) (pythonic . [(20160213 1326) ((emacs (24)) (cl-lib (0 5)) (dash (2 11)) (s (1 9)) (f (0 17 2))) "Utility functions for writing pythonic emacs package." single ((:url . "https://github.com/proofit404/pythonic"))]) (python3-info . [(20151116 2231) nil "Python 3 info manual for Emacs" tar nil]) (python-x . [(20151229 948) ((python (0 24)) (folding (0)) (cl-lib (0 5))) "python.el extras for interactive evaluation" tar ((:keywords "python" "eval" "folding") (:url . "https://github.com/wavexx/python-x.el") (:author . "Yuri D'Elia "))]) (python-mode . [(20160217 508) nil "Python major mode" tar nil]) (python-info . [(20151228 1052) nil "Python info manual for Emacs" tar nil]) (python-environment . [(20150310 153) ((deferred (0 3 1))) "virtualenv API for Emacs Lisp" tar ((:keywords "applications" "tools"))]) (python-docstring . [(20160210 1559) nil "Smart Python docstring formatting" tar nil]) (python-django . [(20150821 2104) nil "A Jazzy package for managing Django projects" single ((:url . "https://github.com/fgallina/python-django.el") (:keywords "languages"))]) (python-cell . [(20131029 1616) nil "Support for MATLAB-like cells in python mode" single ((:keywords "python" "matlab" "cell"))]) (pytest . [(20151104 2125) ((s (1 9 0))) "Easy Python test running in Emacs" single ((:url . "https://github.com/ionrock/pytest-el") (:keywords "pytest" "python" "testing"))]) (pylint . [(20160114 141) nil "minor mode for running `pylint'" single ((:keywords "languages" "python"))]) (pyimpsort . [(20160129 2053) ((emacs (24 3))) "Sort python imports." tar ((:url . "https://github.com/emacs-pe/pyimpsort.el") (:keywords "convenience"))]) (pyfmt . [(20150521 1356) nil "Emacs interface to pyfmt" single ((:url . "https://github.com/aheaume/pyfmt.el") (:keywords "tools"))]) (pyenv-mode-auto . [(20160122 2341) ((pyenv-mode (0 1 0)) (s (1 11 0)) (f (0 17 0))) "Automatically activates pyenv version if .python-version file exists." single ((:url . "https://github.com/ssbb/pyenv-mode-auto") (:keywords "python" "pyenv"))]) (pyenv-mode . [(20151105 241) ((pythonic (0 1 0))) "Integrate pyenv with python-mode" single ((:url . "https://github.com/proofit404/pyenv-mode"))]) (pydoc-info . [(20110301 34) nil "Better Python support for info-lookup-symbol." tar nil]) (pydoc . [(20150525 1845) nil "functional, syntax highlighted pydoc navigation" single ((:url . "https://github.com/statmobile/pydoc") (:keywords "pydoc" "python"))]) (pycarddavel . [(20150831 516) ((helm (1 7 0)) (emacs (24 0))) "Integrate pycarddav" single ((:keywords "helm" "pyccarddav" "carddav" "message" "mu4e" "contacts"))]) (py-yapf . [(20160101 412) nil "Use yapf to beautify a Python buffer" single ((:url . "https://github.com/paetzke/py-yapf.el"))]) (py-test . [(20151116 2222) ((dash (2 9 0)) (f (0 17)) (emacs (24 4))) "A test runner for Python code." single ((:url . "https://github.com/Bogdanp/py-test.el") (:keywords "python" "testing" "py.test"))]) (py-smart-operator . [(20150824 1910) ((s (1 9 0))) "smart-operator for python-mode" single ((:keywords "python" "convenience" "smart-operator"))]) (py-isort . [(20150422 839) nil "Use isort to sort the imports in a Python buffer" single ((:url . "http://paetzke.me/project/py-isort.el"))]) (py-import-check . [(20130802 411) nil "Finds the unused python imports using importchecker" single ((:url . "https://github.com/psibi/emacs-py-import-check") (:keywords "python" "import" "check"))]) (py-gnitset . [(20140224 2010) nil "Run your Python tests any way you'd like" single ((:url . "https://www.github.com/quodlibetor/py-gnitset"))]) (py-autopep8 . [(20151231 614) nil "Use autopep8 to beautify a Python buffer" single ((:url . "http://paetzke.me/project/py-autopep8.el"))]) (px . [(20141006 548) nil "preview inline latex in any mode" single ((:url . "http://github.com/aaptel/preview-latex"))]) (pushbullet . [(20140809 532) ((grapnel (0 5 2)) (json (1 2))) "Emacs client for the PushBullet Android app" single ((:url . "http://www.github.com/theanalyst/revolver") (:keywords "convenience"))]) (purty-mode . [(20131004 1559) nil "Safely pretty-print greek letters, mathematical symbols, or anything else." single nil]) (purple-haze-theme . [(20141014 1929) ((emacs (24 0))) "an overtly purple color theme for Emacs24." single ((:url . "https://github.com/jasonm23/emacs-purple-haze-theme"))]) (purescript-mode . [(20150316 1828) nil "A PureScript editing mode" tar nil]) (puppet-mode . [(20150730 1208) ((emacs (24 1)) (pkg-info (0 4))) "Major mode for Puppet manifests" single ((:url . "https://github.com/lunaryorn/puppet-mode") (:keywords "languages"))]) (pungi . [(20150222 446) ((jedi (0 2 0 -3 2)) (pyvenv (1 5))) "Integrates jedi with virtualenv and buildout python environments" single ((:keywords "convenience"))]) (punctuality-logger . [(20141120 1231) nil "Punctuality logger for Emacs" single ((:url . "https://gitlab.com/elzair/punctuality-logger") (:keywords "reminder" "calendar"))]) (puml-mode . [(20151212 823) nil "Major mode for PlantUML" single ((:keywords "uml" "plantuml" "ascii"))]) (pt . [(20160119 817) nil "A front-end for pt, The Platinum Searcher." single ((:url . "https://github.com/bling/pt.el") (:keywords "pt" "ack" "ag" "grep" "search"))]) (psysh . [(20160123 758) nil "PsySH, PHP interactive shell (REPL)" single ((:keywords "process" "php"))]) (psvn . [(20151103 1042) nil "Subversion interface for emacs" single nil]) (psession . [(20151114 1106) ((emacs (24)) (cl-lib (0 5))) "Persistent save of elisp objects." single ((:url . "https://github.com/thierryvolpiatto/psession"))]) (psci . [(20150328 1201) ((purescript-mode (13 10)) (dash (2 9 0)) (s (1 9 0)) (f (0 17 1)) (deferred (0 3 2))) "Major mode for purescript repl psci" tar ((:url . "https://github.com/ardumont/emacs-psci") (:keywords "purescript" "psci" "repl" "major" "mode"))]) (psc-ide . [(20160203 1532) ((dash (2 11 0)) (company (0 8 7)) (cl-lib (0 5)) (s (1 10 0))) "Minor mode for PureScript's psc-ide tool." tar ((:url . "https://github.com/epost/psc-ide-emacs") (:keywords "languages"))]) (protobuf-mode . [(20150521 2011) nil "major mode for editing protocol buffers." single ((:keywords "google" "protobuf" "languages"))]) (prosjekt . [(20151127 616) ((dash (2 8 0))) "a software project tool for emacs" tar ((:url . "https://github.com/abingham/prosjekt"))]) (propfont-mixed . [(20150113 1411) ((emacs (24)) (cl-lib (0 5))) "Use proportional fonts with space-based indentation." single ((:url . "https://github.com/ikirill/propfont-mixed") (:keywords "faces"))]) (prop-menu . [(20150728 418) ((emacs (24 3)) (cl-lib (0 5))) "Create and display a context menu based on text and overlay properties" single ((:url . "https://github.com/david-christiansen/prop-menu-el") (:keywords "convenience"))]) (prompt-text . [(20160106 609) nil "Various information in minibuffer prompt" single ((:url . "https://github.com/10sr/prompt-text-el") (:keywords "utility" "minibuffer"))]) (projmake-mode . [(20150619 1420) ((dash (20150611 922)) (indicators (20130217 1405))) "Project oriented automatic builder and error highlighter, flymake for projects" tar nil]) (projekt . [(20150324 148) ((emacs (24))) "some kind of staging for CVS" single nil]) (projector . [(20151201 1241) ((alert (1 1)) (projectile (0 11 0)) (cl-lib (0 5))) "Lightweight library for managing project-aware shell and command buffers" single ((:url . "https://github.com/waymondo/projector"))]) (projectile-speedbar . [(20150629 1153) ((projectile (0 11 0))) "projectile integration for speedbar" single ((:url . "https://github.com/anshulverma/projectile-speedbar") (:keywords "project" "convenience" "speedbar" "projectile"))]) (projectile-sift . [(20160107 215) ((sift (0 2 0)) (projectile (0 13 0))) "Run a sift with Projectile" single ((:url . "https://github.com/nlamirault/sift.el") (:keywords "sift" "projectile"))]) (projectile-rails . [(20160211 1440) ((emacs (24 3)) (projectile (0 12 0)) (inflections (1 1)) (inf-ruby (2 2 6)) (f (0 13 0)) (rake (0 3 2))) "Minor mode for Rails projects based on projectile-mode" single ((:url . "https://github.com/asok/projectile-rails") (:keywords "rails" "projectile"))]) (projectile-codesearch . [(20151228 20) ((codesearch (20141019 625)) (projectile (20150405 126))) "Integration of codesearch into projectile" single ((:url . "https://github.com/abingham/codesearch.el") (:keywords "tools" "development" "search"))]) (projectile . [(20160210 905) ((dash (2 11 0)) (pkg-info (0 4))) "Manage and navigate projects in Emacs easily" single ((:url . "https://github.com/bbatsov/projectile") (:keywords "project" "convenience"))]) (project-root . [(20110206 1230) nil "Define a project root and take actions based upon it." single nil]) (project-persist-drawer . [(20151108 422) ((project-persist (0 3))) "Use a project drawer with project-persist." tar nil]) (project-persist . [(20150519 1324) nil "A minor mode to allow loading and saving of project settings." tar nil]) (project-local-variables . [(20080502 952) nil "Set project-local variables from a file." single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/ProjectLocalVariables") (:keywords "project" "convenience"))]) (project-explorer . [(20150503 1714) ((cl-lib (0 3)) (es-lib (0 3)) (es-windows (0 1)) (emacs (24))) "A project explorer sidebar" single ((:url . "https://github.com/sabof/project-explorer"))]) (programmer-dvorak . [(20150426 1837) nil "Input method for Programmer Dvorak." single ((:url . "https://github.com/yangchenyun/programmer-dvorak") (:keywords "dvorak" "programmer-dvorak" "input-method"))]) (prognth . [(20130920 1059) nil "Extend prog1 to arbitrary index" single ((:keywords "lisp"))]) (professional-theme . [(20150315 400) nil "Emacs port of Vim's professional theme" single ((:url . "https://github.com/juanjux/emacs-professional-theme") (:keywords "theme" "light" "professional"))]) (prodigy . [(20141109 252) ((s (1 8 0)) (dash (2 4 0)) (f (0 14 0)) (emacs (24))) "Manage external services from within Emacs" single ((:url . "http://github.com/rejeep/prodigy.el"))]) (processing-snippets . [(20140426 728) ((yasnippet (0 8 0))) "Snippets for processing-mode" tar nil]) (processing-mode . [(20150217 432) nil "Major mode for Processing 2.0" single ((:url . "https://github.com/ptrv/processing2-emacs") (:keywords "languages" "snippets"))]) (proc-net . [(20130321 1712) nil "network process tools" single ((:url . "http://github.com/nicferrier/emacs-procnet") (:keywords "processes"))]) (private-diary . [(20151216 857) ((emacs (24 0))) "maintain a private diary in Emacs" single ((:url . "https://github.com/cacology/private-diary") (:keywords "diary" "encryption"))]) (private . [(20150121 1757) ((aes (0 6))) "take care of your private configuration files." single ((:url . "https://github.com/cheunghy/private") (:keywords "private" "configuration" "backup" "recover"))]) (pretty-symbols . [(20140814 259) nil "Draw tokens as Unicode glyphs." single ((:url . "http://github.com/drothlis/pretty-symbols") (:keywords "faces"))]) (pretty-sha-path . [(20141105 1026) nil "Prettify Guix/Nix store paths" single ((:url . "https://gitorious.org/alezost-emacs/pretty-sha-path") (:keywords "faces" "convenience"))]) (pretty-mode . [(20141207 1152) nil "Redisplay parts of the buffer as pretty symbols." single ((:url . "https://github.com/akatov/pretty-mode") (:keywords "pretty" "unicode" "symbols"))]) (pretty-lambdada . [(20151231 1548) nil "Show the word `lambda' as the Greek letter." single ((:url . "http://www.emacswiki.org/pretty-lambdada.el") (:keywords "convenience" "display"))]) (preseed-generic-mode . [(20150119 1241) nil "Debian preseed file major mode" single ((:url . "https://github.com/suntong001/preseed-generic-mode"))]) (preproc-font-lock . [(20151107 1218) nil "Highlight C-style preprocessor directives." single ((:url . "https://github.com/Lindydancer/preproc-font-lock") (:keywords "c" "languages" "faces"))]) (ppd-sr-speedbar . [(20151108 424) ((sr-speedbar (20140914 2339)) (project-persist-drawer (0 0 4))) "Sr Speedbar adaptor for project-persist-drawer." tar nil]) (pp-c-l . [(20151231 1547) nil "Display Control-l characters in a pretty way" single ((:url . "http://www.emacswiki.org/pp-c-l.el") (:keywords "display" "convenience" "faces"))]) (pp+ . [(20151231 1546) nil "Extensions to `pp.el'." single ((:url . "http://www.emacswiki.org/pp%2b.el") (:keywords "lisp"))]) (powershell . [(20160210 1858) ((emacs (24))) "Mode for editing Powershell scripts" single ((:url . "http://github.com/jschaf/powershell.el") (:keywords "powershell" "languages"))]) (powerline-evil . [(20151112 710) ((evil (1 0 8)) (powerline (2 3))) "Utilities for better Evil support for Powerline" tar ((:url . "http://github.com/raugturi/powerline-evil/") (:keywords "evil" "mode-line" "powerline"))]) (powerline . [(20151008 1449) ((cl-lib (0 2))) "Rewrite of Powerline" tar ((:url . "http://github.com/milkypostman/powerline/") (:keywords "mode-line"))]) (pow . [(20140420 106) ((emacs (24)) (cl-lib (0 5))) "pow (http://pow.cx/) manager for emacs" tar ((:url . "http://github.com/yukihr/emacs-pow") (:keywords "develop" "web" "pow"))]) (pov-mode . [(20120825 716) nil "Major mode for editing POV-Ray scene files." tar nil]) (pos-tip . [(20150318 813) nil "Show tooltip at point" single ((:keywords "tooltip"))]) (portage-navi . [(20141208 555) ((concurrent (0 3 1)) (ctable (0 1 2))) "portage viewer" single ((:url . "https://github.com/kiwanami/emacs-portage-navi") (:keywords "tools" "gentoo"))]) (popwin . [(20150315 600) nil "Popup Window Manager." single ((:keywords "convenience"))]) (popup-switcher . [(20160123 1400) ((cl-lib (0 3)) (popup (0 5 3))) "switch to other buffers and files via popup." single ((:url . "https://github.com/kostafey/popup-switcher") (:keywords "popup" "switch" "buffers" "functions"))]) (popup-kill-ring . [(20131020 1154) ((popup (0 4)) (pos-tip (0 4))) "interactively insert item from kill-ring" single ((:url . "https://github.com/waymondo/popup-kill-ring") (:keywords "popup" "kill-ring" "pos-tip"))]) (popup-imenu . [(20160214 904) ((dash (2 12 1)) (popup (0 5 3)) (flx-ido (0 6 1))) "imenu index popup" single ((:url . "https://github.com/ancane/popup-imenu") (:keywords "popup" "imenu"))]) (popup-complete . [(20141108 1908) ((popup (0 5 0))) "completion with popup" single ((:url . "https://github.com/syohex/emacs-popup-complete"))]) (popup . [(20151222 1339) ((cl-lib (0 5))) "Visual Popup User Interface" single ((:keywords "lisp"))]) (poporg . [(20150603 1847) nil "Pop a comment or string to an empty buffer for text editing" single ((:url . "https://github.com/QBobWatson/poporg") (:keywords "outlines" "tools"))]) (pophint . [(20150930 1034) ((popup (0 5 0)) (log4e (0 2 0)) (yaxception (0 1))) "Provide navigation using pop-up tips, like Firefox's Vimperator Hint Mode" tar ((:url . "https://github.com/aki2o/emacs-pophint") (:keywords "popup"))]) (ponylang-mode . [(20160123 1437) ((dash (2 10 0))) "Language mode for Pony" single ((:url . "https://github.com/seantallen/ponylang-mode") (:keywords "programming"))]) (pony-snippets . [(20160204 2011) ((yasnippet (0 8 0))) "Yasnippets for Pony" tar ((:url . "https://github.com/seantallen/pony-snippets") (:keywords "snippets" "pony"))]) (pony-mode . [(20151028 302) nil "Minor mode for working with Django Projects" tar nil]) (pomodoro . [(20150716 1046) nil "A timer for the Pomodoro Technique" single nil]) (polymode . [(20160217 1228) ((emacs (24))) "Versatile multiple modes with extensive literate programming support" tar ((:url . "https://github.com/vitoshka/polymode"))]) (pointback . [(20100210 752) nil "Restore window points when returning to buffers" single ((:keywords "convenience"))]) (point-undo . [(20100504 129) nil "undo/redo position" single nil]) (point-stack . [(20140102 1223) nil "A forward/back stack for point" single nil]) (pmdm . [(20151109 1036) nil "poor man's desktop-mode alternative." single ((:url . "https://bitbucket.com/inigoserna/pmdm.el"))]) (plsql . [(20121115 243) nil "Programming support for PL/SQL code" single ((:url . "http://www.emacswiki.org/elisp/plsql.el") (:keywords "languages"))]) (plsense-direx . [(20140520 1308) ((direx (0 1 -3)) (plsense (0 3 2)) (log4e (0 2 0)) (yaxception (0 3 2))) "Perl Package Explorer" single ((:url . "https://github.com/aki2o/plsense-direx") (:keywords "perl" "convenience"))]) (plsense . [(20151104 645) ((auto-complete (1 4 0)) (log4e (0 2 0)) (yaxception (0 2 0))) "provide interface for PlSense that is a development tool for Perl." single ((:url . "https://github.com/aki2o/emacs-plsense") (:keywords "perl" "completion"))]) (plim-mode . [(20140812 1713) nil "Major mode for editing Plim files" single ((:url . "http://github.com/dongweiming/plim-mode") (:keywords "markup" "language"))]) (plenv . [(20130706 2316) nil "A plenv wrapper for Emacs" single ((:keywords "emacs" "perl"))]) (platformio-mode . [(20160109 2035) ((projectile (0 13 0))) "PlatformIO integration" single ((:url . "https://github.com/zachmassia/platformio-mode"))]) (plantuml-mode . [(20131031 1632) ((auto-complete (1 4))) "Major mode for plantuml" single ((:url . "https://github.com/wildsoul/plantuml-mode") (:keywords "uml" "ascii"))]) (planet-theme . [(20150627 751) ((emacs (24))) "A dark theme inspired by Gmail's 'Planets' theme of yore" single ((:url . "https://github.com/cmack/emacs-planet-theme") (:keywords "themes"))]) (plan9-theme . [(20160111 1923) nil "A color theme for Emacs based on Plan9" single ((:url . "https://github.com/john2x/plan9-theme.el"))]) (pkgbuild-mode . [(20151010 736) nil "Interface to the ArchLinux package manager" single nil]) (pkg-info . [(20150517 443) ((epl (0 8))) "Information about packages" single ((:url . "https://github.com/lunaryorn/pkg-info.el") (:keywords "convenience"))]) (pixiv-novel-mode . [(20150109 2254) nil "Major mode for pixiv novel" single ((:keywords "novel" "pixiv"))]) (pixie-mode . [(20150121 2124) ((clojure-mode (3 0 1)) (inf-clojure (1 0 0))) "Major mode for Pixie-lang" single ((:url . "https://github.com/johnwalker/pixie-mode"))]) (pivotal-tracker . [(20151203 1150) nil "Interact with Pivotal Tracker through its API" single ((:url . "http://github.com/jxa/pivotal-tracker"))]) (pip-requirements . [(20160131 926) ((dash (2 8 0))) "A major mode for editing pip requirements files." single nil]) (pinyin-search . [(20150719 1755) nil "Search Chinese by Pinyin" single ((:url . "https://github.com/xuchunyang/pinyin-search.el") (:keywords "chinese" "search"))]) (pinot . [(20140211 1226) nil "Emacs interface to pinot-search" tar nil]) (pinboard-api . [(20140324 448) nil "Rudimentary http://pinboard.in integration" single ((:url . "https://github.com/danieroux/pinboard-api-el") (:keywords "pinboard" "www"))]) (pillar . [(20141112 1011) ((makey (0 3))) "Major mode for editing Pillar files" tar ((:url . "http://github.com/DamienCassou/pillar-mode") (:keywords "markup" "major-mode"))]) (pig-snippets . [(20130912 2324) ((yasnippet (0 8 0))) "Snippets for pig-mode" tar nil]) (pig-mode . [(20140617 1058) nil "Major mode for Pig files" single nil]) (picolisp-mode . [(20150516 155) nil "Major mode for PicoLisp programming." single ((:url . "https://github.com/flexibeast/picolisp-mode") (:keywords "picolisp" "lisp" "programming"))]) (pianobar . [(20120128 1301) nil "thin wrapper for Pianobar, a Pandora Radio client" single ((:url . "http://github.com/agrif/pianobar.el"))]) (phpunit . [(20151009 254) ((s (1 9 0)) (f (0 16 0)) (pkg-info (0 5))) "Launch PHP unit tests using phpunit" single ((:url . "https://github.com/nlamirault/phpunit.el") (:keywords "php" "tests" "phpunit"))]) (phpcbf . [(20150302 528) ((s (1 9 0))) "Format PHP code in Emacs using PHP_CodeSniffer's phpcbf" single ((:url . "https://github.com/nishimaki10/emacs-phpcbf") (:keywords "tools" "php"))]) (php-refactor-mode . [(20140920 1411) nil "Minor mode to quickly and safely perform common refactorings" single ((:url . "https://github.com/keelerm84/php-refactor-mode.el") (:keywords "php" "refactor"))]) (php-mode . [(20151002 2030) nil "Major mode for editing PHP code" tar ((:url . "https://github.com/ejmr/php-mode"))]) (php-eldoc . [(20140202 1141) nil "eldoc backend for php" tar ((:url . "https://github.com/sabof/php-eldoc"))]) (php-boris-minor-mode . [(20140209 1035) ((php-boris (0 0 1)) (highlight (0))) "a minor mode to evaluate PHP code in the Boris repl" single ((:url . "https://github.com/steckerhalter/php-boris-minor-mode") (:keywords "php" "repl" "eval"))]) (php-boris . [(20130527 121) nil "Run boris php REPL" single ((:keywords "php" "commint" "repl" "boris"))]) (php-auto-yasnippets . [(20141128 1411) ((php-mode (1 11)) (yasnippet (0 8 0))) "Creates snippets for PHP functions" tar ((:url . "https://github.com/ejmr/php-auto-yasnippets"))]) (php+-mode . [(20121129 1252) nil "A better PHP mode with Zend Framework 1 support." tar nil]) (phoenix-dark-pink-theme . [(20150406 2002) nil "Port of the Sublime Text 2 theme of the same name" single ((:url . "http://github.com/j0ni/phoenix-dark-pink"))]) (phoenix-dark-mono-theme . [(20130306 1215) nil "Monochromatic version of the Phoenix theme" single ((:url . "http://github.com/j0ni/phoenix-dark-mono"))]) (phi-search-migemo . [(20150116 506) ((phi-search (2 2 0)) (migemo (1 9 1))) "migemo extension for phi-search" single ((:url . "http://hins11.yu-yake.com/"))]) (phi-search-mc . [(20150217 2255) ((phi-search (2 0 0)) (multiple-cursors (1 2 1))) "multiple-cursors extension for phi-search" single ((:url . "https://github.com/knu/phi-search-mc.el") (:keywords "search" "cursors"))]) (phi-search-dired . [(20150405 14) ((phi-search (2 2 0))) "interactive filtering for dired powered by phi-search" single ((:url . "http://hins11.yu-yake.com/"))]) (phi-search . [(20150807 112) nil "another incremental search & replace, compatible with \"multiple-cursors\"" tar ((:url . "http://hins11.yu-yake.com/"))]) (phi-rectangle . [(20151207 2254) nil "another rectangle-mark command (rewrite of rect-mark)" single ((:url . "http://hins11.yu-yake.com/"))]) (phi-grep . [(20150212 724) ((cl-lib (0 1))) "Interactively-editable recursive grep implementation in elisp" single ((:url . "http://hins11.yu-yake.com/"))]) (phi-autopair . [(20150527 223) ((paredit (20))) "another simple-minded autopair implementation" single ((:url . "http://hins11.yu-yake.com/"))]) (phabricator . [(20151115 107) ((emacs (24 4)) (dash (1 0)) (projectile (0 13 0)) (s (1 10 0)) (f (0 17 2))) "Phabricator/Arcanist helpers for Emacs." single ((:url . "https://github.com/ajtulloch/phabricator.el") (:keywords "phabricator" "arcanist" "diffusion"))]) (ph . [(20130312 1137) ((emacs (24 3))) "A global minor mode for managing multiple projects." tar nil]) (pgdevenv . [(20150105 1436) nil "Manage your PostgreSQL development envs" tar ((:keywords "emacs" "postgresql" "development" "environment" "shell" "debug" "gdb"))]) (pg . [(20130731 1442) nil "Emacs Lisp interface to the PostgreSQL RDBMS" single ((:keywords "data" "comm" "database" "postgresql"))]) (perspective . [(20151211 1454) ((cl-lib (0 5))) "switch between named \"perspectives\" of the editor" single ((:url . "http://github.com/nex3/perspective-el") (:keywords "workspace" "convenience" "frames"))]) (persp-projectile . [(20151220 430) ((perspective (1 9)) (projectile (0 11 0)) (cl-lib (0 3))) "Perspective integration with Projectile" single ((:keywords "project" "convenience"))]) (persp-mode . [(20160216 325) nil "\"perspectives\" shared among frames + save/load - bugs." single ((:url . "https://github.com/Bad-ptr/persp-mode.el") (:keywords "perspectives" "session" "workspace" "persistence" "windows" "buffers" "convenience"))]) (persistent-soft . [(20150223 1053) ((pcache (0 3 1)) (list-utils (0 4 2))) "Persistent storage, returning nil on failure" single ((:url . "http://github.com/rolandwalker/persistent-soft") (:keywords "data" "extensions"))]) (persistent-scratch . [(20160112 139) ((emacs (24))) "Preserve the scratch buffer across Emacs sessions" single ((:url . "https://github.com/Fanael/persistent-scratch"))]) (perlbrew . [(20130127 324) nil "A perlbrew wrapper for Emacs" single ((:keywords "emacs" "perl"))]) (perl6-mode . [(20160117 1109) ((emacs (24 4)) (pkg-info (0 1))) "Major mode for editing Perl 6 code" tar ((:url . "https://github.com/hinrik/perl6-mode") (:keywords "languages"))]) (perl-completion . [(20090527 2336) nil "No description available." single nil]) (per-buffer-theme . [(20151013 1012) ((cl-lib (0 5))) "Change theme according to buffer name or major mode." single ((:url . "https://bitbucket.com/inigoserna/per-buffer-theme.el") (:keywords "themes"))]) (peg . [(20150707 2341) nil "Parsing Expression Grammars in Emacs Lisp" single nil]) (peep-dired . [(20150518 700) nil "Peep at files in another window from dired buffers" single ((:keywords "files" "convenience"))]) (peek-mode . [(20130620 1246) ((elnode (0 9 8 1))) "Serve buffers live over HTTP with elnode backend" tar ((:url . "https://github.com/erikriverson/peek-mode"))]) (peacock-theme . [(20141115 2302) ((emacs (24 0))) "an Emacs 24 theme based on Peacock (tmTheme)" single ((:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) (pdf-tools . [(20160203 1057) ((emacs (24 3)) (tablist (0 70)) (let-alist (1 0 4))) "Support library for PDF documents." tar ((:keywords "files" "multimedia"))]) (pdb-mode . [(20150128 951) nil "Major mode for editing Protein Data Bank files" single ((:url . "http://bondxray.org/software/pdb-mode/") (:keywords "data" "pdb"))]) (pcsv . [(20150220 331) nil "Parser of csv" single ((:url . "https://github.com/mhayashi1120/Emacs-pcsv/raw/master/pcsv.el") (:keywords "data"))]) (pcre2el . [(20151213 234) ((emacs (24)) (cl-lib (0 3))) "regexp syntax converter" single ((:url . "https://github.com/joddie/pcre2el"))]) (pcomplete-extension . [(20140604 947) ((emacs (24)) (cl-lib (0 5))) "additional completion for pcomplete" single ((:url . "https://github.com/thierryvolpiatto/pcomplete-extension"))]) (pcmpl-pip . [(20141024 148) nil "pcomplete for pip" single ((:keywords "pcomplete" "pip" "python" "tools"))]) (pcmpl-homebrew . [(20150506 1852) nil "pcomplete for homebrew" single ((:keywords "pcomplete" "homebrew" "tools"))]) (pcmpl-git . [(20160110 2255) nil "pcomplete for git" tar ((:keywords "tools"))]) (pcmpl-args . [(20120911 2224) nil "Enhanced shell command completion" single ((:url . "https://github.com/JonWaltman/pcmpl-args.el") (:keywords "abbrev" "completion" "convenience" "processes" "terminals" "unix"))]) (pcache . [(20151109 639) ((eieio (1 3))) "persistent caching for Emacs." single nil]) (pc-bufsw . [(20150923 13) nil "PC style quick buffer switcher" single ((:url . "https://github.com/ibukanov/pc-bufsw") (:keywords "buffer"))]) (pbcopy . [(20150224 2059) nil "Emacs Interface to pbcopy" single ((:url . "https://github.com/jkp/pbcopy.el") (:keywords "mac" "osx" "pbcopy"))]) (paxedit . [(20160102 1821) ((cl-lib (0 5)) (paredit (23))) "Structured, Context Driven LISP Editing and Refactoring" single ((:url . "https://github.com/promethial/paxedit") (:keywords "lisp" "refactoring" "context"))]) (path-headerline-mode . [(20140423 632) nil "Displaying file path on headerline." single ((:url . "https://github.com/7696122/path-headerline-mode") (:keywords "headerline"))]) (pastels-on-dark-theme . [(20120304 1022) nil "Pastels on Dark theme for Emacs 24" single ((:url . "http://gist.github.com/1906662") (:keywords "theme" "color"))]) (pastelmac-theme . [(20151030 1936) ((emacs (24 1))) "a soothing theme with a pastel color palette" single ((:url . "https://github.com/bmastenbrook/pastelmac-theme-el") (:keywords "themes"))]) (pastehub . [(20140614 2320) nil "A client for the PasteHub cloud service" single ((:url . "https://github.com/kiyoka/pastehub"))]) (pastebin . [(20101125 1155) nil "A simple interface to the www.pastebin.com webservice" single nil]) (password-vault . [(20160126 1020) ((cl-lib (0 2)) (emacs (24))) "A Password manager for Emacs." single ((:url . "http://github.com/PuercoPop/password-vault") (:keywords "password" "productivity"))]) (password-store . [(20151027 1449) ((f (0 11 0)) (s (1 9 0))) "Password store (pass) support" single ((:keywords "pass"))]) (password-generator . [(20150222 1240) nil "Password generator for humans. Good, Bad, Phonetic passwords included." single ((:url . "http://github.com/zargener/emacs-password-genarator"))]) (passthword . [(20141201 123) ((cl-lib (0 5))) "Simple password manager" single nil]) (pass . [(20160214 235) ((emacs (24)) (password-store (0 1)) (f (0 17))) "Major mode for password-store.el" single ((:keywords "password-store" "password" "keychain"))]) (parsebib . [(20151006 232) ((emacs (24 3))) "A library for parsing bib files" single ((:keywords "text" "bibtex"))]) (parse-csv . [(20140203 116) nil "Parse strings with CSV fields into s-expressions" single ((:url . "https://github.com/mrc/el-csv") (:keywords "csv"))]) (parent-mode . [(20150824 1600) nil "get major mode's parent modes" single ((:url . "https://github.com/Fanael/parent-mode"))]) (paren-face . [(20151105 1906) nil "a face for parentheses in lisp modes" single ((:url . "http://github.com/tarsius/paren-face"))]) (paren-completer . [(20150711 1523) ((emacs (24 3))) "Automatically, language agnostically, fill in delimiters." single ((:url . "https://github.com/MatthewBregg/paren-completer") (:keywords "convenience"))]) (paredit-menu . [(20160128 933) ((paredit (25))) "Adds a menu to paredit.el as memory aid" single ((:keywords "paredit"))]) (paredit-everywhere . [(20150821 2144) ((paredit (22))) "Enable some paredit features in non-lisp buffers" single ((:keywords "languages" "convenience"))]) (paredit . [(20150217 713) nil "minor mode for editing parentheses" single ((:keywords "lisp"))]) (paradox . [(20160119 1827) ((emacs (24 4)) (seq (1 7)) (let-alist (1 0 3)) (spinner (1 4)) (hydra (0 13 2))) "A modern Packages Menu. Colored, with package ratings, and customizable." tar ((:url . "https://github.com/Malabarba/paradox") (:keywords "package" "packages"))]) (paper-theme . [(20151231 932) ((emacs (24)) (hexrgb (0))) "A minimal Emacs colour theme." single ((:url . "http://gkayaalp.com/emacs.html#paper") (:keywords "theme" "paper"))]) (pangu-spacing . [(20150927 24) nil "Minor-mode to add space between Chinese and English characters." single ((:url . "http://github.com/coldnew/pangu-spacing"))]) (pandoc-mode . [(20160210 400) ((hydra (0 10 0)) (dash (2 10 0))) "Minor mode for interacting with Pandoc" tar ((:keywords "text" "pandoc"))]) (pallet . [(20150512 2) ((dash (2 10 0)) (s (1 9 0)) (f (0 17 1)) (cask (0 7))) "A package management tool for Emacs, using Cask." tar nil]) (palimpsest . [(20130731 821) nil "Various deletion strategies when editing" single nil]) (palette . [(20151231 1545) ((hexrgb (0))) "Color palette useful with RGB, HSV, and color names" single ((:url . "http://www.emacswiki.org/palette.el") (:keywords "color" "rgb" "hsv" "hexadecimal" "face" "frame"))]) (pager-default-keybindings . [(20130719 1357) ((pager (1 0))) "Add the default keybindings suggested for pager.el" single ((:url . "http://github.com/nflath/pager-default-keybindings"))]) (pager . [(20100330 1131) nil "windows-scroll commands" single nil]) (page-break-lines . [(20160109 1813) nil "Display ugly ^L page breaks as tidy horizontal lines" single ((:url . "https://github.com/purcell/page-break-lines") (:keywords "convenience" "faces"))]) (pacmacs . [(20160131 32) ((emacs (24 4)) (dash (2 11 0)) (dash-functional (1 2 0)) (cl-lib (0 5)) (f (0 18 0))) "Pacman for Emacs" tar ((:url . "http://github.com/codingteam/pacmacs.el"))]) (packed . [(20160209 905) ((emacs (24 3)) (dash (2 10 0))) "package manager agnostic Emacs Lisp package utilities" single ((:url . "https://github.com/tarsius/packed") (:keywords "compile" "convenience" "lisp" "package" "library"))]) (package-utils . [(20150126 406) ((epl (0 7 -3))) "Extensions for package.el" single ((:url . "https://github.com/Silex/package-utils") (:keywords "package" "convenience"))]) (package-safe-delete . [(20150116 807) ((emacs (24)) (epl (0 7 -3))) "Safely delete package.el packages" single ((:url . "https://github.com/Fanael/package-safe-delete"))]) (package-filter . [(20140105 1426) nil "special handling for package.el" single ((:url . "https://github.com/milkypostman/package-filter"))]) (package-build . [(20160129 1332) ((cl-lib (0 5))) "Tools for assembling a package archive" single ((:keywords "tools"))]) (package+ . [(20150319 1455) nil "Extensions for the package library." single ((:url . "TBA") (:keywords "extensions" "tools"))]) (pabbrev . [(20150806 445) nil "Predictive abbreviation expansion" single nil]) (p4 . [(20150721 1237) nil "Simple Perforce-Emacs Integration" single ((:url . "https://github.com/gareth-rees/p4.el"))]) (ox-twiki . [(20151206 240) ((org (8)) (cl-lib (0 5))) "org Twiki and Foswiki export" single ((:url . "https://github.com/dfeich/org8-wikiexporters") (:keywords "org"))]) (ox-twbs . [(20151223 1120) nil "Bootstrap compatible HTML Back-End for Org" single ((:url . "https://github.com/marsmining/ox-twbs") (:keywords "org" "html" "publish" "twitter" "bootstrap"))]) (ox-trac . [(20151102 955) ((org (8 0))) "Org Export Backend to Trac WikiFormat" single ((:url . "https://github.com/JalapenoGremlin/ox-trac") (:keywords "org-mode" "trac"))]) (ox-tiddly . [(20151206 240) ((org (8)) (cl-lib (0 5))) "org TiddlyWiki exporter" single ((:url . "https://github.com/dfeich/org8-wikiexporters") (:keywords "org"))]) (ox-textile . [(20151114 2025) ((org (8 1))) "Textile Back-End for Org Export Engine" single ((:url . "https://github.com/yashi/org-textile") (:keywords "org" "textile"))]) (ox-rst . [(20151114 2343) ((emacs (24 4)) (org (8 2 4))) "Export reStructuredText using org-mode." single ((:url . "https://github.com/masayuko/ox-rst") (:keywords "org" "rst" "rest" "restructuredtext"))]) (ox-reveal . [(20151022 2306) ((org (20150330))) "reveal.js Presentation Back-End for Org Export Engine" single ((:keywords "outlines" "hypermedia" "slideshow" "presentation"))]) (ox-pukiwiki . [(20150124 916) ((org (8 1))) "Pukiwiki Back-End for Org Export Engine" single ((:url . "https://github.com/yashi/org-pukiwiki") (:keywords "org" "pukiwiki"))]) (ox-pandoc . [(20151222 1553) ((org (8 2)) (emacs (24)) (dash (2 8)) (ht (2 0))) "org exporter for pandoc." single ((:url . "https://github.com/kawabata/ox-pandoc") (:keywords "tools"))]) (ox-nikola . [(20151114 316) ((emacs (24 4)) (org (8 2 4)) (ox-rst (0 2))) "Export Nikola articles using org-mode." single ((:url . "https://github.com/masayuko/ox-nikola") (:keywords "org" "nikola"))]) (ox-mediawiki . [(20150923 902) ((cl-lib (0 5)) (s (1 9 0))) "Mediawiki Back-End for Org Export Engine" single ((:url . "https://github.com/tomalexander/orgmode-mediawiki") (:keywords "org" "wp" "mediawiki"))]) (ox-ioslide . [(20160120 805) ((emacs (24 1)) (org (8 0)) (cl-lib (0 5)) (f (0 17 2)) (makey (0 3))) "Export org-mode to Google I/O HTML5 slide." tar ((:url . "http://github.com/coldnew/org-ioslide") (:keywords "html" "presentation"))]) (ox-impress-js . [(20150412 1016) ((org (8))) "impress.js Back-End for Org Export Engine" tar ((:url . "https://github.com/kinjo/org-impress-js.el") (:keywords "outlines" "hypermedia" "calendar" "wp"))]) (ox-html5slide . [(20131227 2206) ((org (8 0))) "Export org-mode to HTML5 slide." single ((:url . "http://github.com/coldnew/org-html5slide") (:keywords "html" "presentation"))]) (ox-gfm . [(20150604 26) nil "Github Flavored Markdown Back-End for Org Export Engine" single ((:keywords "org" "wp" "markdown" "github"))]) (ox-asciidoc . [(20160120 523) ((org (8 1))) "AsciiDoc Back-End for Org Export Engine" single ((:url . "https://github.com/yashi/org-asciidoc") (:keywords "org" "asciidoc"))]) (owdriver . [(20141011 738) ((smartrep (0 0 3)) (log4e (0 2 0)) (yaxception (0 2 0))) "Quickly perform various actions on other windows" single ((:url . "https://github.com/aki2o/owdriver") (:keywords "convenience"))]) (overseer . [(20150801 1002) ((emacs (24)) (dash (2 10 0)) (pkg-info (0 4))) "Ert-runner Integration Into Emacs" single ((:url . "http://www.github.com/tonini/overseer.el"))]) (ov . [(20150311 2228) ((emacs (24 3))) "Overlay library for Emacs Lisp" single ((:url . "https://github.com/ShingoFukuyama/ov.el") (:keywords "overlay"))]) (outshine . [(20160204 1346) ((outorg (2 0)) (cl-lib (0 5))) "outline with outshine outshines outline" single ((:url . "https://github.com/tj64/outshine"))]) (outorg . [(20150910 1240) nil "Org-style comment editing" single ((:url . "https://github.com/tj64/outorg"))]) (outlined-elisp-mode . [(20131108 327) nil "outline-minor-mode settings for emacs lisp" single ((:url . "http://hins11.yu-yake.com/"))]) (outline-magic . [(20150209 1426) nil "outline mode extensions for Emacs" single ((:keywords "outlines"))]) (osx-trash . [(20150723 735) ((emacs (24 1))) "System trash for OS X" tar ((:url . "https://github.com/lunaryorn/osx-trash.el") (:keywords "files" "convenience" "tools" "unix"))]) (osx-pseudo-daemon . [(20131026 1730) nil "Daemon mode that plays nice with OSX." single ((:url . "https://github.com/DarwinAwardWinner/osx-pseudo-daemon") (:keywords "convenience" "osx"))]) (osx-plist . [(20101130 448) nil "Apple plist file parser" single ((:keywords "convenience"))]) (osx-org-clock-menubar . [(20150205 1311) nil "simple menubar integration for org-clock" tar ((:url . "https://github.com/jordonbiondo/osx-org-clock-menubar") (:keywords "org" "osx"))]) (osx-location . [(20150613 217) nil "Watch and respond to changes in geographical location on OS X" tar nil]) (osx-lib . [(20160125 2128) ((emacs (24 4))) "Basic function for Apple/OSX." single ((:keywords "apple" "applescript" "osx" "finder" "emacs" "elisp" "vpn" "speech"))]) (osx-dictionary . [(20160215 726) ((cl-lib (0 5))) "Interface for OSX Dictionary.app" tar ((:url . "https://github.com/xuchunyang/osx-dictionary.el") (:keywords "mac" "dictionary"))]) (osx-clipboard . [(20141012 17) nil "Use the OS X clipboard from terminal Emacs" single ((:url . "https://github.com/joddie/osx-clipboard-mode"))]) (osx-browse . [(20140508 1341) ((string-utils (0 3 2)) (browse-url-dwim (0 6 6))) "Web browsing helpers for OS X" single ((:url . "http://github.com/rolandwalker/osx-browse") (:keywords "hypermedia" "external"))]) (origami . [(20150822 450) ((s (1 9 0)) (dash (2 5 0)) (emacs (24))) "Flexible text folding" tar ((:url . "https://github.com/gregsexton/origami.el") (:keywords "folding"))]) (orgtbl-show-header . [(20141023 137) nil "Show the header of the current column in the minibuffer" single nil]) (orgtbl-join . [(20150121 1446) ((cl-lib (0 5))) "join columns from another table" tar ((:keywords "org" "table" "join" "filtering"))]) (orgtbl-ascii-plot . [(20151215 1351) nil "ascii-art bar plots in org-mode tables" single ((:keywords "org" "table" "ascii" "plot"))]) (orgtbl-aggregate . [(20150104 818) nil "Create an aggregated Org table from another one" tar ((:keywords "org" "table" "aggregation" "filtering"))]) (orglue . [(20150430 513) ((org (8 1)) (epic (0 2)) (org-mac-link (1 2))) "more functionality to org-mode." tar ((:keywords "org"))]) (orglink . [(20151106 1006) ((dash (1 3 2)) (org (8 0))) "use Org Mode links in other modes" single ((:url . "http://github.com/tarsius/orglink") (:keywords "hypertext"))]) (orgit . [(20160119 1424) ((emacs (24 4)) (dash (2 12 1)) (magit (2 4 1)) (org (8 3 3))) "support for Org links to Magit buffers" single ((:url . "https://github.com/magit/orgit"))]) (orgbox . [(20140528 1826) ((org (8 0)) (cl-lib (0 5))) "Mailbox-like task scheduling Org." single ((:url . "https://github.com/yasuhito/orgbox") (:keywords "org"))]) (organic-green-theme . [(20160202 620) nil "Low-contrast green color theme." single nil]) (org2jekyll . [(20150906 647) ((dash-functional (2 11 0)) (s (1 9 0)) (deferred (0 3 1))) "Minor mode to publish org-mode post to jekyll without specific yaml" tar ((:url . "https://github.com/ardumont/org2jekyll") (:keywords "org-mode" "jekyll" "blog" "publish"))]) (org2blog . [(20151208 828) ((org (8 1)) (xml-rpc (1 6 8)) (metaweblog (0 1))) "Blog from Org mode to wordpress" tar nil]) (org-wunderlist . [(20150817 1913) ((request-deferred (0 2 0)) (alert (1 1)) (emacs (24)) (cl-lib (0 5)) (org (8 2 4)) (s (1 9 0))) "Org sync with Wunderlist" single ((:url . "https://github.com/myuhe/org-wunderlist.el") (:keywords "convenience"))]) (org-webpage . [(20160108 126) ((cl-lib (1 0)) (ht (1 5)) (mustache (0 22)) (htmlize (1 47)) (org (8 0)) (dash (2 0 0)) (web-server (0 1))) "a static site generator based on org mode." tar nil]) (org-wc . [(20160204 1715) nil "Count words in org mode trees." single nil]) (org-vcard . [(20151213 2222) nil "org-mode support for vCard export and import." tar ((:url . "https://github.com/flexibeast/org-vcard") (:keywords "outlines" "org" "vcard"))]) (org-trello . [(20160213 1107) ((request-deferred (0 2 0)) (deferred (0 4 0)) (s (1 11 0)) (dash-functional (2 12 1)) (dash (2 12 1)) (emacs (24))) "Minor mode to synchronize org-mode buffer and trello board" tar nil]) (org-tree-slide . [(20151222 2347) nil "A presentation tool for org-mode" single ((:keywords "org-mode" "presentation" "narrowing"))]) (org-transform-tree-table . [(20150110 633) ((dash (2 10 0)) (s (1 3 0))) "Transform org-mode tree with properties to a table, and the other way around" single ((:url . "https://github.com/jplindstrom/emacs-org-transform-tree-table") (:keywords "org-mode" "table" "org-table" "tree" "csv" "convert"))]) (org-tracktable . [(20151129 1241) ((emacs (24)) (cl-lib (0 5))) "Track your writing progress in an org-table" single ((:url . "https://github.com/tty-tourist/org-tracktable") (:keywords "org" "writing"))]) (org-toodledo . [(20150301 313) ((request-deferred (0 2 0)) (emacs (24)) (cl-lib (0 5))) "Toodledo integration for Emacs Org mode" tar ((:keywords "outlines" "data"))]) (org-time-budgets . [(20151111 1) ((alert (0 5 10)) (cl-lib (0 5))) "Define time budgets and display clocked time." single nil]) (org-themis . [(20160121 2004) ((cl-lib (0 4))) "Experimental project management mode for org-mode" single ((:url . "http://github.com/zellio/org-themis") (:keywords "org-mode" "elisp" "project"))]) (org-tfl . [(20160131 1244) ((org (0 16 2)) (cl-lib (0 5)) (emacs (24 1))) "Transport for London meets Orgmode" tar ((:url . "https://github.com/storax/org-tfl") (:keywords "org" "tfl"))]) (org-table-comment . [(20120209 1051) nil "Org table comment modes." single ((:url . "http://github.com/mlf176f2/org-table-comment.el") (:keywords "org-mode" "orgtbl"))]) (org-sync . [(20150817 754) ((cl-lib (0 5)) (org (8 2)) (emacs (24))) "Synchronize Org documents with External Issue Trackers" tar ((:url . "https://github.com/arbox/org-sync") (:keywords "org" "synchronization" "issue tracking" "github" "redmine"))]) (org-rtm . [(20160214 436) ((rtm (0 1))) "Simple import/export from rememberthemilk to org-mode" single ((:url . "https://github.com/pmiddend/org-rtm") (:keywords "outlines" "data"))]) (org-repo-todo . [(20141204 1341) nil "Simple repository todo management with org-mode" single ((:url . "https://github.com/waymondo/org-repo-todo") (:keywords "convenience"))]) (org-ref . [(20160217 1826) ((dash (2 11 0)) (helm (1 5 5)) (helm-bibtex (1 0 0)) (hydra (0 13 2)) (key-chord (0)) (s (1 10 0)) (f (0 18 0)) (emacs (24 4))) "citations, cross-references and bibliographies in org-mode" tar ((:url . "https://github.com/jkitchin/org-ref") (:keywords "org-mode" "cite" "ref" "label"))]) (org-redmine . [(20160205 344) nil "Redmine tools using Emacs OrgMode" single ((:url . "https://github.com/gongo/org-redmine") (:keywords "redmine" "org"))]) (org-readme . [(20151204 417) ((http-post-simple (1 0)) (yaoddmuse (0 1 1)) (header2 (21 0)) (lib-requires (21 0)) (cl-lib (0 5))) "Integrates Readme.org and Commentary/Change-logs." tar ((:url . "https://github.com/mlf176f2/org-readme") (:keywords "header2" "readme.org" "emacswiki" "git"))]) (org-random-todo . [(20160208 426) ((emacs (24 3)) (alert (1 2))) "notify of random TODO's" single ((:keywords "org" "todo" "notification"))]) (org-protocol-jekyll . [(20151119 838) ((cl-lib (0 5))) "Jekyll's handler for org-protocol" single nil]) (org-projectile . [(20160101 1550) ((projectile (0 11 0)) (dash (2 10 0))) "Repository todo management for org-mode" single ((:url . "https://github.com/IvanMalison/org-projectile") (:keywords "org" "projectile" "todo"))]) (org-present . [(20141109 1756) ((org (7))) "Minimalist presentation minor-mode for Emacs org-mode." single ((:url . "https://github.com/rlister/org-present"))]) (org-pomodoro . [(20151217 553) ((alert (0 5 10)) (cl-lib (0 5))) "Pomodoro implementation for org-mode." tar ((:url . "https://github.com/lolownia/org-pomodoro"))]) (org-pdfview . [(20160125 1254) ((org (6 1)) (pdf-tools (0 40))) "Support for links to documents in pdfview mode" single ((:keywords "org" "pdf-view" "pdf-tools"))]) (org-password-manager . [(20150729 1515) ((org (8 2 10)) (s (1 9 0))) "Minimal password manager for Emacs Org Mode." single ((:url . "https://github.com/leafac/org-password-manager") (:keywords "password"))]) (org-pandoc . [(20130729 1850) nil "Export from Org using Pandoc" tar nil]) (org-page . [(20160216 447) ((ht (1 5)) (simple-httpd (1 4 6)) (mustache (0 22)) (htmlize (1 47)) (org (8 0)) (dash (2 0 0)) (cl-lib (0 5))) "a static site generator based on org mode" tar nil]) (org-outlook . [(20150914 547) nil "Outlook org" tar ((:url . "https://github.com/mlf176f2/org-outlook.el") (:keywords "org-outlook"))]) (org-octopress . [(20150826 416) ((org (8 0)) (orglue (0 1)) (ctable (0 1 1))) "Compose octopress articles using org-mode." tar ((:keywords "org" "jekyll" "octopress" "blog"))]) (org-multiple-keymap . [(20150328 1806) ((org (8 2 4)) (emacs (24)) (cl-lib (0 5))) "Set keymap to elements, such as timestamp and priority." single ((:url . "https://github.com/myuhe/org-multiple-keymap.el") (:keywords "convenience" "org-mode"))]) (org-mobile-sync . [(20131118 1116) ((emacs (24 3 50)) (org (8 0))) "automatically sync org-mobile on changes" single ((:url . "https://github.com/steckerhalter/org-mobile-sync") (:keywords "org-mode" "org" "mobile" "sync" "todo"))]) (org-mac-link . [(20160109 1443) nil "Insert org-mode links to items selected in various Mac apps" single ((:keywords "org" "mac" "hyperlink"))]) (org-mac-iCal . [(20140107 519) nil "Imports events from iCal.app to the Emacs diary" single ((:keywords "outlines" "calendar"))]) (org-linkany . [(20160206 2011) ((log4e (0 2 0)) (yaxception (0 1))) "Insert link using anything.el/helm.el on org-mode" single ((:url . "https://github.com/aki2o/org-linkany") (:keywords "org" "completion"))]) (org-link-travis . [(20140405 1627) ((org (7))) "Insert/Export the link of Travis CI on org-mode" single ((:url . "https://github.com/aki2o/org-link-travis") (:keywords "org"))]) (org-journal . [(20151228 603) nil "a simple org-mode based journaling mode" single ((:url . "http://github.com/bastibe/org-journal"))]) (org-jira . [(20150911 558) nil "Syncing between Jira and Org-mode." tar ((:url . "https://github.com/baohaojun/org-jira"))]) (org-jekyll . [(20130508 239) ((org (8 0))) "Export jekyll-ready posts form org-mode entries" single ((:url . "http://juanreyero.com/open/org-jekyll/") (:keywords "hypermedia"))]) (org-iv . [(20151213 714) ((impatient-mode (1 0 0)) (org (8 0)) (cl-lib (0 5))) "a tool used to view html (in browser) generated by org-file once the org-file changes" tar nil]) (org-if . [(20150920 813) nil "Interactive Fiction Authoring System for Org-Mode." tar nil]) (org-grep . [(20151202 429) ((cl-lib (0 5))) "Kind of M-x rgrep adapted for Org mode." single ((:url . "https://github.com/pinard/org-grep"))]) (org-gnome . [(20150614 757) ((alert (1 2)) (telepathy (0 1)) (gnome-calendar (0 1))) "Orgmode integration with the GNOME desktop" single ((:keywords "org" "gnome"))]) (org-gcal . [(20151230 124) ((request-deferred (0 2 0)) (alert (1 1)) (emacs (24)) (cl-lib (0 5)) (org (8 2 4))) "Org sync with Google Calendar" single ((:url . "https://github.com/myuhe/org-gcal.el") (:keywords "convenience"))]) (org-fstree . [(20090723 819) nil "include a filesystem subtree into an org file" single ((:url . "http://www.burtzlaff.de/org-fstree/org-fstree.el") (:keywords "org-mode" "filesystem" "tree"))]) (org-eww . [(20160104 636) ((org (8 0)) (emacs (24 4))) "automatically use eww to preview current org-file when save" single ((:url . "https://github.com/lujun9972/org-eww") (:keywords "convenience" "eww" "org"))]) (org-elisp-help . [(20130423 1545) ((cl-lib (0 2)) (org (8 0))) "org links to emacs-lisp documentation" single ((:url . "https://github.com/tarsius/org-elisp-help") (:keywords "org" "remember" "lisp"))]) (org-ehtml . [(20150506 1658) ((web-server (20140109 2200)) (emacs (24 3))) "Export Org-mode files as editable web pages" tar nil]) (org-dropbox . [(20150113 2109) ((dash (2 2)) (names (20150000)) (emacs (24))) "move Dropbox notes from phone into org-mode datetree" single ((:url . "https://github.com/heikkil/org-dropbox") (:keywords "dropbox" "android" "notes" "org-mode"))]) (org-drill-table . [(20140117 137) ((s (1 7 0)) (dash (2 2 0)) (cl-lib (0 3)) (org-plus-contrib (8 2)) (emacs (24 1))) "Generate drill cards from org tables" single nil]) (org-dp . [(20160206 202) ((cl-lib (0 5))) "Declarative Local Programming with Org Elements" tar ((:url . "https://github.com/tj64/org-dp"))]) (org-download . [(20151030 716) ((async (1 2))) "Image drag-and-drop for Emacs org-mode" single ((:url . "https://github.com/abo-abo/org-download") (:keywords "images" "screenshots" "download"))]) (org-dotemacs . [(20151119 1022) ((org (7 9 3)) (cl-lib (1 0))) "Store your emacs config as an org file, and choose which bits to load." single ((:url . "https://github.com/vapniks/org-dotemacs") (:keywords "local"))]) (org-doing . [(20150824 701) nil "Keep track of what you're doing" tar ((:url . "https://github.com/omouse/org-doing") (:keywords "tools" "org"))]) (org-dashboard . [(20150812 302) ((cl-lib (0 5))) "Visually summarize progress in org files" single ((:url . "http://github.com/bard/org-dashboard") (:keywords "outlines" "calendar"))]) (org-cua-dwim . [(20120202 2134) nil "Org-mode and Cua mode compatibility layer" single ((:keywords "org-mode" "cua-mode"))]) (org-context . [(20160108 214) nil "Contextual capture and agenda commands for Org-mode" single ((:url . "https://github.com/thisirs/org-context") (:keywords "org" "capture" "agenda" "convenience"))]) (org-clock-convenience . [(20160217 106) ((cl-lib (0 5)) (org (8)) (emacs (24 3))) "convenience functions for org time tracking" single ((:url . "https://github.com/dfeich/org-clock-convenience") (:keywords "org"))]) (org-cliplink . [(20151229 1100) nil "insert org-mode links from the clipboard" tar ((:url . "http://github.com/rexim/org-cliplink"))]) (org-caldav . [(20150131 152) ((org (7))) "Sync org files with external calendar through CalDAV" single ((:keywords "calendar" "caldav"))]) (org-bullets . [(20140918 1137) nil "Show bullets in org-mode as UTF-8 characters" single ((:url . "https://github.com/sabof/org-bullets"))]) (org-beautify-theme . [(20150106 956) nil "A sub-theme to make org-mode more beautiful." single ((:keywords "org" "theme"))]) (org-autolist . [(20150922 705) nil "Improved list management in org-mode" single ((:url . "https://github.com/calvinwyoung/org-autolist") (:keywords "lists" "checklists" "org-mode"))]) (org-attach-screenshot . [(20160125 1332) nil "screenshots integrated with org attachment dirs" single ((:url . "https://github.com/dfeich/org-screenshot") (:keywords "org"))]) (org-alert . [(20151007 337) ((s (1 10 0)) (dash (2 12 0)) (alert (1 2))) "Notify org deadlines via notify-send" single ((:url . "https://github.com/groksteve/org-alert") (:keywords "org" "org-mode" "notify" "notifications"))]) (org-agenda-property . [(20140626 1416) ((emacs (24 2))) "Display org properties in the agenda buffer." single ((:url . "http://github.com/Bruce-Connor/org-agenda-property") (:keywords "calendar"))]) (org-ac . [(20140302 413) ((auto-complete-pcmp (0 0 1)) (log4e (0 2 0)) (yaxception (0 1))) "Some auto-complete sources for org-mode" single ((:url . "https://github.com/aki2o/org-ac") (:keywords "org" "completion"))]) (operate-on-number . [(20150706 2323) nil "Operate on number at point with arithmetic functions" single ((:url . "https://github.com/knu/operate-on-number.el") (:keywords "editing"))]) (openwith . [(20120531 1436) nil "Open files with external programs" single ((:url . "https://bitbucket.org/jpkotta/openwith") (:keywords "files" "processes"))]) (openstack-cgit-browse-file . [(20130819 227) nil "Browse the current file in OpenStack cgit" single ((:url . "https://github.com/chmouel/openstack-cgit-browse-file") (:keywords "convenience" "vc" "git" "cgit" "gerrit" "openstack"))]) (open-junk-file . [(20130130 2320) nil "Open a junk (memo) file to try-and-error" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/open-junk-file.el") (:keywords "convenience" "tools"))]) (opam . [(20150719 520) ((emacs (24 1))) "OPAM tools" single ((:url . "https://github.com/lunaryorn/opam.el") (:keywords "convenience"))]) (oneonone . [(20151231 1541) ((hexrgb (0))) "Frame configuration that uses one frame per window." single ((:url . "http://www.emacswiki.org/oneonone.el") (:keywords "local" "frames"))]) (on-screen . [(20151108 2108) ((cl-lib (0))) "guide your eyes while scrolling" single ((:url . "https://github.com/michael-heerdegen/on-screen.el") (:keywords "convenience"))]) (on-parens . [(20150702 1506) ((dash (2 10 0)) (emacs (24)) (evil (1 1 6)) (smartparens (1 6 3))) "smartparens wrapper to fit with evil-mode/vim normal-state" single ((:keywords "evil" "smartparens"))]) (omtose-phellack-theme . [(20160212 347) ((emacs (24))) "A dark, soothing theme with a cold bluish touch." tar ((:url . "http:/github.com/franksn/omtose-phellack-theme/"))]) (omnisharp . [(20151210 1114) ((json (1 2)) (flycheck (0 25 1)) (dash (20141201 2206)) (auto-complete (1 4)) (popup (0 5 1)) (csharp-mode (0 8 7)) (cl-lib (0 5)) (s (1 9 0))) "Omnicompletion (intellisense) and more for C#" tar ((:url . "https://github.com/sp3ctum/omnisharp-emacs") (:keywords "csharp" "c#" "ide" "auto-complete" "intellisense"))]) (omniref . [(20151118 21) nil "Omniref Ruby documentation search engine interface" single ((:url . "http://github.org/dotemacs/omniref.el") (:keywords "docs" "help" "tools"))]) (omni-tags . [(20150513 1053) ((pcre2el (1 7)) (cl-lib (0 5))) "Highlight and Actions for 'Tags'" tar ((:url . "http://github.com/AdrieanKhisbe/omni-tags.el") (:keywords "convenience"))]) (omni-scratch . [(20151211 859) nil "Easy and mode-specific draft buffers" single ((:url . "https://github.com/AdrieanKhisbe/omni-scratch.el") (:keywords "convenience" "languages" "tools"))]) (omni-quotes . [(20150604 1057) ((dash (2 8)) (omni-log (0 1 2))) "Random quotes displayer" tar ((:url . "https://github.com/AdrieanKhisbe/omni-quotes.el") (:keywords "convenience"))]) (omni-log . [(20150604 1038) ((emacs (24)) (ht (2 0)) (s (1 6 1)) (dash (1 8 0))) "Logging utilities" tar ((:url . "https://github.com/AdrieanKhisbe/omni-log.el") (:keywords "convenience" "languages" "tools"))]) (omni-kill . [(20150526 2349) nil "Kill all the things" single ((:keywords "convenience" "editing" "tools"))]) (om-mode . [(20140915 1410) nil "Insert Om component template with life cycle." single ((:keywords "clojurescript"))]) (olivetti . [(20160105 355) nil "Minor mode for a nice writing environment" single ((:keywords "wp"))]) (oldlace-theme . [(20150705 600) ((emacs (24))) "Emacs 24 theme with an 'oldlace' background." single nil]) (offlineimap . [(20150916 458) nil "Run OfflineIMAP from Emacs" single ((:url . "http://julien.danjou.info/offlineimap-el.html"))]) (octopress . [(20160123 1406) nil "A lightweight wrapper for Jekyll and Octopress." tar ((:url . "https://github.com/aaronbieber/octopress.el") (:keywords "octopress" "blog"))]) (octicons . [(20151031 2040) ((cl-lib (0 5))) "octicons utility" tar ((:url . "https://github.com/syohex/emacs-octicons"))]) (ocp-indent . [(20150914 132) nil "automatic indentation with ocp-indent" single ((:url . "http://www.typerex.org/ocp-indent.html") (:keywords "ocaml" "languages"))]) (ocodo-svg-modelines . [(20150516 719) ((svg-mode-line-themes (0))) "A collection of beautiful SVG modelines" tar nil]) (occur-x . [(20130610 643) nil "Extra functionality for occur" single ((:keywords "occur" "search" "convenience"))]) (occur-context-resize . [(20151227 2002) nil "dynamically resize context around matches in occur-mode" single ((:url . "https://github.com/dgtized/occur-context-resize.el") (:keywords "matching"))]) (occidental-theme . [(20130312 1258) nil "Custom theme for faces based on Adwaita" single ((:url . "http://github.com/olcai/occidental-theme"))]) (obsidian-theme . [(20140420 943) nil "port of the eclipse obsidian theme" single ((:url . "http://github.com/mswift42/obsidian-theme"))]) (objc-font-lock . [(20141021 1122) nil "Highlight Objective-C method calls." single ((:url . "https://github.com/Lindydancer/objc-font-lock") (:keywords "languages" "faces"))]) (oberon . [(20120715 209) nil "Major mode for editing Oberon/Oberon-2 program texts" single ((:keywords "oberon" "oberon-2" "languages" "oop"))]) (ob-typescript . [(20150804 530) ((emacs (24)) (org (8 0))) "org-babel functions for typescript evaluation" single ((:url . "https://github.com/lurdan/ob-typescript") (:keywords "literate programming" "reproducible research" "typescript"))]) (ob-translate . [(20130718 729) ((google-translate (0 4)) (org (8))) "Translation of text blocks in org-mode." single ((:url . "https://github.com/krisajenkins/ob-translate") (:keywords "org" "babel" "translate" "translation"))]) (ob-sml . [(20130829 1143) ((sml-mode (6 4))) "org-babel functions for template evaluation" single ((:url . "http://orgmode.org") (:keywords "literate programming" "reproducible research"))]) (ob-scala . [(20160209 635) ((ensime (0 9 10))) "org-babel functions for scala evaluation" single ((:url . "github.com/reactormonk/ob-scala") (:keywords "scala"))]) (ob-restclient . [(20160201 456) ((restclient (0))) "org-babel functions for restclient-mode" single ((:url . "http://orgmode.org") (:keywords "literate programming" "reproducible research"))]) (ob-prolog . [(20150530 937) nil "org-babel functions for prolog evaluation." single ((:url . "https://github.com/ljos/ob-prolog") (:keywords "literate programming" "reproducible research"))]) (ob-mongo . [(20130718 732) ((org (8))) "Execute mongodb queries within org-mode blocks." single ((:url . "https://github.com/krisajenkins/ob-mongo") (:keywords "org" "babel" "mongo" "mongodb"))]) (ob-lfe . [(20150701 655) ((org (8))) "org-babel functions for lfe evaluation" single ((:url . "http://github.com/zweifisch/ob-lfe") (:keywords "org" "babel" "lfe" "lisp" "erlang"))]) (ob-kotlin . [(20150312 614) ((org (8))) "org-babel functions for kotlin evaluation" single ((:url . "http://github.com/zweifisch/ob-kotlin") (:keywords "org" "babel" "kotlin"))]) (ob-ipython . [(20151010 307) ((s (1 9 0)) (dash (2 10 0)) (dash-functional (1 2 0)) (f (0 17 2)) (emacs (24))) "org-babel functions for IPython evaluation" tar ((:url . "http://www.gregsexton.org") (:keywords "literate programming" "reproducible research"))]) (ob-http . [(20160210 258) ((s (1 9 0)) (cl-lib (0 5))) "http request in org-mode babel" tar ((:url . "http://github.com/zweifisch/ob-http"))]) (ob-go . [(20151211 1601) ((go-mode (1 0 0))) "org-babel functions for go evaluation" single ((:url . "http://orgmode.org") (:keywords "golang" "go" "literate programming" "reproducible research"))]) (ob-elixir . [(20151021 447) ((org (8))) "org-babel functions for elixir evaluation" single ((:url . "http://github.com/zweifisch/ob-elixir") (:keywords "org" "babel" "elixir"))]) (ob-cypher . [(20150224 1837) ((s (1 9 0)) (cypher-mode (0 0 6)) (dash (2 10 0)) (dash-functional (1 2 0))) "query neo4j using cypher in org-mode blocks" single ((:url . "http://github.com/zweifisch/ob-cypher") (:keywords "org" "babel" "cypher" "neo4j"))]) (ob-browser . [(20150101 710) ((org (8))) "Render HTML in org-mode blocks." tar ((:url . "https://github.com/krisajenkins/ob-browser") (:keywords "org" "babel" "browser" "phantomjs"))]) (ob-axiom . [(20150804 1500) ((emacs (24 2)) (axiom-environment (20150801))) "org-babel for the axiom-environment system" single ((:keywords "axiom" "openaxiom" "fricas"))]) (oauth . [(20130127 1751) nil "Oauth library." tar ((:keywords "comm"))]) (o-blog . [(20151202 1539) nil "Standalone orgmode blog exporter" tar ((:keywords "emacs"))]) (nyan-prompt . [(20140809 2208) nil "Nyan Cat on the eshell prompt." tar ((:url . "http://github.com/PuercoPop/nyan-prompt") (:keywords "nyan" "cat" "lulz" "eshell" "rainbow dependencies ((rx 0))"))]) (nyan-mode . [(20151017 2235) nil "Nyan Cat shows position in current buffer in mode-line." tar ((:url . "https://github.com/TeMPOraL/nyan-mode/") (:keywords "nyan" "cat" "lulz" "pop tart cat" "build something amazing"))]) (nvm . [(20151113 55) ((s (1 8 0)) (dash (2 4 0)) (f (0 14 0)) (dash-functional (2 4 0))) "Manage Node versions within Emacs" single ((:url . "http://github.com/rejeep/nvm.el") (:keywords "node" "nvm"))]) (nummm-mode . [(20131117 214) nil "Display the number of minor modes instead of their names" single ((:url . "http://github.com/agpchil/nummm-mode"))]) (number . [(20141127 1004) nil "Working with numbers at point." single nil]) (nu-mode . [(20150413 1315) ((undo-tree (0 6 5)) (helm (20140902 1005))) "Modern Emacs Prompts Based Keybinding." tar nil]) (nsis-mode . [(20150914 546) nil "NSIS-mode" tar ((:url . "http://github.com/mlf176f2/nsis-mode") (:keywords "nsis"))]) (nrepl-sync . [(20140807 854) ((cider (0 6))) "connect to nrepl port and eval .sync.clj." single ((:url . "https://github.com/phillord/lein-sync"))]) (nrepl-eval-sexp-fu . [(20140311 341) ((highlight (0 0 0)) (smartparens (0 0 0)) (thingatpt (0 0 0))) "Tiny functionality enhancements for evaluating sexps." single ((:keywords "lisp" "highlight" "convenience"))]) (noxml-fold . [(20151216 821) nil "Fold away XML things." single ((:url . "https://github.com/paddymcall/noxml-fold") (:keywords "xml" "folding"))]) (novice+ . [(20151231 1540) nil "Extensions to `novice.el'." single ((:url . "http://www.emacswiki.org/novice+.el") (:keywords "internal" "help"))]) (notmuch-labeler . [(20131230 919) ((notmuch (0))) "Improve notmuch way of displaying labels" tar ((:url . "https://github.com/DamienCassou/notmuch-labeler") (:keywords "emacs" "package" "elisp" "notmuch" "emails"))]) (notmuch . [(20160213 840) nil "No description available." tar nil]) (nose . [(20140520 948) nil "Easy Python test running in Emacs" single ((:keywords "nose" "python" "testing"))]) (noflet . [(20141102 654) nil "locally override functions" single ((:url . "https://github.com/nicferrier/emacs-noflet") (:keywords "lisp"))]) (nodejs-repl . [(20151229 603) nil "Run Node.js REPL" single nil]) (node-resolver . [(20140930 1023) ((cl-lib (0 5))) "hook to install node modules in background" single ((:url . "https://github.com/meandavejustice/node-resolver.el") (:keywords "convenience" "nodejs" "javascript" "npm"))]) (noctilux-theme . [(20150723 747) nil "Dark theme inspired by LightTable" tar nil]) (noccur . [(20150514 1420) nil "Run multi-occur on project/dired files" single ((:keywords "convenience"))]) (nnir-est . [(20140301 602) nil "Gnus nnir interface for HyperEstraier" single ((:url . "https://github.com/kawabata/nnir-est") (:keywords "mail"))]) (nm . [(20151110 1110) ((notmuch (0 21)) (peg (0 6)) (company (0)) (emacs (24 3))) "NEVERMORE: an email interface for Notmuch" tar ((:url . "https://github.com/tjim/nevermore"))]) (nixos-options . [(20160209 1041) ((emacs (24))) "Interface for browsing and completing NixOS options." single ((:url . "http://www.github.com/travisbhartwell/nix-emacs/") (:keywords "unix"))]) (nix-sandbox . [(20160214 218) ((dash (2 12 1)) (s (1 10 0))) "Utility functions to work with nix-shell sandboxes" single ((:url . "https://github.com/travisbhartwell/nix-emacs"))]) (nix-mode . [(20151026 315) nil "Major mode for editing Nix expressions" single ((:url . "https://github.com/NixOS/nix/tree/master/misc/emacs"))]) (ninja-mode . [(20141203 2159) ((emacs (24))) "Major mode for editing .ninja files" single nil]) (nim-mode . [(20160216 108) ((emacs (24 4)) (epc (0 1 1)) (let-alist (1 0 1)) (commenter (0 5 1))) "A major mode for the Nim programming language" tar ((:keywords "nim" "languages"))]) (niflheim-theme . [(20150630 821) nil "A port of the Nifleim theme to Emacs" single ((:url . "https://github.com/niflheim-theme/emacs") (:keywords "themes"))]) (nginx-mode . [(20150824 1411) nil "major mode for editing nginx config files" single ((:keywords "nginx"))]) (nexus . [(20140114 505) nil "REST Client for Nexus Maven Repository servers" tar ((:keywords "comm"))]) (newlisp-mode . [(20150120 1040) nil "newLISP editing mode for Emacs" single ((:url . "https://github.com/kosh04/newlisp-mode") (:keywords "language" "lisp" "newlisp"))]) (never-comment . [(20140104 1407) nil "Never blocks are comment" single ((:url . "http://stackoverflow.com/a/4554658/89376"))]) (netherlands-holidays . [(20150202 817) nil "Netherlands holidays for Emacs calendar." single ((:url . "https://github.com/abo-abo/netherlands-holidays") (:keywords "calendar"))]) (neotree . [(20160214 532) nil "A tree plugin like NerdTree for Vim" tar ((:url . "https://github.com/jaypei/emacs-neotree"))]) (nemerle . [(20130328 746) nil "major mode for editing nemerle programs" single ((:keywords "nemerle" "mode" "languages"))]) (nclip . [(20130617 1315) nil "Network (HTTP) Clipboard" tar ((:url . "http://www.github.com/maio/nclip.el") (:keywords "nclip" "clipboard" "network"))]) (ncl-mode . [(20150525 929) ((emacs (24))) "Major Mode for editing NCL scripts and other goodies" tar nil]) (navorski . [(20141203 1024) ((s (1 9 0)) (dash (1 5 0)) (multi-term (0 8 14))) "Helping you live in the terminal, like Viktor did." single ((:keywords "terminal"))]) (navi2ch . [(20150329 1916) nil "Navigator for 2ch for Emacsen" tar ((:keywords "network" "2ch"))]) (navi-mode . [(20151203 757) ((outshine (2 0)) (outorg (2 0))) "major-mode for easy buffer-navigation" single ((:url . "https://github.com/tj64/navi"))]) (nav-flash . [(20140508 1341) nil "Briefly highlight the current line" single ((:url . "http://github.com/rolandwalker/nav-flash") (:keywords "extensions" "navigation" "interface"))]) (nav . [(20120507 7) nil "Emacs mode for filesystem navigation" tar nil]) (nasm-mode . [(20151109 1658) ((emacs (24 3))) "NASM x86 assembly major mode" single ((:url . "https://github.com/skeeto/nasm-mode"))]) (narrowed-page-navigation . [(20150108 2119) ((emacs (24)) (cl-lib (0 5))) "A minor mode for showing one page at a time" single ((:keywords "outlines"))]) (narrow-reindent . [(20150722 1206) ((emacs (24 4))) "Defines a minor mode to left-align narrowed regions." single ((:url . "https://github.com/emallson/narrow-reindent.el"))]) (narrow-indirect . [(20151231 1539) nil "Narrow using an indirect buffer that is a clone" single ((:url . "http://www.emacswiki.org/narrow-indirect.el") (:keywords "narrow" "indirect" "buffer" "clone" "view" "multiple-modes"))]) (naquadah-theme . [(20150923 141) nil "A theme based on Tango color set" single nil]) (nanowrimo . [(20151104 1828) nil "Track progress for nanowrimo" single ((:url . "https://bitbucket.org/gvol/nanowrimo-mode"))]) (nand2tetris-assembler . [(20151027 1436) ((names (0 3 0)) (nand2tetris (0 0 1))) "Assembler For the Nand2tetris Course" single ((:url . "http://www.github.com/CestDiego/nand2tetris-assembler.el/") (:keywords "nand2tetris-assembler" "hdl"))]) (nand2tetris . [(20151027 1451) ((names (0 3 0))) "Major mode for HDL files in the nand2tetris course" tar ((:url . "http://www.github.com/CestDiego/nand2tetris.el/") (:keywords "nand2tetris" "hdl"))]) (namespaces . [(20130326 1550) nil "An implementation of namespaces for Elisp, with an emphasis on immutabilty." single ((:url . "https://github.com/chrisbarrett/elisp-namespaces"))]) (names . [(20151201 404) ((emacs (24 1)) (cl-lib (0 5))) "Namespaces for emacs-lisp. Avoid name clobbering without hiding symbols." tar ((:url . "https://github.com/Malabarba/names") (:keywords "extensions" "lisp"))]) (nameless . [(20151014 439) ((emacs (24 4))) "Hide package namespace in your emacs-lisp code" single ((:url . "https://github.com/Malabarba/nameless") (:keywords "convenience" "lisp"))]) (nameframe-projectile . [(20151018 207) ((nameframe (0 4 0 -2)) (projectile (0 13 0))) "Nameframe integration with Projectile" single ((:url . "https://github.com/john2x/nameframe"))]) (nameframe-perspective . [(20151018 207) ((nameframe (0 4 0 -2)) (perspective (1 12))) "Nameframe integration with perspective.el" single ((:url . "https://github.com/john2x/nameframe"))]) (nameframe . [(20151017 2119) nil "Manage frames by name." single ((:url . "https://github.com/john2x/nameframe"))]) (name-this-color . [(20151014 1330) ((emacs (24)) (cl-lib (0 5)) (dash (2 11 0))) "Match RGB codes to names easily and precisely" single ((:url . "https://github.com/knl/name-this-color.el") (:keywords "lisp" "color" "hex" "rgb" "shade" "name"))]) (naked . [(20151231 1527) nil "Provide for naked key descriptions: no angle brackets." single ((:url . "http://www.emacswiki.org/naked.el") (:keywords "lisp" "key" "print" "format" "help"))]) (n4js . [(20150713 1931) ((emacs (24)) (cypher-mode (0))) "Neo4j Shell" single ((:url . "https://github.com/tmtxt/n4js.el") (:keywords "neo4j" "shell" "comint"))]) (n3-mode . [(20141027 1057) nil "mode for Notation 3" single nil]) (myterminal-controls . [(20160119 2030) ((emacs (24)) (cl-lib (0 5))) "Quick toggle controls at a key-stroke" single ((:url . "http://ismail.teamfluxion.com") (:keywords "convenience" "shortcuts"))]) (mysql2sqlite . [(20151123 1339) nil "Convert mysql databases into sqlite databases." single nil]) (mynt-mode . [(20150512 1349) ((virtualenvwrapper (20131514))) "Minor mode to work with the mynt static site generator" single ((:url . "https://github.com/crshd/mynt-mode") (:keywords "convenience"))]) (mykie . [(20150808 1505) ((emacs (24 3)) (cl-lib (0 5))) "Command multiplexer: Register multiple functions to a keybind" tar ((:url . "https://github.com/yuutayamada/mykie-el") (:keywords "emacs" "configuration" "keybind"))]) (myanmar-input-methods . [(20160106 737) nil "Emacs Input Method for Myanmar" single ((:url . "http://github.com/yelinkyaw/emacs-myanmar-input-methods") (:keywords "myanmar" "unicode" "keyboard"))]) (mwim . [(20150822 1236) nil "Move to the beginning/end of line or code" single ((:url . "https://github.com/alezost/mwim.el") (:keywords "convenience"))]) (mwe-log-commands . [(20100703 541) nil "log keyboard commands to buffer" single ((:keywords "help"))]) (mvn . [(20160211 743) nil "helpers for compiling with maven" single ((:url . "https://github.com/apgwoz/mvn-el") (:keywords "compilation" "maven" "java"))]) (muttrc-mode . [(20090804 1552) nil "Major mode to edit muttrc under Emacs" single nil]) (mutant . [(20160124 553) ((emacs (24 4)) (dash (2 1 0))) "An interface for the Mutant testing tool" single ((:url . "http://github.com/p-lambert/mutant.el") (:keywords "mutant" "testing"))]) (mustard-theme . [(20141115 2302) ((emacs (24 0))) "an Emacs 24 theme based on Mustard (tmTheme)" single ((:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) (mustang-theme . [(20141017 1623) nil "port of vim's mustang theme" single ((:url . "http://github.com/mswift42/mustang-theme"))]) (mustache-mode . [(20141024 732) nil "A major mode for editing Mustache files." single nil]) (mustache . [(20131117 1407) ((ht (0 9)) (s (1 3 0)) (dash (1 2 0))) "a mustache templating library in emacs lisp" tar nil]) (multiple-cursors . [(20160213 817) nil "Multiple cursors for Emacs." tar nil]) (multifiles . [(20130615 1433) nil "View and edit parts of multiple files in one buffer" single ((:keywords "multiple" "files"))]) (multicolumn . [(20150202 1451) nil "Creating and managing multiple side-by-side windows." single ((:url . "https://github.com/Lindydancer/multicolumn"))]) (multi-web-mode . [(20130823 2054) nil "multiple major mode support for web editing" tar ((:url . "https://github.com/fgallina/multi-web-mode") (:keywords "convenience" "languages" "wp"))]) (multi-term . [(20150220 520) nil "Managing multiple terminal buffers in Emacs." single ((:url . "http://www.emacswiki.org/emacs/download/multi-term.el") (:keywords "term" "terminal" "multiple buffer"))]) (multi-project . [(20150314 744) nil "Easily work with multiple projects." single ((:url . "https://bitbucket.org/ellisvelo/multi-project/overview") (:keywords "project" "management"))]) (multi-line . [(20151206 1613) ((emacs (24))) "multi-line statements" tar ((:url . "https://github.com/IvanMalison/multi-line") (:keywords "multi" "line" "length" "whitespace" "programming"))]) (multi-eshell . [(20120608 1135) nil "Create and manage multiple shells within Emacs" single ((:url . "http://cims.nyu.edu/~stucchio"))]) (multi-compile . [(20160215 1219) ((emacs (24))) "Multi target interface to compile." single ((:url . "https://github.com/ReanGD/emacs-multi-compile") (:keywords "tools" "compile" "build"))]) (multi . [(20131013 844) ((emacs (24))) "Clojure-style multi-methods for emacs lisp" single ((:url . "http://github.com/kurisuwhyte/emacs-multi") (:keywords "multimethod" "generic" "predicate" "dispatch"))]) (mu4e-maildirs-extension . [(20160126 39) ((dash (0 0 0))) "Show mu4e maildirs summary in mu4e-main-view" single ((:url . "http://github.com/agpchil/mu4e-maildirs-extension"))]) (mu4e-alert . [(20160215 209) ((alert (1 2)) (s (1 10 0)) (ht (2 0)) (emacs (24 1))) "Desktop notification for mu4e" single ((:url . "https://github.com/iqbalansari/mu4e-alert") (:keywords "mail" "convenience"))]) (mu-cite . [(20160130 300) ((flim (1 14 9))) "A library to provide MIME features." tar nil]) (msvc . [(20150530 151) ((emacs (24)) (cl-lib (0 5)) (cedet (1 0)) (ac-clang (1 2 0))) "Microsoft Visual C/C++ mode" tar ((:url . "https://github.com/yaruopooner/msvc") (:keywords "languages" "completion" "syntax check" "mode" "intellisense"))]) (mpv . [(20150218 118) ((cl-lib (0 5)) (emacs (24)) (json (1 3)) (names (0 5 4)) (org (8 0))) "control mpv for easy note-taking" single ((:url . "https://github.com/kljohann/mpv.el") (:keywords "tools" "multimedia"))]) (mpg123 . [(20151214 1150) nil "A front-end program to mpg123/ogg123" single nil]) (mpages . [(20150710 704) nil "An Emacs buffer for quickly writing your Morning Pages" single ((:url . "https://github.com/slevin/mpages"))]) (mozc-popup . [(20150223 1634) ((popup (0 5 2)) (mozc (0))) "Mozc with popup" single ((:keywords "i18n" "extentions"))]) (mozc-im . [(20150419 449) ((mozc (0))) "Mozc with input-method-function interface." single ((:keywords "i18n" "extentions"))]) (mozc . [(20160102 1506) nil "minor mode to input Japanese with Mozc" single ((:keywords "mule" "multilingual" "input method"))]) (moz-controller . [(20151208 1806) ((moz (0))) "Control Firefox from Emacs" single ((:url . "https://github.com/RenWenshan/emacs-moz-controller"))]) (moz . [(20150805 1006) nil "Lets current buffer interact with inferior mozilla." single ((:url . "http://github.com/bard/mozrepl/raw/master/chrome/content/moz.el"))]) (mowedline . [(20150601 1009) nil "elisp utilities for using mowedline" single nil]) (move-text . [(20160211 1847) nil "Move current line or region with M-up or M-down." single ((:keywords "edit"))]) (move-dup . [(20140925 808) nil "Eclipse-like moving and duplicating lines or rectangles." single ((:keywords "convenience" "wp"))]) (mouse3 . [(20151231 1526) nil "Customizable behavior for `mouse-3'." single ((:url . "http://www.emacswiki.org/mouse3.el") (:keywords "mouse" "menu" "keymap" "kill" "rectangle" "region"))]) (mouse-slider-mode . [(20150910 1400) ((emacs (24 3)) (cl-lib (0 3))) "scale numbers dragged under the mouse" single ((:url . "https://github.com/skeeto/mouse-slider-mode"))]) (mouse+ . [(20151231 1525) nil "Extensions to `mouse.el'." single ((:url . "http://www.emacswiki.org/mouse+.el") (:keywords "mouse"))]) (motion-mode . [(20140919 1856) ((flymake-easy (0 7)) (flymake-cursor (1 0 2))) "major mode for RubyMotion enviroment" tar ((:url . "https://github.com/ainame/motion-mode"))]) (mote-mode . [(20160122 1629) ((ruby-mode (1 1))) "Mote minor mode" single ((:url . "http://inkel.github.com/mote-mode/"))]) (morlock . [(20150815 834) nil "more font-lock keywords for elisp" single ((:url . "http://github.com/tarsius/morlock") (:keywords "convenience"))]) (monroe . [(20141111 107) nil "Yet another client for nREPL" single ((:url . "http://www.github.com/sanel/monroe") (:keywords "languages" "clojure" "nrepl" "lisp"))]) (monokai-theme . [(20160104 1312) nil "A fruity color theme for Emacs." single ((:url . "http://github.com/oneKelvinSmith/monokai-emacs"))]) (monochrome-theme . [(20140326 350) nil "A dark Emacs 24 theme for your focused hacking sessions" tar nil]) (monky . [(20150404 18) nil "Control Hg from Emacs." tar nil]) (mongo . [(20150315 519) nil "MongoDB driver for Emacs Lisp" tar ((:keywords "convenience"))]) (molokai-theme . [(20151016 845) nil "molokai theme with Emacs theme engine" single ((:url . "https://github.com/alloy-d/color-theme-molokai"))]) (moe-theme . [(20160216 1821) nil "A colorful eye-candy theme. Moe, moe, kyun!" tar ((:url . "https://github.com/kuanyui/moe-theme.el"))]) (modtime-skip-mode . [(20140128 1401) nil "Minor mode for disabling modtime and supersession checks on files." single ((:url . "http://www.github.com/jordonbiondo/modtime-skip-mode"))]) (modeline-posn . [(20160112 649) nil "Set up `mode-line-position'." single ((:url . "http://www.emacswiki.org/modeline-posn.el") (:keywords "mode-line" "region" "column"))]) (modeline-char . [(20151231 1519) nil "In the mode-line, show the value of the character after point." single ((:url . "http://www.emacswiki.org/modeline-char.el") (:keywords "mode-line" "character"))]) (mode-line-debug . [(20150307 512) nil "show status of `debug-on-error' in the mode-line" single ((:url . "https://github.com/tarsius/mode-line-debug") (:keywords "convenience" "lisp"))]) (mode-icons . [(20160212 748) ((emacs (24)) (cl-lib (0 5))) "Show icons for modes" tar ((:url . "http://ryuslash.org/projects/mode-icons.html") (:keywords "multimedia"))]) (modalka . [(20160122 433) ((emacs (24 4))) "Easily introduce native modal editing of your own design" single ((:url . "https://github.com/mrkkrp/modalka") (:keywords "modal" "editing"))]) (mocker . [(20150916 1854) ((eieio (1 3)) (el-x (0 2 4))) "mocking framework for emacs" single ((:keywords "lisp" "testing"))]) (mocha-snippets . [(20160211 832) ((yasnippet (0 8 0))) "Yasnippets for the Mocha JS Testing Framework" tar ((:keywords "test" "javascript"))]) (mocha . [(20160203 1608) ((js2-mode (20150909))) "Run Mocha or Jasmine tests" single ((:url . "http://github.com/scottaj/mocha.el") (:keywords "javascript" "mocha" "jasmine"))]) (mobdebug-mode . [(20140109 1946) ((lua-mode (20130419)) (emacs (24))) "Major mode for MobDebug" single ((:url . "https://github.com/deftsp/mobdebug-mode"))]) (mo-vi-ment-mode . [(20131028 2333) nil "Provide vi-like cursor movement that's easy on the fingers" single ((:keywords "convenience"))]) (mo-git-blame . [(20160129 959) nil "An interactive, iterative 'git blame' mode for Emacs" single ((:keywords "tools"))]) (mmt . [(20150906 959) ((emacs (24 1)) (cl-lib (0 3))) "Missing macro tools for Emacs Lisp" single ((:url . "https://github.com/mrkkrp/mmt") (:keywords "macro" "emacs-lisp"))]) (mmm-mode . [(20150828 1716) nil "Allow Multiple Major Modes in a buffer" tar ((:url . "https://github.com/purcell/mmm-mode") (:keywords "convenience" "faces" "languages" "tools"))]) (mmm-mako . [(20121019 2351) ((mmm-mode (0 4 8))) "MMM submode class for Mako Templates" single ((:url . "https://bitbucket.org/pjenvey/mmm-mako"))]) (mmm-jinja2 . [(20150904 1134) ((mmm-mode (0 5 4))) "MMM submode class for Jinja2 Templates" single ((:url . "https://github.com/beardedprojamz/mmm-jinja2"))]) (mkdown . [(20140517 718) ((markdown-mode (2 0))) "Pretty Markdown previews based on mkdown.com" tar ((:url . "https://github.com/ajtulloch/mkdown.el") (:keywords "markdown"))]) (misc-fns . [(20151231 1508) nil "Miscellaneous non-interactive functions." single ((:url . "http://www.emacswiki.org/misc-fns.el") (:keywords "internal" "unix" "lisp" "extensions" "local"))]) (misc-cmds . [(20151231 1423) nil "Miscellaneous commands (interactive functions)." single ((:url . "http://www.emacswiki.org/misc-cmds.el") (:keywords "internal" "unix" "extensions" "maint" "local"))]) (mip-mode . [(20151126 2217) nil "virtual projects for emacs." single ((:keywords "workspaces" "workspace" "project" "projects" "mip-mode"))]) (minor-mode-hack . [(20141226 1220) nil "Change priority of minor-mode keymaps" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/minor-mode-hack.el") (:keywords "lisp"))]) (minizinc-mode . [(20151214 558) ((emacs (24 1))) "Major mode for MiniZinc code" single ((:url . "http://github.com/m00nlight/minizinc-mode") (:keywords "languages" "minizinc"))]) (minitest . [(20160111 1149) ((dash (1 0 0))) "An Emacs mode for ruby minitest files" tar ((:url . "https://github.com/arthurnn/minitest-emacs"))]) (minimal-theme . [(20140409 1601) nil "A light/dark minimalistic Emacs 24 theme." tar ((:url . "http://github.com/ikame/minimal-theme") (:keywords "color" "theme" "minimal"))]) (minimal-session-saver . [(20140508 1341) nil "Very lean session saver" single ((:url . "http://github.com/rolandwalker/minimal-session-saver") (:keywords "tools" "frames" "project"))]) (miniedit . [(20100419 1045) nil "Enhanced editing for minibuffer fields." single nil]) (minibuffer-cua . [(20130906 434) nil "Make CUA mode's S-up/S-down work in minibuffer" single ((:url . "https://github.com/knu/minibuffer-cua.el") (:keywords "completion" "editing"))]) (minibuffer-complete-cycle . [(20130813 945) nil "Cycle through the *Completions* buffer" single ((:url . "https://github.com/knu/minibuffer-complete-cycle") (:keywords "completion"))]) (minibuf-isearch . [(20151226 1143) nil "incremental search on minibuffer history" single ((:keywords "minibuffer" "history" "incremental search"))]) (mingus . [(20160206 110) ((libmpdee (2 1))) "MPD Interface" tar ((:url . "https://github.com/pft/mingus") (:keywords "multimedia" "elisp" "music" "mpd"))]) (minesweeper . [(20150413 2222) nil "play minesweeper in Emacs" single ((:url . "https://bitbucket.org/zck/minesweeper.el") (:keywords "game" "fun" "minesweeper" "inane" "diversion"))]) (milkode . [(20140926 2229) nil "Command line search and direct jump with Milkode" single ((:keywords "milkode" "search" "grep" "jump" "keyword"))]) (migemo . [(20150412 741) ((cl-lib (0 5))) "Japanese incremental search through dynamic pattern expansion" single ((:url . "https://github.com/emacs-jp/migemo"))]) (midje-mode . [(20150921 1750) ((cider (0 1 4)) (clojure-mode (1 0))) "Minor mode for running Midje tests in emacs" tar nil]) (mic-paren . [(20140714 19) nil "advanced highlighting of matching parentheses" single ((:keywords "languages" "faces" "parenthesis" "matching"))]) (mhc . [(20160210 2037) ((calfw (20150703))) "Message Harmonized Calendaring system." tar ((:url . "http://www.quickhack.net/mhc") (:keywords "calendar"))]) (mexican-holidays . [(20160109 1342) nil "Mexico holidays for Emacs calendar." single ((:url . "https://github.com/shopClerk/mexican-holidays") (:keywords "calendar"))]) (mew . [(20150813 2354) nil "Messaging in the Emacs World" tar nil]) (metaweblog . [(20141130 605) ((xml-rpc (1 6 8))) "An emacs library to access metaweblog based weblogs" tar nil]) (metascript-mode . [(20150708 1757) ((emacs (24 3))) "Major mode for the Metascript programming language" single ((:url . "http://github.com/metascript/metascript-mode") (:keywords "languages" "metascript" "mjs"))]) (metafmt . [(20160127 159) nil "Emacs interface for metafmt" single ((:url . "https://github.com/lvillani/metafmt") (:keywords "languages" "tools"))]) (meta-presenter . [(20150501 410) nil "A simple multi-file presentation tool for Emacs" single ((:url . "http://ismail.teamfluxion.com") (:keywords "productivity" "presentation"))]) (message-x . [(20151029 718) nil "customizable completion in message headers" single ((:keywords "news" "mail" "compose" "completion"))]) (merlin . [(20151228 734) nil "Mode for Merlin, an assistant for OCaml." tar ((:url . "http://github.com/the-lambda-church/merlin") (:keywords "ocaml" "languages"))]) (menu-bar+ . [(20151231 1422) nil "Extensions to `menu-bar.el'." single ((:url . "http://www.emacswiki.org/menu-bar+.el") (:keywords "internal" "local" "convenience"))]) (mentor . [(20140904 1710) ((xml-rpc (1 6 9))) "Frontend for the rTorrent bittorrent client" tar ((:keywords "bittorrent" "rtorrent"))]) (memolist . [(20150804 1021) ((markdown-mode (22 0)) (ag (0 45))) "memolist.el is Emacs port of memolist.vim." single ((:url . "http://github.com/mikanfactory/emacs-memolist") (:keywords "markdown" "memo"))]) (memoize . [(20130421 1234) nil "Memoization functions" single ((:url . "https://github.com/skeeto/emacs-memoize"))]) (memento . [(20150823 339) nil "maintaining daily journals when the day ends." single ((:keywords "journal" "log" "diary"))]) (melpa-upstream-visit . [(20130720 333) ((s (1 6 0))) "A set of kludges to visit a melpa-hosted package's homepage" single ((:keywords "convenience"))]) (mellow-theme . [(20141115 2302) ((emacs (24 0))) "an Emacs 24 theme based on Mellow (tmTheme)" single ((:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) (mediawiki . [(20160123 1837) nil "mediawiki frontend" single ((:url . "http://github.com/hexmode/mediawiki-el") (:keywords "mediawiki" "wikipedia" "network" "wiki"))]) (meacupla-theme . [(20151027 1517) nil "meacupla theme for emacs" single ((:url . "https://gitlab.com/jtecca/meacupla-theme") (:keywords "color" "theme" "meacupla" "faces"))]) (md-readme . [(20150505 2359) nil "Markdown-formatted READMEs for your ELisp" tar ((:url . "http://github.com/thomas11/md-readme/tree/master") (:keywords "lisp" "help" "readme" "markdown" "header" "documentation" "github"))]) (mc-extras . [(20150218 234) ((multiple-cursors (1 2 1))) "Extra functions for multiple-cursors mode." tar ((:url . "https://github.com/knu/mc-extras.el") (:keywords "editing" "cursors"))]) (mbo70s-theme . [(20141122 642) ((emacs (24 0))) "70s style palette, with similarities to mbo theme" single ((:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) (mbe . [(20151126 334) ((emacs (24)) (cl-lib (0 5))) "Macros by Example" single ((:url . "https://github.com/ijp/mbe.el") (:keywords "tools" "macros"))]) (mb-url . [(20151210 1016) ((cl-lib (0))) "Multiple Backends for Emacs URL package." tar ((:url . "https://github.com/dochang/mb-url") (:keywords "url"))]) (mb-depth+ . [(20151231 1421) nil "Indicate minibuffer-depth in prompt" single ((:url . "http://www.emacswiki.org/mb-depth+.el") (:keywords "convenience"))]) (maxframe . [(20140916 754) nil "maximize the emacs frame based on display size" single ((:keywords "display" "frame" "window" "maximize"))]) (maven-test-mode . [(20141219 2157) ((s (1 9)) (emacs (24))) "Utilities for navigating test files and running maven test tasks." single ((:url . "http://github.com/rranelli/maven-test-mode") (:keywords "java" "maven" "test"))]) (maude-mode . [(20140212 302) nil "Emacs mode for the programming language Maude" single ((:keywords "maude"))]) (matrix-client . [(20160205 1600) ((json (1 4)) (request (0 2 0))) "A minimal chat client for the Matrix.org RPC" tar ((:url . "http://doc.rix.si/matrix.html") (:keywords "web"))]) (matlab-mode . [(20160210 227) nil "No description available." tar nil]) (math-symbols . [(20151121 1642) ((helm (1 0))) "Math Symbol Input methods and conversion tools" tar ((:url . "https://github.com/kawabata/math-symbols") (:keywords "math symbols" "tex" "latex"))]) (math-symbol-lists . [(20151215 1043) nil "Lists of Unicode math symbols and latex commands" single ((:url . "https://github.com/vspinu/math-symbol-lists") (:keywords "unicode" "symbols" "mathematics"))]) (material-theme . [(20160211 2354) ((emacs (24 1))) "A Theme based on the colors of the Google Material Design" tar ((:url . "http://github.com/cpaulik/emacs-material-theme") (:keywords "themes"))]) (marshal . [(20150916 1857) ((eieio (1 4)) (json (1 3))) "eieio extension for automatic (un)marshalling" single ((:url . "https://github.com/sigma/marshal.el") (:keywords "eieio"))]) (marmalade-client . [(20141231 1207) ((web (0 5 2)) (kv (0 0 19)) (gh (0 8 0))) "client for marmalade API from emacs" tar ((:url . "https://github.com/nicferrier/emacs-marmalade-upload") (:keywords "lisp"))]) (marmalade . [(20110602 1622) ((furl (0 0 2))) "Elisp interface for the Emacs Lisp package server." single ((:url . "http://code.google.com/p/marmalade"))]) (markup-faces . [(20141110 17) nil "collection of faces for markup language modes" single ((:url . "https://github.com/sensorflo/markup-faces") (:keywords "wp" "faces"))]) (markup . [(20130207 1309) nil "Simple markup generation helpers." single ((:url . "http://github.com/leoc/markup.el") (:keywords "convenience" "markup" "html"))]) (markdown-toc . [(20160207 858) ((s (1 9 0)) (dash (2 11 0)) (markdown-mode (2 0))) "A simple TOC generator for markdown file" tar nil]) (markdown-preview-mode . [(20160215 849) ((websocket (1 5)) (markdown-mode (2 1)) (cl-lib (0 5))) "markdown realtime preview minor mode." tar ((:url . "https://github.com/ancane/markdown-preview-mode") (:keywords "markdown" "preview"))]) (markdown-preview-eww . [(20160111 702) ((emacs (24 4))) "Realtime preview by eww" single ((:url . "https://github.com/niku/markdown-preview-eww"))]) (markdown-mode . [(20160216 501) ((cl-lib (0 5))) "Emacs Major mode for Markdown-formatted text files" single ((:url . "http://jblevins.org/projects/markdown-mode/") (:keywords "markdown" "github flavored markdown" "itex"))]) (markdown-mode+ . [(20120829 510) ((markdown-mode (20111229))) "extra functions for markdown-mode" tar ((:url . "http://github.com/milkypostman/markdown-mode+.el") (:keywords "markdown" "latex" "osx" "rtf"))]) (mark-tools . [(20130614 325) nil "Some simple tools to access the mark-ring in Emacs" single ((:url . "https://github.com/stsquad/emacs-mark-tools"))]) (mark-multiple . [(20121118 754) nil "Sorta lets you mark several regions at once." tar nil]) (marcopolo . [(20150326 918) ((s (1 9 0)) (dash (2 9 0)) (pkg-info (0 5 0)) (request (0 1 0))) "Emacs client for Docker API" tar ((:url . "https://github.com/nlamirault/marcopolo") (:keywords "docker"))]) (map-regexp . [(20130522 1403) ((cl-lib (0 2))) "map over matches of a regular expression" single ((:url . "https://github.com/tarsius/map-regexp") (:keywords "convenience"))]) (map-progress . [(20140310 1432) nil "mapping macros that report progress" single ((:url . "https://github.com/tarsius/map-progress/") (:keywords "convenience"))]) (mandoku . [(20160126 2026) ((org (8 0)) (magit (20151028)) (github-clone (20150705)) (git (20140128))) "A tool to access repositories of premodern Chinese texts" tar nil]) (manage-minor-mode . [(20140310 900) ((emacs (24 3))) "Manage your minor-modes easily" single ((:url . "https://github.com/ShingoFukuyama/manage-minor-mode") (:keywords "minor-mode" "manage" "emacs"))]) (man-commands . [(20151221 1421) ((cl-lib (0 5))) "Add interactive commands for every manpages installed in your computer." single ((:url . "http://github.com/nflath/man-commands"))]) (mallard-snippets . [(20131023 1151) ((yasnippet (0 8 0)) (mallard-mode (0 1 1))) "Yasnippets for Mallard" tar ((:url . "https://github.com/jhradilek/emacs-mallard-snippets") (:keywords "snippets" "mallard"))]) (mallard-mode . [(20131203 2025) nil "Major mode for editing Mallard files" tar ((:url . "https://github.com/jhradilek/emacs-mallard-mode") (:keywords "xml" "mallard"))]) (malinka . [(20151107 16) ((s (1 9 0)) (dash (2 4 0)) (f (0 11 0)) (cl-lib (0 3)) (rtags (0 0)) (projectile (0 11 0))) "A C/C++ project configuration package for Emacs" single ((:url . "https://github.com/LefterisJP/malinka") (:keywords "c" "c++" "project-management"))]) (malabar-mode . [(20150720 1055) ((fringe-helper (1 0 1)) (groovy-mode (0))) "JVM Integration mode for EMACS" tar ((:url . "http://www.github.com/m0smith/malabar-mode") (:keywords "java" "maven" "groovy" "language" "malabar"))]) (makey . [(20131231 630) ((cl-lib (0 2))) "interactive commandline mode" single nil]) (maker-mode . [(20150116 354) ((s (1 3 0)) (dash (2 8 0))) "Emacs mode for maker (scala build tool)" single ((:url . "https://github.com/fommil/maker-mode") (:keywords "processes" "tools"))]) (make-it-so . [(20150319 1207) ((helm (1 5 3)) (emacs (24))) "Transform files with Makefile recipes." tar ((:url . "https://github.com/abo-abo/make-it-so") (:keywords "make" "dired"))]) (make-color . [(20140625 450) nil "Alternative to picking color - update fg/bg color by pressing r/g/b/... keys" single ((:url . "https://github.com/alezost/make-color.el") (:keywords "color"))]) (majapahit-theme . [(20160203 629) nil "Color theme with a dark and light versions" tar ((:keywords "color" "theme") (:url . "https://gitlab.com/franksn/majapahit-theme"))]) (main-line . [(20151120 1806) ((cl-lib (0 5))) "modeline replacement forked from an early version of powerline.el" single ((:url . "https://github.com/jasonm23/emacs-mainline") (:keywords "statusline" "/" "modeline"))]) (magnatune . [(20151030 1235) ((dash (2 9 0)) (s (1 9 0))) "browse magnatune's music catalog" tar nil]) (magma-mode . [(20150923 140) ((cl-lib (0 3)) (dash (2 6 0)) (f (0 17 1))) "Magma mode for Emacs" tar ((:url . "https://github.com/ThibautVerron/magma-mode"))]) (magit-topgit . [(20160215 839) ((emacs (24 4)) (magit (2 1 0))) "TopGit extension for Magit" single ((:keywords "vc" "tools"))]) (magit-svn . [(20151219 547) ((emacs (24 4)) (magit (2 1 0))) "Git-Svn extension for Magit" single ((:keywords "vc" "tools"))]) (magit-stgit . [(20160217 747) ((emacs (24 4)) (magit (2 1 0))) "StGit extension for Magit" single ((:keywords "vc" "tools"))]) (magit-rockstar . [(20160117 1658) ((dash (2 12 1)) (magit (2 4 0))) "commit like a rockstar" single ((:url . "http://github.com/tarsius/magit-rockstar") (:keywords "convenience"))]) (magit-popup . [(20160130 649) ((emacs (24 4)) (async (20150909 2257)) (dash (20151021 113))) "Define prefix-infix-suffix command combos" tar ((:url . "https://github.com/magit/magit") (:keywords "bindings"))]) (magit-gitflow . [(20160208 1304) ((magit (2 1 0)) (magit-popup (2 2 0))) "gitflow extension for magit" single ((:url . "https://github.com/jtatarik/magit-gitflow") (:keywords "vc" "tools"))]) (magit-gh-pulls . [(20160215 232) ((emacs (24)) (gh (0 9 1)) (magit (2 1 0)) (pcache (0 2 3)) (s (1 6 1))) "GitHub pull requests extension for Magit" single ((:url . "https://github.com/sigma/magit-gh-pulls") (:keywords "git" "tools"))]) (magit-gerrit . [(20160128 1926) ((magit (2 3 1))) "Magit plugin for Gerrit Code Review" single ((:url . "https://github.com/terranpro/magit-gerrit"))]) (magit-find-file . [(20150702 130) ((magit (2 1 0)) (dash (2 8 0))) "completing-read over all files in Git" single ((:url . "https://github.com/bradleywright/magit-find-file.el") (:keywords "git"))]) (magit-filenotify . [(20151116 1540) ((magit (1 3 0)) (emacs (24 4))) "Refresh status buffer when git tree changes" single ((:keywords "tools"))]) (magit-annex . [(20160204 1935) ((cl-lib (0 3)) (magit (2 3 0))) "Control git-annex from Magit" single ((:url . "https://github.com/kyleam/magit-annex") (:keywords "vc" "tools"))]) (magit . [(20160214 1130) ((emacs (24 4)) (async (20150909 2257)) (dash (20151021 113)) (with-editor (20160128 1201)) (git-commit (20160119 1409)) (magit-popup (20160119 1409))) "A Git porcelain inside Emacs" tar ((:url . "https://github.com/magit/magit") (:keywords "git" "tools" "vc"))]) (magic-latex-buffer . [(20160212 603) ((cl-lib (0 5)) (emacs (24 3))) "Magically enhance LaTeX-mode font-locking for semi-WYSIWYG editing" single ((:url . "http://hins11.yu-yake.com/"))]) (magic-filetype . [(20160120 504) ((emacs (24)) (s (1 9 0))) "Enhance filetype major mode" single ((:keywords "vim" "ft" "file" "magic-mode"))]) (mag-menu . [(20150505 1150) ((splitter (0 1 0))) "Intuitive keyboard-centric menu system" single ((:url . "https://github.com/chumpage/mag-menu") (:keywords "convenience"))]) (macrostep . [(20151213 145) ((cl-lib (0 5))) "interactive macro expander" tar ((:url . "https://github.com/joddie/macrostep") (:keywords "lisp" "languages" "macro" "debugging"))]) (macros+ . [(20151231 1419) nil "Extensions to `macros.el'." single ((:url . "http://www.emacswiki.org/macros+.el") (:keywords "abbrev" "local"))]) (macro-math . [(20130328 904) nil "in-buffer mathematical operations" single ((:url . "http://nschum.de/src/emacs/macro-math/") (:keywords "convenience"))]) (m-buffer . [(20160125 1303) ((dash (2 8 0)) (emacs (24 3))) "List-Oriented, Functional Buffer Manipulation" tar nil]) (lxc . [(20140410 1322) nil "lxc integration with Emacs" single ((:url . "https://github.com/nicferrier/emacs-lxc") (:keywords "processes"))]) (lusty-explorer . [(20150508 1557) nil "Dynamic filesystem explorer and buffer switcher" single ((:keywords "convenience" "files" "matching"))]) (lush-theme . [(20141107 806) ((emacs (24))) "A dark theme with strong colors" single ((:url . "https://github.com/andre-richter/emacs-lush-theme") (:keywords "theme" "dark" "strong colors"))]) (lua-mode . [(20151025 530) nil "a major-mode for editing Lua scripts" tar ((:url . "http://immerrr.github.com/lua-mode") (:keywords "languages" "processes" "tools"))]) (love-minor-mode . [(20130429 1459) ((lua-mode (20130419))) "Minor mode for working on LÖVE projects" single ((:url . "https://github.com/ejmr/love-minor-mode"))]) (lorem-ipsum . [(20140911 1408) nil "Insert dummy pseudo Latin text." single ((:keywords "tools" "language" "convenience"))]) (loop . [(20151228 321) nil "friendly imperative loop structures" single ((:keywords "loop" "while" "for each" "break" "continue"))]) (look-mode . [(20151211 1026) nil "quick file viewer for image and text file browsing" single nil]) (look-dired . [(20151115 1756) ((look-mode (1 0))) "Extensions to look-mode for dired buffers" single ((:url . "https://github.com/vapniks/look-dired") (:keywords "convenience"))]) (lolcode-mode . [(20111002 147) nil "Major mode for editing LOLCODE" single ((:url . "http://github.com/bodil/lolcode-mode") (:keywords "lolcode" "major" "mode"))]) (logview . [(20151030 1449) ((emacs (24 1))) "Major mode for viewing log files" single ((:url . "https://github.com/doublep/logview") (:keywords "files" "tools"))]) (logstash-conf . [(20150308 518) nil "basic mode for editing logstash configuration" single nil]) (logito . [(20120225 1255) ((eieio (1 3))) "logging library for Emacs" single ((:keywords "lisp" "tool"))]) (logalimacs . [(20131021 1129) ((popwin (0 6 2)) (popup (0 5 0)) (stem (20130120))) "Front-end to logaling-command for Ruby gems" single ((:url . "https://github.com/logaling/logalimacs") (:keywords "translation" "logaling-command"))]) (log4j-mode . [(20160108 1118) nil "major mode for viewing log files" single ((:url . "http://log4j-mode.sourceforge.net") (:keywords "tools"))]) (log4e . [(20150105 505) nil "provide logging framework for elisp" single ((:url . "https://github.com/aki2o/log4e") (:keywords "log"))]) (lodgeit . [(20150312 649) nil "Paste to a lodgeit powered pastebin" single ((:url . "https://github.com/ionrock/lodgeit-el") (:keywords "pastebin" "lodgeit"))]) (loccur . [(20160129 1222) ((cl-lib (0))) "Perform an occur-like folding in current buffer" single ((:url . "https://github.com/fourier/loccur") (:keywords "matching"))]) (loc-changes . [(20150302 848) nil "keep track of positions even after buffer changes" single ((:url . "http://github.com/rocky/emacs-loc-changes"))]) (load-theme-buffer-local . [(20120702 1336) nil "Install emacs24 color themes by buffer." single ((:url . "http://github.com/vic/color-theme-buffer-local") (:keywords "faces"))]) (llvm-mode . [(20150910 644) nil "Major mode for the LLVM assembler language." tar nil]) (livid-mode . [(20131116 544) ((skewer-mode (1 5 3)) (s (1 8 0))) "Live browser eval of JavaScript every time a buffer changes" single ((:url . "https://github.com/pandeiro/livid-mode"))]) (livescript-mode . [(20140612 2121) nil "Major mode for editing LiveScript files" single ((:url . "https://github.com/yhisamatsu/livescript-mode") (:keywords "languages" "livescript"))]) (lively . [(20120728 713) nil "Interactively updating text" single nil]) (live-py-mode . [(20160204 1714) ((emacs (24 1))) "Live Coding in Python" tar ((:url . "http://donkirkby.github.io/live-py-plugin/") (:keywords "live" "coding"))]) (live-code-talks . [(20150115 1423) ((emacs (24)) (cl-lib (0 5)) (narrowed-page-navigation (0 1))) "Support for slides with live code in them" single ((:keywords "docs" "multimedia"))]) (literate-starter-kit . [(20150730 1154) ((emacs (24 3))) "A literate starter kit to configure Emacs using Org-mode files." tar nil]) (literate-coffee-mode . [(20160114 434) ((coffee-mode (0 5 0))) "major-mode for Literate CoffeeScript" single ((:url . "https://github.com/syohex/emacs-literate-coffee-mode"))]) (litecoin-ticker . [(20160130 1907) nil "No description available." single nil]) (litable . [(20150908 709) ((dash (2 6 0))) "dynamic evaluation replacement with emacs" single ((:keywords "lisp"))]) (lit-mode . [(20141123 936) nil "Major mode for lit" single ((:keywords "languages" "tools"))]) (list-utils . [(20140508 1341) nil "List-manipulation utility functions" single ((:url . "http://github.com/rolandwalker/list-utils") (:keywords "extensions"))]) (list-unicode-display . [(20150219 101) ((cl-lib (0 5))) "Search for and list unicode characters by name" single ((:keywords "convenience"))]) (list-register . [(20130824 500) nil "List register" single nil]) (list-processes+ . [(20131117 1135) nil "Add process management to `list-processes'" single ((:url . "not distributed yet"))]) (list-packages-ext . [(20151115 916) ((s (1 6 0)) (ht (1 5 0)) (persistent-soft (0 8 6))) "Extras for list-packages" single ((:keywords "convenience" "tools"))]) (list-environment . [(20151226 1856) nil "A tabulated process environment editor" single ((:keywords "processes" "unix"))]) (lispyscript-mode . [(20130828 719) nil "Major mode for LispyScript code." single ((:url . "https://github.com/krisajenkins/lispyscript-mode") (:keywords "lisp" "languages"))]) (lispy . [(20160213 654) ((emacs (24 1)) (ace-window (0 9 0)) (iedit (0 97)) (swiper (0 4 0)) (hydra (0 13 4))) "vi-like Paredit" tar nil]) (lispxmp . [(20130824 507) nil "Automagic emacs lisp code annotation" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/download/lispxmp.el") (:keywords "lisp" "convenience"))]) (lisp-extra-font-lock . [(20150129 1316) nil "Highlight bound variables and quoted exprs." single ((:url . "https://github.com/Lindydancer/lisp-extra-font-lock") (:keywords "languages" "faces"))]) (linum-relative . [(20160117 2200) nil "display relative line number in emacs." single ((:url . "http://github.com/coldnew/linum-relative") (:keywords "converience"))]) (linum-off . [(20160217 1337) nil "Provides an interface for turning line-numbering off" single ((:url . "http://www.emacswiki.org/emacs/auto-indent-mode.el ") (:keywords "line" "numbering"))]) (linphone . [(20130524 409) nil "Emacs interface to Linphone" tar ((:url . "https://github.com/zabbal/emacs-linphone") (:keywords "comm"))]) (link-hint . [(20160128 1254) ((avy (0 3 0)) (emacs (24 1))) "Use avy to open or copy visible urls." single ((:url . "https://github.com/noctuid/link-hint.el") (:keywords "url"))]) (link . [(20140717 2029) nil "Hypertext links in text buffers" single ((:keywords "interface" "hypermedia"))]) (lingr . [(20100807 1031) nil "Lingr Client for GNU Emacs" single ((:url . "http://github.com/lugecy/lingr-el") (:keywords "chat" "client" "internet"))]) (light-soap-theme . [(20150607 745) ((emacs (24))) "Emacs 24 theme with a light background." single nil]) (lice . [(20151225 1022) nil "License And Header Template" tar ((:url . "https://github.com/buzztaiki/lice-el") (:keywords "template" "license" "tools"))]) (libmpdee . [(20160117 1501) nil "Client end library for mpd, a music playing daemon" single ((:keywords "music" "mpd"))]) (lib-requires . [(20151231 1410) nil "Commands to list Emacs Lisp library dependencies." single ((:url . "http://www.emacswiki.org/lib-requires.el") (:keywords "libraries" "files"))]) (lfe-mode . [(20151227 1831) nil "Lisp Flavoured Erlang mode" tar nil]) (lexbind-mode . [(20141027 729) nil "Puts the value of lexical-binding in the mode line" single ((:url . "https://github.com/spacebat/lexbind-mode") (:keywords "convenience" "lisp"))]) (levenshtein . [(20051013 1056) nil "Edit distance between two strings." single ((:keywords "lisp"))]) (leuven-theme . [(20160207 1043) nil "Awesome Emacs color theme on white background" single ((:url . "https://github.com/fniessen/emacs-leuven-theme") (:keywords "color" "theme"))]) (letcheck . [(20160202 1148) nil "Check the erroneous assignments in let forms" single ((:url . "https://github.com/Fuco1/letcheck") (:keywords "convenience"))]) (less-css-mode . [(20150511 319) nil "Major mode for editing LESS CSS files (lesscss.org)" single ((:url . "https://github.com/purcell/less-css-mode") (:keywords "less" "css" "mode"))]) (lentic-server . [(20150320 626) ((lentic (0 8)) (web-server (0 1 1))) "Web Server for Emacs Literate Source" single nil]) (lentic . [(20160110 905) ((emacs (24 4)) (m-buffer (0 13)) (dash (2 5 0)) (f (0 17 2)) (s (1 9 0))) "One buffer as a view of another" tar nil]) (lenlen-theme . [(20150307 11) ((color-theme-solarized (20150110))) "a solarized-based kawaii light theme" single ((:url . "http://hins11.yu-yake.com/"))]) (lemon-mode . [(20130216 504) nil "A major mode for editing lemon grammar files" single ((:keywords "lemon"))]) (legalese . [(20100119 1348) nil "Add legalese to your program files" single ((:keywords "convenience"))]) (leerzeichen . [(20151105 2228) nil "Minor mode to display whitespace characters." single ((:url . "http://github.com/fgeller/leerzeichen.el") (:keywords "whitespace" "characters"))]) (ledger-mode . [(20160111 1834) nil "Helper code for use with the \"ledger\" command-line tool" tar nil]) (ldap-mode . [(20091203 1015) nil "major modes for editing LDAP schema and LDIF files" single ((:url . "http://www.loveshack.ukfsn.org/emacs") (:keywords "data"))]) (lavender-theme . [(20141115 2302) ((emacs (24 0))) "an Emacs 24 theme based on Lavender (tmTheme)" single ((:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) (launchctl . [(20150518 609) ((emacs (24 1))) "Interface to launchctl on Mac OS X." single ((:url . "http://github.com/pekingduck/launchctl-el") (:keywords "tools" "convenience"))]) (launch . [(20130619 1504) nil "launch files with OS-standard associated applications." single ((:url . "https://github.com/sfllaw/emacs-launch") (:keywords "convenience" "processes"))]) (latex-unicode-math-mode . [(20160209 917) nil "Input method for Unicode math symbols" tar ((:url . "https://github.com/Christoph-D/latex-unicode-math-mode"))]) (latex-preview-pane . [(20151023 1303) nil "Makes LaTeX editing less painful by providing a updatable preview pane" tar nil]) (latex-pretty-symbols . [(20151112 244) nil "Display many latex symbols as their unicode counterparts" single ((:url . "https://bitbucket.org/mortiferus/latex-pretty-symbols.el") (:keywords "convenience" "display"))]) (latex-math-preview . [(20160104 1658) nil "preview LaTeX mathematical expressions." single ((:url . "https://gitlab.com/latex-math-preview/latex-math-preview") (:keywords "latex" "tex"))]) (latex-extra . [(20160209 745) ((auctex (11 86 1)) (cl-lib (0 5))) "Adds several useful functionalities to LaTeX-mode." single ((:url . "http://github.com/Malabarba/latex-extra") (:keywords "tex"))]) (latest-clojure-libraries . [(20140314 617) nil "Clojure dependency resolver" single ((:url . "http://github.com/AdamClements/latest-clojure-libraries/"))]) (langtool . [(20160116 1654) ((cl-lib (0 3))) "Grammar check utility using LanguageTool" single ((:url . "https://github.com/mhayashi1120/Emacs-langtool") (:keywords "docs"))]) (langdoc . [(20150217 2245) ((cl-lib (0 2))) "Help to define help document mode for various languages" single ((:url . "https://github.com/tom-tan/langdoc/") (:keywords "convenience" "eldoc"))]) (lang-refactor-perl . [(20131122 1327) nil "Simple refactorings, primarily for Perl" single ((:url . "https://github.com/jplindstrom/emacs-lang-refactor-perl") (:keywords "languages" "refactoring" "perl"))]) (lacarte . [(20151231 1409) nil "Execute menu items as commands, with completion." single ((:url . "http://www.emacswiki.org/lacarte.el") (:keywords "menu-bar" "menu" "command" "help" "abbrev" "minibuffer" "keys" "completion" "matching" "local" "internal" "extensions"))]) (kwin . [(20150308 1112) nil "communicatewith the KWin window manager" single ((:url . "http://github.com/reactormonk/kwin-minor-mode"))]) (kv . [(20140108 734) nil "key/value data structure functions" single ((:keywords "lisp"))]) (kurecolor . [(20150423 2122) ((emacs (24 1)) (s (1 0))) "color editing goodies for Emacs" single nil]) (kroman . [(20150827 1640) nil "Korean hangul romanization" single ((:keywords "korean" "roman"))]) (kpm-list . [(20130131 148) nil "An emacs buffer list that tries to intelligently group together buffers." single ((:url . "https://github.com/KMahoney/kpm-list/"))]) (kooten-theme . [(20160214 451) ((emacs (24 1))) "Dark color theme" single ((:url . "http://github.com/kootenpv/emacs-kooten-theme") (:keywords "themes"))]) (kolon-mode . [(20140122 334) nil "Syntax highlighting for Text::Xslate's Kolon syntax" single ((:url . "https://github.com/samvtran/kolon-mode") (:keywords "xslate" "perl"))]) (know-your-http-well . [(20160208 1504) nil "Look up the meaning of HTTP headers, methods, relations, status codes" tar nil]) (kixtart-mode . [(20150611 904) ((emacs (24))) "major mode for Kixtart scripting files" single ((:url . "https://github.com/ryrun/kixtart-mode") (:keywords "languages"))]) (kivy-mode . [(20140524 557) nil "Emacs major mode for editing Kivy files" single nil]) (kite-mini . [(20150811 1129) ((dash (2 11 0)) (websocket (1 5))) "Remotely evaluate JavaScript in the WebKit debugger" single ((:url . "https://github.com/tungd/kite-mini.el") (:keywords "webkit"))]) (kite . [(20130201 1138) ((json (1 2)) (websocket (0 93 1))) "WebKit inspector front-end" tar ((:keywords "tools"))]) (killer . [(20120808 422) nil "kill and delete text" single ((:url . "http://github.com/tarsius/killer") (:keywords "convenience"))]) (kill-ring-search . [(20140422 855) nil "incremental search for the kill ring" single ((:url . "http://nschum.de/src/emacs/kill-ring-search/") (:keywords "convenience" "matching"))]) (kill-or-bury-alive . [(20160128 109) ((emacs (24 4)) (cl-lib (0 5))) "Precise control over buffer killing in Emacs" single ((:url . "https://github.com/mrkkrp/kill-or-bury-alive") (:keywords "buffer" "killing" "convenience"))]) (kibit-helper . [(20150508 833) ((s (0 8)) (emacs (24))) "Conveniently use the Kibit Leiningen plugin from Emacs" single ((:url . "http://www.github.com/brunchboy/kibit-helper") (:keywords "languages" "clojure" "kibit"))]) (kfg . [(20140908 2238) ((f (0 17 1))) "an emacs configuration system" single ((:url . "https://github.com/abingham/kfg"))]) (keyword-search . [(20150911 232) nil "browser keyword search from Emacs" single ((:url . "https://github.com/juhp/keyword-search") (:keywords "web" "search" "keyword"))]) (keyset . [(20150219 2130) ((dash (2 8 0)) (cl-lib (0 5))) "A small library for structuring key bindings." single ((:url . "https://github.com/HKey/keyset"))]) (keymap-utils . [(20151128 644) ((cl-lib (0 3))) "keymap utilities" single ((:url . "https://github.com/tarsius/keymap-utils") (:keywords "convenience" "extensions"))]) (keyfreq . [(20150924 2005) nil "track command frequencies" single nil]) (keydef . [(20090428 1231) nil "a simpler way to define keys, with kbd syntax" single ((:keywords "convenience" "lisp" "customization" "keyboard" "keys"))]) (keychain-environment . [(20150416 1258) nil "load keychain environment variables" single ((:url . "https://github.com/tarsius/keychain-environment") (:keywords "gnupg" "pgp" "ssh"))]) (key-seq . [(20150907 56) ((key-chord (0 6))) "map pairs of sequentially pressed keys to commands" single ((:url . "http://github.com/vlevit/key-seq.el") (:keywords "convenience" "keyboard" "keybindings"))]) (key-leap . [(20160109 1237) ((emacs (24 3))) "Leap between lines by typing keywords" single ((:url . "https://github.com/MartinRykfors/key-leap") (:keywords "point" "convenience"))]) (key-intercept . [(20140210 2349) nil "Intercept prefix keys" single ((:url . "http://github.com/tarao/key-intercept-el") (:keywords "keyboard"))]) (key-combo . [(20150324 739) nil "map key sequence to commands" single ((:url . "https://github.com/uk-ar/key-combo") (:keywords "keyboard" "input"))]) (key-chord . [(20151209 104) nil "map pairs of simultaneously pressed keys to commands" single ((:keywords "keyboard" "chord" "input"))]) (kerl . [(20150424 1305) nil "Emacs integration for kerl" single ((:url . "http://github.com/correl/kerl.el/") (:keywords "tools"))]) (karma . [(20150120 2158) ((pkg-info (0 4)) (emacs (24))) "Karma Test Runner Emacs Integration" single ((:url . "http://github.com/tonini/karma.el") (:keywords "language" "javascript" "js" "karma" "testing"))]) (kaomoji . [(20160119 743) ((emacs (24 3)) (helm-core (1 9 1))) "Input kaomoji superb easily" tar ((:url . "https://github.com/kuanyui/kaomoji.el") (:keywords "tools" "fun"))]) (kanji-mode . [(20150202 25) nil "View stroke order for kanji characters at cursor" tar ((:url . "http://github.com/wsgac/kanji-mode "))]) (kanban . [(20150930 917) nil "Parse org-todo headlines to use org-tables as Kanban tables" single ((:keywords "outlines" "convenience"))]) (kakapo-mode . [(20150906 2152) ((cl-lib (0 5))) "TABS (hard or soft) for indentation (leading whitespace), and SPACES for alignment." single ((:url . "https://github.com/listx/kakapo-mode") (:keywords "indentation"))]) (kaesar-mode . [(20160128 208) ((kaesar (0 1 4)) (cl-lib (0 3))) "Encrypt/Decrypt buffer by AES with password." single ((:url . "https://github.com/mhayashi1120/Emacs-kaesar") (:keywords "data" "convenience"))]) (kaesar-file . [(20160128 208) ((kaesar (0 1 1))) "Encrypt/Decrypt file by AES with password." single ((:url . "https://github.com/mhayashi1120/Emacs-kaesar") (:keywords "data" "files"))]) (kaesar . [(20160128 208) ((cl-lib (0 3))) "Another AES algorithm encrypt/decrypt string with password." single ((:url . "https://github.com/mhayashi1120/Emacs-kaesar") (:keywords "data"))]) (jvm-mode . [(20150422 8) ((dash (2 6 0)) (emacs (24))) "Monitor and manage your JVMs" single ((:url . "https://github.com/martintrojer/jvm-mode.el") (:keywords "convenience"))]) (jumplist . [(20151119 1945) ((cl-lib (0 5))) "Jump like vim jumplist or ex jumplist" single ((:url . "https://github.com/ganmacs/jumplist") (:keywords "jumplist" "vim"))]) (jump-to-line . [(20130122 853) nil "Jump to line number at point." single ((:keywords "jump" "line" "back" "file" "ruby" "csharp" "python" "perl"))]) (jump-char . [(20150108 1235) nil "navigation by char" single ((:url . "https://github.com/lewang/jump-char"))]) (jump . [(20151009 129) ((findr (0 7)) (inflections (1 1))) "build functions which contextually jump between files" single ((:url . "http://github.com/eschulte/jump.el/tree/master") (:keywords "project" "convenience" "navigation"))]) (jumblr . [(20140908 1352) ((s (1 8 0)) (dash (2 2 0))) "an anagram game for emacs" tar ((:url . "https://github.com/mkmcc/jumblr") (:keywords "anagram" "word game" "games"))]) (julia-shell . [(20151104 1052) ((julia-mode (0 3))) "Major mode for an inferior Julia shell" tar nil]) (julia-mode . [(20150912 800) nil "Major mode for editing Julia source code" single ((:url . "https://github.com/JuliaLang/julia") (:keywords "languages"))]) (jtags . [(20160211 1229) nil "enhanced tags functionality for Java development" tar ((:url . "http://jtags.sourceforge.net") (:keywords "languages" "tools"))]) (jsx-mode . [(20130908 1024) nil "major mode for JSX" single ((:url . "https://github.com/jsx/jsx-mode.el"))]) (jst . [(20150604 438) ((s (1 9)) (f (0 17)) (dash (2 10)) (pcache (0 3)) (emacs (24 4))) "JS test mode" single ((:url . "https://github.com/cheunghy/jst-mode") (:keywords "js" "javascript" "jasmine" "coffee" "coffeescript"))]) (jss . [(20130508 723) ((emacs (24 1)) (websocket (0)) (js2-mode (0))) "An emacs interface to webkit and mozilla debuggers" tar ((:keywords "languages"))]) (json-snatcher . [(20150511 2047) ((emacs (24))) "Grabs the path to JSON values in a JSON file" single ((:url . "http://github.com/sterlingg/json-snatcher"))]) (json-rpc . [(20150830 1401) ((emacs (24 1)) (cl-lib (0 5))) "JSON-RPC library" single ((:url . "https://github.com/skeeto/elisp-json-rpc"))]) (json-reformat . [(20160212 53) nil "Reformatting tool for JSON" single ((:url . "https://github.com/gongo/json-reformat") (:keywords "json"))]) (json-mode . [(20151116 2000) ((json-reformat (0 0 5)) (json-snatcher (1 0 0))) "Major mode for editing JSON files" single ((:url . "https://github.com/joshwnj/json-mode"))]) (jsfmt . [(20150727 1525) nil "Interface to jsfmt command for javascript files" single ((:url . "https://github.com/brettlangdon/jsfmt.el"))]) (jscs . [(20151015 1049) ((emacs (24 1)) (cl-lib (0 5))) "Consistent JavaScript editing using JSCS" single ((:url . "https://github.com/papaeye/emacs-jscs") (:keywords "languages" "convenience"))]) (js3-mode . [(20150902 949) nil "An improved JavaScript editing mode" tar ((:keywords "javascript" "languages"))]) (js2-refactor . [(20151029 507) ((js2-mode (20101228)) (s (1 9 0)) (multiple-cursors (1 0 0)) (dash (1 0 0)) (s (1 0 0)) (yasnippet (0 9 0 1))) "A JavaScript refactoring library for emacs." tar nil]) (js2-mode . [(20160124 1132) ((emacs (24 1)) (cl-lib (0 5))) "Improved JavaScript editing mode" tar ((:url . "https://github.com/mooz/js2-mode/") (:keywords "languages" "javascript"))]) (js2-highlight-vars . [(20150914 108) ((js2-mode (20150908))) "highlight occurrences of the variable under cursor" single ((:url . "http://mihai.bazon.net/projects/editing-javascript-with-emacs-js2-mode/js2-highlight-vars-mode"))]) (js2-closure . [(20141027 1550) ((js2-mode (20140114))) "Google Closure dependency manager" single ((:url . "http://github.com/jart/js2-closure"))]) (js-doc . [(20160208 1707) nil "Insert JsDoc style comment easily" single ((:url . "https://github.com/mooz/js-doc") (:keywords "document" "comment"))]) (js-comint . [(20151126 1838) ((nvm (0 2 0))) "Run a JavaScript interpreter in an inferior process window." single ((:url . "https://github.com/redguardtoo/js-comint") (:keywords "javascript" "node" "inferior-mode" "convenience"))]) (jquery-doc . [(20150812 58) nil "jQuery api documentation interface for emacs" tar ((:keywords "docs" "jquery"))]) (jq-mode . [(20160217 1631) ((emacs (24 3))) "Edit jq scripts." tar ((:url . "https://github.com/ljos/jq-mode"))]) (jonprl-mode . [(20151203 142) ((emacs (24 3)) (cl-lib (0 5)) (yasnippet (0 8 0))) "A major mode for editing JonPRL files" tar ((:keywords "languages"))]) (jknav . [(20121006 1325) nil "Automatically enable j/k keys for line-based navigation" single ((:keywords "keyboard" "navigation"))]) (jist . [(20151228 1550) ((emacs (24 4)) (pkg-info (0 4)) (dash (2 12 0)) (let-alist (1 0 4)) (magit (2 1 0)) (request (0 2 0))) "Gist integration" single ((:url . "https://github.com/emacs-pe/jist.el") (:keywords "convenience"))]) (jira-markup-mode . [(20150601 1409) nil "Emacs Major mode for JIRA-markup-formatted text files" single ((:url . "https://github.com/mnuessler/jira-markup-mode") (:keywords "jira" "markup"))]) (jira . [(20131210 1022) nil "Connect to JIRA issue tracking software" single nil]) (jinja2-mode . [(20141128 207) nil "A major mode for jinja2" single nil]) (jg-quicknav . [(20160216 2035) ((s (1 9 0)) (cl-lib (0 5))) "Quickly navigate the file system to find a file." single ((:url . "https://github.com/jeffgran/jg-quicknav") (:keywords "navigation"))]) (jenkins-watch . [(20121004 1626) nil "Watch continuous integration build status" single ((:url . "https://github.com/ataylor284/jenkins-watch"))]) (jenkins . [(20151114 1908) ((dash (2 12)) (emacs (24 3)) (json (1 4))) "Minimalistic Jenkins client for Emacs" single ((:keywords "jenkins" "convenience"))]) (jekyll-modes . [(20141117 514) ((polymode (0 2))) "Major modes (markdown and HTML) for authoring Jekyll content" single ((:url . "https://github.com/fred-o/jekyll-modes") (:keywords "docs"))]) (jedi-direx . [(20140310 236) ((jedi (0 1 2)) (direx (0 1 -3))) "Tree style source code viewer for Python buffer" single nil]) (jedi-core . [(20151214 705) ((emacs (24)) (epc (0 1 0)) (python-environment (0 0 2)) (cl-lib (0 5))) "Common code of jedi.el and company-jedi.el" tar nil]) (jedi . [(20151214 705) ((emacs (24)) (jedi-core (0 2 2)) (auto-complete (1 4))) "a Python auto-completion for Emacs" single nil]) (jdee . [(20160207 28) ((emacs (24 3))) "Java Development Environment for Emacs" tar ((:url . "http://github.com/jdee-emacs/jdee") (:keywords "java" "tools"))]) (jbeans-theme . [(20151217 754) ((emacs (24))) "Jbeans theme for GNU Emacs 24 (deftheme)" single ((:url . "https://github.com/synic/jbeans-emacs"))]) (jazz-theme . [(20150910 844) nil "A warm color theme for Emacs 24." single ((:url . "https://github.com/donderom/jazz-theme"))]) (jaword . [(20150325 718) ((tinysegmenter (0 1))) "Minor-mode for handling Japanese words better" single ((:url . "http://hins11.yu-yake.com/"))]) (javap-mode . [(20120223 1408) nil "Javap major mode" single ((:url . "http://github.com/hiredman/javap-mode"))]) (javadoc-lookup . [(20160213 1631) ((cl-lib (0 3))) "Javadoc Emacs integration with Maven" tar ((:url . "https://github.com/skeeto/javadoc-lookup"))]) (java-snippets . [(20140727 2236) ((yasnippet (0 8 0))) "Yasnippets for Java" tar ((:url . "https://github.com/nekop/yasnippet-java-mode"))]) (java-imports . [(20160127 729) ((emacs (24 4)) (s (1 10 0)) (pcache (0 3 2))) "Code for dealing with Java imports" single ((:url . "http://www.github.com/dakrone/emacs-java-imports") (:keywords "java"))]) (jaunte . [(20130413 219) nil "Emacs Hit a Hint" single nil]) (jasminejs-mode . [(20150526 1705) nil "A minor mode for manipulating jasmine test files" tar ((:url . "https://github.com/stoltene2/jasminejs-mode") (:keywords "javascript" "jasmine"))]) (jar-manifest-mode . [(20150329 1533) nil "Major mode to edit JAR manifest files" single ((:url . "http://github.com/omajid/jar-manifest-mode") (:keywords "convenience" "languages"))]) (jape-mode . [(20140903 806) nil "An Emacs editing mode mode for GATE's JAPE files" single ((:url . "http://github.com/tanzoniteblack/jape-mode") (:keywords "languages" "jape" "gate"))]) (japanlaw . [(20160129 20) ((cl-lib (0 5))) "Japan law from law.e-gov.go.jp" single ((:keywords "docs" "help"))]) (japanese-holidays . [(20150208 1737) ((cl-lib (0 3))) "calendar functions for the Japanese calendar" single ((:url . "https://github.com/emacs-jp/japanese-holidays") (:keywords "calendar"))]) (jammer . [(20151213 614) nil "Punish yourself for using Emacs inefficiently" single ((:url . "https://github.com/wasamasa/jammer") (:keywords "games"))]) (jade-mode . [(20150801 944) nil "Major mode for editing .jade files" single ((:url . "https://github.com/brianc/jade-mode"))]) (jack-connect . [(20141207 407) nil "Manage jack connections within Emacs" single nil]) (jabber-otr . [(20150918 444) ((emacs (24)) (jabber (0 8 92))) "Off-The-Record messaging for jabber.el" tar ((:url . "https://github.com/legoscia/emacs-jabber-otr/") (:keywords "comm"))]) (jabber . [(20160124 552) ((fsm (0 2))) "A Jabber client for Emacs." tar nil]) (j-mode . [(20140702 809) nil "Major mode for editing J programs" tar ((:url . "http://github.com/zellio/j-mode") (:keywords "j" "langauges"))]) (iy-go-to-char . [(20141029 849) nil "Go to next CHAR which is similar to \"f\" and \"t\" in vim" single ((:url . "https://github.com/doitian/iy-go-to-char") (:keywords "navigation" "search"))]) (ix . [(20131027 929) ((grapnel (0 5 3))) "Emacs client for http://ix.io pastebin" single ((:url . "http://www.github.com/theanalyst/ix.el"))]) (ivs-edit . [(20140720 346) ((emacs (24 3)) (dash (2 6 0)) (cl-lib (1 0))) "IVS (Ideographic Variation Sequence) editing tool" tar ((:url . "http://github.com/kawabata/ivs-edit") (:keywords "text"))]) (ivariants . [(20140720 2127) ((emacs (24 3)) (ivs-edit (1 0))) "Ideographic variants editor and browser" tar ((:url . "http://github.com/kawabata/ivariants") (:keywords "i18n" "languages"))]) (iterator . [(20150321 2125) ((emacs (24)) (cl-lib (0 5))) "A library to create and use elisp iterators objects." single ((:url . "https://github.com/thierryvolpiatto/iterator"))]) (itail . [(20151113 835) nil "An interactive tail mode" single ((:url . "https://github.com/re5et/itail") (:keywords "tail"))]) (iss-mode . [(20141001 1213) nil "Mode for InnoSetup install scripts" single nil]) (isgd . [(20150414 236) nil "Shorten URLs using the isgd.com shortener service" single ((:url . "https://github.com/chmouel/isgd.el"))]) (isend-mode . [(20130419 258) nil "Interactively send parts of an Emacs buffer to an interpreter" single ((:url . "https://github.com/ffevotte/isend-mode.el"))]) (isearch-symbol-at-point . [(20130728 1521) nil "Use isearch to search for the symbol at point" single ((:url . "https://github.com/re5et/isearch-symbol-at-point") (:keywords "isearch"))]) (isearch-prop . [(20151231 1407) nil "Search text-property or overlay-property contexts." single ((:url . "http://www.emacswiki.org/isearch-prop.el") (:keywords "search" "matching" "invisible" "thing" "help"))]) (isearch-dabbrev . [(20141223 2222) ((cl-lib (0 5))) "Use dabbrev in isearch" single ((:url . "https://github.com/Dewdrops/isearch-dabbrev") (:keywords "dabbrev" "isearch"))]) (isearch+ . [(20160212 1323) nil "Extensions to `isearch.el' (incremental search)." single ((:url . "http://www.emacswiki.org/isearch+.el") (:keywords "help" "matching" "internal" "local"))]) (irony-eldoc . [(20141226 2219) ((emacs (24)) (cl-lib (0 5)) (irony (0 1))) "irony-mode support for eldoc-mode" single ((:url . "https://github.com/ikirill/irony-eldoc") (:keywords "c" "c++" "objc" "convenience" "tools"))]) (irony . [(20160203 1207) ((cl-lib (0 5)) (json (1 2))) "C/C++ minor mode powered by libclang" tar ((:url . "https://github.com/Sarcasm/irony-mode") (:keywords "c" "convenience" "tools"))]) (irfc . [(20130824 507) nil "Interface for IETF RFC document." single ((:url . "http://www.emacswiki.org/emacs/download/irfc.el") (:keywords "rfc" "ietf"))]) (iregister . [(20150515 1407) nil "Interactive register commands for Emacs." tar ((:url . "https://github.com/atykhonov/iregister.el") (:keywords "convenience"))]) (ir-black-theme . [(20130302 2355) nil "Port of ir-black theme" single ((:keywords "faces"))]) (ipretty . [(20140406 2220) nil "Interactive Emacs Lisp pretty-printing" single ((:url . "https://github.com/steckerhalter/ipretty") (:keywords "pretty-print" "elisp" "buffer"))]) (iplayer . [(20150101 255) nil "Browse and download BBC TV/radio shows" single ((:url . "https://github.com/csrhodes/iplayer-el") (:keywords "multimedia" "bbc"))]) (iodine-theme . [(20151031 939) ((emacs (24))) "A light emacs color theme" single ((:url . "https://github.com/srdja/iodine-theme") (:keywords "themes"))]) (ioccur . [(20130821 2248) nil "Incremental occur" single ((:url . "https://github.com/thierryvolpiatto/ioccur"))]) (io-mode-inf . [(20140128 1134) nil "Interaction with an Io interpreter." single ((:url . "https://github.com/slackorama/io-emacs") (:keywords "io" "languages"))]) (io-mode . [(20140814 321) nil "Major mode to edit Io language files in Emacs" single ((:url . "https://github.com/superbobry/io-mode") (:keywords "languages" "io"))]) (interval-tree . [(20130325 707) ((dash (1 1 0))) "Interval tree data structure for 1D range queries" single ((:url . "https://github.com/Fuco1/interval-tree") (:keywords "extensions" "data structure"))]) (interval-list . [(20150327 1018) ((dash (2 4 0)) (cl-lib (0 5)) (emacs (24 4))) "Interval list data structure for 1D selections" single ((:url . "https://github.com/Fuco1/interval-list") (:keywords "extensions" "data structure"))]) (interleave . [(20160208 237) nil "Interleaving text books since 2015" single ((:url . "https://github.com/rudolfochrist/interleave"))]) (interaction-log . [(20150603 1010) ((cl-lib (0))) "exhaustive log of interactions with Emacs" single ((:url . "https://github.com/michael-heerdegen/interaction-log.el") (:keywords "convenience"))]) (instapaper . [(20130104 621) nil "add URLs to instapaper from emacs" single ((:url . "htts://bitbucket.org/jfm/emacs-instapaper"))]) (insfactor . [(20141116 1602) nil "Client for a Clojure project with insfactor in it" single ((:url . "http://github.com/duelinmarkers/insfactor.el") (:keywords "clojure"))]) (insert-shebang . [(20141119 427) nil "Insert shebang line automatically." single ((:url . "http://github.com/psachin/insert-shebang") (:keywords "shebang" "tool" "convenience"))]) (inlineR . [(20120520 732) nil "insert Tag for inline image of R graphics" single ((:url . "https://github.com/myuhe/inlineR.el") (:keywords "convenience" "iimage.el" "cacoo.el"))]) (inline-crypt . [(20130409 507) nil "Simple inline encryption via openssl" tar nil]) (inkpot-theme . [(20120505 708) nil "port of vim's inkpot theme" single ((:url . "http://github.com/siovan/emacs24-inkpot.git"))]) (initsplit . [(20160113 653) nil "code to split customizations into different files" single ((:url . "http://www.gci-net.com/users/j/johnw/emacs.html") (:keywords "lisp"))]) (init-open-recentf . [(20151106 2023) ((emacs (24 4))) "Open recentf immediately after Emacs is started" single ((:keywords "file" "recentf" "after-init-hook"))]) (init-loader . [(20141030 2333) nil "Loader for configuration files" single ((:url . "https://github.com/emacs-jp/init-loader/"))]) (inform7-mode . [(20131009 2354) ((sws-mode (0 1))) "Major mode for editing Inform 7 source files" single ((:keywords "inform" "inform7" "interactive fiction"))]) (info+ . [(20151231 1403) nil "Extensions to `info.el'." single ((:url . "http://www.emacswiki.org/info+.el") (:keywords "help" "docs" "internal"))]) (inflections . [(20121016 157) nil "convert english words between singular and plural" single ((:url . "https://github.com/eschulte/jump.el") (:keywords "ruby" "rails" "languages" "oop"))]) (inf-ruby . [(20151104 1237) nil "Run a Ruby process in a buffer" single ((:url . "http://github.com/nonsequitur/inf-ruby") (:keywords "languages" "ruby"))]) (inf-php . [(20130414 21) ((php-mode (1 5 0))) "Run a php interactive shell in a buffer" single ((:url . "https://github.com/taksatou/inf-php") (:keywords "languages" "php"))]) (inf-mongo . [(20131216 228) nil "Run a MongoDB shell process in a buffer" single ((:url . "http://github.com/tobiassvn/inf-mongo") (:keywords "databases" "mongodb"))]) (inf-clojure . [(20160206 819) ((emacs (24 1)) (clojure-mode (5 1))) "Run an external Clojure process in an Emacs buffer" single ((:url . "http://github.com/clojure-emacs/inf-clojure") (:keywords "processes" "clojure"))]) (indy . [(20150610 1006) nil "A minor mode and EDSL to manage your mode's indentation rules." single ((:keywords "convenience" "matching" "tools"))]) (indicators . [(20130217 1405) nil "Display the buffer relative location of line in the fringe." single ((:url . "https://github.com/Fuco1/indicators.el") (:keywords "fringe" "frames"))]) (indent-guide . [(20151119 717) nil "show vertical lines to guide indentation" single ((:url . "http://hins11.yu-yake.com/"))]) (import-popwin . [(20150716 233) ((popwin (0 6)) (cl-lib (0 5))) "popwin buffer near by import statements with popwin" single ((:url . "https://github.com/syohex/emacs-import-popwin"))]) (import-js . [(20160103 1431) ((emacs (24))) "Import Javascript dependencies" single ((:url . "http://github.com/trotzig/import-js/") (:keywords "javascript"))]) (impatient-mode . [(20150501 247) ((cl-lib (0 3)) (simple-httpd (1 4 0)) (htmlize (1 40))) "Serve buffers live over HTTP" tar ((:url . "https://github.com/netguy204/imp.el"))]) (immutant-server . [(20140311 1508) nil "Run your Immutant server in Emacs" single ((:url . "http://www.github.com/leathekd/immutant-server.el"))]) (imgur . [(20120307 225) ((anything (1 287))) "imgur client for Emacs" single ((:keywords "multimedia" "convenience"))]) (imgix . [(20141226 1332) ((json (1 2)) (ht (2 0)) (s (1 9 0)) (dash (2 9 0)) (cl-lib (0 5))) "Major mode for editing images in emacs via imgix" tar ((:keywords "images" "image processing" "image editing" "sepia" "blur"))]) (imenus . [(20150107 939) ((cl-lib (0 5))) "Imenu for multiple buffers" single ((:url . "https://gitorious.org/alezost-emacs/imenus") (:keywords "tools" "convenience"))]) (imenu-list . [(20160211 341) ((cl-lib (0 5))) "Show imenu entries in a seperate buffer" single ((:url . "https://github.com/bmag/imenu-list"))]) (imenu-anywhere . [(20160213 532) ((cl-lib (0 5))) "ido/helm imenu tag selection across all buffers with the same mode" single ((:url . "https://github.com/vitoshka/imenu-anywhere") (:keywords "ido" "imenu" "tags"))]) (imenu+ . [(20151231 1401) nil "Extensions to `imenu.el'." single ((:url . "http://www.emacswiki.org/imenu+.el") (:keywords "tools" "menus"))]) (imakado . [(20141024 223) nil "imakado's usefull macros and functions" single ((:url . "https://github.com/imakado/emacs-imakado") (:keywords "convenience"))]) (image-dired+ . [(20150429 2244) ((cl-lib (0 3))) "Image-dired extensions" single ((:url . "https://github.com/mhayashi1120/Emacs-image-diredx") (:keywords "extensions" "multimedia"))]) (image-archive . [(20150620 1832) ((emacs (24)) (cl-lib (0 5))) "Image thumbnails in archive file with non-blocking" single ((:url . "https://github.com/mhayashi1120/Emacs-image-archive") (:keywords "multimedia"))]) (image+ . [(20150707 916) ((cl-lib (0 3))) "Image manipulate extensions for Emacs" single ((:url . "https://github.com/mhayashi1120/Emacs-imagex") (:keywords "multimedia" "extensions"))]) (igv . [(20141210 427) nil "Control Integrative Genomic Viewer within Emacs" single nil]) (igrep . [(20130824 507) nil "An improved interface to `grep` and `find`" single ((:keywords "tools" "processes" "search"))]) (ignoramus . [(20150216 1342) nil "Ignore backups, build files, et al." single ((:url . "http://github.com/rolandwalker/ignoramus") (:keywords "convenience" "tools"))]) (iflipb . [(20141123 1316) nil "interactively flip between recently visited buffers" single ((:url . "http://git.rosdahl.net/?p=joel/iflipb.git"))]) (ietf-docs . [(20150928 257) nil "Fetch, Cache and Load IETF documents" single ((:url . "https://github.com/choppsv1/ietf-docs") (:keywords "ietf" "rfc"))]) (iedit . [(20150915 2022) nil "Edit multiple regions in the same way simultaneously." tar ((:url . "http://www.emacswiki.org/emacs/Iedit") (:keywords "occurrence" "region" "simultaneous" "refactoring"))]) (ids-edit . [(20151128 435) ((emacs (24 3))) "IDS (Ideographic Description Sequence) editing tool" tar ((:url . "http://github.com/kawabata/ids-edit") (:keywords "text"))]) (idris-mode . [(20151030 407) ((emacs (24)) (prop-menu (0 1)) (cl-lib (0 5))) "Major mode for editing Idris code" tar ((:url . "https://github.com/idris-hackers/idris-mode") (:keywords "languages"))]) (idomenu . [(20141123 1320) nil "imenu tag selection a la ido" single nil]) (ido-yes-or-no . [(20160217 1617) ((ido-completing-read+ (0))) "Use Ido to answer yes-or-no questions" single ((:url . "https://github.com/DarwinAwardWinner/ido-yes-or-no"))]) (ido-vertical-mode . [(20151003 1833) nil "Makes ido-mode display vertically." single ((:url . "https://github.com/creichert/ido-vertical-mode.el") (:keywords "convenience"))]) (ido-ubiquitous . [(20160217 1053) ((emacs (24 1)) (ido-completing-read+ (3 11)) (cl-lib (0 5))) "Use ido (nearly) everywhere." single ((:url . "https://github.com/DarwinAwardWinner/ido-ubiquitous") (:keywords "convenience" "completion" "ido"))]) (ido-springboard . [(20150505 1011) nil "Temporarily change default-directory for one command" single ((:url . "https://github.com/jwiegley/springboard") (:keywords "ido"))]) (ido-sort-mtime . [(20131117 530) nil "Sort Ido's file list by modification time" single ((:keywords "convenience" "files"))]) (ido-skk . [(20151111 150) ((emacs (24 4)) (ddskk (20150912 1820))) "ido interface for skk henkan" single ((:url . "https://github.com/tsukimizake/ido-skk") (:keywords "languages"))]) (ido-select-window . [(20131220 1247) ((emacs (24 1))) "Select a window using ido and buffer names" single ((:url . "https://github.com/pjones/ido-select-window"))]) (ido-occur . [(20160114 1113) ((dash (2 11 0))) "Yet another `occur' with `ido'." single ((:url . "https://github.com/danil/ido-occur") (:keywords "inner" "buffer" "search"))]) (ido-occasional . [(20150214 448) ((emacs (24 1))) "Use ido where you choose." single ((:url . "https://github.com/abo-abo/ido-occasional") (:keywords "completion"))]) (ido-migemo . [(20150921 1544) ((migemo (1 9 1))) "Migemo plug-in for Ido" single ((:url . "https://github.com/myuhe/ido-migemo.el") (:keywords "files"))]) (ido-load-library . [(20140611 900) ((persistent-soft (0 8 8)) (pcache (0 2 3))) "Load-library alternative using ido-completing-read" single ((:url . "http://github.com/rolandwalker/ido-load-library") (:keywords "maint" "completion"))]) (ido-hacks . [(20150331 1209) nil "Put more IDO in your IDO" single ((:keywords "convenience"))]) (ido-grid-mode . [(20160122 339) ((emacs (24 4))) "Display ido-prospects in the minibuffer in a grid." single ((:url . "https://github.com/larkery/ido-grid-mode.el") (:keywords "convenience"))]) (ido-gnus . [(20140216 846) ((gnus (5 13))) "Access gnus groups or servers using ido" single ((:url . "https://github.com/vapniks/ido-gnus") (:keywords "comm"))]) (ido-exit-target . [(20150904 737) ((emacs (24 4))) "Commands and keys for selecting other window and frame targets within ido" single ((:url . "https://github.com/waymondo/ido-exit-target") (:keywords "convenience" "tools" "extensions"))]) (ido-describe-bindings . [(20160105 53) ((dash (2 11 0))) "Yet another `describe-bindings' with `ido'." single ((:url . "https://github.com/danil/ido-describe-bindings") (:keywords "help"))]) (ido-completing-read+ . [(20160217 1053) ((emacs (24 1)) (cl-lib (0 5))) "A completing-read-function using ido" single ((:url . "https://github.com/DarwinAwardWinner/ido-ubiquitous") (:keywords "ido" "completion" "convenience"))]) (ido-complete-space-or-hyphen . [(20130228 208) nil "Complete SPACE or HYPHEN when type SPACE in ido" single ((:url . "https://github.com/doitian/ido-complete-space-or-hyphen") (:keywords "ido" "completion"))]) (ido-clever-match . [(20151011 1026) ((emacs (24 4)) (cl-lib (0 5))) "Alternative matcher for ido." single ((:url . "https://github.com/Bogdanp/ido-clever-match") (:keywords "ido" "flex"))]) (ido-at-point . [(20151021 57) ((emacs (24))) "ido-style completion-at-point" single ((:url . "https://github.com/katspaugh/ido-at-point") (:keywords "convenience" "abbrev"))]) (idle-require . [(20090715 1503) nil "load elisp libraries while Emacs is idle" single ((:url . "http://nschum.de/src/emacs/idle-require/") (:keywords "internal"))]) (idle-highlight-mode . [(20120920 948) nil "highlight the word the point is on" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/IdleHighlight") (:keywords "convenience"))]) (identica-mode . [(20130204 1453) nil "Major mode API client for status.net open microblogging" tar ((:url . "http://blog.gabrielsaldana.org/identica-mode-for-emacs/") (:keywords "identica" "web"))]) (idea-darkula-theme . [(20160208 2311) ((emacs (24 1))) "Color theme based on IntelliJ IDEA Darkula color theme" single ((:url . "http://github.com/fourier/idea-darkula-theme") (:keywords "themes"))]) (id-manager . [(20150605 2039) nil "id-password management" single ((:keywords "password" "convenience"))]) (icomplete+ . [(20151231 1400) nil "Extensions to `icomplete.el'." single ((:url . "http://www.emacswiki.org/icomplete+.el") (:keywords "help" "abbrev" "internal" "extensions" "local" "completion" "matching"))]) (icicles . [(20160131 1003) nil "Minibuffer input completion and cycling." tar ((:url . "http://www.emacswiki.org/icicles.el") (:keywords "extensions" "help" "abbrev" "local" "minibuffer" "projects" "keys" "apropos" "completion" "matching" "regexp" "command"))]) (ibuffer-vc . [(20150714 1320) ((cl-lib (0 2))) "Group ibuffer's list by VC project, or show VC status" single ((:url . "http://github.com/purcell/ibuffer-vc") (:keywords "themes"))]) (ibuffer-tramp . [(20151118 939) nil "Group ibuffer's list by TRAMP connection" single ((:url . "http://github.com/svend/ibuffer-tramp") (:keywords "convenience"))]) (ibuffer-rcirc . [(20150215 1318) ((cl-lib (0 2))) "Ibuffer integration for rcirc" single ((:url . "https://github.com/fgallina/ibuffer-rcirc") (:keywords "buffer" "convenience" "comm"))]) (ibuffer-projectile . [(20150121 837) ((projectile (0 11 0))) "Group ibuffer's list by projectile root" single ((:url . "http://github.com/purcell/ibuffer-projectile") (:keywords "themes"))]) (ibuffer-git . [(20110508 31) nil "show git status in ibuffer column" single ((:keywords "convenience"))]) (iasm-mode . [(20131004 1644) nil "interactive assembly major mode." single ((:url . "https://github.com/RAttab/iasm-mode") (:keywords ":" "tools"))]) (i2b2-mode . [(20140709 1804) nil "Highlights corresponding PHI data in the text portion of an i2b2 XML Document." single ((:keywords "xml" "phi" "i2b2" "deidi2b2"))]) (hydra . [(20160126 57) ((cl-lib (0 5))) "Make bindings that stick around." tar ((:url . "https://github.com/abo-abo/hydra") (:keywords "bindings"))]) (hyde . [(20150615 1025) nil "Major mode to help create and manage Jekyll blogs" tar nil]) (hydandata-light-theme . [(20160122 1753) nil "A light color theme that is easy on your eyes" single ((:keywords "color-theme" "theme"))]) (hyai . [(20160216 625) ((cl-lib (0 5)) (emacs (24))) "Haskell Yet Another Indentation" single ((:url . "https://github.com/iquiw/hyai"))]) (hy-mode . [(20151025 543) nil "Major mode for Hy code" single ((:url . "http://github.com/hylang/hy-mode") (:keywords "languages" "lisp"))]) (hungry-delete . [(20151203 1314) nil "hungry delete minor mode" single ((:url . "http://github.com/nflath/hungry-delete"))]) (httprepl . [(20141101 1034) ((s (1 9 0)) (dash (2 5 0)) (emacs (24))) "An HTTP REPL" single ((:url . "https://github.com/gregsexton/httprepl.el") (:keywords "http" "repl"))]) (httpcode . [(20121001 2045) nil "explains the meaning of an HTTP status code" single ((:url . "http://github.com/rspivak/httpcode.el"))]) (http-twiddle . [(20151121 544) nil "send & twiddle & resend HTTP requests" single ((:url . "https://github.com/hassy/http-twiddle/blob/master/http-twiddle.el") (:keywords "http" "rest" "soap"))]) (http-post-simple . [(20131010 2058) nil "HTTP POST requests using the url library" single ((:keywords "comm" "data" "processes" "hypermedia"))]) (http . [(20160126 2025) ((emacs (24 4)) (request (0 2 0))) "Yet another HTTP client" single ((:url . "https://github.com/emacs-pe/http.el") (:keywords "convenience"))]) (htmlize . [(20130207 1202) nil "Convert buffer text and decorations to HTML." single ((:keywords "hypermedia" "extensions"))]) (html-to-markdown . [(20151105 40) ((cl-lib (0 5))) "HTML to Markdown converter written in Emacs-lisp." single ((:url . "http://github.com/Bruce-Connor/html-to-markdown") (:keywords "tools" "wp" "languages"))]) (html-script-src . [(20120403 1115) nil "Insert +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/script.javascript-src b/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/script.javascript-src new file mode 100644 index 0000000..b64c4dc --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/script.javascript-src @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/textarea b/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/textarea new file mode 100644 index 0000000..058498f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/textarea @@ -0,0 +1,4 @@ +#contributor : Jimmy Wu +#name : +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/th b/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/th new file mode 100644 index 0000000..3b5fab1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/html-mode/th @@ -0,0 +1,5 @@ +#contributor : Jimmy Wu +#name : ... +#group : table +# -- +$2 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/apr_assert b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/apr_assert new file mode 100644 index 0000000..a3942be --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/apr_assert @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: apr_assert +# key: apr_assert +# -- +if (Globals.useAssertions) { + ${1:assert ..}; +} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/assert b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/assert new file mode 100644 index 0000000..686ffea --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/assert @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: assert +# key: as +# -- +assert ${1:expression}; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/assertEquals b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/assertEquals new file mode 100644 index 0000000..ce23dae --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/assertEquals @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: assertEquals +# key: ae +# group: test +# -- +Assert.assertEquals($1, $2); +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/cls b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/cls new file mode 100644 index 0000000..88f534f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/cls @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cls +# key: cls +# -- +class ${1:Class} { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/constructor b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/constructor new file mode 100644 index 0000000..602e496 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/constructor @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: constructor +# key: c +# -- +public ${1:Class} (${2:args}) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/define test method b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/define test method new file mode 100644 index 0000000..fd9daf6 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/define test method @@ -0,0 +1,8 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: define test method +# key: dt +# -- +@Test +public void test${1:Name}() throws Exception { + $0 +} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/doc b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/doc new file mode 100644 index 0000000..88f556e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/doc @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: doc +# key: /* +# -- +/** + * ${1:documentation} + */ \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/equals b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/equals new file mode 100644 index 0000000..e990966 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/equals @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: equals +# key: eq +# -- +public boolean equals(${1:Class} other) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/file_class b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/file_class new file mode 100644 index 0000000..e0a46f6 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/file_class @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: file_class +# key: file +# -- +public class ${1:`(file-name-base + (or (buffer-file-name) + (buffer-name)))`} { + $0 +} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/for new file mode 100644 index 0000000..833827b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/for @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: for +# key: for +# -- +for (${1:int i = 0}; ${2:i < N}; ${3:i++}) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/fori b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/fori new file mode 100644 index 0000000..a417f2c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/fori @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: fori +# key: fori +# -- +for (${1:Object el} : ${2:iterator}) { + $0 +} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/getter b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/getter new file mode 100644 index 0000000..747f9f4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/getter @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: getter +# key: g +# -- +public ${1:int} get${2:Field}() { + return ${3:field}; +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/if new file mode 100644 index 0000000..cae545f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/if @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# -- +if (${1:condition}) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/ife b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/ife new file mode 100644 index 0000000..975643f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/ife @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: ife +# key: ife +# -- +if (${1:cond}) { + $2 +} +else { + $3 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/import b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/import new file mode 100644 index 0000000..56235a2 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/import @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: import +# key: imp +# -- +import ${1:System.}; +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/iterator b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/iterator new file mode 100644 index 0000000..69fb2ac --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/iterator @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: iterator +# key: iterator +# -- +public Iterator<${1:type}> iterator() { + $0 +} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/javadoc b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/javadoc new file mode 100644 index 0000000..5bc9051 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/javadoc @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: javadoc +# key: doc +# -- +/** + * $0 + * + */ \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/lambda b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/lambda new file mode 100644 index 0000000..a73a7a5 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/lambda @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: lambda +# key: \ +# -- +(${1:args}) -> ${2:expression}; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/main b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/main new file mode 100644 index 0000000..b24e49d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/main @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: main +# key: main +# -- +public static void main(String[] args) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/main_class b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/main_class new file mode 100644 index 0000000..624b31c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/main_class @@ -0,0 +1,11 @@ +# contributor: L. Guruprasad +# name: main_class +# key: main_class +# -- +class `(file-name-nondirectory (file-name-sans-extension (buffer-file-name)))` +{ +public static void main(String args[]) +{ +$0 +} +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/method b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/method new file mode 100644 index 0000000..7a6b9ed --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/method @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: method +# key: m +# -- +${1:public} ${2:void} ${3:name}(${4:args}) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/new b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/new new file mode 100644 index 0000000..f06091d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/new @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: new +# key: new +# -- +${1:Type} ${2:obj} = new ${3:Constr}(${4:args}); +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/override b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/override new file mode 100644 index 0000000..9878c85 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/override @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: override +# key: o +# -- +@Override +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/param b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/param new file mode 100644 index 0000000..4a1f44d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/param @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: param +# key: param +# -- +@param ${1:paramater} $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/printf b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/printf new file mode 100644 index 0000000..f93c965 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/printf @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: printf +# key: printf +# -- +System.out.printf("$0%n"); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/println b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/println new file mode 100644 index 0000000..7dd8f0d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/println @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: println +# key: pr +# -- +System.out.println("${1:text}"); +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/return b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/return new file mode 100644 index 0000000..5712e0c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/return @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: return +# key: r +# -- +return $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/test b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/test new file mode 100644 index 0000000..a37d115 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/test @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: test +# key: test +# -- +@Test +public void test_${1:Case}() { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/testClass b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/testClass new file mode 100644 index 0000000..b01a68f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/testClass @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: testClass +# key: tc +# -- +import junit.framework.*; +import junit.textui.*; + +public class Test${1:Class} extends TestCase { + protected void setUp() { + $0 + } +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/this b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/this new file mode 100644 index 0000000..45201b4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/this @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: this +# key: . +# -- +this.$1 = $1; +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/toString b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/toString new file mode 100644 index 0000000..0382a9e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/toString @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: toString +# key: toStr +# -- +public String toString() { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/try b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/try new file mode 100644 index 0000000..1a17ba3 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/try @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: try +# key: try +# -- +try { + $0 +} +catch (${1:Throwable e}) { + ${2:System.out.println("Error " + e.getMessage()); + e.printStackTrace();} +} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/value b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/value new file mode 100644 index 0000000..7ec38ef --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/java-mode/value @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: value +# key: val +# -- +final ${1:int} ${2:n} = $0; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/al b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/al new file mode 100644 index 0000000..04fbec4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/al @@ -0,0 +1,4 @@ +# -*- mode: snippet -*- +#name : alert +# -- +alert($0); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/class b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/class new file mode 100644 index 0000000..84171bb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/class @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#name : Class +# -- +var ${1:name} = new Class({ + initialize: function($2) { + $0 + } +}); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/com b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/com new file mode 100644 index 0000000..6179e18 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/com @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name : comment (/* ... */) +# -- +/* + * $0 + */ \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/debugger b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/debugger new file mode 100644 index 0000000..09af6eb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/debugger @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: debugger +# key: dbg +# -- +debugger; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/each b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/each new file mode 100644 index 0000000..74cbddd --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/each @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name : each +# -- +${1:collection}.each(function($2) { + $0 +}); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/el b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/el new file mode 100644 index 0000000..ac13571 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/el @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name : else +# -- +else { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/ev.add b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/ev.add new file mode 100644 index 0000000..cf2a7e0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/ev.add @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name : addEvent +# -- +addEvent('${1:event}', function($2) { + $0 +}); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/ev.fire b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/ev.fire new file mode 100644 index 0000000..c90e9ed --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/ev.fire @@ -0,0 +1,4 @@ +# -*- mode: snippet -*- +#name : fireEvent +# -- +fireEvent('$0') \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/for new file mode 100644 index 0000000..d79ed03 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/for @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name : for +# -- +for(var ${1:i} = ${2:0}; $1 < ${3:collection}.length; $1++) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/function b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/function new file mode 100644 index 0000000..8b36e86 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/function @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: function +# key: f +# -- +function${1: ${2:name}}(${3:arg}) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/if new file mode 100644 index 0000000..7306759 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/if @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name : if +# -- +if (${1:condition}) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/init b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/init new file mode 100644 index 0000000..feac58a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/init @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name : Constructor +# -- +initialize: function($1) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/log b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/log new file mode 100644 index 0000000..2f33f4d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/log @@ -0,0 +1,4 @@ +# -*- mode: snippet -*- +#name : console.log +# -- +console.log($0); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/multiline-comment b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/multiline-comment new file mode 100644 index 0000000..1d34aed --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/multiline-comment @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +#name : multiline-comment +#key: /** +# -- +/** + * $0 + */ \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/param-comment b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/param-comment new file mode 100644 index 0000000..e3c9d27 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/param-comment @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name: param-comment +#key: *@p +#condition: (= (js2-node-type (js2-node-at-point)) js2-COMMENT) +# -- +* @param {${type}} ${comment}. \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/req.html b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/req.html new file mode 100644 index 0000000..bc1491f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/req.html @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#name : html +# -- +new Request.HTML({ + onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) { + $0 + } +}).${1:get}(${2:url}); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/req.json b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/req.json new file mode 100644 index 0000000..36fb03f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/req.json @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#name : json +# -- +new Request.JSON({ + onSuccess: function(responseJSON, responseText) { + $0 + } +}).${1:send}(${2:url}); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/return-comment b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/return-comment new file mode 100644 index 0000000..fc5dadf --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/return-comment @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name: return-comment +#key: *@r +#condition: (= (js2-node-type (js2-node-at-point)) js2-COMMENT) +# -- +* @return {${type}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/type-inline-comment b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/type-inline-comment new file mode 100644 index 0000000..ccc9430 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/type-inline-comment @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name: type-inline-comment +#key: @ty +#condition: (not (= (js2-node-type (js2-node-at-point)) js2-COMMENT)) +# -- +/** @type {${type}} */ \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/type-multiline-comment b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/type-multiline-comment new file mode 100644 index 0000000..92d7482 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js-mode/type-multiline-comment @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#name: type-inline-comment +#key: *ty +#condition: (= (js2-node-type (js2-node-at-point)) js2-COMMENT) +# -- +* @type {${type}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/js2-mode b/.emacs.d/elpa/yasnippet-20160131.948/snippets/js2-mode new file mode 100755 index 0000000..e69de29 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/acronym b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/acronym new file mode 100644 index 0000000..ea2314c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/acronym @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: acronym +# key: ac +# -- +\newacronym{${1:label}}{${1:$(upcase yas-text)}}{${2:Name}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/alertblock b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/alertblock new file mode 100644 index 0000000..d259d2b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/alertblock @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: alertblock +# key: al +# -- +\begin{alertblock}{$2} + $0 +\end{alertblock} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/alg b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/alg new file mode 100644 index 0000000..24a9c94 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/alg @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: alg +# key: alg +# -- +\begin{algorithmic} +$0 +\end{algorithmic} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/begin b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/begin new file mode 100644 index 0000000..dabcbe8 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/begin @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: begin +# key: begin +# -- +\begin{${1:environment}} +$0 +\end{$1} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/block b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/block new file mode 100644 index 0000000..6b16f4b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/block @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: block +# key: bl +# -- +\begin{block}{$1} + $0 +\end{block} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/capgls b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/capgls new file mode 100644 index 0000000..d469185 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/capgls @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Gls +# key: G +# -- +\Gls{${1:label}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/caption b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/caption new file mode 100644 index 0000000..98e25fb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/caption @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: caption +# key: ca +# -- +\caption{$0} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/cite b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/cite new file mode 100644 index 0000000..2e24838 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/cite @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: cite +# key: c +# -- +\cite{$1} $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/code b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/code new file mode 100644 index 0000000..cef9570 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/code @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: code +# key: code +# -- +\begin{lstlisting} +$0 +\end{lstlisting} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/columns b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/columns new file mode 100644 index 0000000..80388f1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/columns @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: columns +# key: cols +# -- +\begin{columns} + \begin{column}{.${1:5}\textwidth} + $0 + \end{column} + + \begin{column}{.${2:5}\textwidth} + + \end{column} +\end{columns} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/emph b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/emph new file mode 100644 index 0000000..36b19d7 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/emph @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: emph +# key: e +# -- +\emph{$1}$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/enumerate b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/enumerate new file mode 100644 index 0000000..d49ce37 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/enumerate @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: enumerate +# key: enum +# -- +\begin{enumerate} +\item $0 +\end{enumerate} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/figure b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/figure new file mode 100644 index 0000000..a25d601 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/figure @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: figure +# key: fig +# -- +\begin{figure}[ht] + \centering + \includegraphics[${1:options}]{figures/${2:path.pdf}} + \caption{\label{fig:${3:label}} $0} +\end{figure} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/frac b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/frac new file mode 100644 index 0000000..b35f8ef --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/frac @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: frac +# key: frac +# -- +\frac{${1:numerator}}{${2:denominator}}$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/frame b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/frame new file mode 100644 index 0000000..f94357d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/frame @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: frame +# key: fr +# -- +\begin{frame}${1:[$2]} + ${3:\frametitle{$4}} + $0 +\end{frame} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/gls b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/gls new file mode 100644 index 0000000..c6a7aac --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/gls @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: gls +# key: g +# -- +\gls{${1:label}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/glspl b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/glspl new file mode 100644 index 0000000..699927b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/glspl @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: glspl +# key: gp +# -- +\glspl{${1:label}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/if new file mode 100644 index 0000000..2d80b81 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/if @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# -- +\IF {$${1:cond}$} + $0 +\ELSE +\ENDIF diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/includegraphics b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/includegraphics new file mode 100644 index 0000000..d46c9a4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/includegraphics @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: includegraphics +# key: ig +# -- +\includegraphics${1:[$2]}{$0} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/item b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/item new file mode 100644 index 0000000..d4773f5 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/item @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: item +# key: - +# -- +\item $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/itemize b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/itemize new file mode 100644 index 0000000..09a848f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/itemize @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: itemize +# key: it +# -- +\begin{itemize} +\item $0 +\end{itemize} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/label b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/label new file mode 100644 index 0000000..96a72b4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/label @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: label +# key: lab +# -- +\label{$0} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/listing b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/listing new file mode 100644 index 0000000..3c95b17 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/listing @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: listing +# key: lst +# -- +\begin{lstlisting}[float,label=lst:${1:label},caption=nextHopInfo: ${2:caption}] +$0 +\end{lstlisting} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/movie b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/movie new file mode 100644 index 0000000..a01d032 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/movie @@ -0,0 +1,15 @@ +# -*- mode: snippet -*- +# name: movie +# key: movie +# -- +\begin{center} +\includemovie[ + label=test, + controls=false, + text={\includegraphics[width=4in]{${1:image.pdf}}} +]{4in}{4in}{${2:video file}} + +\movieref[rate=3]{test}{Play Fast} +\movieref[rate=1]{test}{Play Normal Speed} +\movieref[rate=0.2]{test}{Play Slow} +\movieref[resume]{test}{Pause/Resume} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/newcommand b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/newcommand new file mode 100644 index 0000000..e9e03ca --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/newcommand @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: newcommand +# key: cmd +# -- +\newcommand{\\${1:name}}${2:[${3:0}]}{$0} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/newglossaryentry b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/newglossaryentry new file mode 100644 index 0000000..66c964a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/newglossaryentry @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: newglossaryentry +# key: gl +# -- +\newglossaryentry{${1:AC}}{name=${2:Andrea Crotti}${3:, description=${4:description}}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/note b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/note new file mode 100644 index 0000000..1122d7a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/note @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: note +# key: no +# -- +\note{$0} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/python b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/python new file mode 100644 index 0000000..0ba0fc4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/python @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: python +# key: py +# -- +\lstset{language=python} +\begin[language=python]{lstlisting} +$0 +\end{lstlisting} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/question b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/question new file mode 100644 index 0000000..235eb59 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/question @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: question +# key: q +# -- +\question{$0} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/section b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/section new file mode 100644 index 0000000..88faeab --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/section @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: section +# key: sec +# -- +\section{${1:name}} +\label{sec:${2:label}} + +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subf b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subf new file mode 100644 index 0000000..0497748 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subf @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: subf +# key: sf +# -- +\subfigure[${1:caption}]{ + \label{fig:${2:label}} + \includegraphics[width=.${3:3}\textwidth]{${4:path}}} +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subfigure b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subfigure new file mode 100644 index 0000000..e93678b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subfigure @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: subfigure +# key: subfig +# -- +\begin{figure}[ht] + \centering + \subfigure[$1] + {\label{fig:${2:label}} + \includegraphics[width=.${3:5}\textwidth]{${4:path}}} + + \caption{${5:caption}} +\label{fig:${6:label}} +\end{figure} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subsec b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subsec new file mode 100644 index 0000000..5658494 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/subsec @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: subsec +# key: sub +# -- +\subsection{${1:name}} +\label{subsec:${2:label}} + +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/textbf b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/textbf new file mode 100644 index 0000000..84171d7 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/textbf @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: textbf +# key: b +# -- +\textbf{$1}$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/usepackage b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/usepackage new file mode 100644 index 0000000..2afd38b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/latex-mode/usepackage @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: usepackage +# key: pkg +# -- +\usepackage{$0} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-interaction-mode/defun b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-interaction-mode/defun new file mode 100644 index 0000000..5cf3d68 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-interaction-mode/defun @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: defun +# key: defun +# -- +(defun ${1:fun} (${2:args}) + $0 +) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/class b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/class new file mode 100644 index 0000000..bc5eec9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/class @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: class +# key: cls +# -- +(defclass ${1:name} (${2:inherits}) + (${4:slot}) + (:documentation "${3:doc}")) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/comment b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/comment new file mode 100644 index 0000000..107fad9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/comment @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: comment +# key: /* +# -- +#|${1:type the comment here}|# +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/defpackage b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/defpackage new file mode 100644 index 0000000..2e44ac2 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/defpackage @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: defpackage +# key: defp +# -- +(defpackage #:${1:name} + (:nicknames #:${2:nick}) + (:use #:cl #:closer-mop #:${3:package}) + (:shadow :${4.symbol}) + (:shadowing-import-from #:${5:package} #:${6:symbol}) + (:export :$0)) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/do b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/do new file mode 100644 index 0000000..6f90064 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/do @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: do +# key: do +# -- +(do ((${1:var1} ${2:init-form} ${3:step-form}) + (${4:var2} ${5:init-form} ${6:step-form})) + (${7:condition} ${8:return-value}) + (${9:body})) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/for new file mode 100644 index 0000000..de8f644 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/for @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: do +# key: for +# -- +(dotimes (${1:var} ${2:count-form}) + ${3:body}) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/foreach b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/foreach new file mode 100644 index 0000000..a993bf1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/foreach @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: do +# key: foreach +# -- +(dolist (${1:var} ${2:list-form}) + ${3:body}) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/format b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/format new file mode 100644 index 0000000..d4f10ad --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/format @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: format +# key: print +# -- +(format t "~& $0 ~%") diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/if new file mode 100644 index 0000000..cd57e3d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/if @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# -- +(when (${1:condition}) + (${2:then-do-this})) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/ifelse b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/ifelse new file mode 100644 index 0000000..91854d8 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/ifelse @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: ifelse (...) (...) (...) ... +# key: ifelse +# -- + +(if (${1:condition}) + (${2:then}) + (${3:else})) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/ifnot b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/ifnot new file mode 100644 index 0000000..467636e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/ifnot @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: ifnot (...) (...) ... +# key: ifnot +# -- + +(unless (${1:condition}) + (${2:then-do-this})) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/slot b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/slot new file mode 100644 index 0000000..2a51f64 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/slot @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: slot +# key: slot +# -- +(${1:name} :initarg :${1:$(yas/substr yas-text "[^: ]*")} + :initform (error ":${1:$(yas/substr yas-text "[^: ]*")} must be specified") + ;; :accessor ${1:$(yas/substr yas-text "[^: ]*")} + :reader ${1:$(yas/substr yas-text "[^: ]*")}-changed + :writer set-${1:$(yas/substr yas-text "[^: ]*")} + :type + :allocation ${3::class :instance} + :documentation "${2:about-slot}") +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/switch b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/switch new file mode 100644 index 0000000..6d002dd --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/switch @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: switch +# key: switch +# -- + +(cond (${1:case1} (${2:do-this})) + (${3:case2} (${4:do-this})) + (t ${5:default})) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/typecast b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/typecast new file mode 100644 index 0000000..4856e93 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lisp-mode/typecast @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: typecast +# name: cast +# -- +(coerce ${1:object} ${2:type}) +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/lua-mode/fun b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lua-mode/fun new file mode 100644 index 0000000..f2cc839 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/lua-mode/fun @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: fun +# key: fun +# -- +function () + ${1:return something} +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/m4-mode/def b/.emacs.d/elpa/yasnippet-20160131.948/snippets/m4-mode/def new file mode 100644 index 0000000..2cc90cb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/m4-mode/def @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: def +# key: def +# -- +define(\`${1:macro}',\`${2:subst}'). +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-automake-mode/noinst_HEADERS b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-automake-mode/noinst_HEADERS new file mode 100644 index 0000000..ab0a30b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-automake-mode/noinst_HEADERS @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: noinst_HEADERS +# key: noinst +# -- +noinst_HEADERS = $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/PHONY b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/PHONY new file mode 100644 index 0000000..9652539 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/PHONY @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: PHONY +# key: phony +# -- +.PHONY: $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/echo b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/echo new file mode 100644 index 0000000..d772a6e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/echo @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: echo +# key: echo +# -- +@echo ${1:"message to output"} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/gen b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/gen new file mode 100644 index 0000000..2b5e466 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/gen @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: gen +# key: gen +# possibly add some smart control over the list +# -- +all: ${1:targets} + +$0 + +clean: + ${2:clean actions} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/if new file mode 100644 index 0000000..2e623f0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/if @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# -- +@if [ ${1:cond} ] + then $0 +fi diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/var b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/var new file mode 100644 index 0000000..196f4d9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-bsdmake-mode/var @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: var +# key: $ +# -- +$(${1:VAR})$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/abspath b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/abspath new file mode 100644 index 0000000..e02c55c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/abspath @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: abspath +# contributor: gbalats +# key: abs +# -- +\$(abspath ${1:\$(${2:paths})})$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/addprefix b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/addprefix new file mode 100644 index 0000000..2edc1e3 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/addprefix @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: addprefix +# contributor: gbalats +# key: ap +# -- +\$(addprefix ${1:\$(${2:dir})/},${3:\$(${4:items})})$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/addsuffix b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/addsuffix new file mode 100644 index 0000000..6a3ebe4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/addsuffix @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: addsuffix +# contributor: gbalats +# key: as +# -- +\$(addsuffix ${1:.suffix},${2:\$(${3:items})})$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/dir b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/dir new file mode 100644 index 0000000..bc3561b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/dir @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: dir +# contributor: gbalats +# key: d +# -- +\$(dir ${1:\$(${2:paths})})$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/make b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/make new file mode 100644 index 0000000..16c49ce --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/make @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: make +# contributor: gbalats +# key: make +# -- +\$(MAKE) --directory=${1:\$@} +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/notdir b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/notdir new file mode 100644 index 0000000..d5e82d5 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/notdir @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: notdir +# contributor: gbalats +# key: nd +# -- +\$(notdir ${1:\$(${2:paths})})$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/patsubst b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/patsubst new file mode 100644 index 0000000..a966757 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/patsubst @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: patsubst +# key: ps +# -- +$(patsubst ${1:from},${2:to},${3:src}) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/phony b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/phony new file mode 100644 index 0000000..8da99d7 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/phony @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: phony +# key: ph +# -- +.PHONY = $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/shell b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/shell new file mode 100644 index 0000000..b550475 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/shell @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: shell +# key: sh +# -- +\$(shell ${1:command})$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/special b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/special new file mode 100644 index 0000000..775021f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/special @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: special targets +# contributor: gbalats +# key: . +# -- +.${1:PHONY$(upcase yas-text)}: $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/template b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/template new file mode 100644 index 0000000..285624d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/template @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: template +# contributor: gbalats +# binding: C-c C-t +# -- +define ${1:PROGRAM$(upcase yas-text)}_template +$0 +endef + +\$(foreach ${2:${1:$(downcase yas-text)}},\$(${3:$1S}),\$(eval \$(call $1_template,\$($2)))) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/wildcard b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/wildcard new file mode 100644 index 0000000..c91dc9c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-gmake-mode/wildcard @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: wildcard +# key: wl +# -- +$(wildcard $0) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-mode/all b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-mode/all new file mode 100644 index 0000000..823886f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-mode/all @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: all +# key: all +# -- +all: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-mode/clean b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-mode/clean new file mode 100644 index 0000000..7ade5eb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/makefile-mode/clean @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: clean +# contributor: gbalats +# expand-env: ((yas-indent-line 'fixed)) +# key: cl +# -- +clean: + ${1:rm -r ${2:\$(${3:OUTDIR})}} +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/malabar-mode/variable b/.emacs.d/elpa/yasnippet-20160131.948/snippets/malabar-mode/variable new file mode 100644 index 0000000..16ec628 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/malabar-mode/variable @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: variable +# key: var +# -- +${1:int} ${2:n} = $0; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/+ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/+ new file mode 100644 index 0000000..0407169 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/+ @@ -0,0 +1,5 @@ +#name : Unordered List +#contributor: Peng Deng +# -- ++ ${1:Text} ++$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/- b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/- new file mode 100644 index 0000000..9d5c51d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/- @@ -0,0 +1,5 @@ +#name : Unordered List +#contributor: Peng Deng +# -- +- ${1:Text} +-$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/_ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/_ new file mode 100644 index 0000000..50ab476 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/_ @@ -0,0 +1,4 @@ +#name : Emphasis +#contributor: Peng Deng +# -- +_${1:Text}_ $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/__ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/__ new file mode 100644 index 0000000..b6304f3 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/__ @@ -0,0 +1,4 @@ +#name : Strong +#contributor: Peng Deng +# -- +**${1:Text}** $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/` b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/` new file mode 100644 index 0000000..ae58211 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/` @@ -0,0 +1,4 @@ +#name : Inline Code +#contributor: Peng Deng +# -- +\`${1:Code}\` $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h1.1 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h1.1 new file mode 100644 index 0000000..8bb7ea2 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h1.1 @@ -0,0 +1,6 @@ +#name : Header 1 (#) +#contributor: Peng Deng +# -- +# ${1:Header 1} # + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h1.2 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h1.2 new file mode 100644 index 0000000..57b178d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h1.2 @@ -0,0 +1,7 @@ +#name : Header 1 (=) +#contributor: Peng Deng +# -- +${1:Header 1} +${1:$(make-string (string-width yas-text) ?\=)} + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h2.1 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h2.1 new file mode 100644 index 0000000..bfee3fc --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h2.1 @@ -0,0 +1,6 @@ +#name : Header 2 (##) +#contributor: Peng Deng +# -- +## ${1:Header 1} ## + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h2.2 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h2.2 new file mode 100644 index 0000000..8f94c73 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h2.2 @@ -0,0 +1,7 @@ +#name : Header 2 (-) +#contributor: Peng Deng +# -- +${1:Header 2} +${1:$(make-string (string-width yas-text) ?\-)} + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h3 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h3 new file mode 100644 index 0000000..44a6104 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h3 @@ -0,0 +1,6 @@ +#name : Header 3 +#contributor: Peng Deng +# -- +### ${1:Header 3} ### + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h4 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h4 new file mode 100644 index 0000000..315140a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h4 @@ -0,0 +1,6 @@ +#name : Header 4 +#contributor: Peng Deng +# -- +#### ${1:Header 4} #### + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h5 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h5 new file mode 100644 index 0000000..f50a785 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h5 @@ -0,0 +1,6 @@ +#name : Header 5 +#contributor: Peng Deng +# -- +##### ${1:Header 5} ##### + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h6 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h6 new file mode 100644 index 0000000..1cdfebb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/h6 @@ -0,0 +1,6 @@ +#name : Header 6 +#contributor: Peng Deng +# -- +###### ${1:Header 6} ###### + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/highlight b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/highlight new file mode 100644 index 0000000..f1bce71 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/highlight @@ -0,0 +1,6 @@ +#name : Highlight +#contributor: nguyenvinhlinh +# -- +{% highlight ${1:language} %} +${0:content} +{% endhighlight %} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/hr.1 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/hr.1 new file mode 100644 index 0000000..5fbe4f4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/hr.1 @@ -0,0 +1,7 @@ +#name : Horizontal Rule (-) +#contributor: Peng Deng +# -- + +---------- + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/hr.2 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/hr.2 new file mode 100644 index 0000000..2d4de22 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/hr.2 @@ -0,0 +1,7 @@ +#name : Horizontal Rule (*) +#contributor: Peng Deng +# -- + +******* + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/img b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/img new file mode 100644 index 0000000..69ee77d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/img @@ -0,0 +1,4 @@ +#name : Image +#contributor: Peng Deng +# -- +![${1:Alt Text}](${2:URL} $3) $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/link b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/link new file mode 100644 index 0000000..dd7f99b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/link @@ -0,0 +1,4 @@ +#name : Link +#contributor: Peng Deng +# -- +[${1:Link Text}](${2:URL} $3) $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/ol b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/ol new file mode 100644 index 0000000..c8e3970 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/ol @@ -0,0 +1,5 @@ +#name : Ordered List +#contributor: Peng Deng +# -- +${1:1}. ${2:Text} +${1:$(number-to-string (1+ (string-to-number yas-text)))}. $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rimg b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rimg new file mode 100644 index 0000000..caafb60 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rimg @@ -0,0 +1,4 @@ +#name : Referenced Image +#contributor: Peng Deng +# -- +![${1:Alt Text}][$2] $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rlb b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rlb new file mode 100644 index 0000000..681d9f0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rlb @@ -0,0 +1,5 @@ +#name : Reference Label +#contributor: Peng Deng +# -- +[${1:Reference}]: ${2:URL} $3 +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rlink b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rlink new file mode 100644 index 0000000..e35a0c0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/rlink @@ -0,0 +1,4 @@ +#name : Reference Link +#contributor: Peng Deng +# -- +[${1:Link Text}][$2] $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/utf8 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/utf8 new file mode 100644 index 0000000..b21c56f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/markdown-mode/utf8 @@ -0,0 +1,6 @@ +# name: utf-8 encoding +# key: utf8 +# contributor: Thiago Perrotta +# -- + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/.yas-parents b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/.yas-parents new file mode 100644 index 0000000..0539988 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/.yas-parents @@ -0,0 +1 @@ +prog-mode \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/chan b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/chan new file mode 100644 index 0000000..b1dda9a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/chan @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: chan +# key: chan +# -- +channel Channel extends ${1:ned.DelayChannel} { + $0 +} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/connections b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/connections new file mode 100644 index 0000000..a731e88 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/connections @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: connections +# key: conn +# -- +connections${1: allowunconnected}: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/for new file mode 100644 index 0000000..62ed072 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/for @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: for +# key: for +# -- +for ${1:i}=${2:0}..${3:sizeof(port)-1} { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/import b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/import new file mode 100644 index 0000000..47aa063 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/import @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: import +# key: imp +# -- +import ned.${1:Package}; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/network b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/network new file mode 100644 index 0000000..a7691e3 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/network @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: network +# key: net +# -- +network ${1:Name} +{ + submodules: + $2 + connections: + $3 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/simple b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/simple new file mode 100644 index 0000000..7db2698 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/simple @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: simple +# key: simple +# -- +simple ${1:Component}${2: extends ${3:Component}} +{ + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/submodules b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/submodules new file mode 100644 index 0000000..46c1612 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ned-mode/submodules @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: submodules +# key: sub +# -- +submodules: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/.yas-parents b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/.yas-parents new file mode 100644 index 0000000..2fa94cd --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/.yas-parents @@ -0,0 +1 @@ +text-mode cc-mode \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/TOSSIM b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/TOSSIM new file mode 100644 index 0000000..a7d6edb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/TOSSIM @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: TOSSIM +# key: tossim +# -- +#ifndef TOSSIM + $0 +#endif \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/command b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/command new file mode 100644 index 0000000..314e7a0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/command @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: command +# key: command +# -- +command ${1:void} ${2:naMe}($3) { + +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/dbg b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/dbg new file mode 100644 index 0000000..ab9b580 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/dbg @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: dbg +# key: dbg +# -- +dbg("${1:Module}", "${2:message}"${3:, ${4:var list}}); \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/event b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/event new file mode 100644 index 0000000..1cdc257 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/event @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: event +# key: event +# -- +event ${1:void} ${2:On.Event}($3) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/ifdef b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/ifdef new file mode 100644 index 0000000..dbe1a29 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/ifdef @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: ifdef +# key: ifdef +# -- +#ifdef ${1:Macro} + $2 +${3:#else} + $4 +#endif \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/interface b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/interface new file mode 100644 index 0000000..495a6c4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/interface @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: interface +# key: int +# -- +interface ${1:Interface} { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/module b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/module new file mode 100644 index 0000000..477f49e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/module @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: module +# key: mod +# -- +module ${1:Module} { + ${2:uses interface ${3:Packet}}; + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/nx b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/nx new file mode 100644 index 0000000..38da916 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/nx @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: nx +# key: nx +# -- +nx_uint${1:8}_t ${2:var}; +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/provides b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/provides new file mode 100644 index 0000000..175b621 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/provides @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: provides +# key: provides +# -- +provides interface ${1:Interface}; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/sim b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/sim new file mode 100644 index 0000000..cd77218 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/sim @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: sim +# key: sim +# -- +#ifdef TOSSIM + $0 +#endif \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/uint8_t b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/uint8_t new file mode 100644 index 0000000..eb0144e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/uint8_t @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: uint8_t +# key: u8 +# -- +uint8_t ${1:var}; +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/uses b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/uses new file mode 100644 index 0000000..cbb977d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nesc-mode/uses @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: uses +# key: uses +# -- +uses interface ${1:Interface}${2: as ${3:alias}}; +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/.yas-parents b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/.yas-parents new file mode 100644 index 0000000..0539988 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/.yas-parents @@ -0,0 +1 @@ +prog-mode \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/define b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/define new file mode 100644 index 0000000..223d364 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/define @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: define +# key: def +# -- +!define ${1:CONSTANT} ${2:value} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/function b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/function new file mode 100644 index 0000000..22926eb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/function @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: function +# key: fun +# -- +Function ${1:Name} + $0 +FunctionEnd \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/if new file mode 100644 index 0000000..da3e92f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/if @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# -- +${IF} ${1:cond} + $0 +${ElseIf} ${2:else_cond} + +${EndIf} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/include b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/include new file mode 100644 index 0000000..a7e0f24 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/include @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: include +# key: inc +# -- +!include "${Library.nsh}" \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/insert_macro b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/insert_macro new file mode 100644 index 0000000..451dbb6 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/insert_macro @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: insert_macro +# key: im +# -- +!insermacro ${1:Name} ${2:"args"} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/instdir b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/instdir new file mode 100644 index 0000000..f5b14bc --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/instdir @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: instdir +# key: $ +# -- +$INSTDIR \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/macro b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/macro new file mode 100644 index 0000000..0316183 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/macro @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: macro +# key: macro +# -- +!macro ${1:Name} UN +$0 + +!macroend \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/message b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/message new file mode 100644 index 0000000..37de365 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/message @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: message +# key: msg +# -- +MessageBox MB_OK "${1:hello}" \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/outdir b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/outdir new file mode 100644 index 0000000..234b74d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/outdir @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: outdir +# key: $ +# -- +$OUTDIR \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/outfile b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/outfile new file mode 100644 index 0000000..14abffc --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/outfile @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: outfile +# key: out +# -- +outFile "${1:setup}.exe" \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/section b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/section new file mode 100644 index 0000000..5f0556e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nsis-mode/section @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: section +# key: sec +# -- +Section "${1:Program}" + $0 +SectionEnd \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/body b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/body new file mode 100644 index 0000000..ddcf0cf --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/body @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- + + $0 + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/br b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/br new file mode 100644 index 0000000..ba35773 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/br @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name :
+# -- +
\ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype new file mode 100644 index 0000000..3fdcf17 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : DocType XHTML 1.1 +#group : meta +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype_xhtml1_strict b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype_xhtml1_strict new file mode 100644 index 0000000..eca5860 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype_xhtml1_strict @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : DocType XHTML 1.0 Strict +#group : meta +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype_xhtml1_transitional b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype_xhtml1_transitional new file mode 100644 index 0000000..fba232a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/doctype_xhtml1_transitional @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : DocType XHTML 1.0 Transitional +#group : meta +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/form b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/form new file mode 100644 index 0000000..252253e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/form @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name :
+# -- +
+ $0 +
\ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/href b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/href new file mode 100644 index 0000000..47cb84a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/href @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : ... +#key: a +# -- +$2 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/html b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/html new file mode 100644 index 0000000..85e09f7 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/html @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- + + $0 + diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/img b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/img new file mode 100644 index 0000000..1f4382b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/img @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : ... +# -- +$2 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/input b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/input new file mode 100644 index 0000000..80c3503 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/input @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/link b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/link new file mode 100644 index 0000000..d93b7a5 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/link @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/meta b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/meta new file mode 100644 index 0000000..dfee1f2 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/meta @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : +#group : meta +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/name b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/name new file mode 100644 index 0000000..592d0da --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/name @@ -0,0 +1,4 @@ +#contributor : Anders Bach Nielsen +#name : +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/quote b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/quote new file mode 100644 index 0000000..20fed1e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/quote @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name :
...
+# -- +
+ $1 +
\ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/style b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/style new file mode 100644 index 0000000..b80be1c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/style @@ -0,0 +1,6 @@ +#contributor : Anders Bach Nielsen +#name : +# -- + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag new file mode 100644 index 0000000..7c6a766 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : ... +#key: t +# -- +<${1:tag}>$2$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag_closing b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag_closing new file mode 100644 index 0000000..dcf5523 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag_closing @@ -0,0 +1,5 @@ +#contributor : Anders Bach Nielsen +#name : +#key: t +# -- +<$1 $2 />$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag_newline b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag_newline new file mode 100644 index 0000000..a1e1260 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/nxml-mode/tag_newline @@ -0,0 +1,7 @@ +#contributor : Anders Bach Nielsen +#name : \n...\n +#key: tn +# -- +<${1:tag}> + $2 +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/for new file mode 100644 index 0000000..c8e1dde --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/for @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: for +# key: for +# -- +for ${1:var} = ${2:expr} + $0 +endfor \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/function b/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/function new file mode 100644 index 0000000..ad2fe56 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/function @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: function +# key: fun +# -- +function ${1:return_val} = ${2:fname}(${3:args}) + $0 +endfunction \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/if new file mode 100644 index 0000000..c785a24 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/octave-mode/if @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# -- +if ${1:cond} + $0 +${2:else + ${3:other}} +endif \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/code b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/code new file mode 100644 index 0000000..89a94ff --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/code @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: code +# key: code_ +# -- +#+begin_${1:lang} ${2:options} +$0 +#+end_$1 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/dot b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/dot new file mode 100644 index 0000000..e9e76a1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/dot @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: dot +# key: dot_ +# -- +#+begin_src dot :file ${1:file} :cmdline -T${2:pdf} :exports none :results silent + $0 +#+end_src + +[[file:$1]] \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/elisp b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/elisp new file mode 100644 index 0000000..c96251e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/elisp @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: elisp +# key: elisp_ +# -- +#+begin_src emacs-lisp :tangle yes +$0 +#+end_src \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/embedded b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/embedded new file mode 100644 index 0000000..5e74820 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/embedded @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: embedded +# key: emb_ +# -- +src_${1:lang}${2:[${3:where}]}{${4:code}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/entry b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/entry new file mode 100644 index 0000000..51d680a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/entry @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: entry +# key: entry_ +# -- +#+begin_html +--- +layout: ${1:default} +title: ${2:title} +--- +#+end_html +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/figure b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/figure new file mode 100644 index 0000000..6c01df8 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/figure @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: figure +# key: fig_ +# -- +#+CAPTION: ${1:caption} +#+ATTR_LaTeX: ${2:scale=0.75} +#+LABEL: fig:${3:label} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/img b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/img new file mode 100644 index 0000000..9da54ba --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/img @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: img +# key: img_ +# -- +$2 +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/latex b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/latex new file mode 100644 index 0000000..66541c2 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/latex @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: latex +# key: latex_ +# -- +#+BEGIN_LaTeX +$0 +#+END_LaTeX \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/matrix b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/matrix new file mode 100644 index 0000000..01f28c0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/matrix @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: matrix +# key: matrix_ +# possible improvement, compute the number of lines from the argument to array +# -- +\left \( +\begin{array}{${1:ccc}} +${2:v1 & v2} \\ +$0 +\end{array} +\right \) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/verse b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/verse new file mode 100644 index 0000000..02c691e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/org-mode/verse @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: verse +# key: verse_ +# -- +#+begin_verse + $0 +#+end_verse \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/.yas-parents b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/.yas-parents new file mode 100644 index 0000000..eed5b44 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/.yas-parents @@ -0,0 +1 @@ +text-mode diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/eval b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/eval new file mode 100644 index 0000000..a484014 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/eval @@ -0,0 +1,9 @@ +# name: eval { ... } if ($@) { ... } +# key: eval +# -- +eval { + ${1:# do something risky...} +}; +if (\$@) { + ${2:# handle failure...} +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/for new file mode 100644 index 0000000..1ba240f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/for @@ -0,0 +1,6 @@ +# name: for (...) { ... } +# key: for +# -- +for (my \$${1:var} = 0; \$$1 < ${2:expression}; \$$1++) { + ${3:# body...} +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/fore b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/fore new file mode 100644 index 0000000..c3b81d5 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/fore @@ -0,0 +1,6 @@ +# name: foreach ... { ... } +# key: fore +# -- +foreach my \$${1:x} (@${2:array}) { + ${3:# body...} +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/if new file mode 100644 index 0000000..567db90 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/if @@ -0,0 +1,6 @@ +# name: if (...) { ... } +# key: if +# -- +if ($1) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/ife b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/ife new file mode 100644 index 0000000..f278f21 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/ife @@ -0,0 +1,8 @@ +# name: if (...) { ... } else { ... } +# key: ife +# -- +if ($1) { + $2 +} else { + $3 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/ifee b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/ifee new file mode 100644 index 0000000..d1bf237 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/ifee @@ -0,0 +1,10 @@ +# name: if, elsif, else ... +# key: ifee +# -- +if ($1) { + ${2:# body...} +} elsif ($3) { + ${4:# elsif...} +} else { + ${5:# else...} +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/sub b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/sub new file mode 100644 index 0000000..05607d6 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/sub @@ -0,0 +1,6 @@ +# name: sub ... { ... } +# key: sub +# -- +sub ${1:function_name} { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/unless b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/unless new file mode 100644 index 0000000..f91a652 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/unless @@ -0,0 +1,6 @@ +# name: unless (...) { ... } +# key: unless +# -- +unless ($1) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/while b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/while new file mode 100644 index 0000000..2744530 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/while @@ -0,0 +1,6 @@ +# name: while (...) { ... } +# key: while +# -- +while ($1) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xfore b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xfore new file mode 100644 index 0000000..018e140 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xfore @@ -0,0 +1,4 @@ +# name: ... foreach ... +# key: xfore +# -- +${1:expression} foreach @${2:array}; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xif b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xif new file mode 100644 index 0000000..ca8b563 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xif @@ -0,0 +1,4 @@ +# name: ... if ... +# key: xif +# -- +${1:expression} if ${2:condition} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xunless b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xunless new file mode 100644 index 0000000..dbb7d7d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xunless @@ -0,0 +1,4 @@ +# name: ... unless ... +# key: xunless +# -- +${1:expression} unless ${2:condition} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xwhile b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xwhile new file mode 100644 index 0000000..14c6308 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/perl-mode/xwhile @@ -0,0 +1,4 @@ +# name: ... while ... +# key: xwhile +# -- +${1:expression} while ${2:condition}; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/.yas-setup.el b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/.yas-setup.el new file mode 100644 index 0000000..03d07cf --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/.yas-setup.el @@ -0,0 +1,2 @@ +(defun yas-with-comment (str) + (format "%s%s%s" comment-start str comment-end)) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/.yas-setup.elc b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/.yas-setup.elc new file mode 100644 index 0000000..a0fc804 Binary files /dev/null and b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/.yas-setup.elc differ diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/fixme b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/fixme new file mode 100644 index 0000000..146db8b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/fixme @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: fixme +# key: fi +# condition: (not (eq major-mode 'sh-mode)) +# -- +`(yas-with-comment "FIXME: ")` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/todo b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/todo new file mode 100644 index 0000000..973151f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/todo @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: todo +# key: t +# -- +`(yas-with-comment "TODO: ")` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/xxx b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/xxx new file mode 100644 index 0000000..09df18b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/prog-mode/xxx @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: xxx +# key: x +# -- +`(yas-with-comment "XXX: ")` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-parents b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-parents new file mode 100644 index 0000000..75d003f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-parents @@ -0,0 +1 @@ +prog-mode diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-setup.el b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-setup.el new file mode 100644 index 0000000..6635232 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-setup.el @@ -0,0 +1,22 @@ +(defun python-split-args (arg-string) + "Split a python argument string into ((name, default)..) tuples" + (mapcar (lambda (x) + (split-string x "[[:blank:]]*=[[:blank:]]*" t)) + (split-string arg-string "[[:blank:]]*,[[:blank:]]*" t))) + +(defun python-args-to-docstring () + "return docstring format for the python arguments in yas-text" + (let* ((indent (concat "\n" (make-string (current-column) 32))) + (args (python-split-args yas-text)) + (max-len (if args (apply 'max (mapcar (lambda (x) (length (nth 0 x))) args)) 0)) + (formatted-args (mapconcat + (lambda (x) + (concat (nth 0 x) (make-string (- max-len (length (nth 0 x))) ? ) " -- " + (if (nth 1 x) (concat "\(default " (nth 1 x) "\)")))) + args + indent))) + (unless (string= formatted-args "") + (mapconcat 'identity (list "Keyword Arguments:" formatted-args) indent)))) + +(add-hook 'python-mode-hook + '(lambda () (set (make-local-variable 'yas-indent-line) 'fixed))) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-setup.elc b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-setup.elc new file mode 100644 index 0000000..bd78043 Binary files /dev/null and b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/.yas-setup.elc differ diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__contains__ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__contains__ new file mode 100644 index 0000000..4d4ad50 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__contains__ @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __contains__ +# key: cont +# group: dunder methods +# -- +def __contains__(self, el): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__enter__ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__enter__ new file mode 100644 index 0000000..3dcc3ba --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__enter__ @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: __enter__ +# key: ent +# group: dunder methods +# -- +def __enter__(self): + $0 + + return self \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__exit__ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__exit__ new file mode 100644 index 0000000..cd9de7d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__exit__ @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __exit__ +# key: ex +# group: dunder methods +# -- +def __exit__(self, type, value, traceback): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__getitem__ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__getitem__ new file mode 100644 index 0000000..939bd1a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__getitem__ @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __getitem__ +# key: getit +# group: dunder methods +# -- +def __getitem__(self, ${1:key}): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__len__ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__len__ new file mode 100644 index 0000000..9e6c164 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__len__ @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __len__ +# key: len +# group: dunder methods +# -- +def __len__(self): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__new__ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__new__ new file mode 100644 index 0000000..0256580 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__new__ @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: __new__ +# key: new +# group: dunder methods +# -- +def __new__(mcs, name, bases, dict): + $0 + return type.__new__(mcs, name, bases, dict) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__setitem__ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__setitem__ new file mode 100644 index 0000000..c7db5b1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/__setitem__ @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __setitem__ +# key: setit +# group: dunder methods +# -- +def __setitem__(self, ${1:key}, ${2:val}): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/all b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/all new file mode 100644 index 0000000..062e31a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/all @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: all +# key: a +# -- +__all__ = [ + $0 +] \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/arg b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/arg new file mode 100644 index 0000000..f5145ec --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/arg @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: arg +# key: arg +# group: argparser +# -- +parser.add_argument('-$1', '--$2', + $0) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/arg_positional b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/arg_positional new file mode 100644 index 0000000..b54fc46 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/arg_positional @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: arg_positional +# key: arg +# group: argparser +# -- +parser.add_argument('${1:varname}', $0) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ass b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ass new file mode 100644 index 0000000..ec82efe --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ass @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assert +# key: ass +# group: testing +# -- +assert $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertEqual b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertEqual new file mode 100644 index 0000000..29282b9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertEqual @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assertEqual +# key: ae +# group: testing +# -- +self.assertEqual($1, $2) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertFalse b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertFalse new file mode 100644 index 0000000..41a9dcf --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertFalse @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assertFalse +# key: af +# group: testing +# -- +self.assertFalse($0) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertIn b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertIn new file mode 100644 index 0000000..74e1ee7 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertIn @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assertIn +# key: ai +# group: testing +# -- +self.assertIn(${1:member}, ${2:container}) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertNotEqual b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertNotEqual new file mode 100644 index 0000000..6837407 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertNotEqual @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assertNotEqual +# key: ane +# group: testing +# -- +self.assertNotEqual($1, $2) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertNotIn b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertNotIn new file mode 100644 index 0000000..4780a7e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertNotIn @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assetNotIn +# key: an +# group: testing +# -- +self.assertNotIn(${1:member}, ${2:container}) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertRaises b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertRaises new file mode 100644 index 0000000..db125da --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertRaises @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assertRaises +# key: ar +# group: testing +# -- +self.assertRaises(${1:Exception}, ${2:fun}) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertRaises.with b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertRaises.with new file mode 100644 index 0000000..c97807e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertRaises.with @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assertRaises +# key: ar +# -- +with self.assertRaises(${1:Exception}): + $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertTrue b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertTrue new file mode 100644 index 0000000..1cc59ac --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/assertTrue @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: assertTrue +# key: at +# group: testing +# -- +self.assertTrue($0) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/celery_pdb b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/celery_pdb new file mode 100644 index 0000000..6095b2d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/celery_pdb @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: celery pdb +# key: cdb +# group: debug +# -- +from celery.contrib import rdb; rdb.set_trace() \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/classmethod b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/classmethod new file mode 100644 index 0000000..3bffaac --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/classmethod @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: classmethod +# key: cm +# group: object oriented +# -- +@classmethod +def ${1:meth}(cls, $0): + \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/cls b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/cls new file mode 100644 index 0000000..f857cdb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/cls @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: class +# key: cls +# group: object oriented +# -- +class ${1:class}: + $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/dec b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/dec new file mode 100644 index 0000000..b22c9e9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/dec @@ -0,0 +1,14 @@ +# -*- mode: snippet -*- +# name: dec +# key: dec +# group : definitions +# -- +def ${1:decorator}(func): + $2 + def _$1(*args, **kwargs): + $3 + ret = func(*args, **kwargs) + $4 + return ret + + return _$1 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/deftest b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/deftest new file mode 100644 index 0000000..394553a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/deftest @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: deftest +# key: dt +# group: testing +# -- +def test_${1:long_name}(self): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/django_test_class b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/django_test_class new file mode 100644 index 0000000..386e305 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/django_test_class @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: django_test_class +# key: tcs +# group: testing +# -- +class ${1:Model}Test(TestCase): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/doc b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/doc new file mode 100644 index 0000000..2929e78 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/doc @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: doc +# key: d +# -- +"""$0 +""" \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/doctest b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/doctest new file mode 100644 index 0000000..a5e4bb5 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/doctest @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: doctest +# key: doc +# group: testing +# -- +>>> ${1:function calls} +${2:desired output} +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/eq b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/eq new file mode 100644 index 0000000..e19c328 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/eq @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __eq__ +# key: eq +# group: dunder methods +# -- +def __eq__(self, other): + return self.$1 == other.$1 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/for new file mode 100644 index 0000000..0033c87 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/for @@ -0,0 +1,6 @@ +# name: for ... in ... : ... +# key: for +# group : control structure +# -- +for ${var} in ${collection}: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/from b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/from new file mode 100644 index 0000000..3a4acfc --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/from @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: from +# key: from +# group : general +# -- +from ${1:lib} import ${2:funs} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/function b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/function new file mode 100644 index 0000000..d7e8f12 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/function @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: function +# key: f +# group: definitions +# -- +def ${1:fun}(${2:args}): + $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/function_docstring b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/function_docstring new file mode 100644 index 0000000..1f7f35b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/function_docstring @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: function_docstring +# key: fd +# group: definitions +# -- +def ${1:name}($2): + \"\"\"$3 + ${2:$(python-args-to-docstring)} + \"\"\" + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/if new file mode 100644 index 0000000..d1538a9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/if @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# group : control structure +# -- +if ${1:cond}: + $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ife b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ife new file mode 100644 index 0000000..4b8f613 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ife @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: ife +# key: ife +# group : control structure +# -- +if $1: + $2 +else: + $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ifmain b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ifmain new file mode 100644 index 0000000..9575798 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ifmain @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: ifmain +# key: ifm +# -- +if __name__ == '__main__': + ${1:main()} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/import b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/import new file mode 100644 index 0000000..f34bc39 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/import @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: import +# key: imp +# group : general +# -- +import ${1:lib}${2: as ${3:alias}} +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/init b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/init new file mode 100644 index 0000000..aece55c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/init @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: init +# key: init +# group : definitions +# -- +def __init__(self${1:, args}): + ${2:"${3:docstring}" + }$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/init_docstring b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/init_docstring new file mode 100644 index 0000000..51af8db --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/init_docstring @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: init_docstring +# key: id +# group : definitions +# -- +def __init__(self$1): + \"\"\"$2 + ${1:$(python-args-to-docstring)} + \"\"\" + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/interact b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/interact new file mode 100644 index 0000000..4b412c8 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/interact @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: interact +# key: int +# -- +import code; code.interact(local=locals()) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ipdbdebug b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ipdbdebug new file mode 100644 index 0000000..f45ad75 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/ipdbdebug @@ -0,0 +1,6 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: ipdb trace +# key: itr +# group: debug +# -- +import ipdb; ipdb.set_trace() \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/iter b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/iter new file mode 100644 index 0000000..a4fed13 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/iter @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __iter__ +# key: iter +# group: dunder methods +# -- +def __iter__(self): + return ${1:iter($2)} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/lambda b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/lambda new file mode 100644 index 0000000..08b268b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/lambda @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: lambda +# key: lam +# -- +lambda ${1:x}: $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/list b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/list new file mode 100644 index 0000000..63cef24 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/list @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: list +# key: li +# group : definitions +# -- +[${1:el} for $1 in ${2:list}] +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/logger_name b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/logger_name new file mode 100644 index 0000000..9759dd9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/logger_name @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: logger_name +# key: ln +# -- +logger = logging.getLogger(${1:__name__}) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/logging b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/logging new file mode 100644 index 0000000..568eeea --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/logging @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: logging +# key: log +# -- +logger = logging.getLogger("${1:name}") +logger.setLevel(logging.${2:level}) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/main b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/main new file mode 100644 index 0000000..9f3c721 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/main @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: main +# key: main +# -- +def main(): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/metaclass b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/metaclass new file mode 100644 index 0000000..1e688e4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/metaclass @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: metaclass +# key: mt +# group: object oriented +# -- +__metaclass__ = type \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/method b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/method new file mode 100644 index 0000000..985ef0c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/method @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: method +# key: m +# group: object oriented +# -- +def ${1:method}(self${2:, $3}): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/method_docstring b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/method_docstring new file mode 100644 index 0000000..8f5e78d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/method_docstring @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: method_docstring +# key: md +# group: object oriented +# -- +def ${1:name}(self$2): + \"\"\"$3 + ${2:$(python-args-to-docstring)} + \"\"\" + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/not_impl b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/not_impl new file mode 100644 index 0000000..515e353 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/not_impl @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: not_impl +# key: not_impl +# -- +raise NotImplementedError \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/np b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/np new file mode 100644 index 0000000..9f6327c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/np @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: np +# key: np +# group : general +# -- +import numpy as np +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/parse_args b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/parse_args new file mode 100644 index 0000000..aa61070 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/parse_args @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: parse_args +# key: pargs +# group: argparser +# -- +def parse_arguments(): + parser = argparse.ArgumentParser(description='$1') + $0 + return parser.parse_args() \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/parser b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/parser new file mode 100644 index 0000000..29a04ea --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/parser @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: parser +# key: pars +# group: argparser +# -- +parser = argparse.ArgumentParser(description='$1') +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/pass b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/pass new file mode 100644 index 0000000..4734f7f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/pass @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: pass +# key: ps +# -- +pass \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/pl b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/pl new file mode 100644 index 0000000..29d905c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/pl @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: Import pyplot +# key: pl +# group : general +# -- +import matplotlib.pyplot as pl +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/print b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/print new file mode 100644 index 0000000..cc1c797 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/print @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: print +# key: p +# -- +print($0) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/prop b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/prop new file mode 100644 index 0000000..34e4fa1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/prop @@ -0,0 +1,17 @@ +# contributor: Mads D. Kristensen +# name: prop +# -- +def ${1:foo}(): + doc = """${2:Doc string}""" + def fget(self): + return self._$1 + + def fset(self, value): + self._$1 = value + + def fdel(self): + del self._$1 + return locals() +$1 = property(**$1()) + +$0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/reg b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/reg new file mode 100644 index 0000000..c4ebeac --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/reg @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: reg +# key: reg +# group : general +# -- +${1:regexp} = re.compile(r"${2:expr}") +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/repr b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/repr new file mode 100644 index 0000000..a1f6783 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/repr @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __repr__ +# key: repr +# group: dunder methods +# -- +def __repr__(self): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/return b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/return new file mode 100644 index 0000000..641a308 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/return @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: return +# key: r +# -- +return $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/script b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/script new file mode 100644 index 0000000..55e42e9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/script @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: script +# key: script +# -- +#!/usr/bin/env python + +def main(): + pass + +if __name__ == '__main__': + main() diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/self b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/self new file mode 100644 index 0000000..4461022 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/self @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: self +# key: . +# group: object oriented +# -- +self.$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/self_without_dot b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/self_without_dot new file mode 100644 index 0000000..a1a0526 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/self_without_dot @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: self_without_dot +# key: s +# group: object oriented +# -- +self \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/selfassign b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/selfassign new file mode 100644 index 0000000..95d7b2b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/selfassign @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: selfassign +# key: sn +# group: object oriented +# -- +self.$1 = $1 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/setdef b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/setdef new file mode 100644 index 0000000..2398eb1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/setdef @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: setdef +# key: setdef +# -- +${1:var}.setdefault(${2:key}, []).append(${3:value}) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/setup b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/setup new file mode 100644 index 0000000..107abc1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/setup @@ -0,0 +1,14 @@ +# -*- mode: snippet -*- +# name: setup +# key: setup +# group: distribute +# -- +from setuptools import setup + +package = '${1:name}' +version = '${2:0.1}' + +setup(name=package, + version=version, + description="${3:description}", + url='${4:url}'$0) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/size b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/size new file mode 100644 index 0000000..47a0f38 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/size @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: size +# key: size +# -- +sys.getsizeof($0) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/static b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/static new file mode 100644 index 0000000..19c3df9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/static @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: static +# key: sm +# -- +@staticmethod +def ${1:func}($0): diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/str b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/str new file mode 100644 index 0000000..b0572e3 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/str @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __str__ +# key: str +# group: dunder methods +# -- +def __str__(self): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/super b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/super new file mode 100644 index 0000000..23fba5d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/super @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: super +# key: super +# group: object oriented +# -- +super(`(replace-regexp-in-string "\\([.]\\)[^.]+$" ", self)." (python-info-current-defun) nil nil 1)`($1) +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/test_class b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/test_class new file mode 100644 index 0000000..7342c5f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/test_class @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: test_class +# key: tcs +# group : testing +# -- +class Test${1:toTest}(${2:unittest.TestCase}): + $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/test_file b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/test_file new file mode 100644 index 0000000..e4b5315 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/test_file @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: test_file +# key: tf +# group : testing +# -- +import unittest +${1:from ${2:test_file} import *} + +$0 + +if __name__ == '__main__': + unittest.main() \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/trace b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/trace new file mode 100644 index 0000000..e475d62 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/trace @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: trace +# key: tr +# group: debug +# -- +import pdb; pdb.set_trace() \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/try b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/try new file mode 100644 index 0000000..8836de6 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/try @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: try +# key: try +# -- +try: + $1 +except ${2:Exception}: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/tryelse b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/tryelse new file mode 100644 index 0000000..f2e44e4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/tryelse @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: tryelse +# key: try +# -- +try: + $1 +except $2: + $3 +else: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/unicode b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/unicode new file mode 100644 index 0000000..52d6b8d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/unicode @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: __unicode__ +# key: un +# group: dunder methods +# -- +def __unicode__(self): + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/utf8 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/utf8 new file mode 100644 index 0000000..2ebd82e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/utf8 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: utf-8 encoding +# key: utf8 +# -- +# -*- coding: utf-8 -*- diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/while b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/while new file mode 100644 index 0000000..7b3539c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/while @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: while +# key: wh +# group: control structure +# -- +while ${1:True}: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/with b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/with new file mode 100644 index 0000000..7fcbd38 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/with @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: with +# key: with +# group : control structure +# -- +with ${1:expr}${2: as ${3:alias}}: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/with_statement b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/with_statement new file mode 100644 index 0000000..1be3692 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/python-mode/with_statement @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: with_statement +# key: fw +# group: future +# -- +from __future__ import with_statement \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rename_add_contr.py b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rename_add_contr.py new file mode 100755 index 0000000..3ed7847 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rename_add_contr.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +import os +import re +from os.path import join +from shutil import move + + +def rename(root, f): + if f.endswith('.yasnippet'): + base, _ = f.split('.') + print("move %s to %s" % (join(root, f), join(root, base))) + move(join(root, f), join(root, base)) + + +CONT = "# contributor: Andrea crotti\n# --" +END = "# --\n\n" + +orig = "# --\n\n" +to = "# --\n" + +def insert(root, f, orig, to): + fname = join(root, f) + text = open(fname).read() + nex_text = re.sub(orig, to, text) + open(fname, 'w').write(nex_text) + +if __name__ == '__main__': + for root, dirs, files in os.walk('.'): + if "mode" in root: + # os.popen("git add *yasnippet") + for f in files: + rename(root, f) + # insert(root, f, orig, to) + + + diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/autoclass b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/autoclass new file mode 100644 index 0000000..b207dd3 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/autoclass @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: autoclass +# key: auto +# -- +.. autoclass:: $0 + ${1::members: ${2:members}} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/autofunction b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/autofunction new file mode 100644 index 0000000..7ed5c5e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/autofunction @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: autofunction +# key: auto +# -- +.. autofunction:: $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/automodule b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/automodule new file mode 100644 index 0000000..2929f77 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/automodule @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: automodule +# key: auto +# -- +.. automodule:: ${1:module_name} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/class b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/class new file mode 100644 index 0000000..66ad562 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/class @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: class +# key: cls +# -- +:class:\`$0\` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/code b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/code new file mode 100644 index 0000000..49ff111 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/code @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: code +# key: code +# -- +.. code:: ${1:python} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/digraph b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/digraph new file mode 100644 index 0000000..448de13 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/digraph @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: digraph +# key: graph +# -- +.. digraph:: $1 + + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/function b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/function new file mode 100644 index 0000000..8677632 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/function @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: function +# key: fun +# -- +:function:\`$0\` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/graph b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/graph new file mode 100644 index 0000000..f7d7b69 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/graph @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: graph +# key: graph +# -- +.. graph:: $1 + + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/graphviz b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/graphviz new file mode 100644 index 0000000..53ca449 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/graphviz @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: graphviz +# key: graph +# -- +.. graphviz:: + + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/image b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/image new file mode 100644 index 0000000..402c9a5 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/image @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: image +# key: img +# -- +.. image:: ${1:path} + :height: ${2:100} + :width: ${3:200} + :alt: ${4:description} + +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/inheritance b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/inheritance new file mode 100644 index 0000000..e646c9a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/inheritance @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: inheritance +# key: inh +# -- +.. inheritance-diagram:: $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/literal_include b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/literal_include new file mode 100644 index 0000000..9e2a7de --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/literal_include @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: literatal include +# key: inc +# -- +.. literalinclude:: ${1:path} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/meta b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/meta new file mode 100644 index 0000000..6aaae41 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/meta @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: meta +# key: : +# -- +:${1:var}: $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/module b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/module new file mode 100644 index 0000000..e60e18e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/module @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: module +# key: mod +# -- +:mod: \`$0\` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/parsed_literal b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/parsed_literal new file mode 100644 index 0000000..ee8c07c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/parsed_literal @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: parsed_literal +# key: src +# -- +.. parsed-literal:: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/pause b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/pause new file mode 100644 index 0000000..0833e87 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/pause @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: pause +# key: pause +# group: hieroglyph +# -- +.. rst-class:: build \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/term b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/term new file mode 100644 index 0000000..86624e2 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/term @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: term +# key: term +# -- +:term:\`$0\` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/url b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/url new file mode 100644 index 0000000..ead9d35 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/url @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: url +# key: url +# -- +.. _${1:description}: $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/verbatim b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/verbatim new file mode 100644 index 0000000..1d0362c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/verbatim @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: verbatim +# key: | +# -- +| $0 +| \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/warning b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/warning new file mode 100644 index 0000000..8f74b36 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/rst-mode/warning @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: warning +# key: warn +# -- +.. warning: + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/# b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/# new file mode 100644 index 0000000..33581c8 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/# @@ -0,0 +1,4 @@ +#name : # => +#group : general +# -- +# => \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/=b b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/=b new file mode 100644 index 0000000..22a013f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/=b @@ -0,0 +1,6 @@ +#name : =begin rdoc ... =end +#group : general +# -- +=begin rdoc + $0 +=end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/Comp b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/Comp new file mode 100644 index 0000000..03f2b35 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/Comp @@ -0,0 +1,8 @@ +#name : include Comparable; def <=> ... end +#group : definitions +# -- +include Comparable + +def <=> other + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/GLOB b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/GLOB new file mode 100644 index 0000000..6667254 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/GLOB @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: GLOB +# key: $ +# -- +$${1:GLOBAL} = $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/all b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/all new file mode 100644 index 0000000..a98a9f4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/all @@ -0,0 +1,4 @@ +#name : all? { |...| ... } +#group : collections +# -- +all? { |${e}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/am b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/am new file mode 100644 index 0000000..7675a97 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/am @@ -0,0 +1,4 @@ +#name : alias_method new, old +#group : definitions +# -- +alias_method :${new_name}, :${old_name} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/any b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/any new file mode 100644 index 0000000..d0b6dd2 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/any @@ -0,0 +1,4 @@ +#name : any? { |...| ... } +#group : collections +# -- +any? { |${e}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/app b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/app new file mode 100644 index 0000000..19bf60a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/app @@ -0,0 +1,6 @@ +#name : if __FILE__ == $PROGRAM_NAME ... end +#group : general +# -- +if __FILE__ == $PROGRAM_NAME + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/attribute b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/attribute new file mode 100644 index 0000000..4e8e37a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/attribute @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: attribute +# key: @ +# -- +@${1:attr} = $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/bench b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/bench new file mode 100644 index 0000000..e440919 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/bench @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: bench +# key: bench +# -- +require "benchmark" + +TESTS = ${1:1_000} +Benchmark.bmbm do |x| + x.report("${2:var}") {} +end diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/bm b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/bm new file mode 100644 index 0000000..4789f64 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/bm @@ -0,0 +1,6 @@ +#name : Benchmark.bmbm(...) do ... end +#group : general +# -- +Benchmark.bmbm(${1:10}) do |x| + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/case b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/case new file mode 100644 index 0000000..40c3529 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/case @@ -0,0 +1,7 @@ +#name : case ... end +#group : general +# -- +case ${1:object} +when ${2:condition} + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/cla b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/cla new file mode 100644 index 0000000..81ccf45 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/cla @@ -0,0 +1,6 @@ +#name : class << self ... end +#group : definitions +# -- +class << ${self} + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/cls b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/cls new file mode 100644 index 0000000..ab81ca8 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/cls @@ -0,0 +1,11 @@ +#name : class ... end +#contributor : hitesh +#group : definitions +# -- +class ${1:`(let ((fn (capitalize (file-name-nondirectory + (file-name-sans-extension + (or (buffer-file-name) + (buffer-name (current-buffer)))))))) + (replace-regexp-in-string "_" "" fn t t))`} + $0 +end diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/collect b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/collect new file mode 100644 index 0000000..934014a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/collect @@ -0,0 +1,4 @@ +#name : collect { |...| ... } +#group : collections +# -- +collect { |${e}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/dee b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/dee new file mode 100644 index 0000000..56d0a18 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/dee @@ -0,0 +1,4 @@ +#name : deep_copy(...) +#group : general +# -- +Marshal.load(Marshal.dump($0)) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/def b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/def new file mode 100644 index 0000000..875f0ff --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/def @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: def ... end +# key: def +# -- +def ${1:method}${2:(${3:args})} + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/deli b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/deli new file mode 100644 index 0000000..8476ef9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/deli @@ -0,0 +1,4 @@ +#name : delete_if { |...| ... } +#group : collections +# -- +delete_if { |${e}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/det b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/det new file mode 100644 index 0000000..6a17da9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/det @@ -0,0 +1,4 @@ +#name : detect { |...| ... } +#group : collections +# -- +detect { |${e}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/dow b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/dow new file mode 100644 index 0000000..3b65271 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/dow @@ -0,0 +1,6 @@ +#name : downto(...) { |n| ... } +#group : control structure +# -- +downto(${0}) { |${n}| + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/ea b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/ea new file mode 100644 index 0000000..9cdf8dc --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/ea @@ -0,0 +1,4 @@ +#name : each { |...| ... } +#group : collections +# -- +each { |${e}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eac b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eac new file mode 100644 index 0000000..f0d9cb1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eac @@ -0,0 +1,4 @@ +#name : each_cons(...) { |...| ... } +#group : collections +# -- +each_cons(${1:2}) { |${group}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eai b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eai new file mode 100644 index 0000000..5b0ed67 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eai @@ -0,0 +1,4 @@ +#name : each_index { |i| ... } +#group : collections +# -- +each_index { |${i}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eav b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eav new file mode 100644 index 0000000..558e5b4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eav @@ -0,0 +1,4 @@ +#name : each_value { |val| ... } +#group : collections +# -- +each_value { |${val}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eawi b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eawi new file mode 100644 index 0000000..edf8418 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/eawi @@ -0,0 +1,4 @@ +#name : each_with_index { |e, i| ... } +#group : collections +# -- +each_with_index { |${e}, ${i}| $0 } \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/for new file mode 100644 index 0000000..03dd82c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/for @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: for +# key: for +# -- +for ${1:el} in ${2:collection} + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/forin b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/forin new file mode 100644 index 0000000..36b4387 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/forin @@ -0,0 +1,6 @@ +#name : for ... in ...; ... end +#group : control structure +# -- +for ${1:element} in ${2:collection} + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/formula b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/formula new file mode 100644 index 0000000..735b0d1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/ruby-mode/formula @@ -0,0 +1,16 @@ +# -*- mode: snippet -*- +# name: formula +# key: form +# -- +require 'formula' + +class ${1:Name} +#name : object name extends App +# key: app +# -- +object ${1:name} extends App { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/case b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/case new file mode 100644 index 0000000..b16dcae --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/case @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : case pattern => +# key: case +# -- +case ${1:_} => $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/cc b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/cc new file mode 100644 index 0000000..3eedbc7 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/cc @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#Author : Sam Halliday +#name : case class T(arg: A) +# key: cc +# -- +case class ${1:Name}( + ${2:arg}: ${3:Type} +) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/co b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/co new file mode 100644 index 0000000..7c3d371 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/co @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : case object T +# key: co +# -- +case object ${1:name} $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/cons b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/cons new file mode 100644 index 0000000..bb2b26c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/cons @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : element1 :: element2 +# key: cons +# -- +${1:element1} :: ${2:element2} $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/def b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/def new file mode 100644 index 0000000..22a8ee9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/def @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : def f(arg: T): R = {...} +# key: def +# -- +def ${1:name}(${2:args}): ${3:Unit} = { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/doc b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/doc new file mode 100644 index 0000000..60b5007 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/doc @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +#Author : Anders Bach Nielsen +#name : /** ... */ +# key: doc +# -- +/** + * ${1:description} + * $0 + */ \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/for new file mode 100644 index 0000000..44a4253 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/for @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#Author : Sam Halliday +#name : for { x <- xs } yield +#key: for +# -- +for { + ${1:x} <- ${2:xs} +} yield ${3:x} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/if new file mode 100644 index 0000000..28ff792 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/if @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : if (cond) { .. } +# key: if +# -- +if (${1:condition}) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/ls b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/ls new file mode 100644 index 0000000..3e1fb51 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/ls @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : List(..) +# key: ls +# -- +List(${1:args}, ${2:args}) $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/main b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/main new file mode 100644 index 0000000..4befc32 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/main @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name: def main(args: Array[String]) = { ... } +# key: main +# -- +def main(args: Array[String]) = { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/match b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/match new file mode 100644 index 0000000..8aadeea --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/match @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : cc match { .. } +# key: match +# -- +${1:cc} match { + case ${2:pattern} => $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/ob b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/ob new file mode 100644 index 0000000..1890550 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/ob @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : object name extends T +# key: ob +# -- +object ${1:name} extends ${2:type} $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/throw b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/throw new file mode 100644 index 0000000..02ad549 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/throw @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +#Author : Jonas Bonèr +#name : throw new Exception +# key: throw +# -- +throw new ${1:Exception}(${2:msg}) $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/try b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/try new file mode 100644 index 0000000..d0c8d04 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/scala-mode/try @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +#Author : Sam Halliday +#name : try { .. } catch { case e => ..} +# key: try +# -- +try { + $0 +} catch { + case e: ${1:Throwable} => + ${2:// TODO: handle exception} +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/args b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/args new file mode 100644 index 0000000..09fe3a0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/args @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name:args +# key: args +# -- +if [ $# -lt ${1:2} ] + then $0 +fi \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/bang b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/bang new file mode 100644 index 0000000..5e11f0e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/bang @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: bang +# key: ! +# -- +#!/usr/bin/env bash +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/for loop b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/for loop new file mode 100644 index 0000000..438706b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/for loop @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: for loop +# key: for +# -- +for ${1:var} in ${2:stuff}; do + $0 +done \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/function b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/function new file mode 100644 index 0000000..c0f670a --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/function @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: function +# key: f +# -- +function ${1:name} { + $0 +} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/if b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/if new file mode 100644 index 0000000..2dc537d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/if @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# -- +if ${1:[ -f file]} + then ${2:do} +fi +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/ife b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/ife new file mode 100644 index 0000000..f046a3e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sh-mode/ife @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: ife +# key: ife +# -- +if ${1:cond} +then ${2:stuff} +else ${3:other} +fi +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/cont b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/cont new file mode 100644 index 0000000..3783d54 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/cont @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: cont +# key: cont +# -- +# contributor: `user-full-name` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/elisp b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/elisp new file mode 100644 index 0000000..768e94d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/elisp @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: elisp +# key: ` +# -- +\`$0\` \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/field b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/field new file mode 100644 index 0000000..12ff0e0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/field @@ -0,0 +1,6 @@ +# name : ${ ... } field +# contributor : joaotavora +# key : $f +# key: field +# -- +\${${1:${2:n}:}$3${4:\$(${5:lisp-fn})}\}$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/group b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/group new file mode 100644 index 0000000..3ae8fd2 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/group @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: group +# key: group +# -- +# group : ${1:group} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/mirror b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/mirror new file mode 100644 index 0000000..2a45042 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/mirror @@ -0,0 +1,6 @@ +# name : ${n:$(...)} mirror +# key : $m +# contributor : joaotavora +# key: mirror +# -- +\${${2:n}:${4:\$(${5:reflection-fn})}\}$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/vars b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/vars new file mode 100644 index 0000000..ec4e4b6 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippet-mode/vars @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name : Snippet header +# contributor : joaotavora +# key: vars +# -- +# name : $1${2: +# key : ${3:trigger-key}}${4: +# keybinding : ${5:keybinding}}${6: +# expand-env : (${7:})} +# contributor : $6 +# key: vars +# -- +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippets/ruby-mode/definitions/mod b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippets/ruby-mode/definitions/mod new file mode 100644 index 0000000..118400c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/snippets/ruby-mode/definitions/mod @@ -0,0 +1,13 @@ +# name: module ... end +# contributor: hitesh , jimeh +# key: mod +# -- +module ${1:`(let ((fn (capitalize (file-name-nondirectory + (file-name-sans-extension + (or (buffer-file-name) + (buffer-name (current-buffer)))))))) + (cond + ((string-match "_" fn) (replace-match "" nil nil fn)) + (t fn)))`} + $0 +end \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/column b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/column new file mode 100644 index 0000000..90e4963 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/column @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : , ColumnName ColumnType NOT NULL... +# -- + , ${1:Name} ${2:Type} ${3:NOT NULL} diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/constraint b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/constraint new file mode 100644 index 0000000..989e508 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/constraint @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : CONSTRAINT [..] PRIMARY KEY ... +# -- +CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}]) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/constraint.1 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/constraint.1 new file mode 100644 index 0000000..98d89f0 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/constraint.1 @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : CONSTRAINT [..] FOREIGN KEY ... +# -- +CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}]) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/create b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/create new file mode 100644 index 0000000..a34624d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/create @@ -0,0 +1,10 @@ +#contributor : Alejandro Espinoza Esparza +#name : create table ... +# -- +CREATE TABLE [${1:dbo}].[${2:TableName}] +( + ${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL} +$0 + CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3]) +) +GO diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/create.1 b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/create.1 new file mode 100644 index 0000000..1323daf --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/create.1 @@ -0,0 +1,12 @@ +#contributor : Alejandro Espinoza Esparza +#name : create procedure ... +# -- +CREATE PROCEDURE [${1:dbo}].[${2:Name}] +( + $3 $4 = ${5:NULL} ${6:OUTPUT} +) +AS +BEGIN +$0 +END +GO diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/references b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/references new file mode 100644 index 0000000..f2e4eab --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/sql-mode/references @@ -0,0 +1,4 @@ +#contributor : Alejandro Espinoza Esparza +#name : REFERENCES ... +# -- +REFERENCES ${1:TableName}([${2:ColumnName}]) diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/text-mode/.yas-parents b/.emacs.d/elpa/yasnippet-20160131.948/snippets/text-mode/.yas-parents new file mode 100644 index 0000000..c3ca481 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/text-mode/.yas-parents @@ -0,0 +1 @@ +fundamental-mode diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/assert b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/assert new file mode 100644 index 0000000..574f865 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/assert @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: assert +# key: as +# -- +assert $0;; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/docstring b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/docstring new file mode 100644 index 0000000..6738353 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/docstring @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: docstring +# key: d +# -- +(* $0 *) \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/for b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/for new file mode 100644 index 0000000..f21b345 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/for @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: for +# key: for +# -- +for ${1:cond} do + $0 +done \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/fun b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/fun new file mode 100644 index 0000000..7579a3c --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/fun @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: fun +# key: fun +# -- +fun ${1:args} -> $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/guard b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/guard new file mode 100644 index 0000000..13d43fc --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/guard @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: guard +# key: | +# -- +| ${1:match} -> $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/ifthen b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/ifthen new file mode 100644 index 0000000..dfb1907 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/ifthen @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: ifthen +# key: if +# -- +if ${1:cond} then + $0 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/ifthenelse b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/ifthenelse new file mode 100644 index 0000000..86d409f --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/ifthenelse @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: ifthenelse +# key: if +# -- +if ${1:cond} then + $2 +else + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/let b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/let new file mode 100644 index 0000000..1a0162e --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/let @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: let +# key: let +# -- +let ${1:var} $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/list_comprehension b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/list_comprehension new file mode 100644 index 0000000..86d4a53 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/list_comprehension @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: list_comprehension +# key: l +# -- +[? $1 | $0 ?] \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/main b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/main new file mode 100644 index 0000000..3351548 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/main @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: main +# key: m +# -- +let main = + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/match b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/match new file mode 100644 index 0000000..18d4caa --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/match @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: match +# key: match +# -- +match ${1:to_match} with + | ${2:matching} -> $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/module b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/module new file mode 100644 index 0000000..7e14d14 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/module @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: module +# key: mod +# -- +module ${1:A} = + struct + ${2:type t = { name : string; phone : string }} + $0 +end;; diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/open b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/open new file mode 100644 index 0000000..cfc71f4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/open @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: open +# key: op +# -- +open ${1:Module} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/printf b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/printf new file mode 100644 index 0000000..71a9a59 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/printf @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: printf +# key: pr +# -- +Printf.printf "${1:string}" ${2:vals};; \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/rec b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/rec new file mode 100644 index 0000000..e901eb4 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/rec @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: rec +# key: rec +# -- +let rec ${1:fun} ${2:args} = + $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/try b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/try new file mode 100644 index 0000000..9c7faed --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/try @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: try +# key: try +# -- +try + $0 +with + $1 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/type b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/type new file mode 100644 index 0000000..a81b0e1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/type @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: type_record +# key: type +# -- +type ${1:name} = {${2:var}: ${3:int}$0} \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/type_type b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/type_type new file mode 100644 index 0000000..c5b4ac9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/type_type @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: type_type +# key: type +# -- +type ${1:expr} = + | $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/val b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/val new file mode 100644 index 0000000..6a565ac --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/val @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: val +# key: val +# -- +val ${1:fun} : $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/while b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/while new file mode 100644 index 0000000..e4b1f07 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/tuareg-mode/while @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: while +# key: wh +# -- +while ${1:cond} do + $0 +done \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/typerex-mode b/.emacs.d/elpa/yasnippet-20160131.948/snippets/typerex-mode new file mode 100755 index 0000000..e69de29 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/ENV b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/ENV new file mode 100644 index 0000000..e25b271 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/ENV @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: ENV +# key: env +# -- +ENV{$1}$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/GOTO b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/GOTO new file mode 100644 index 0000000..2200b5d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/GOTO @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: GOTO +# key: goto +# -- +GOTO="$1" +$0 + +LABEL="$1" \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/KERNEL b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/KERNEL new file mode 100644 index 0000000..c27d937 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/KERNEL @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: KERNEL +# key: ker +# -- +KERNEL!="$0" \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/add b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/add new file mode 100644 index 0000000..8cbd63b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/add @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: add +# key: add +# -- +ACTION=="add", $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/env$ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/env$ new file mode 100644 index 0000000..7c743b1 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/env$ @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: env$ +# key: $ +# -- +$env{$1} $0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/run b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/run new file mode 100644 index 0000000..cc0bb7b --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/udev-mode/run @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: run +# key: run +# -- +RUN+="$0" \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/web-mode b/.emacs.d/elpa/yasnippet-20160131.948/snippets/web-mode new file mode 100755 index 0000000..e69de29 diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/entry b/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/entry new file mode 100644 index 0000000..f9cfbe7 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/entry @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: entry +# key: entry +# -- +${1:entry}: ${2:value} +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/list b/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/list new file mode 100644 index 0000000..89d97eb --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/list @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: list +# key: list +# -- +[$1] +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/section b/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/section new file mode 100644 index 0000000..5e8782d --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/snippets/yaml-mode/section @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: section +# key: -- +# -- +--- # ${1:section} +$0 \ No newline at end of file diff --git a/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-autoloads.el b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-autoloads.el new file mode 100644 index 0000000..64619cd --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-autoloads.el @@ -0,0 +1,59 @@ +;;; yasnippet-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;;;### (autoloads nil "yasnippet" "yasnippet.el" (22209 51590 580162 +;;;;;; 0)) +;;; Generated autoloads from yasnippet.el + +(autoload 'yas-minor-mode "yasnippet" "\ +Toggle YASnippet mode. + +When YASnippet mode is enabled, `yas-expand', normally bound to +the TAB key, expands snippets of code depending on the major +mode. + +With no argument, this command toggles the mode. +positive prefix argument turns on the mode. +Negative prefix argument turns off the mode. + +Key bindings: +\\{yas-minor-mode-map} + +\(fn &optional ARG)" t nil) + +(defvar yas-global-mode nil "\ +Non-nil if Yas-Global mode is enabled. +See the command `yas-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `yas-global-mode'.") + +(custom-autoload 'yas-global-mode "yasnippet" nil) + +(autoload 'yas-global-mode "yasnippet" "\ +Toggle Yas minor mode in all buffers. +With prefix ARG, enable Yas-Global mode if ARG is positive; +otherwise, disable it. If called from Lisp, enable the mode if +ARG is omitted or nil. + +Yas minor mode is enabled in all buffers where +`yas-minor-mode-on' would do it. +See `yas-minor-mode' for more information on Yas minor mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("yasnippet-pkg.el") (22209 51590 667587 +;;;;;; 128000)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; yasnippet-autoloads.el ends here diff --git a/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-autoloads.el~ b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-autoloads.el~ new file mode 100644 index 0000000..a8667f9 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-autoloads.el~ @@ -0,0 +1,11 @@ +;;; yasnippet-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; yasnippet-autoloads.el ends here diff --git a/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-pkg.el b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-pkg.el new file mode 100644 index 0000000..732b775 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet-pkg.el @@ -0,0 +1,5 @@ +(define-package "yasnippet" "20160131.948" "Yet another snippet extension for Emacs." 'nil :url "http://github.com/capitaomorte/yasnippet" :keywords + '("convenience" "emulation")) +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/.emacs.d/elpa/yasnippet-20160131.948/yasnippet.el b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet.el new file mode 100644 index 0000000..69d6b26 --- /dev/null +++ b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet.el @@ -0,0 +1,4596 @@ +;;; yasnippet.el --- Yet another snippet extension for Emacs. + +;; Copyright (C) 2008-2013, 2015 Free Software Foundation, Inc. +;; Authors: pluskid , João Távora , Noam Postavsky +;; Maintainer: Noam Postavsky +;; Version: 0.8.1 +;; Package-version: 0.8.0 +;; X-URL: http://github.com/capitaomorte/yasnippet +;; Keywords: convenience, emulation +;; URL: http://github.com/capitaomorte/yasnippet +;; EmacsWiki: YaSnippetMode + +;; 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 . + +;;; Commentary: +;; +;; Basic steps to setup: +;; +;; (add-to-list 'load-path +;; "~/path-to-yasnippet") +;; (require 'yasnippet) +;; (yas-global-mode 1) +;; +;; +;; Interesting variables are: +;; +;; `yas-snippet-dirs' +;; +;; The directory where user-created snippets are to be +;; stored. Can also be a list of directories. In that case, +;; when used for bulk (re)loading of snippets (at startup or +;; via `yas-reload-all'), directories appearing earlier in +;; the list override other dir's snippets. Also, the first +;; directory is taken as the default for storing the user's +;; new snippets. +;; +;; The deprecated `yas/root-directory' aliases this variable +;; for backward-compatibility. +;; +;; +;; Major commands are: +;; +;; M-x yas-expand +;; +;; Try to expand snippets before point. In `yas-minor-mode', +;; this is normally bound to TAB, but you can customize it in +;; `yas-minor-mode-map'. +;; +;; M-x yas-load-directory +;; +;; Prompts you for a directory hierarchy of snippets to load. +;; +;; M-x yas-activate-extra-mode +;; +;; Prompts you for an extra mode to add snippets for in the +;; current buffer. +;; +;; M-x yas-insert-snippet +;; +;; Prompts you for possible snippet expansion if that is +;; possible according to buffer-local and snippet-local +;; expansion conditions. With prefix argument, ignore these +;; conditions. +;; +;; M-x yas-visit-snippet-file +;; +;; Prompts you for possible snippet expansions like +;; `yas-insert-snippet', but instead of expanding it, takes +;; you directly to the snippet definition's file, if it +;; exists. +;; +;; M-x yas-new-snippet +;; +;; Lets you create a new snippet file in the correct +;; subdirectory of `yas-snippet-dirs', according to the +;; active major mode. +;; +;; M-x yas-load-snippet-buffer +;; +;; When editing a snippet, this loads the snippet. This is +;; bound to "C-c C-c" while in the `snippet-mode' editing +;; mode. +;; +;; M-x yas-tryout-snippet +;; +;; When editing a snippet, this opens a new empty buffer, +;; sets it to the appropriate major mode and inserts the +;; snippet there, so you can see what it looks like. This is +;; bound to "C-c C-t" while in `snippet-mode'. +;; +;; M-x yas-describe-tables +;; +;; Lists known snippets in a separate buffer. User is +;; prompted as to whether only the currently active tables +;; are to be displayed, or all the tables for all major +;; modes. +;; +;; If you have `dropdown-list' installed, you can optionally use it +;; as the preferred "prompting method", putting in your .emacs file, +;; for example: +;; +;; (require 'dropdown-list) +;; (setq yas-prompt-functions '(yas-dropdown-prompt +;; yas-ido-prompt +;; yas-completing-prompt)) +;; +;; Also check out the customization group +;; +;; M-x customize-group RET yasnippet RET +;; +;; If you use the customization group to set variables +;; `yas-snippet-dirs' or `yas-global-mode', make sure the path to +;; "yasnippet.el" is present in the `load-path' *before* the +;; `custom-set-variables' is executed in your .emacs file. +;; +;; For more information and detailed usage, refer to the project page: +;; http://github.com/capitaomorte/yasnippet + +;;; Code: + +(require 'cl) +(require 'cl-lib) +(require 'easymenu) +(require 'help-mode) + +(defvar yas--editing-template) +(defvar yas--guessed-modes) +(defvar yas--indent-original-column) +(defvar yas--scheduled-jit-loads) +(defvar yas-keymap) +(defvar yas-selected-text) +(defvar yas-verbosity) +(defvar yas--current-template) + + +;;; User customizable variables + +(defgroup yasnippet nil + "Yet Another Snippet extension" + :prefix "yas-" + :group 'editing) + +(defvar yas-installed-snippets-dir nil) +(setq yas-installed-snippets-dir + (when load-file-name + (concat (file-name-directory load-file-name) "snippets"))) + +(defconst yas--default-user-snippets-dir + (concat user-emacs-directory "snippets")) + +(defcustom yas-snippet-dirs (remove nil + (list yas--default-user-snippets-dir + 'yas-installed-snippets-dir)) + "List of top-level snippet directories. + +Each element, a string or a symbol whose value is a string, +designates a top-level directory where per-mode snippet +directories can be found. + +Elements appearing earlier in the list override later elements' +snippets. + +The first directory is taken as the default for storing snippet's +created with `yas-new-snippet'. " + :type '(choice (string :tag "Single directory (string)") + (repeat :args (string) :tag "List of directories (strings)")) + :group 'yasnippet + :require 'yasnippet + :set #'(lambda (symbol new) + (let ((old (and (boundp symbol) + (symbol-value symbol)))) + (set-default symbol new) + (unless (or (not (fboundp 'yas-reload-all)) + (equal old new)) + (yas-reload-all))))) + +(defun yas-snippet-dirs () + "Return variable `yas-snippet-dirs' as list of strings." + (cl-loop for e in (if (listp yas-snippet-dirs) + yas-snippet-dirs + (list yas-snippet-dirs)) + collect + (cond ((stringp e) e) + ((and (symbolp e) + (boundp e) + (stringp (symbol-value e))) + (symbol-value e)) + (t + (error "[yas] invalid element %s in `yas-snippet-dirs'" e))))) + +(defvaralias 'yas/root-directory 'yas-snippet-dirs) + +(defcustom yas-new-snippet-default "\ +# -*- mode: snippet -*- +# name: $1 +# key: ${2:${1:$(yas--key-from-desc yas-text)}} +# -- +$0" + "Default snippet to use when creating a new snippet. +If nil, don't use any snippet." + :type 'string + :group 'yasnippet) + +(defcustom yas-prompt-functions '(yas-dropdown-prompt + yas-completing-prompt + yas-maybe-ido-prompt + yas-no-prompt) + "Functions to prompt for keys, templates, etc interactively. + +These functions are called with the following arguments: + +- PROMPT: A string to prompt the user + +- CHOICES: a list of strings or objects. + +- optional DISPLAY-FN : A function that, when applied to each of +the objects in CHOICES will return a string. + +The return value of any function you put here should be one of +the objects in CHOICES, properly formatted with DISPLAY-FN (if +that is passed). + +- To signal that your particular style of prompting is +unavailable at the moment, you can also have the function return +nil. + +- To signal that the user quit the prompting process, you can +signal `quit' with + + (signal 'quit \"user quit!\")." + :type '(repeat function) + :group 'yasnippet) + +(defcustom yas-indent-line 'auto + "Controls indenting applied to a recent snippet expansion. + +The following values are possible: + +- `fixed' Indent the snippet to the current column; + +- `auto' Indent each line of the snippet with `indent-according-to-mode' + +Every other value means don't apply any snippet-side indentation +after expansion (the manual per-line \"$>\" indentation still +applies)." + :type '(choice (const :tag "Nothing" nothing) + (const :tag "Fixed" fixed) + (const :tag "Auto" auto)) + :group 'yasnippet) + +(defcustom yas-also-auto-indent-first-line nil + "Non-nil means also auto indent first line according to mode. + +Naturally this is only valid when `yas-indent-line' is `auto'" + :type 'boolean + :group 'yasnippet) + +(defcustom yas-snippet-revival t + "Non-nil means re-activate snippet fields after undo/redo." + :type 'boolean + :group 'yasnippet) + +(defcustom yas-triggers-in-field nil + "If non-nil, allow stacked expansions (snippets inside snippets). + +Otherwise `yas-next-field-or-maybe-expand' just moves on to the +next field" + :type 'boolean + :group 'yasnippet) + +(defcustom yas-fallback-behavior 'call-other-command + "How to act when `yas-expand' does *not* expand a snippet. + +- `call-other-command' means try to temporarily disable YASnippet + and call the next command bound to whatever key was used to + invoke `yas-expand'. + +- nil or the symbol `return-nil' mean do nothing. (and + `yas-expand' returns nil) + +- A Lisp form (apply COMMAND . ARGS) means interactively call + COMMAND. If ARGS is non-nil, call COMMAND non-interactively + with ARGS as arguments." + :type '(choice (const :tag "Call previous command" call-other-command) + (const :tag "Do nothing" return-nil)) + :group 'yasnippet) + +(defcustom yas-choose-keys-first nil + "If non-nil, prompt for snippet key first, then for template. + +Otherwise prompts for all possible snippet names. + +This affects `yas-insert-snippet' and `yas-visit-snippet-file'." + :type 'boolean + :group 'yasnippet) + +(defcustom yas-choose-tables-first nil + "If non-nil, and multiple eligible snippet tables, prompts user for tables first. + +Otherwise, user chooses between the merging together of all +eligible tables. + +This affects `yas-insert-snippet', `yas-visit-snippet-file'" + :type 'boolean + :group 'yasnippet) + +(defcustom yas-use-menu 'abbreviate + "Display a YASnippet menu in the menu bar. + +When non-nil, submenus for each snippet table will be listed +under the menu \"Yasnippet\". + +- If set to `abbreviate', only the current major-mode +menu and the modes set in `yas--extra-modes' are listed. + +- If set to `full', every submenu is listed + +- If set to `nil', hide the menu. + +Any other non-nil value, every submenu is listed." + :type '(choice (const :tag "Full" full) + (const :tag "Abbreviate" abbreviate) + (const :tag "No menu" nil)) + :group 'yasnippet) + +(defcustom yas-trigger-symbol (or (and (eq window-system 'mac) + (ignore-errors + (char-to-string ?\x21E5))) ;; little ->| sign + " =>") + "The text that will be used in menu to represent the trigger." + :type 'string + :group 'yasnippet) + +(defcustom yas-wrap-around-region nil + "If non-nil, snippet expansion wraps around selected region. + +The wrapping occurs just before the snippet's exit marker. This +can be overridden on a per-snippet basis." + :type 'boolean + :group 'yasnippet) + +(defcustom yas-good-grace t + "If non-nil, don't raise errors in inline elisp evaluation. + +An error string \"[yas] error\" is returned instead." + :type 'boolean + :group 'yasnippet) + +(defcustom yas-visit-from-menu nil + "If non-nil visit snippets's files from menu, instead of expanding them. + +This can only work when snippets are loaded from files." + :type 'boolean + :group 'yasnippet) + +(defcustom yas-expand-only-for-last-commands nil + "List of `last-command' values to restrict tab-triggering to, or nil. + +Leave this set at nil (the default) to be able to trigger an +expansion simply by placing the cursor after a valid tab trigger, +using whichever commands. + +Optionally, set this to something like '(self-insert-command) if +you to wish restrict expansion to only happen when the last +letter of the snippet tab trigger was typed immediately before +the trigger key itself." + :type '(repeat function) + :group 'yasnippet) + +;; Only two faces, and one of them shouldn't even be used... +;; +(defface yas-field-highlight-face + '((t (:inherit 'region))) + "The face used to highlight the currently active field of a snippet" + :group 'yasnippet) + +(defface yas--field-debug-face + '() + "The face used for debugging some overlays normally hidden" + :group 'yasnippet) + + +;;; User-visible variables + +(defvar yas-keymap (let ((map (make-sparse-keymap))) + (define-key map [(tab)] 'yas-next-field-or-maybe-expand) + (define-key map (kbd "TAB") 'yas-next-field-or-maybe-expand) + (define-key map [(shift tab)] 'yas-prev-field) + (define-key map [backtab] 'yas-prev-field) + (define-key map (kbd "C-g") 'yas-abort-snippet) + (define-key map (kbd "C-d") 'yas-skip-and-clear-or-delete-char) + map) + "The active keymap while a snippet expansion is in progress.") + +(defvar yas-key-syntaxes (list "w" "w_" "w_." "w_.()" + #'yas-try-key-from-whitespace) + "Syntaxes and functions to help look for trigger keys before point. + +Each element in this list specifies how to skip buffer positions +backwards and look for the start of a trigger key. + +Each element can be either a string or a function receiving the +original point as an argument. A string element is simply passed +to `skip-syntax-backward' whereas a function element is called +with no arguments and should also place point before the original +position. + +The string between the resulting buffer position and the original +point is matched against the trigger keys in the active snippet +tables. + +If no expandable snippets are found, the next element is the list +is tried, unless a function element returned the symbol `again', +in which case it is called again from the previous position and +may once more reposition point. + +For example, if `yas-key-syntaxes'' value is '(\"w\" \"w_\"), +trigger keys composed exclusively of \"word\"-syntax characters +are looked for first. Failing that, longer keys composed of +\"word\" or \"symbol\" syntax are looked for. Therefore, +triggering after + +foo-bar + +will, according to the \"w\" element first try \"barbaz\". If +that isn't a trigger key, \"foo-barbaz\" is tried, respecting the +second \"w_\" element. Notice that even if \"baz\" is a trigger +key for an active snippet, it won't be expanded, unless a +function is added to `yas-key-syntaxes' that eventually places +point between \"bar\" and \"baz\". + +See also Info node `(elisp) Syntax Descriptors'.") + +(defvar yas-after-exit-snippet-hook + '() + "Hooks to run after a snippet exited. + +The hooks will be run in an environment where some variables bound to +proper values: + +`yas-snippet-beg' : The beginning of the region of the snippet. + +`yas-snippet-end' : Similar to beg. + +Attention: These hooks are not run when exiting nested/stacked snippet expansion!") + +(defvar yas-before-expand-snippet-hook + '() + "Hooks to run just before expanding a snippet.") + +(defvar yas-buffer-local-condition + '(if (and (let ((ppss (syntax-ppss))) + (or (nth 3 ppss) (nth 4 ppss))) + (memq this-command '(yas-expand yas-expand-from-trigger-key + yas-expand-from-keymap))) + '(require-snippet-condition . force-in-comment) + t) + "Snippet expanding condition. + +This variable is a Lisp form which is evaluated every time a +snippet expansion is attempted: + + * If it evaluates to nil, no snippets can be expanded. + + * If it evaluates to the a cons (require-snippet-condition + . REQUIREMENT) + + * Snippets bearing no \"# condition:\" directive are not + considered + + * Snippets bearing conditions that evaluate to nil (or + produce an error) won't be considered. + + * If the snippet has a condition that evaluates to non-nil + RESULT: + + * If REQUIREMENT is t, the snippet is considered + + * If REQUIREMENT is `eq' RESULT, the snippet is + considered + + * Otherwise, the snippet is not considered. + + * If it evaluates to the symbol 'always, all snippets are + considered for expansion, regardless of any conditions. + + * If it evaluates to t or some other non-nil value + + * Snippet bearing no conditions, or conditions that + evaluate to non-nil, are considered for expansion. + + * Otherwise, the snippet is not considered. + +Here's an example preventing snippets from being expanded from +inside comments, in `python-mode' only, with the exception of +snippets returning the symbol 'force-in-comment in their +conditions. + + (add-hook 'python-mode-hook + '(lambda () + (setq yas-buffer-local-condition + '(if (python-in-string/comment) + '(require-snippet-condition . force-in-comment) + t)))) + +The default value is similar, it filters out potential snippet +expansions inside comments and string literals, unless the +snippet itself contains a condition that returns the symbol +`force-in-comment'.") + + +;;; Internal variables + +(defvar yas--version "0.8.0beta") + +(defvar yas--menu-table (make-hash-table) + "A hash table of MAJOR-MODE symbols to menu keymaps.") + +(defvar yas--escaped-characters + '(?\\ ?` ?\" ?' ?$ ?} ?{ ?\( ?\)) + "List of characters which *might* need to be escaped.") + +(defconst yas--field-regexp + "${\\([0-9]+:\\)?\\([^}]*\\)}" + "A regexp to *almost* recognize a field.") + +(defconst yas--multi-dollar-lisp-expression-regexp + "$+[ \t\n]*\\(([^)]*)\\)" + "A regexp to *almost* recognize a \"$(...)\" expression.") + +(defconst yas--backquote-lisp-expression-regexp + "`\\([^`]*\\)`" + "A regexp to recognize a \"`lisp-expression`\" expression." ) + +(defconst yas--transform-mirror-regexp + "${\\(?:\\([0-9]+\\):\\)?$\\([ \t\n]*([^}]*\\)" + "A regexp to *almost* recognize a mirror with a transform.") + +(defconst yas--simple-mirror-regexp + "$\\([0-9]+\\)" + "A regexp to recognize a simple mirror.") + +(defvar yas--snippet-id-seed 0 + "Contains the next id for a snippet.") + +(defun yas--snippet-next-id () + (let ((id yas--snippet-id-seed)) + (cl-incf yas--snippet-id-seed) + id)) + + +;;; Minor mode stuff + +;; XXX: `last-buffer-undo-list' is somehow needed in Carbon Emacs for MacOSX +(defvar last-buffer-undo-list nil) + +(defvar yas--minor-mode-menu nil + "Holds the YASnippet menu.") + +(defvar yas-minor-mode-map + (let ((map (make-sparse-keymap))) + (define-key map [(tab)] 'yas-expand) + (define-key map (kbd "TAB") 'yas-expand) + (define-key map "\C-c&\C-s" 'yas-insert-snippet) + (define-key map "\C-c&\C-n" 'yas-new-snippet) + (define-key map "\C-c&\C-v" 'yas-visit-snippet-file) + map) + "The keymap used when `yas-minor-mode' is active.") + +(easy-menu-define yas--minor-mode-menu + yas-minor-mode-map + "Menu used when `yas-minor-mode' is active." + '("YASnippet" :visible yas-use-menu + "----" + ["Expand trigger" yas-expand + :help "Possibly expand tab trigger before point"] + ["Insert at point..." yas-insert-snippet + :help "Prompt for an expandable snippet and expand it at point"] + ["New snippet..." yas-new-snippet + :help "Create a new snippet in an appropriate directory"] + ["Visit snippet file..." yas-visit-snippet-file + :help "Prompt for an expandable snippet and find its file"] + "----" + ("Snippet menu behaviour" + ["Visit snippets" (setq yas-visit-from-menu t) + :help "Visit snippets from the menu" + :active t :style radio :selected yas-visit-from-menu] + ["Expand snippets" (setq yas-visit-from-menu nil) + :help "Expand snippets from the menu" + :active t :style radio :selected (not yas-visit-from-menu)] + "----" + ["Show all known modes" (setq yas-use-menu 'full) + :help "Show one snippet submenu for each loaded table" + :active t :style radio :selected (eq yas-use-menu 'full)] + ["Abbreviate according to current mode" (setq yas-use-menu 'abbreviate) + :help "Show only snippet submenus for the current active modes" + :active t :style radio :selected (eq yas-use-menu 'abbreviate)]) + ("Indenting" + ["Auto" (setq yas-indent-line 'auto) + :help "Indent each line of the snippet with `indent-according-to-mode'" + :active t :style radio :selected (eq yas-indent-line 'auto)] + ["Fixed" (setq yas-indent-line 'fixed) + :help "Indent the snippet to the current column" + :active t :style radio :selected (eq yas-indent-line 'fixed)] + ["None" (setq yas-indent-line 'none) + :help "Don't apply any particular snippet indentation after expansion" + :active t :style radio :selected (not (member yas-indent-line '(fixed auto)))] + "----" + ["Also auto indent first line" (setq yas-also-auto-indent-first-line + (not yas-also-auto-indent-first-line)) + :help "When auto-indenting also, auto indent the first line menu" + :active (eq yas-indent-line 'auto) + :style toggle :selected yas-also-auto-indent-first-line] + ) + ("Prompting method" + ["System X-widget" (setq yas-prompt-functions + (cons 'yas-x-prompt + (remove 'yas-x-prompt + yas-prompt-functions))) + :help "Use your windowing system's (gtk, mac, windows, etc...) default menu" + :active t :style radio :selected (eq (car yas-prompt-functions) + 'yas-x-prompt)] + ["Dropdown-list" (setq yas-prompt-functions + (cons 'yas-dropdown-prompt + (remove 'yas-dropdown-prompt + yas-prompt-functions))) + :help "Use a special dropdown list" + :active t :style radio :selected (eq (car yas-prompt-functions) + 'yas-dropdown-prompt)] + ["Ido" (setq yas-prompt-functions + (cons 'yas-ido-prompt + (remove 'yas-ido-prompt + yas-prompt-functions))) + :help "Use an ido-style minibuffer prompt" + :active t :style radio :selected (eq (car yas-prompt-functions) + 'yas-ido-prompt)] + ["Completing read" (setq yas-prompt-functions + (cons 'yas-completing-prompt + (remove 'yas-completing-prompt + yas-prompt-functions))) + :help "Use a normal minibuffer prompt" + :active t :style radio :selected (eq (car yas-prompt-functions) + 'yas-completing-prompt)] + ) + ("Misc" + ["Wrap region in exit marker" + (setq yas-wrap-around-region + (not yas-wrap-around-region)) + :help "If non-nil automatically wrap the selected text in the $0 snippet exit" + :style toggle :selected yas-wrap-around-region] + ["Allow stacked expansions " + (setq yas-triggers-in-field + (not yas-triggers-in-field)) + :help "If non-nil allow snippets to be triggered inside other snippet fields" + :style toggle :selected yas-triggers-in-field] + ["Revive snippets on undo " + (setq yas-snippet-revival + (not yas-snippet-revival)) + :help "If non-nil allow snippets to become active again after undo" + :style toggle :selected yas-snippet-revival] + ["Good grace " + (setq yas-good-grace + (not yas-good-grace)) + :help "If non-nil don't raise errors in bad embedded elisp in snippets" + :style toggle :selected yas-good-grace] + ) + "----" + ["Load snippets..." yas-load-directory + :help "Load snippets from a specific directory"] + ["Reload everything" yas-reload-all + :help "Cleanup stuff, reload snippets, rebuild menus"] + ["About" yas-about + :help "Display some information about YASnippet"])) + +(defvar yas--extra-modes nil + "An internal list of modes for which to also lookup snippets. + +This variable probably makes more sense as buffer-local, so +ensure your use `make-local-variable' when you set it.") +(define-obsolete-variable-alias 'yas-extra-modes 'yas--extra-modes "0.8.1") + +(defvar yas--tables (make-hash-table) + "A hash table of mode symbols to `yas--table' objects.") + +(defvar yas--parents (make-hash-table) + "A hash table of mode symbols do lists of direct parent mode symbols. + +This list is populated when reading the \".yas-parents\" files +found when traversing snippet directories with +`yas-load-directory'. + +There might be additional parenting information stored in the +`derived-mode-parent' property of some mode symbols, but that is +not recorded here.") + +(defvar yas--direct-keymaps (list) + "Keymap alist supporting direct snippet keybindings. + +This variable is placed in `emulation-mode-map-alists'. + +Its elements looks like (TABLE-NAME . KEYMAP). They're +instantiated on `yas-reload-all' but KEYMAP is added to only when +loading snippets. `yas--direct-TABLE-NAME' is then a variable set +buffer-locally when entering `yas-minor-mode'. KEYMAP binds all +defined direct keybindings to the command +`yas-expand-from-keymap' which then which snippet to expand.") + +(defun yas-direct-keymaps-reload () + "Force reload the direct keybinding for active snippet tables." + (interactive) + (setq yas--direct-keymaps nil) + (maphash #'(lambda (name table) + (push (cons (intern (format "yas--direct-%s" name)) + (yas--table-direct-keymap table)) + yas--direct-keymaps)) + yas--tables)) + +(defun yas--modes-to-activate (&optional mode) + "Compute list of mode symbols that are active for `yas-expand' +and friends." + (let* ((explored (if mode (list mode) ; Building up list in reverse. + (cons major-mode (reverse yas--extra-modes)))) + (dfs + (lambda (mode) + (cl-loop for neighbour + in (cl-list* (get mode 'derived-mode-parent) + (ignore-errors (symbol-function mode)) + (gethash mode yas--parents)) + when (and neighbour + (not (memq neighbour explored)) + (symbolp neighbour)) + do (push neighbour explored) + (funcall dfs neighbour))))) + (mapcar dfs explored) + (nreverse explored))) + +(defvar yas-minor-mode-hook nil + "Hook run when `yas-minor-mode' is turned on.") + +;;;###autoload +(define-minor-mode yas-minor-mode + "Toggle YASnippet mode. + +When YASnippet mode is enabled, `yas-expand', normally bound to +the TAB key, expands snippets of code depending on the major +mode. + +With no argument, this command toggles the mode. +positive prefix argument turns on the mode. +Negative prefix argument turns off the mode. + +Key bindings: +\\{yas-minor-mode-map}" + nil + ;; The indicator for the mode line. + " yas" + :group 'yasnippet + (cond (yas-minor-mode + ;; Install the direct keymaps in `emulation-mode-map-alists' + ;; (we use `add-hook' even though it's not technically a hook, + ;; but it works). Then define variables named after modes to + ;; index `yas--direct-keymaps'. + ;; + ;; Also install the post-command-hook. + ;; + (add-hook 'emulation-mode-map-alists 'yas--direct-keymaps) + (add-hook 'post-command-hook 'yas--post-command-handler nil t) + ;; Set the `yas--direct-%s' vars for direct keymap expansion + ;; + (dolist (mode (yas--modes-to-activate)) + (let ((name (intern (format "yas--direct-%s" mode)))) + (set-default name nil) + (set (make-local-variable name) t))) + ;; Perform JIT loads + ;; + (yas--load-pending-jits)) + (t + ;; Uninstall the direct keymaps and the post-command hook + ;; + (remove-hook 'post-command-hook 'yas--post-command-handler t) + (remove-hook 'emulation-mode-map-alists 'yas--direct-keymaps)))) + +(defun yas-activate-extra-mode (mode) + "Activates the snippets for the given `mode' in the buffer. + +The function can be called in the hook of a minor mode to +activate snippets associated with that mode." + (interactive + (let (modes + symbol) + (maphash (lambda (k _) + (setq modes (cons (list k) modes))) + yas--parents) + (setq symbol (completing-read + "Activate mode: " modes nil t)) + (list + (when (not (string= "" symbol)) + (intern symbol))))) + (when mode + (add-to-list (make-local-variable 'yas--extra-modes) mode) + (yas--load-pending-jits))) + +(defun yas-deactivate-extra-mode (mode) + "Deactivates the snippets for the given `mode' in the buffer." + (interactive + (list (intern + (completing-read + "Deactivate mode: " (mapcar #'list yas--extra-modes) nil t)))) + (set (make-local-variable 'yas--extra-modes) + (remove mode + yas--extra-modes))) + +(defvar yas-dont-activate '(minibufferp) + "If non-nil don't let `yas-global-mode' affect some buffers. + +If a function of zero arguments, then its result is used. + +If a list of functions, then all functions must return nil to +activate yas for this buffer. + +In Emacsen <= 23, this variable is buffer-local. Because +`yas-minor-mode-on' is called by `yas-global-mode' after +executing the buffer's major mode hook, setting this variable +there is an effective way to define exceptions to the \"global\" +activation behaviour. + +In Emacsen > 23, only the global value is used. To define +per-mode exceptions to the \"global\" activation behaviour, call +`yas-minor-mode' with a negative argument directily in the major +mode's hook.") +(unless (> emacs-major-version 23) + (with-no-warnings + (make-variable-buffer-local 'yas-dont-activate))) + + +(defun yas-minor-mode-on () + "Turn on YASnippet minor mode. + +Honour `yas-dont-activate', which see." + (interactive) + ;; Check `yas-dont-activate' + (unless (cond ((functionp yas-dont-activate) + (funcall yas-dont-activate)) + ((consp yas-dont-activate) + (some #'funcall yas-dont-activate)) + (yas-dont-activate)) + (yas-minor-mode 1))) + +;;;###autoload +(define-globalized-minor-mode yas-global-mode yas-minor-mode yas-minor-mode-on + :group 'yasnippet + :require 'yasnippet) + +(defun yas--global-mode-reload-with-jit-maybe () + "Run `yas-reload-all' when `yas-global-mode' is on." + (when yas-global-mode (yas-reload-all))) + +(add-hook 'yas-global-mode-hook 'yas--global-mode-reload-with-jit-maybe) + + +;;; Major mode stuff + +(defvar yas--font-lock-keywords + (append '(("^#.*$" . font-lock-comment-face)) + lisp-font-lock-keywords-2 + '(("$\\([0-9]+\\)" + (0 font-lock-keyword-face) + (1 font-lock-string-face t)) + ("${\\([0-9]+\\):?" + (0 font-lock-keyword-face) + (1 font-lock-warning-face t)) + ("${" . font-lock-keyword-face) + ("$[0-9]+?" . font-lock-preprocessor-face) + ("\\(\\$(\\)" 1 font-lock-preprocessor-face) + ("}" + (0 font-lock-keyword-face))))) + +(defvar snippet-mode-map + (let ((map (make-sparse-keymap))) + (easy-menu-define nil + map + "Menu used when snippet-mode is active." + (cons "Snippet" + (mapcar #'(lambda (ent) + (when (third ent) + (define-key map (third ent) (second ent))) + (vector (first ent) (second ent) t)) + '(("Load this snippet" yas-load-snippet-buffer "\C-c\C-l") + ("Load and quit window" yas-load-snippet-buffer-and-close "\C-c\C-c") + ("Try out this snippet" yas-tryout-snippet "\C-c\C-t"))))) + map) + "The keymap used when `snippet-mode' is active.") + + +(define-derived-mode snippet-mode text-mode "Snippet" + "A mode for editing yasnippets" + (setq font-lock-defaults '(yas--font-lock-keywords)) + (set (make-local-variable 'require-final-newline) nil) + (set (make-local-variable 'comment-start) "#") + (set (make-local-variable 'comment-start-skip) "#+[\t ]*")) + + + +;;; Internal structs for template management + +(cl-defstruct (yas--template + (:constructor yas--make-template) + ;; Handles `yas-define-snippets' format, plus the + ;; initial TABLE argument. + (:constructor + yas--define-snippets-2 + (table + key content + &optional xname condition group + expand-env load-file xkeybinding xuuid save-file + &aux + (name (or xname + ;; A little redundant: we always get a name + ;; from `yas--parse-template' except when + ;; there isn't a file. + (and load-file (file-name-nondirectory load-file)) + (and save-file (file-name-nondirectory save-file)) + key)) + (keybinding (yas--read-keybinding xkeybinding)) + (uuid (or xuuid name)) + (old (gethash uuid (yas--table-uuidhash table))) + (menu-binding-pair + (and old (yas--template-menu-binding-pair old))) + (perm-group + (and old (yas--template-perm-group old)))))) + "A template for a snippet." + key + content + name + condition + expand-env + load-file + save-file + keybinding + uuid + menu-binding-pair + group ;; as dictated by the #group: directive or .yas-make-groups + perm-group ;; as dictated by `yas-define-menu' + table + ) + +(defstruct (yas--table (:constructor yas--make-snippet-table (name))) + "A table to store snippets for a particular mode. + +Has the following fields: + +`yas--table-name' + + A symbol name normally corresponding to a major mode, but can + also be a pseudo major-mode to be used in + `yas-activate-extra-mode', for example. + +`yas--table-hash' + + A hash table (KEY . NAMEHASH), known as the \"keyhash\". KEY is + a string or a vector, where the former is the snippet's trigger + and the latter means it's a direct keybinding. NAMEHASH is yet + another hash of (NAME . TEMPLATE) where NAME is the snippet's + name and TEMPLATE is a `yas--template' object. + +`yas--table-direct-keymap' + + A keymap for the snippets in this table that have direct + keybindings. This is kept in sync with the keyhash, i.e., all + the elements of the keyhash that are vectors appear here as + bindings to `yas-expand-from-keymap'. + +`yas--table-uuidhash' + + A hash table mapping snippets uuid's to the same `yas--template' + objects. A snippet uuid defaults to the snippet's name." + name + (hash (make-hash-table :test 'equal)) + (uuidhash (make-hash-table :test 'equal)) + (parents nil) + (direct-keymap (make-sparse-keymap))) + +(defun yas--get-template-by-uuid (mode uuid) + "Find the snippet template in MODE by its UUID." + (let* ((table (gethash mode yas--tables mode))) + (when table + (gethash uuid (yas--table-uuidhash table))))) + +;; Apropos storing/updating in TABLE, this works in two steps: +;; +;; 1. `yas--remove-template-by-uuid' removes any +;; keyhash-namehash-template mappings from TABLE, grabbing the +;; snippet by its uuid. Also removes mappings from TABLE's +;; `yas--table-direct-keymap' (FIXME: and should probably take care +;; of potentially stale menu bindings right?.) +;; +;; 2. `yas--add-template' adds this all over again. +;; +;; Create a new or add to an existing keyhash-namehash mapping. +;; +;; For reference on understanding this, consider three snippet +;; definitions: +;; +;; A: # name: The Foo +;; # key: foo +;; # binding: C-c M-l +;; +;; B: # name: Mrs Foo +;; # key: foo +;; +;; C: # name: The Bar +;; # binding: C-c M-l +;; +;; D: # name: Baz +;; # key: baz +;; +;; keyhash namehashes(3) yas--template structs(4) +;; ----------------------------------------------------- +;; __________ +;; / \ +;; "foo" ---> "The Foo" ---> [yas--template A] | +;; "Mrs Foo" ---> [yas--template B] | +;; | +;; [C-c M-l] ---> "The Foo" -------------------------/ +;; "The Bar" ---> [yas--template C] +;; +;; "baz" ---> "Baz" ---> [yas--template D] +;; +;; Additionally, since uuid defaults to the name, we have a +;; `yas--table-uuidhash' for TABLE +;; +;; uuidhash yas--template structs +;; ------------------------------- +;; "The Foo" ---> [yas--template A] +;; "Mrs Foo" ---> [yas--template B] +;; "The Bar" ---> [yas--template C] +;; "Baz" ---> [yas--template D] +;; +;; FIXME: the more I look at this data-structure the more I think I'm +;; stupid. There has to be an easier way (but beware lots of code +;; depends on this). +;; +(defun yas--remove-template-by-uuid (table uuid) + "Remove from TABLE a template identified by UUID." + (let ((template (gethash uuid (yas--table-uuidhash table)))) + (when template + (let* ((name (yas--template-name template)) + (empty-keys nil)) + ;; Remove the name from each of the targeted namehashes + ;; + (maphash #'(lambda (k v) + (let ((template (gethash name v))) + (when (and template + (eq uuid (yas--template-uuid template))) + (remhash name v) + (when (zerop (hash-table-count v)) + (push k empty-keys))))) + (yas--table-hash table)) + ;; Remove the namehash themselves if they've become empty + ;; + (dolist (key empty-keys) + (when (vectorp key) + (define-key (yas--table-direct-keymap table) key nil)) + (remhash key (yas--table-hash table))) + + ;; Finally, remove the uuid from the uuidhash + ;; + (remhash uuid (yas--table-uuidhash table)))))) + +(defun yas--add-template (table template) + "Store in TABLE the snippet template TEMPLATE. + +KEY can be a string (trigger key) of a vector (direct +keybinding)." + (let ((name (yas--template-name template)) + (key (yas--template-key template)) + (keybinding (yas--template-keybinding template)) + (_menu-binding-pair (yas--template-menu-binding-pair-get-create template))) + (dolist (k (remove nil (list key keybinding))) + (puthash name + template + (or (gethash k + (yas--table-hash table)) + (puthash k + (make-hash-table :test 'equal) + (yas--table-hash table)))) + (when (vectorp k) + (define-key (yas--table-direct-keymap table) k 'yas-expand-from-keymap))) + + ;; Update TABLE's `yas--table-uuidhash' + (puthash (yas--template-uuid template) + template + (yas--table-uuidhash table)))) + +(defun yas--update-template (table template) + "Add or update TEMPLATE in TABLE. + +Also takes care of adding and updating to the associated menu. +Return TEMPLATE." + ;; Remove from table by uuid + ;; + (yas--remove-template-by-uuid table (yas--template-uuid template)) + ;; Add to table again + ;; + (yas--add-template table template) + ;; Take care of the menu + ;; + (yas--update-template-menu table template) + template) + +(defun yas--update-template-menu (table template) + "Update every menu-related for TEMPLATE." + (let ((menu-binding-pair (yas--template-menu-binding-pair-get-create template)) + (key (yas--template-key template)) + (keybinding (yas--template-keybinding template))) + ;; The snippet might have changed name or keys, so update + ;; user-visible strings + ;; + (unless (eq (cdr menu-binding-pair) :none) + ;; the menu item name + ;; + (setf (cadar menu-binding-pair) (yas--template-name template)) + ;; the :keys information (also visible to the user) + (setf (getf (cdr (car menu-binding-pair)) :keys) + (or (and keybinding (key-description keybinding)) + (and key (concat key yas-trigger-symbol)))))) + (unless (yas--template-menu-managed-by-yas-define-menu template) + (let ((menu-keymap + (yas--menu-keymap-get-create (yas--table-mode table) + (mapcar #'yas--table-mode + (yas--table-parents table)))) + (group (yas--template-group template))) + ;; Remove from menu keymap + ;; + (assert menu-keymap) + (yas--delete-from-keymap menu-keymap (yas--template-uuid template)) + + ;; Add necessary subgroups as necessary. + ;; + (dolist (subgroup group) + (let ((subgroup-keymap (lookup-key menu-keymap (vector (make-symbol subgroup))))) + (unless (and subgroup-keymap + (keymapp subgroup-keymap)) + (setq subgroup-keymap (make-sparse-keymap)) + (define-key menu-keymap (vector (make-symbol subgroup)) + `(menu-item ,subgroup ,subgroup-keymap))) + (setq menu-keymap subgroup-keymap))) + + ;; Add this entry to the keymap + ;; + (define-key menu-keymap + (vector (make-symbol (yas--template-uuid template))) + (car (yas--template-menu-binding-pair template)))))) + +(defun yas--namehash-templates-alist (namehash) + "Return NAMEHASH as an alist." + (let (alist) + (maphash #'(lambda (k v) + (push (cons k v) alist)) + namehash) + alist)) + +(defun yas--fetch (table key) + "Fetch templates in TABLE by KEY. + +Return a list of cons (NAME . TEMPLATE) where NAME is a +string and TEMPLATE is a `yas--template' structure." + (let* ((keyhash (yas--table-hash table)) + (namehash (and keyhash (gethash key keyhash)))) + (when namehash + (yas--filter-templates-by-condition (yas--namehash-templates-alist namehash))))) + + +;;; Filtering/condition logic + +(defun yas--eval-condition (condition) + (condition-case err + (save-excursion + (save-restriction + (save-match-data + (eval condition)))) + (error (progn + (yas--message 1 "Error in condition evaluation: %s" (error-message-string err)) + nil)))) + + +(defun yas--filter-templates-by-condition (templates) + "Filter the templates using the applicable condition. + +TEMPLATES is a list of cons (NAME . TEMPLATE) where NAME is a +string and TEMPLATE is a `yas--template' structure. + +This function implements the rules described in +`yas-buffer-local-condition'. See that variables documentation." + (let ((requirement (yas--require-template-specific-condition-p))) + (if (eq requirement 'always) + templates + (remove-if-not #'(lambda (pair) + (yas--template-can-expand-p + (yas--template-condition (cdr pair)) requirement)) + templates)))) + +(defun yas--require-template-specific-condition-p () + "Decide if this buffer requests/requires snippet-specific +conditions to filter out potential expansions." + (if (eq 'always yas-buffer-local-condition) + 'always + (let ((local-condition (or (and (consp yas-buffer-local-condition) + (yas--eval-condition yas-buffer-local-condition)) + yas-buffer-local-condition))) + (when local-condition + (if (eq local-condition t) + t + (and (consp local-condition) + (eq 'require-snippet-condition (car local-condition)) + (symbolp (cdr local-condition)) + (cdr local-condition))))))) + +(defun yas--template-can-expand-p (condition requirement) + "Evaluate CONDITION and REQUIREMENT and return a boolean." + (let* ((result (or (null condition) + (yas--eval-condition condition)))) + (cond ((eq requirement t) + result) + (t + (eq requirement result))))) + +(defun yas--table-templates (table) + (when table + (let ((acc (list))) + (maphash #'(lambda (_key namehash) + (maphash #'(lambda (name template) + (push (cons name template) acc)) + namehash)) + (yas--table-hash table)) + (yas--filter-templates-by-condition acc)))) + +(defun yas--templates-for-key-at-point () + "Find `yas--template' objects for any trigger keys preceding point. +Returns (TEMPLATES START END). This function respects +`yas-key-syntaxes', which see." + (save-excursion + (let ((original (point)) + (methods yas-key-syntaxes) + (templates) + (method)) + (while (and methods + (not templates)) + (unless (eq method (car methods)) + ;; TRICKY: `eq'-ness test means we can only be here if + ;; `method' is a function that returned `again', and hence + ;; don't revert back to original position as per + ;; `yas-key-syntaxes'. + (goto-char original)) + (setq method (car methods)) + (cond ((stringp method) + (skip-syntax-backward method) + (setq methods (cdr methods))) + ((functionp method) + (unless (eq (funcall method original) + 'again) + (setq methods (cdr methods)))) + (t + (setq methods (cdr methods)) + (yas--warning "Invalid element `%s' in `yas-key-syntaxes'" method))) + (let ((possible-key (buffer-substring-no-properties (point) original))) + (save-excursion + (goto-char original) + (setq templates + (mapcan #'(lambda (table) + (yas--fetch table possible-key)) + (yas--get-snippet-tables)))))) + (when templates + (list templates (point) original))))) + +(defun yas--table-all-keys (table) + "Get trigger keys of all active snippets in TABLE." + (let ((acc)) + (maphash #'(lambda (key namehash) + (when (yas--filter-templates-by-condition (yas--namehash-templates-alist namehash)) + (push key acc))) + (yas--table-hash table)) + acc)) + +(defun yas--table-mode (table) + (intern (yas--table-name table))) + + +;;; Internal functions and macros: + +(defun yas--handle-error (err) + "Handle error depending on value of `yas-good-grace'." + (let ((msg (yas--format "elisp error: %s" (error-message-string err)))) + (if yas-good-grace msg + (error "%s" msg)))) + +(defun yas--eval-lisp (form) + "Evaluate FORM and convert the result to string." + (let ((retval (catch 'yas--exception + (condition-case err + (save-excursion + (save-restriction + (save-match-data + (widen) + (let ((result (eval form))) + (when result + (format "%s" result)))))) + (error (yas--handle-error err)))))) + (when (and (consp retval) + (eq 'yas--exception (car retval))) + (error (cdr retval))) + retval)) + +(defun yas--eval-lisp-no-saves (form) + (condition-case err + (eval form) + (error (message "%s" (yas--handle-error err))))) + +(defun yas--read-lisp (string &optional nil-on-error) + "Read STRING as a elisp expression and return it. + +In case STRING in an invalid expression and NIL-ON-ERROR is nil, +return an expression that when evaluated will issue an error." + (condition-case err + (read string) + (error (and (not nil-on-error) + `(error (error-message-string ,err)))))) + +(defun yas--read-keybinding (keybinding) + "Read KEYBINDING as a snippet keybinding, return a vector." + (when (and keybinding + (not (string-match "keybinding" keybinding))) + (condition-case err + (let ((res (or (and (string-match "^\\[.*\\]$" keybinding) + (read keybinding)) + (read-kbd-macro keybinding 'need-vector)))) + res) + (error + (yas--message 3 "warning: keybinding \"%s\" invalid since %s." + keybinding (error-message-string err)) + nil)))) + +(defun yas--table-get-create (mode) + "Get or create the snippet table corresponding to MODE." + (let ((table (gethash mode + yas--tables))) + (unless table + (setq table (yas--make-snippet-table (symbol-name mode))) + (puthash mode table yas--tables) + (push (cons (intern (format "yas--direct-%s" mode)) + (yas--table-direct-keymap table)) + yas--direct-keymaps)) + table)) + +(defun yas--get-snippet-tables (&optional mode) + "Get snippet tables for MODE. + +MODE defaults to the current buffer's `major-mode'. + +Return a list of `yas--table' objects. The list of modes to +consider is returned by `yas--modes-to-activate'" + (remove nil + (mapcar #'(lambda (name) + (gethash name yas--tables)) + (yas--modes-to-activate mode)))) + +(defun yas--menu-keymap-get-create (mode &optional parents) + "Get or create the menu keymap for MODE and its PARENTS. + +This may very well create a plethora of menu keymaps and arrange +them all in `yas--menu-table'" + (let* ((menu-keymap (or (gethash mode yas--menu-table) + (puthash mode (make-sparse-keymap) yas--menu-table)))) + (mapc #'yas--menu-keymap-get-create parents) + (define-key yas--minor-mode-menu (vector mode) + `(menu-item ,(symbol-name mode) ,menu-keymap + :visible (yas--show-menu-p ',mode))) + menu-keymap)) + + +;;; Template-related and snippet loading functions + +(defun yas--parse-template (&optional file) + "Parse the template in the current buffer. + +Optional FILE is the absolute file name of the file being +parsed. + +Optional GROUP is the group where the template is to go, +otherwise we attempt to calculate it from FILE. + +Return a snippet-definition, i.e. a list + + (KEY TEMPLATE NAME CONDITION GROUP VARS LOAD-FILE KEYBINDING UUID) + +If the buffer contains a line of \"# --\" then the contents above +this line are ignored. Directives can set most of these with the syntax: + +# directive-name : directive-value + +Here's a list of currently recognized directives: + + * type + * name + * contributor + * condition + * group + * key + * expand-env + * binding + * uuid" + (goto-char (point-min)) + (let* ((type 'snippet) + (name (and file + (file-name-nondirectory file))) + (key nil) + template + bound + condition + (group (and file + (yas--calculate-group file))) + expand-env + binding + uuid) + (if (re-search-forward "^# --\n" nil t) + (progn (setq template + (buffer-substring-no-properties (point) + (point-max))) + (setq bound (point)) + (goto-char (point-min)) + (while (re-search-forward "^# *\\([^ ]+?\\) *: *\\(.*?\\)[[:space:]]*$" bound t) + (when (string= "uuid" (match-string-no-properties 1)) + (setq uuid (match-string-no-properties 2))) + (when (string= "type" (match-string-no-properties 1)) + (setq type (if (string= "command" (match-string-no-properties 2)) + 'command + 'snippet))) + (when (string= "key" (match-string-no-properties 1)) + (setq key (match-string-no-properties 2))) + (when (string= "name" (match-string-no-properties 1)) + (setq name (match-string-no-properties 2))) + (when (string= "condition" (match-string-no-properties 1)) + (setq condition (yas--read-lisp (match-string-no-properties 2)))) + (when (string= "group" (match-string-no-properties 1)) + (setq group (match-string-no-properties 2))) + (when (string= "expand-env" (match-string-no-properties 1)) + (setq expand-env (yas--read-lisp (match-string-no-properties 2) + 'nil-on-error))) + (when (string= "binding" (match-string-no-properties 1)) + (setq binding (match-string-no-properties 2))))) + (setq template + (buffer-substring-no-properties (point-min) (point-max)))) + (unless (or key binding) + (setq key (and file (file-name-nondirectory file)))) + (when (eq type 'command) + (setq template (yas--read-lisp (concat "(progn" template ")")))) + (when group + (setq group (split-string group "\\."))) + (list key template name condition group expand-env file binding uuid))) + +(defun yas--calculate-group (file) + "Calculate the group for snippet file path FILE." + (let* ((dominating-dir (locate-dominating-file file + ".yas-make-groups")) + (extra-path (and dominating-dir + (replace-regexp-in-string (concat "^" + (expand-file-name dominating-dir)) + "" + (expand-file-name file)))) + (extra-dir (and extra-path + (file-name-directory extra-path))) + (group (and extra-dir + (replace-regexp-in-string "/" + "." + (directory-file-name extra-dir))))) + group)) + +(defun yas--subdirs (directory &optional filep) + "Return subdirs or files of DIRECTORY according to FILEP." + (remove-if (lambda (file) + (or (string-match "^\\." + (file-name-nondirectory file)) + (string-match "^#.*#$" + (file-name-nondirectory file)) + (string-match "~$" + (file-name-nondirectory file)) + (if filep + (file-directory-p file) + (not (file-directory-p file))))) + (directory-files directory t))) + +(defun yas--make-menu-binding (template) + (let ((mode (yas--table-mode (yas--template-table template)))) + `(lambda () (interactive) (yas--expand-or-visit-from-menu ',mode ,(yas--template-uuid template))))) + +(defun yas--expand-or-visit-from-menu (mode uuid) + (let* ((table (yas--table-get-create mode)) + (yas--current-template (and table + (gethash uuid (yas--table-uuidhash table))))) + (when yas--current-template + (if yas-visit-from-menu + (yas--visit-snippet-file-1 yas--current-template) + (let ((where (if (region-active-p) + (cons (region-beginning) (region-end)) + (cons (point) (point))))) + (yas-expand-snippet (yas--template-content yas--current-template) + (car where) + (cdr where) + (yas--template-expand-env yas--current-template))))))) + +(defun yas--key-from-desc (text) + "Return a yasnippet key from a description string TEXT." + (replace-regexp-in-string "\\(\\w+\\).*" "\\1" text)) + + +;;; Popping up for keys and templates + +(defun yas--prompt-for-template (templates &optional prompt) + "Interactively choose a template from the list TEMPLATES. + +TEMPLATES is a list of `yas--template'. + +Optional PROMPT sets the prompt to use." + (when templates + (setq templates + (sort templates #'(lambda (t1 t2) + (< (length (yas--template-name t1)) + (length (yas--template-name t2)))))) + (some #'(lambda (fn) + (funcall fn (or prompt "Choose a snippet: ") + templates + #'yas--template-name)) + yas-prompt-functions))) + +(defun yas--prompt-for-keys (keys &optional prompt) + "Interactively choose a template key from the list KEYS. + +Optional PROMPT sets the prompt to use." + (when keys + (some #'(lambda (fn) + (funcall fn (or prompt "Choose a snippet key: ") keys)) + yas-prompt-functions))) + +(defun yas--prompt-for-table (tables &optional prompt) + "Interactively choose a table from the list TABLES. + +Optional PROMPT sets the prompt to use." + (when tables + (some #'(lambda (fn) + (funcall fn (or prompt "Choose a snippet table: ") + tables + #'yas--table-name)) + yas-prompt-functions))) + +(defun yas-x-prompt (prompt choices &optional display-fn) + "Display choices in a x-window prompt." + (when (and window-system choices) + ;; Let window position be recalculated to ensure that + ;; `posn-at-point' returns non-nil. + (redisplay) + (or + (x-popup-menu + (if (fboundp 'posn-at-point) + (let ((x-y (posn-x-y (posn-at-point (point))))) + (list (list (+ (car x-y) 10) + (+ (cdr x-y) 20)) + (selected-window))) + t) + `(,prompt ("title" + ,@(mapcar* (lambda (c d) `(,(concat " " d) . ,c)) + choices + (if display-fn (mapcar display-fn choices) choices))))) + (keyboard-quit)))) + +(defun yas-maybe-ido-prompt (prompt choices &optional display-fn) + (when (bound-and-true-p ido-mode) + (yas-ido-prompt prompt choices display-fn))) + +(defun yas-ido-prompt (prompt choices &optional display-fn) + (require 'ido) + (yas-completing-prompt prompt choices display-fn #'ido-completing-read)) + +(defun yas-dropdown-prompt (_prompt choices &optional display-fn) + (when (fboundp 'dropdown-list) + (let* ((formatted-choices + (if display-fn (mapcar display-fn choices) choices)) + (n (dropdown-list formatted-choices))) + (if n (nth n choices) + (keyboard-quit))))) + +(defun yas-completing-prompt (prompt choices &optional display-fn completion-fn) + (let* ((formatted-choices + (if display-fn (mapcar display-fn choices) choices)) + (chosen (funcall (or completion-fn #'completing-read) + prompt formatted-choices + nil 'require-match nil nil))) + (if (eq choices formatted-choices) + chosen + (nth (or (position chosen formatted-choices :test #'string=) 0) + choices)))) + +(defun yas-no-prompt (_prompt choices &optional _display-fn) + (first choices)) + + +;;; Defining snippets +;; This consists of creating and registering `yas--template' objects in the +;; correct tables. +;; + +(defvar yas--creating-compiled-snippets nil) + +(defun yas--define-snippets-1 (snippet snippet-table) + "Helper for `yas-define-snippets'." + ;; Update the appropriate table. Also takes care of adding the + ;; key indicators in the templates menu entry, if any. + (yas--update-template + snippet-table (apply #'yas--define-snippets-2 snippet-table snippet))) + +(defun yas-define-snippets (mode snippets) + "Define SNIPPETS for MODE. + +SNIPPETS is a list of snippet definitions, each taking the +following form + + (KEY TEMPLATE NAME CONDITION GROUP EXPAND-ENV LOAD-FILE KEYBINDING UUID SAVE-FILE) + +Within these, only KEY and TEMPLATE are actually mandatory. + +TEMPLATE might be a Lisp form or a string, depending on whether +this is a snippet or a snippet-command. + +CONDITION, EXPAND-ENV and KEYBINDING are Lisp forms, they have +been `yas--read-lisp'-ed and will eventually be +`yas--eval-lisp'-ed. + +The remaining elements are strings. + +FILE is probably of very little use if you're programatically +defining snippets. + +UUID is the snippet's \"unique-id\". Loading a second snippet +file with the same uuid would replace the previous snippet. + +You can use `yas--parse-template' to return such lists based on +the current buffers contents." + (if yas--creating-compiled-snippets + (let ((print-length nil)) + (insert ";;; Snippet definitions:\n;;;\n") + (dolist (snippet snippets) + ;; Fill in missing elements with nil. + (setq snippet (append snippet (make-list (- 10 (length snippet)) nil))) + ;; Move LOAD-FILE to SAVE-FILE because we will load from the + ;; compiled file, not LOAD-FILE. + (let ((load-file (nth 6 snippet))) + (setcar (nthcdr 6 snippet) nil) + (setcar (nthcdr 9 snippet) load-file))) + (insert (pp-to-string + `(yas-define-snippets ',mode ',snippets))) + (insert "\n\n")) + ;; Normal case. + (let ((snippet-table (yas--table-get-create mode)) + (template nil)) + (dolist (snippet snippets) + (setq template (yas--define-snippets-1 snippet + snippet-table))) + template))) + + +;;; Loading snippets from files + +(defun yas--template-get-file (template) + "Return TEMPLATE's LOAD-FILE or SAVE-FILE." + (or (yas--template-load-file template) + (let ((file (yas--template-save-file template))) + (when file + (yas--message 2 "%s has no load file, use save file, %s, instead." + (yas--template-name template) file)) + file))) + +(defun yas--load-yas-setup-file (file) + (if (not yas--creating-compiled-snippets) + ;; Normal case. + (load file 'noerror (<= yas-verbosity 2)) + (let ((elfile (concat file ".el"))) + (when (file-exists-p elfile) + (insert ";;; contents of the .yas-setup.el support file:\n;;;\n") + (insert-file-contents elfile) + (goto-char (point-max)))))) + +(defun yas--define-parents (mode parents) + "Add PARENTS to the list of MODE's parents." + (puthash mode (remove-duplicates + (append parents + (gethash mode yas--parents))) + yas--parents)) + +(defun yas-load-directory (top-level-dir &optional use-jit interactive) + "Load snippets in directory hierarchy TOP-LEVEL-DIR. + +Below TOP-LEVEL-DIR each directory should be a mode name. + +With prefix argument USE-JIT do jit-loading of snippets." + (interactive + (list (read-directory-name "Select the root directory: " nil nil t) + current-prefix-arg t)) + (unless yas-snippet-dirs + (setq yas-snippet-dirs top-level-dir)) + (let ((impatient-buffers)) + (dolist (dir (yas--subdirs top-level-dir)) + (let* ((major-mode-and-parents (yas--compute-major-mode-and-parents + (concat dir "/dummy"))) + (mode-sym (car major-mode-and-parents)) + (parents (cdr major-mode-and-parents))) + ;; Attention: The parents and the menus are already defined + ;; here, even if the snippets are later jit-loaded. + ;; + ;; * We need to know the parents at this point since entering a + ;; given mode should jit load for its parents + ;; immediately. This could be reviewed, the parents could be + ;; discovered just-in-time-as well + ;; + ;; * We need to create the menus here to support the `full' + ;; option to `yas-use-menu' (all known snippet menus are shown to the user) + ;; + (yas--define-parents mode-sym parents) + (yas--menu-keymap-get-create mode-sym) + (let ((fun `(lambda () ;; FIXME: Simulating lexical-binding. + (yas--load-directory-1 ',dir ',mode-sym)))) + (if use-jit + (yas--schedule-jit mode-sym fun) + (funcall fun))) + ;; Look for buffers that are already in `mode-sym', and so + ;; need the new snippets immediately... + ;; + (when use-jit + (cl-loop for buffer in (buffer-list) + do (with-current-buffer buffer + (when (eq major-mode mode-sym) + (yas--message 3 "Discovered there was already %s in %s" buffer mode-sym) + (push buffer impatient-buffers))))))) + ;; ...after TOP-LEVEL-DIR has been completely loaded, call + ;; `yas--load-pending-jits' in these impatient buffers. + ;; + (cl-loop for buffer in impatient-buffers + do (with-current-buffer buffer (yas--load-pending-jits)))) + (when interactive + (yas--message 3 "Loaded snippets from %s." top-level-dir))) + +(defun yas--load-directory-1 (directory mode-sym) + "Recursively load snippet templates from DIRECTORY." + (if yas--creating-compiled-snippets + (let ((output-file (expand-file-name ".yas-compiled-snippets.el" + directory))) + (with-temp-file output-file + (insert (format ";;; Compiled snippets and support files for `%s'\n" + mode-sym)) + (yas--load-directory-2 directory mode-sym) + (insert (format ";;; Do not edit! File generated at %s\n" + (current-time-string))))) + ;; Normal case. + (unless (file-exists-p (concat directory "/" ".yas-skip")) + (unless (and (load (expand-file-name ".yas-compiled-snippets" directory) 'noerror (<= yas-verbosity 3)) + (progn (yas--message 2 "Loaded compiled snippets from %s" directory) t)) + (yas--message 2 "Loading snippet files from %s" directory) + (yas--load-directory-2 directory mode-sym))))) + +(defun yas--load-directory-2 (directory mode-sym) + ;; Load .yas-setup.el files wherever we find them + ;; + (yas--load-yas-setup-file (expand-file-name ".yas-setup" directory)) + (let* ((default-directory directory) + (snippet-defs nil)) + ;; load the snippet files + ;; + (with-temp-buffer + (dolist (file (yas--subdirs directory 'no-subdirs-just-files)) + (when (file-readable-p file) + (insert-file-contents file nil nil nil t) + (push (yas--parse-template file) + snippet-defs)))) + (when snippet-defs + (yas-define-snippets mode-sym + snippet-defs)) + ;; now recurse to a lower level + ;; + (dolist (subdir (yas--subdirs directory)) + (yas--load-directory-2 subdir + mode-sym)))) + +(defun yas--load-snippet-dirs (&optional nojit) + "Reload the directories listed in `yas-snippet-dirs' or +prompt the user to select one." + (let (errors) + (if (null yas-snippet-dirs) + (call-interactively 'yas-load-directory) + (when (member yas--default-user-snippets-dir yas-snippet-dirs) + (make-directory yas--default-user-snippets-dir t)) + (dolist (directory (reverse (yas-snippet-dirs))) + (cond ((file-directory-p directory) + (yas-load-directory directory (not nojit)) + (if nojit + (yas--message 3 "Loaded %s" directory) + (yas--message 3 "Prepared just-in-time loading for %s" directory))) + (t + (push (yas--message 0 "Check your `yas-snippet-dirs': %s is not a directory" directory) errors))))) + errors)) + +(defun yas-reload-all (&optional no-jit interactive) + "Reload all snippets and rebuild the YASnippet menu. + +When NO-JIT is non-nil force immediate reload of all known +snippets under `yas-snippet-dirs', otherwise use just-in-time +loading. + +When called interactively, use just-in-time loading when given a +prefix argument." + (interactive (list (not current-prefix-arg) t)) + (catch 'abort + (let ((errors) + (snippet-editing-buffers + (remove-if-not #'(lambda (buffer) + (with-current-buffer buffer yas--editing-template)) + (buffer-list)))) + ;; Warn if there are buffers visiting snippets, since reloading will break + ;; any on-line editing of those buffers. + ;; + (when snippet-editing-buffers + (if interactive + (if (y-or-n-p "Some buffers editing live snippets, close them and proceed with reload? ") + (mapc #'kill-buffer snippet-editing-buffers) + (yas--message 1 "Aborted reload...") + (throw 'abort nil)) + ;; in a non-interactive use, at least set + ;; `yas--editing-template' to nil, make it guess it next time around + (mapc #'(lambda (buffer) + (with-current-buffer buffer + (kill-local-variable 'yas--editing-template))) + (buffer-list)))) + + ;; Empty all snippet tables and parenting info + ;; + (setq yas--tables (make-hash-table)) + (setq yas--parents (make-hash-table)) + + ;; Before killing `yas--menu-table' use its keys to cleanup the + ;; mode menu parts of `yas--minor-mode-menu' (thus also cleaning + ;; up `yas-minor-mode-map', which points to it) + ;; + (maphash #'(lambda (menu-symbol _keymap) + (define-key yas--minor-mode-menu (vector menu-symbol) nil)) + yas--menu-table) + ;; Now empty `yas--menu-table' as well + (setq yas--menu-table (make-hash-table)) + + ;; Cancel all pending 'yas--scheduled-jit-loads' + ;; + (setq yas--scheduled-jit-loads (make-hash-table)) + + ;; Reload the directories listed in `yas-snippet-dirs' or prompt + ;; the user to select one. + ;; + (setq errors (yas--load-snippet-dirs no-jit)) + ;; Reload the direct keybindings + ;; + (yas-direct-keymaps-reload) + + (run-hooks 'yas-after-reload-hook) + (yas--message 3 "Reloaded everything%s...%s." + (if no-jit "" " (snippets will load just-in-time)") + (if errors " (some errors, check *Messages*)" ""))))) + +(defvar yas-after-reload-hook nil + "Hooks run after `yas-reload-all'.") + +(defun yas--load-pending-jits () + (dolist (mode (yas--modes-to-activate)) + (let ((funs (reverse (gethash mode yas--scheduled-jit-loads)))) + ;; must reverse to maintain coherence with `yas-snippet-dirs' + (dolist (fun funs) + (yas--message 3 "Loading for `%s', just-in-time: %s!" mode fun) + (funcall fun)) + (remhash mode yas--scheduled-jit-loads)))) + +;; (when (<= emacs-major-version 22) +;; (add-hook 'after-change-major-mode-hook 'yas--load-pending-jits)) + +(defun yas--quote-string (string) + "Escape and quote STRING. +foo\"bar\\! -> \"foo\\\"bar\\\\!\"" + (concat "\"" + (replace-regexp-in-string "[\\\"]" + "\\\\\\&" + string + t) + "\"")) + +;;; Snippet compilation function + +(defun yas-compile-directory (top-level-dir) + "Create .yas-compiled-snippets.el files under subdirs of TOP-LEVEL-DIR. + +This works by stubbing a few functions, then calling +`yas-load-directory'." + (interactive "DTop level snippet directory?") + (let ((yas--creating-compiled-snippets t)) + (yas-load-directory top-level-dir nil))) + +(defun yas-recompile-all () + "Compile every dir in `yas-snippet-dirs'." + (interactive) + (mapc #'yas-compile-directory (yas-snippet-dirs))) + + +;;; JIT loading +;;; + +(defvar yas--scheduled-jit-loads (make-hash-table) + "Alist of mode-symbols to forms to be evaled when `yas-minor-mode' kicks in.") + +(defun yas--schedule-jit (mode fun) + (push fun (gethash mode yas--scheduled-jit-loads))) + + + +;;; Some user level functions + +(defun yas-about () + (interactive) + (message (concat "yasnippet (version " + yas--version + ") -- pluskid/joaotavora/npostavs"))) + + +;;; Apropos snippet menu: +;; +;; The snippet menu keymaps are store by mode in hash table called +;; `yas--menu-table'. They are linked to the main menu in +;; `yas--menu-keymap-get-create' and are initially created empty, +;; reflecting the table hierarchy. +;; +;; They can be populated in two mutually exclusive ways: (1) by +;; reading `yas--template-group', which in turn is populated by the "# +;; group:" directives of the snippets or the ".yas-make-groups" file +;; or (2) by using a separate `yas-define-menu' call, which declares a +;; menu structure based on snippets uuids. +;; +;; Both situations are handled in `yas--update-template-menu', which +;; uses the predicate `yas--template-menu-managed-by-yas-define-menu' +;; that can tell between the two situations. +;; +;; Note: +;; +;; * if `yas-define-menu' is used it must run before +;; `yas-define-snippets' and the UUIDS must match, otherwise we get +;; duplicate entries. The `yas--template' objects are created in +;; `yas-define-menu', holding nothing but the menu entry, +;; represented by a pair of ((menu-item NAME :keys KEYS) TYPE) and +;; stored in `yas--template-menu-binding-pair'. The (menu-item ...) +;; part is then stored in the menu keymap itself which make the item +;; appear to the user. These limitations could probably be revised. +;; +;; * The `yas--template-perm-group' slot is only used in +;; `yas-describe-tables'. +;; +(defun yas--template-menu-binding-pair-get-create (template &optional type) + "Get TEMPLATE's menu binding or assign it a new one. + +TYPE may be `:stay', signaling this menu binding should be +static in the menu." + (or (yas--template-menu-binding-pair template) + (let (;; (key (yas--template-key template)) + ;; (keybinding (yas--template-keybinding template)) + ) + (setf (yas--template-menu-binding-pair template) + (cons `(menu-item ,(or (yas--template-name template) + (yas--template-uuid template)) + ,(yas--make-menu-binding template) + :keys ,nil) + type))))) +(defun yas--template-menu-managed-by-yas-define-menu (template) + "Non-nil if TEMPLATE's menu entry was included in a `yas-define-menu' call." + (cdr (yas--template-menu-binding-pair template))) + + +(defun yas--show-menu-p (mode) + (cond ((eq yas-use-menu 'abbreviate) + (find mode + (mapcar #'(lambda (table) + (yas--table-mode table)) + (yas--get-snippet-tables)))) + (yas-use-menu t))) + +(defun yas--delete-from-keymap (keymap uuid) + "Recursively delete items with UUID from KEYMAP and its submenus." + + ;; XXX: This used to skip any submenus named \"parent mode\" + ;; + ;; First of all, recursively enter submenus, i.e. the tree is + ;; searched depth first so that stale submenus can be found in the + ;; higher passes. + ;; + (mapc #'(lambda (item) + (when (and (listp (cdr item)) + (keymapp (third (cdr item)))) + (yas--delete-from-keymap (third (cdr item)) uuid))) + (rest keymap)) + ;; Set the uuid entry to nil + ;; + (define-key keymap (vector (make-symbol uuid)) nil) + ;; Destructively modify keymap + ;; + (setcdr keymap (delete-if #'(lambda (item) + (or (null (cdr item)) + (and (keymapp (third (cdr item))) + (null (cdr (third (cdr item))))))) + (rest keymap)))) + +(defun yas-define-menu (mode menu &optional omit-items) + "Define a snippet menu for MODE according to MENU, omitting OMIT-ITEMS. + +MENU is a list, its elements can be: + +- (yas-item UUID) : Creates an entry the snippet identified with + UUID. The menu entry for a snippet thus identified is + permanent, i.e. it will never move (be reordered) in the menu. + +- (yas-separator) : Creates a separator + +- (yas-submenu NAME SUBMENU) : Creates a submenu with NAME, + SUBMENU has the same form as MENU. NAME is also added to the + list of groups of the snippets defined thereafter. + +OMIT-ITEMS is a list of snippet uuid's that will always be +omitted from MODE's menu, even if they're manually loaded." + (let* ((table (yas--table-get-create mode)) + (hash (yas--table-uuidhash table))) + (yas--define-menu-1 table + (yas--menu-keymap-get-create mode) + menu + hash) + (dolist (uuid omit-items) + (let ((template (or (gethash uuid hash) + (puthash uuid + (yas--make-template :table table + :uuid uuid) + hash)))) + (setf (yas--template-menu-binding-pair template) (cons nil :none)))))) + +(defun yas--define-menu-1 (table menu-keymap menu uuidhash &optional group-list) + "Helper for `yas-define-menu'." + (dolist (e (reverse menu)) + (cond ((eq (first e) 'yas-item) + (let ((template (or (gethash (second e) uuidhash) + (puthash (second e) + (yas--make-template + :table table + :perm-group group-list + :uuid (second e)) + uuidhash)))) + (define-key menu-keymap (vector (gensym)) + (car (yas--template-menu-binding-pair-get-create template :stay))))) + ((eq (first e) 'yas-submenu) + (let ((subkeymap (make-sparse-keymap))) + (define-key menu-keymap (vector (gensym)) + `(menu-item ,(second e) ,subkeymap)) + (yas--define-menu-1 table + subkeymap + (third e) + uuidhash + (append group-list (list (second e)))))) + ((eq (first e) 'yas-separator) + (define-key menu-keymap (vector (gensym)) + '(menu-item "----"))) + (t + (yas--message 3 "Don't know anything about menu entry %s" (first e)))))) + +(defun yas--define (mode key template &optional name condition group) + "Define a snippet. Expanding KEY into TEMPLATE. + +NAME is a description to this template. Also update the menu if +`yas-use-menu' is t. CONDITION is the condition attached to +this snippet. If you attach a condition to a snippet, then it +will only be expanded when the condition evaluated to non-nil." + (yas-define-snippets mode + (list (list key template name condition group)))) + +(defun yas-hippie-try-expand (first-time?) + "Integrate with hippie expand. + +Just put this function in `hippie-expand-try-functions-list'." + (when yas-minor-mode + (if (not first-time?) + (let ((yas-fallback-behavior 'return-nil)) + (yas-expand)) + (undo 1) + nil))) + + +;;; Apropos condition-cache: +;;; +;;; +;;; +;;; +(defvar yas--condition-cache-timestamp nil) +(defmacro yas-define-condition-cache (func doc &rest body) + "Define a function FUNC with doc DOC and body BODY. +BODY is executed at most once every snippet expansion attempt, to check +expansion conditions. + +It doesn't make any sense to call FUNC programatically." + `(defun ,func () ,(if (and doc + (stringp doc)) + (concat doc +"\n\nFor use in snippets' conditions. Within each +snippet-expansion routine like `yas-expand', computes actual +value for the first time then always returns a cached value.") + (setq body (cons doc body)) + nil) + (let ((timestamp-and-value (get ',func 'yas--condition-cache))) + (if (equal (car timestamp-and-value) yas--condition-cache-timestamp) + (cdr timestamp-and-value) + (let ((new-value (progn + ,@body + ))) + (put ',func 'yas--condition-cache (cons yas--condition-cache-timestamp new-value)) + new-value))))) + +(defalias 'yas-expand 'yas-expand-from-trigger-key) +(defun yas-expand-from-trigger-key (&optional field) + "Expand a snippet before point. + +If no snippet expansion is possible, fall back to the behaviour +defined in `yas-fallback-behavior'. + +Optional argument FIELD is for non-interactive use and is an +object satisfying `yas--field-p' to restrict the expansion to." + (interactive) + (setq yas--condition-cache-timestamp (current-time)) + (let (templates-and-pos) + (unless (and yas-expand-only-for-last-commands + (not (member last-command yas-expand-only-for-last-commands))) + (setq templates-and-pos (if field + (save-restriction + (narrow-to-region (yas--field-start field) + (yas--field-end field)) + (yas--templates-for-key-at-point)) + (yas--templates-for-key-at-point)))) + (if templates-and-pos + (yas--expand-or-prompt-for-template (first templates-and-pos) + (second templates-and-pos) + (third templates-and-pos)) + (yas--fallback)))) + +(defun yas-expand-from-keymap () + "Directly expand some snippets, searching `yas--direct-keymaps'. + +If expansion fails, execute the previous binding for this key" + (interactive) + (setq yas--condition-cache-timestamp (current-time)) + (let* ((vec (subseq (this-command-keys-vector) (if current-prefix-arg + (length (this-command-keys)) + 0))) + (templates (mapcan #'(lambda (table) + (yas--fetch table vec)) + (yas--get-snippet-tables)))) + (if templates + (yas--expand-or-prompt-for-template templates) + (let ((yas-fallback-behavior 'call-other-command)) + (yas--fallback))))) + +(defun yas--expand-or-prompt-for-template (templates &optional start end) + "Expand one of TEMPLATES from START to END. + +Prompt the user if TEMPLATES has more than one element, else +expand immediately. Common gateway for +`yas-expand-from-trigger-key' and `yas-expand-from-keymap'." + (let ((yas--current-template (or (and (rest templates) ;; more than one + (yas--prompt-for-template (mapcar #'cdr templates))) + (cdar templates)))) + (when yas--current-template + (yas-expand-snippet (yas--template-content yas--current-template) + start + end + (yas--template-expand-env yas--current-template))))) + +;; Apropos the trigger key and the fallback binding: +;; +;; When `yas-minor-mode-map' binds , that correctly overrides +;; org-mode's , for example and searching for fallbacks correctly +;; returns `org-cycle'. However, most other modes bind "TAB". TODO, +;; improve this explanation. +;; +(defun yas--fallback () + "Fallback after expansion has failed. + +Common gateway for `yas-expand-from-trigger-key' and +`yas-expand-from-keymap'." + (cond ((eq yas-fallback-behavior 'return-nil) + ;; return nil + nil) + ((eq yas-fallback-behavior 'yas--fallback) + (error (concat "yasnippet fallback loop!\n" + "This can happen when you bind `yas-expand' " + "outside of the `yas-minor-mode-map'."))) + ((eq yas-fallback-behavior 'call-other-command) + (let* ((yas-fallback-behavior 'yas--fallback) + ;; Also bind `yas-minor-mode' to prevent fallback + ;; loops when other extensions use mechanisms similar + ;; to `yas--keybinding-beyond-yasnippet'. (github #525 + ;; and #526) + ;; + (yas-minor-mode nil) + (beyond-yasnippet (yas--keybinding-beyond-yasnippet))) + (yas--message 4 "Falling back to %s" beyond-yasnippet) + (assert (or (null beyond-yasnippet) (commandp beyond-yasnippet))) + (setq this-command beyond-yasnippet) + (when beyond-yasnippet + (call-interactively beyond-yasnippet)))) + ((and (listp yas-fallback-behavior) + (cdr yas-fallback-behavior) + (eq 'apply (car yas-fallback-behavior))) + (let ((command-or-fn (cadr yas-fallback-behavior)) + (args (cddr yas-fallback-behavior)) + (yas-fallback-behavior 'yas--fallback) + (yas-minor-mode nil)) + (if args + (apply command-or-fn args) + (when (commandp command-or-fn) + (setq this-command command-or-fn) + (call-interactively command-or-fn))))) + (t + ;; also return nil if all the other fallbacks have failed + nil))) + +(defun yas--keybinding-beyond-yasnippet () + "Get current keys's binding as if YASsnippet didn't exist." + (let* ((yas-minor-mode nil) + (yas--direct-keymaps nil) + (keys (this-single-command-keys))) + (or (key-binding keys t) + (key-binding (yas--fallback-translate-input keys) t)))) + +(defun yas--fallback-translate-input (keys) + "Emulate `read-key-sequence', at least what I think it does. + +Keys should be an untranslated key vector. Returns a translated +vector of keys. FIXME not thoroughly tested." + (let ((retval []) + (i 0)) + (while (< i (length keys)) + (let ((j i) + (translated local-function-key-map)) + (while (and (< j (length keys)) + translated + (keymapp translated)) + (setq translated (cdr (assoc (aref keys j) (remove 'keymap translated))) + j (1+ j))) + (setq retval (vconcat retval (cond ((symbolp translated) + `[,translated]) + ((vectorp translated) + translated) + (t + (substring keys i j))))) + (setq i j))) + retval)) + + +;;; Utils for snippet development: + +(defun yas--all-templates (tables) + "Get `yas--template' objects in TABLES, applicable for buffer and point. + +Honours `yas-choose-tables-first', `yas-choose-keys-first' and +`yas-buffer-local-condition'" + (when yas-choose-tables-first + (setq tables (list (yas--prompt-for-table tables)))) + (mapcar #'cdr + (if yas-choose-keys-first + (let ((key (yas--prompt-for-keys + (mapcan #'yas--table-all-keys tables)))) + (when key + (mapcan #'(lambda (table) + (yas--fetch table key)) + tables))) + (remove-duplicates (mapcan #'yas--table-templates tables) + :test #'equal)))) + +(defun yas--lookup-snippet-1 (name mode) + "Get the snippet called NAME in MODE's tables." + (let ((yas-choose-tables-first nil) ; avoid prompts + (yas-choose-keys-first nil)) + (cl-find name (yas--all-templates + (yas--get-snippet-tables mode)) + :key #'yas--template-name :test #'string=))) + +(defun yas-lookup-snippet (name &optional mode noerror) + "Get the snippet content for the snippet NAME in MODE's tables. + +MODE defaults to the current buffer's `major-mode'. If NOERROR +is non-nil, then don't signal an error if there isn't any snippet +called NAME. + +Honours `yas-buffer-local-condition'." + (let ((snippet (yas--lookup-snippet-1 name mode))) + (cond + (snippet (yas--template-content snippet)) + (noerror nil) + (t (error "No snippet named: %s" name))))) + +(defun yas-insert-snippet (&optional no-condition) + "Choose a snippet to expand, pop-up a list of choices according +to `yas-prompt-functions'. + +With prefix argument NO-CONDITION, bypass filtering of snippets +by condition." + (interactive "P") + (setq yas--condition-cache-timestamp (current-time)) + (let* ((yas-buffer-local-condition (or (and no-condition + 'always) + yas-buffer-local-condition)) + (templates (yas--all-templates (yas--get-snippet-tables))) + (yas--current-template (and templates + (or (and (rest templates) ;; more than one template for same key + (yas--prompt-for-template templates)) + (car templates)))) + (where (if (region-active-p) + (cons (region-beginning) (region-end)) + (cons (point) (point))))) + (if yas--current-template + (yas-expand-snippet (yas--template-content yas--current-template) + (car where) + (cdr where) + (yas--template-expand-env yas--current-template)) + (yas--message 3 "No snippets can be inserted here!")))) + +(defun yas-visit-snippet-file () + "Choose a snippet to edit, selection like `yas-insert-snippet'. + +Only success if selected snippet was loaded from a file. Put the +visited file in `snippet-mode'." + (interactive) + (let* ((yas-buffer-local-condition 'always) + (templates (yas--all-templates (yas--get-snippet-tables))) + (template (and templates + (or (yas--prompt-for-template templates + "Choose a snippet template to edit: ") + (car templates))))) + + (if template + (yas--visit-snippet-file-1 template) + (message "No snippets tables active!")))) + +(defun yas--visit-snippet-file-1 (template) + "Helper for `yas-visit-snippet-file'." + (let ((file (yas--template-get-file template))) + (cond ((and file (file-readable-p file)) + (find-file-other-window file) + (snippet-mode) + (set (make-local-variable 'yas--editing-template) template)) + (file + (message "Original file %s no longer exists!" file)) + (t + (switch-to-buffer (format "*%s*"(yas--template-name template))) + (let ((type 'snippet)) + (when (listp (yas--template-content template)) + (insert (format "# type: command\n")) + (setq type 'command)) + (insert (format "# key: %s\n" (yas--template-key template))) + (insert (format "# name: %s\n" (yas--template-name template))) + (when (yas--template-keybinding template) + (insert (format "# binding: %s\n" (yas--template-keybinding template)))) + (when (yas--template-expand-env template) + (insert (format "# expand-env: %s\n" (yas--template-expand-env template)))) + (when (yas--template-condition template) + (insert (format "# condition: %s\n" (yas--template-condition template)))) + (insert "# --\n") + (insert (if (eq type 'command) + (pp-to-string (yas--template-content template)) + (yas--template-content template)))) + (snippet-mode) + (set (make-local-variable 'yas--editing-template) template))))) + +(defun yas--guess-snippet-directories-1 (table) + "Guess possible snippet subdirectories for TABLE." + (cons (yas--table-name table) + (mapcan #'(lambda (parent) + (yas--guess-snippet-directories-1 + parent)) + (yas--table-parents table)))) + +(defun yas--guess-snippet-directories (&optional table) + "Try to guess suitable directories based on the current active +tables (or optional TABLE). + +Returns a list of elements (TABLE . DIRS) where TABLE is a +`yas--table' object and DIRS is a list of all possible directories +where snippets of table might exist." + (let ((main-dir (replace-regexp-in-string + "/+$" "" + (or (first (or (yas-snippet-dirs) + (setq yas-snippet-dirs (list yas--default-user-snippets-dir))))))) + (tables (or (and table + (list table)) + (yas--get-snippet-tables)))) + ;; HACK! the snippet table created here is actually registered! + ;; + (unless (or table (gethash major-mode yas--tables)) + (push (yas--table-get-create major-mode) + tables)) + + (mapcar #'(lambda (table) + (cons table + (mapcar #'(lambda (subdir) + (concat main-dir "/" subdir)) + (yas--guess-snippet-directories-1 table)))) + tables))) + +(defun yas--make-directory-maybe (table-and-dirs &optional main-table-string) + "Return a dir inside TABLE-AND-DIRS, prompts for creation if none exists." + (or (some #'(lambda (dir) (when (file-directory-p dir) dir)) (cdr table-and-dirs)) + (let ((candidate (first (cdr table-and-dirs)))) + (unless (file-writable-p (file-name-directory candidate)) + (error (yas--format "%s is not writable." candidate))) + (if (y-or-n-p (format "Guessed directory (%s) for%s%s table \"%s\" does not exist! Create? " + candidate + (if (gethash (yas--table-mode (car table-and-dirs)) + yas--tables) + "" + " brand new") + (or main-table-string + "") + (yas--table-name (car table-and-dirs)))) + (progn + (make-directory candidate 'also-make-parents) + ;; create the .yas-parents file here... + candidate))))) + +(defun yas-new-snippet (&optional no-template) + "Pops a new buffer for writing a snippet. + +Expands a snippet-writing snippet, unless the optional prefix arg +NO-TEMPLATE is non-nil." + (interactive "P") + (let ((guessed-directories (yas--guess-snippet-directories))) + + (switch-to-buffer "*new snippet*") + (erase-buffer) + (kill-all-local-variables) + (snippet-mode) + (yas-minor-mode 1) + (set (make-local-variable 'yas--guessed-modes) (mapcar #'(lambda (d) + (yas--table-mode (car d))) + guessed-directories)) + (if (and (not no-template) yas-new-snippet-default) + (yas-expand-snippet yas-new-snippet-default)))) + +(defun yas--compute-major-mode-and-parents (file) + "Given FILE, find the nearest snippet directory for a given mode. + +Returns a list (MODE-SYM PARENTS), the mode's symbol and a list +representing one or more of the mode's parents. + +Note that MODE-SYM need not be the symbol of a real major mode, +neither do the elements of PARENTS." + (let* ((file-dir (and file + (directory-file-name (or (some #'(lambda (special) + (locate-dominating-file file special)) + '(".yas-setup.el" + ".yas-make-groups" + ".yas-parents")) + (directory-file-name (file-name-directory file)))))) + (parents-file-name (concat file-dir "/.yas-parents")) + (major-mode-name (and file-dir + (file-name-nondirectory file-dir))) + (major-mode-sym (or (and major-mode-name + (intern major-mode-name)))) + (parents (when (file-readable-p parents-file-name) + (mapcar #'intern + (split-string + (with-temp-buffer + (insert-file-contents parents-file-name) + (buffer-substring-no-properties (point-min) + (point-max)))))))) + (when major-mode-sym + (cons major-mode-sym (remove major-mode-sym parents))))) + +(defvar yas--editing-template nil + "Supporting variable for `yas-load-snippet-buffer' and `yas--visit-snippet'.") + +(defvar yas--current-template nil + "Holds the current template being expanded into a snippet.") + +(defvar yas--guessed-modes nil + "List of guessed modes supporting `yas-load-snippet-buffer'.") + +(defun yas--read-table () + "Ask user for a snippet table, help with some guessing." + (let ((prompt (if (and (featurep 'ido) + ido-mode) + 'ido-completing-read 'completing-read))) + (unless yas--guessed-modes + (set (make-local-variable 'yas--guessed-modes) + (or (yas--compute-major-mode-and-parents buffer-file-name)))) + (intern + (funcall prompt (format "Choose or enter a table (yas guesses %s): " + (if yas--guessed-modes + (first yas--guessed-modes) + "nothing")) + (mapcar #'symbol-name yas--guessed-modes) + nil + nil + nil + nil + (if (first yas--guessed-modes) + (symbol-name (first yas--guessed-modes))))))) + +(defun yas-load-snippet-buffer (table &optional interactive) + "Parse and load current buffer's snippet definition into TABLE. + +TABLE is a symbol naming a passed to `yas--table-get-create'. + +When called interactively, prompt for the table name." + (interactive (list (yas--read-table) t)) + (cond + ;; We have `yas--editing-template', this buffer's content comes from a + ;; template which is already loaded and neatly positioned,... + ;; + (yas--editing-template + (yas--define-snippets-1 (yas--parse-template (yas--template-load-file yas--editing-template)) + (yas--template-table yas--editing-template))) + ;; Try to use `yas--guessed-modes'. If we don't have that use the + ;; value from `yas--compute-major-mode-and-parents' + ;; + (t + (unless yas--guessed-modes + (set (make-local-variable 'yas--guessed-modes) (or (yas--compute-major-mode-and-parents buffer-file-name)))) + (let* ((table (yas--table-get-create table))) + (set (make-local-variable 'yas--editing-template) + (yas--define-snippets-1 (yas--parse-template buffer-file-name) + table))))) + (when interactive + (yas--message 3 "Snippet \"%s\" loaded for %s." + (yas--template-name yas--editing-template) + (yas--table-name (yas--template-table yas--editing-template))))) + +(defun yas-load-snippet-buffer-and-close (table &optional kill) + "Load the snippet with `yas-load-snippet-buffer', possibly + save, then `quit-window' if saved. + +If the snippet is new, ask the user whether (and where) to save +it. If the snippet already has a file, just save it. + +The prefix argument KILL is passed to `quit-window'. + +Don't use this from a Lisp program, call `yas-load-snippet-buffer' +and `kill-buffer' instead." + (interactive (list (yas--read-table) current-prefix-arg)) + (yas-load-snippet-buffer table t) + (let ((file (yas--template-get-file yas--editing-template))) + (when (and (or + ;; Only offer to save this if it looks like a library or new + ;; snippet (loaded from elisp, from a dir in `yas-snippet-dirs' + ;; which is not the first, or from an unwritable file) + ;; + (not file) + (not (file-writable-p file)) + (and (cdr-safe yas-snippet-dirs) + (not (string-prefix-p (expand-file-name (car yas-snippet-dirs)) file)))) + (y-or-n-p (yas--format "Looks like a library or new snippet. Save to new file? "))) + (let* ((option (first (yas--guess-snippet-directories (yas--template-table yas--editing-template)))) + (chosen (and option + (yas--make-directory-maybe option)))) + (when chosen + (let ((default-file-name (or (and file (file-name-nondirectory file)) + (yas--template-name yas--editing-template)))) + (write-file (concat chosen "/" + (read-from-minibuffer (format "File name to create in %s? " chosen) + default-file-name))) + (setf (yas--template-load-file yas--editing-template) buffer-file-name)))))) + (when buffer-file-name + (save-buffer) + (quit-window kill))) + +(defun yas-tryout-snippet (&optional debug) + "Test current buffer's snippet template in other buffer." + (interactive "P") + (let* ((major-mode-and-parent (yas--compute-major-mode-and-parents buffer-file-name)) + (parsed (yas--parse-template)) + (test-mode (or (and (car major-mode-and-parent) + (fboundp (car major-mode-and-parent)) + (car major-mode-and-parent)) + (first yas--guessed-modes) + (intern (read-from-minibuffer (yas--format "Please input a mode: "))))) + (yas--current-template + (and parsed + (fboundp test-mode) + (yas--make-template :table nil ;; no tables for ephemeral snippets + :key (first parsed) + :content (second parsed) + :name (third parsed) + :expand-env (sixth parsed))))) + (cond (yas--current-template + (let ((buffer-name (format "*testing snippet: %s*" (yas--template-name yas--current-template)))) + (kill-buffer (get-buffer-create buffer-name)) + (switch-to-buffer (get-buffer-create buffer-name)) + (setq buffer-undo-list nil) + (condition-case nil (funcall test-mode) (error nil)) + (yas-minor-mode 1) + (setq buffer-read-only nil) + (yas-expand-snippet (yas--template-content yas--current-template) + (point-min) + (point-max) + (yas--template-expand-env yas--current-template)) + (when (and debug + (require 'yasnippet-debug nil t)) + (add-hook 'post-command-hook 'yas-debug-snippet-vars nil t)))) + (t + (yas--message 3 "Cannot test snippet for unknown major mode"))))) + +(defun yas-active-keys () + "Return all active trigger keys for current buffer and point." + (remove-duplicates + (remove-if-not #'stringp (mapcan #'yas--table-all-keys (yas--get-snippet-tables))) + :test #'string=)) + +(defun yas--template-fine-group (template) + (car (last (or (yas--template-group template) + (yas--template-perm-group template))))) + +(defun yas-describe-tables (&optional choose) + "Display snippets for each table." + (interactive "P") + (let* ((by-name-hash (and choose + (y-or-n-p "Show by namehash? "))) + (buffer (get-buffer-create "*YASnippet tables*")) + (active-tables (yas--get-snippet-tables)) + (remain-tables (let ((all)) + (maphash #'(lambda (_k v) + (unless (find v active-tables) + (push v all))) + yas--tables) + all)) + (table-lists (list active-tables remain-tables)) + (original-buffer (current-buffer)) + (continue t) + (yas--condition-cache-timestamp (current-time))) + (with-current-buffer buffer + (setq buffer-read-only nil) + (erase-buffer) + (cond ((not by-name-hash) + (insert "YASnippet tables: \n") + (while (and table-lists + continue) + (dolist (table (car table-lists)) + (yas--describe-pretty-table table original-buffer)) + (setq table-lists (cdr table-lists)) + (when table-lists + (yas--create-snippet-xrefs) + (display-buffer buffer) + (setq continue (and choose (y-or-n-p "Show also non-active tables? "))))) + (yas--create-snippet-xrefs) + (help-mode) + (goto-char 1)) + (t + (insert "\n\nYASnippet tables by NAMEHASH: \n") + (dolist (table (append active-tables remain-tables)) + (insert (format "\nSnippet table `%s':\n\n" (yas--table-name table))) + (let ((keys)) + (maphash #'(lambda (k _v) + (push k keys)) + (yas--table-hash table)) + (dolist (key keys) + (insert (format " key %s maps snippets: %s\n" key + (let ((names)) + (maphash #'(lambda (k _v) + (push k names)) + (gethash key (yas--table-hash table))) + names)))))))) + (goto-char 1) + (setq buffer-read-only t)) + (display-buffer buffer))) + +(defun yas--describe-pretty-table (table &optional original-buffer) + (insert (format "\nSnippet table `%s'" + (yas--table-name table))) + (if (yas--table-parents table) + (insert (format " parents: %s\n" + (mapcar #'yas--table-name + (yas--table-parents table)))) + (insert "\n")) + (insert (make-string 100 ?-) "\n") + (insert "group state name key binding\n") + (let ((groups-hash (make-hash-table :test #'equal))) + (maphash #'(lambda (_k v) + (let ((group (or (yas--template-fine-group v) + "(top level)"))) + (when (yas--template-name v) + (puthash group + (cons v (gethash group groups-hash)) + groups-hash)))) + (yas--table-uuidhash table)) + (maphash + #'(lambda (group templates) + (setq group (truncate-string-to-width group 25 0 ? "...")) + (insert (make-string 100 ?-) "\n") + (dolist (p templates) + (let ((name (truncate-string-to-width (propertize (format "\\\\snippet `%s'" (yas--template-name p)) + 'yasnippet p) + 50 0 ? "...")) + (group (prog1 group + (setq group (make-string (length group) ? )))) + (condition-string (let ((condition (yas--template-condition p))) + (if (and condition + original-buffer) + (with-current-buffer original-buffer + (if (yas--eval-condition condition) + "(y)" + "(s)")) + "(a)")))) + (insert group " ") + (insert condition-string " ") + (insert name + (if (string-match "\\.\\.\\.$" name) + "'" + " ") + " ") + (insert (truncate-string-to-width (or (yas--template-key p) "") + 15 0 ? "...") " ") + (insert (truncate-string-to-width (key-description (yas--template-keybinding p)) + 15 0 ? "...") " ") + (insert "\n")))) + groups-hash))) + + + +;;; User convenience functions, for using in `yas-key-syntaxes' + +(defun yas-try-key-from-whitespace (_start-point) + "As `yas-key-syntaxes' element, look for whitespace delimited key. + +A newline will be considered whitespace even if the mode syntax +marks it as something else (typically comment ender)." + (skip-chars-backward "^[:space:]\n")) + +(defun yas-shortest-key-until-whitespace (_start-point) + "Like `yas-longest-key-from-whitespace' but take the shortest key." + (when (/= (skip-chars-backward "^[:space:]\n" (1- (point))) 0) + 'again)) + +(defun yas-longest-key-from-whitespace (start-point) + "As `yas-key-syntaxes' element, look for longest key between point and whitespace. + +A newline will be considered whitespace even if the mode syntax +marks it as something else (typically comment ender)." + (if (= (point) start-point) + (yas-try-key-from-whitespace start-point) + (forward-char)) + (unless (<= start-point (1+ (point))) + 'again)) + + + +;;; User convenience functions, for using in snippet definitions + +(defvar yas-modified-p nil + "Non-nil if field has been modified by user or transformation.") + +(defvar yas-moving-away-p nil + "Non-nil if user is about to exit field.") + +(defvar yas-text nil + "Contains current field text.") + +(defun yas-substr (str pattern &optional subexp) + "Search PATTERN in STR and return SUBEXPth match. + +If found, the content of subexp group SUBEXP (default 0) is + returned, or else the original STR will be returned." + (let ((grp (or subexp 0))) + (save-match-data + (if (string-match pattern str) + (match-string-no-properties grp str) + str)))) + +(defun yas-choose-value (&rest possibilities) + "Prompt for a string in POSSIBILITIES and return it. + +The last element of POSSIBILITIES may be a list of strings." + (unless (or yas-moving-away-p + yas-modified-p) + (let* ((last-link (last possibilities)) + (last-elem (car last-link))) + (when (listp last-elem) + (setcar last-link (car last-elem)) + (setcdr last-link (cdr last-elem)))) + (some #'(lambda (fn) + (funcall fn "Choose: " possibilities)) + yas-prompt-functions))) + +(defun yas-key-to-value (alist) + (unless (or yas-moving-away-p + yas-modified-p) + (let ((key (read-key-sequence ""))) + (when (stringp key) + (or (cdr (find key alist :key #'car :test #'string=)) + key))))) + +(defun yas-throw (text) + "Throw a yas--exception with TEXT as the reason." + (throw 'yas--exception (cons 'yas--exception text))) + +(defun yas-verify-value (possibilities) + "Verify that the current field value is in POSSIBILITIES. + +Otherwise throw exception." + (when (and yas-moving-away-p (notany #'(lambda (pos) (string= pos yas-text)) possibilities)) + (yas-throw (yas--format "Field only allows %s" possibilities)))) + +(defun yas-field-value (number) + "Get the string for field with NUMBER. + +Use this in primary and mirror transformations to tget." + (let* ((snippet (car (yas--snippets-at-point))) + (field (and snippet + (yas--snippet-find-field snippet number)))) + (when field + (yas--field-text-for-display field)))) + +(defun yas-text () + "Return `yas-text' if that exists and is non-empty, else nil." + (if (and yas-text + (not (string= "" yas-text))) + yas-text)) + +(defun yas-selected-text () + "Return `yas-selected-text' if that exists and is non-empty, else nil." + (if (and yas-selected-text + (not (string= "" yas-selected-text))) + yas-selected-text)) + +(defun yas--get-field-once (number &optional transform-fn) + (unless yas-modified-p + (if transform-fn + (funcall transform-fn (yas-field-value number)) + (yas-field-value number)))) + +(defun yas-default-from-field (number) + (unless yas-modified-p + (yas-field-value number))) + +(defun yas-inside-string () + "Return non-nil if the point is inside a string according to font-lock." + (equal 'font-lock-string-face (get-char-property (1- (point)) 'face))) + +(defun yas-unimplemented (&optional missing-feature) + (if yas--current-template + (if (y-or-n-p (format "This snippet is unimplemented (missing %s) Visit the snippet definition? " + (or missing-feature + "something"))) + (yas--visit-snippet-file-1 yas--current-template)) + (message "No implementation. Missing %s" (or missing-feature "something")))) + + +;;; Snippet expansion and field management + +(defvar yas--active-field-overlay nil + "Overlays the currently active field.") + +(defvar yas--field-protection-overlays nil + "Two overlays protect the current active field.") + +(defvar yas-selected-text nil + "The selected region deleted on the last snippet expansion.") + +(defvar yas--start-column nil + "The column where the snippet expansion started.") + +(make-variable-buffer-local 'yas--active-field-overlay) +(make-variable-buffer-local 'yas--field-protection-overlays) +(put 'yas--active-field-overlay 'permanent-local t) +(put 'yas--field-protection-overlays 'permanent-local t) + +(defstruct (yas--snippet (:constructor yas--make-snippet ())) + "A snippet. + +..." + (fields '()) + (exit nil) + (id (yas--snippet-next-id) :read-only t) + (control-overlay nil) + active-field + ;; stacked expansion: the `previous-active-field' slot saves the + ;; active field where the child expansion took place + previous-active-field + force-exit) + +(defstruct (yas--field (:constructor yas--make-field (number start end parent-field))) + "A field. + +NUMBER is the field number. +START and END are mostly buffer markers, but see \"apropos markers-to-points\". +PARENT-FIELD is a `yas--field' this field is nested under, or nil. +MIRRORS is a list of `yas--mirror's +TRANSFORM is a lisp form. +MODIFIED-P is a boolean set to true once user inputs text. +NEXT is another `yas--field' or `yas--mirror' or `yas--exit'. +" + number + start end + parent-field + (mirrors '()) + (transform nil) + (modified-p nil) + next) + + +(defstruct (yas--mirror (:constructor yas--make-mirror (start end transform))) + "A mirror. + +START and END are mostly buffer markers, but see \"apropos markers-to-points\". +TRANSFORM is a lisp form. +PARENT-FIELD is a `yas--field' this mirror is nested under, or nil. +NEXT is another `yas--field' or `yas--mirror' or `yas--exit' +DEPTH is a count of how many nested mirrors can affect this mirror" + start end + (transform nil) + parent-field + next + depth) + +(defstruct (yas--exit (:constructor yas--make-exit (marker))) + marker + next) + +(defun yas--apply-transform (field-or-mirror field &optional empty-on-nil-p) + "Calculate transformed string for FIELD-OR-MIRROR from FIELD. + +If there is no transform for ht field, return nil. + +If there is a transform but it returns nil, return the empty +string iff EMPTY-ON-NIL-P is true." + (let* ((yas-text (yas--field-text-for-display field)) + (yas-modified-p (yas--field-modified-p field)) + (yas-moving-away-p nil) + (transform (if (yas--mirror-p field-or-mirror) + (yas--mirror-transform field-or-mirror) + (yas--field-transform field-or-mirror))) + (start-point (if (yas--mirror-p field-or-mirror) + (yas--mirror-start field-or-mirror) + (yas--field-start field-or-mirror))) + (transformed (and transform + (save-excursion + (goto-char start-point) + (let ((ret (yas--eval-lisp transform))) + (or ret (and empty-on-nil-p ""))))))) + transformed)) + +(defsubst yas--replace-all (from to &optional text) + "Replace all occurrences from FROM to TO. + +With optional string TEXT do it in that string." + (if text + (replace-regexp-in-string (regexp-quote from) to text t t) + (goto-char (point-min)) + (while (search-forward from nil t) + (replace-match to t t text)))) + +(defun yas--snippet-find-field (snippet number) + (find-if #'(lambda (field) + (eq number (yas--field-number field))) + (yas--snippet-fields snippet))) + +(defun yas--snippet-sort-fields (snippet) + "Sort the fields of SNIPPET in navigation order." + (setf (yas--snippet-fields snippet) + (sort (yas--snippet-fields snippet) + #'yas--snippet-field-compare))) + +(defun yas--snippet-field-compare (field1 field2) + "Compare FIELD1 and FIELD2. + +The field with a number is sorted first. If they both have a +number, compare through the number. If neither have, compare +through the field's start point" + (let ((n1 (yas--field-number field1)) + (n2 (yas--field-number field2))) + (if n1 + (if n2 + (or (zerop n2) (and (not (zerop n1)) + (< n1 n2))) + (not (zerop n1))) + (if n2 + (zerop n2) + (< (yas--field-start field1) + (yas--field-start field2)))))) + +(defun yas--field-probably-deleted-p (snippet field) + "Guess if SNIPPET's FIELD should be skipped." + (and + ;; field must be zero length + ;; + (zerop (- (yas--field-start field) (yas--field-end field))) + ;; field must have been modified + ;; + (yas--field-modified-p field) + ;; either: + (or + ;; 1) it's a nested field + ;; + (yas--field-parent-field field) + ;; 2) ends just before the snippet end + ;; + (and (eq field (car (last (yas--snippet-fields snippet)))) + (= (yas--field-start field) (overlay-end (yas--snippet-control-overlay snippet))))) + ;; the field numbered 0, just before the exit marker, should + ;; never be skipped + ;; + (not (and (yas--field-number field) + (zerop (yas--field-number field)))))) + +(defun yas--snippets-at-point (&optional all-snippets) + "Return a sorted list of snippets at point. + +The most recently-inserted snippets are returned first." + (sort + (delq nil (delete-dups + (mapcar (lambda (ov) (overlay-get ov 'yas--snippet)) + (if all-snippets (overlays-in (point-min) (point-max)) + (nconc (overlays-at (point)) + (overlays-at (1- (point)))))))) + #'(lambda (s1 s2) + (<= (yas--snippet-id s2) (yas--snippet-id s1))))) + +(defun yas-next-field-or-maybe-expand () + "Try to expand a snippet at a key before point. + +Otherwise delegate to `yas-next-field'." + (interactive) + (if yas-triggers-in-field + (let ((yas-fallback-behavior 'return-nil) + (active-field (overlay-get yas--active-field-overlay 'yas--field))) + (when active-field + (unless (yas-expand-from-trigger-key active-field) + (yas-next-field)))) + (yas-next-field))) + +(defun yas-next-field (&optional arg) + "Navigate to the ARGth next field. + +If there's none, exit the snippet." + (interactive) + (let* ((arg (or arg + 1)) + (snippet (first (yas--snippets-at-point))) + (active-field (overlay-get yas--active-field-overlay 'yas--field)) + (live-fields (remove-if #'(lambda (field) + (and (not (eq field active-field)) + (yas--field-probably-deleted-p snippet field))) + (yas--snippet-fields snippet))) + (active-field-pos (position active-field live-fields)) + (target-pos (and active-field-pos (+ arg active-field-pos))) + (target-field (and target-pos (nth target-pos live-fields)))) + ;; First check if we're moving out of a field with a transform + ;; + (when (and active-field + (yas--field-transform active-field)) + (let* ((yas-moving-away-p t) + (yas-text (yas--field-text-for-display active-field)) + (yas-modified-p (yas--field-modified-p active-field))) + ;; primary field transform: exit call to field-transform + (yas--eval-lisp (yas--field-transform active-field)))) + ;; Now actually move... + (cond ((and target-pos (>= target-pos (length live-fields))) + (yas-exit-snippet snippet)) + (target-field + (yas--move-to-field snippet target-field)) + (t + nil)))) + +(defun yas--place-overlays (snippet field) + "Correctly place overlays for SNIPPET's FIELD." + (yas--make-move-field-protection-overlays snippet field) + (yas--make-move-active-field-overlay snippet field)) + +(defun yas--move-to-field (snippet field) + "Update SNIPPET to move to field FIELD. + +Also create some protection overlays" + (goto-char (yas--field-start field)) + (yas--place-overlays snippet field) + (overlay-put yas--active-field-overlay 'yas--field field) + (let ((number (yas--field-number field))) + ;; check for the special ${0: ...} field + (if (and number (zerop number)) + (progn + (set-mark (yas--field-end field)) + (setf (yas--snippet-force-exit snippet) + (or (yas--field-transform field) + t))) + ;; make this field active + (setf (yas--snippet-active-field snippet) field) + ;; primary field transform: first call to snippet transform + (unless (yas--field-modified-p field) + (if (yas--field-update-display field) + (yas--update-mirrors snippet) + (setf (yas--field-modified-p field) nil)))))) + +(defun yas-prev-field () + "Navigate to prev field. If there's none, exit the snippet." + (interactive) + (yas-next-field -1)) + +(defun yas-abort-snippet (&optional snippet) + (interactive) + (let ((snippet (or snippet + (car (yas--snippets-at-point))))) + (when snippet + (setf (yas--snippet-force-exit snippet) t)))) + +(defun yas-exit-snippet (snippet) + "Goto exit-marker of SNIPPET." + (interactive (list (first (yas--snippets-at-point)))) + (when snippet + (setf (yas--snippet-force-exit snippet) t) + (goto-char (if (yas--snippet-exit snippet) + (yas--exit-marker (yas--snippet-exit snippet)) + (overlay-end (yas--snippet-control-overlay snippet)))))) + +(defun yas-exit-all-snippets () + "Exit all snippets." + (interactive) + (mapc #'(lambda (snippet) + (yas-exit-snippet snippet) + (yas--check-commit-snippet)) + (yas--snippets-at-point 'all-snippets))) + + +;;; Some low level snippet-routines: + +(defvar yas--inhibit-overlay-hooks nil + "Bind this temporarily to non-nil to prevent running `yas--on-*-modification'.") + +(defvar yas-snippet-beg nil "Beginning position of the last snippet committed.") +(defvar yas-snippet-end nil "End position of the last snippet committed.") + +(defun yas--commit-snippet (snippet) + "Commit SNIPPET, but leave point as it is. + +This renders the snippet as ordinary text." + + (let ((control-overlay (yas--snippet-control-overlay snippet))) + ;; + ;; Save the end of the moribund snippet in case we need to revive it + ;; its original expansion. + ;; + (when (and control-overlay + (overlay-buffer control-overlay)) + (setq yas-snippet-beg (overlay-start control-overlay)) + (setq yas-snippet-end (overlay-end control-overlay)) + (delete-overlay control-overlay)) + + (let ((yas--inhibit-overlay-hooks t)) + (when yas--active-field-overlay + (delete-overlay yas--active-field-overlay)) + (when yas--field-protection-overlays + (mapc #'delete-overlay yas--field-protection-overlays))) + + ;; stacked expansion: if the original expansion took place from a + ;; field, make sure we advance it here at least to + ;; `yas-snippet-end'... + ;; + (let ((previous-field (yas--snippet-previous-active-field snippet))) + (when (and yas-snippet-end previous-field) + (yas--advance-end-maybe previous-field yas-snippet-end))) + + ;; Convert all markers to points, + ;; + (yas--markers-to-points snippet) + + ;; Take care of snippet revival + ;; + (if yas-snippet-revival + (push `(apply yas--snippet-revive ,yas-snippet-beg ,yas-snippet-end ,snippet) + buffer-undo-list) + ;; Dismember the snippet... this is useful if we get called + ;; again from `yas--take-care-of-redo'.... + (setf (yas--snippet-fields snippet) nil))) + + (yas--message 3 "Snippet %s exited." (yas--snippet-id snippet))) + +(defun yas--safely-run-hooks (hook-var) + (condition-case error + (run-hooks hook-var) + (error + (yas--message 3 "%s error: %s" hook-var (error-message-string error))))) + + +(defun yas--check-commit-snippet () + "Check if point exited the currently active field of the snippet. + +If so cleans up the whole snippet up." + (let* ((snippets (yas--snippets-at-point 'all-snippets)) + (snippets-left snippets) + (snippet-exit-transform)) + (dolist (snippet snippets) + (let ((active-field (yas--snippet-active-field snippet))) + (setq snippet-exit-transform (yas--snippet-force-exit snippet)) + (cond ((or snippet-exit-transform + (not (and active-field (yas--field-contains-point-p active-field)))) + (setq snippets-left (delete snippet snippets-left)) + (setf (yas--snippet-force-exit snippet) nil) + (yas--commit-snippet snippet)) + ((and active-field + (or (not yas--active-field-overlay) + (not (overlay-buffer yas--active-field-overlay)))) + ;; + ;; stacked expansion: this case is mainly for recent + ;; snippet exits that place us back int the field of + ;; another snippet + ;; + (save-excursion + (yas--move-to-field snippet active-field) + (yas--update-mirrors snippet))) + (t + nil)))) + (unless (or (null snippets) snippets-left) + (if snippet-exit-transform + (yas--eval-lisp-no-saves snippet-exit-transform)) + (yas--safely-run-hooks 'yas-after-exit-snippet-hook)))) + +;; Apropos markers-to-points: +;; +;; This was found useful for performance reasons, so that an +;; excessive number of live markers aren't kept around in the +;; `buffer-undo-list'. However, in `markers-to-points', the +;; set-to-nil markers can't simply be discarded and replaced with +;; fresh ones in `points-to-markers'. The original marker that was +;; just set to nil has to be reused. +;; +;; This shouldn't bring horrible problems with undo/redo, but it +;; you never know +;; +(defun yas--markers-to-points (snippet) + "Convert all markers in SNIPPET to a cons (POINT . MARKER) +where POINT is the original position of the marker and MARKER is +the original marker object with the position set to nil." + (dolist (field (yas--snippet-fields snippet)) + (let ((start (marker-position (yas--field-start field))) + (end (marker-position (yas--field-end field)))) + (set-marker (yas--field-start field) nil) + (set-marker (yas--field-end field) nil) + (setf (yas--field-start field) (cons start (yas--field-start field))) + (setf (yas--field-end field) (cons end (yas--field-end field)))) + (dolist (mirror (yas--field-mirrors field)) + (let ((start (marker-position (yas--mirror-start mirror))) + (end (marker-position (yas--mirror-end mirror)))) + (set-marker (yas--mirror-start mirror) nil) + (set-marker (yas--mirror-end mirror) nil) + (setf (yas--mirror-start mirror) (cons start (yas--mirror-start mirror))) + (setf (yas--mirror-end mirror) (cons end (yas--mirror-end mirror)))))) + (let ((snippet-exit (yas--snippet-exit snippet))) + (when snippet-exit + (let ((exit (marker-position (yas--exit-marker snippet-exit)))) + (set-marker (yas--exit-marker snippet-exit) nil) + (setf (yas--exit-marker snippet-exit) (cons exit (yas--exit-marker snippet-exit))))))) + +(defun yas--points-to-markers (snippet) + "Convert all cons (POINT . MARKER) in SNIPPET to markers. + +This is done by setting MARKER to POINT with `set-marker'." + (dolist (field (yas--snippet-fields snippet)) + (setf (yas--field-start field) (set-marker (cdr (yas--field-start field)) + (car (yas--field-start field)))) + (setf (yas--field-end field) (set-marker (cdr (yas--field-end field)) + (car (yas--field-end field)))) + (dolist (mirror (yas--field-mirrors field)) + (setf (yas--mirror-start mirror) (set-marker (cdr (yas--mirror-start mirror)) + (car (yas--mirror-start mirror)))) + (setf (yas--mirror-end mirror) (set-marker (cdr (yas--mirror-end mirror)) + (car (yas--mirror-end mirror)))))) + (let ((snippet-exit (yas--snippet-exit snippet))) + (when snippet-exit + (setf (yas--exit-marker snippet-exit) (set-marker (cdr (yas--exit-marker snippet-exit)) + (car (yas--exit-marker snippet-exit))))))) + +(defun yas--field-contains-point-p (field &optional point) + (let ((point (or point + (point)))) + (and (>= point (yas--field-start field)) + (<= point (yas--field-end field))))) + +(defun yas--field-text-for-display (field) + "Return the propertized display text for field FIELD." + (buffer-substring (yas--field-start field) (yas--field-end field))) + +(defun yas--undo-in-progress () + "True if some kind of undo is in progress." + (or undo-in-progress + (eq this-command 'undo) + (eq this-command 'redo))) + +(defun yas--make-control-overlay (snippet start end) + "Create the control overlay that surrounds the snippet and +holds the keymap." + (let ((overlay (make-overlay start + end + nil + nil + t))) + (overlay-put overlay 'keymap yas-keymap) + (overlay-put overlay 'priority 100) + (overlay-put overlay 'yas--snippet snippet) + overlay)) + +(defun yas-skip-and-clear-or-delete-char (&optional field) + "Clears unmodified field if at field start, skips to next tab. + +Otherwise deletes a character normally by calling `delete-char'." + (interactive) + (let ((field (or field + (and yas--active-field-overlay + (overlay-buffer yas--active-field-overlay) + (overlay-get yas--active-field-overlay 'yas--field))))) + (cond ((and field + (not (yas--field-modified-p field)) + (eq (point) (marker-position (yas--field-start field)))) + (yas--skip-and-clear field) + (yas-next-field 1)) + (t + (call-interactively 'delete-char))))) + +(defun yas--skip-and-clear (field) + "Deletes the region of FIELD and sets it's modified state to t." + ;; Just before skipping-and-clearing the field, mark its children + ;; fields as modified, too. If the children have mirrors-in-fields + ;; this prevents them from updating erroneously (we're skipping and + ;; deleting!). + ;; + (yas--mark-this-and-children-modified field) + (delete-region (yas--field-start field) (yas--field-end field))) + +(defun yas--mark-this-and-children-modified (field) + (setf (yas--field-modified-p field) t) + (let ((fom (yas--field-next field))) + (while (and fom + (yas--fom-parent-field fom)) + (when (and (eq (yas--fom-parent-field fom) field) + (yas--field-p fom)) + (yas--mark-this-and-children-modified fom)) + (setq fom (yas--fom-next fom))))) + +(defun yas--make-move-active-field-overlay (snippet field) + "Place the active field overlay in SNIPPET's FIELD. + +Move the overlay, or create it if it does not exit." + (if (and yas--active-field-overlay + (overlay-buffer yas--active-field-overlay)) + (move-overlay yas--active-field-overlay + (yas--field-start field) + (yas--field-end field)) + (setq yas--active-field-overlay + (make-overlay (yas--field-start field) + (yas--field-end field) + nil nil t)) + (overlay-put yas--active-field-overlay 'priority 100) + (overlay-put yas--active-field-overlay 'face 'yas-field-highlight-face) + (overlay-put yas--active-field-overlay 'yas--snippet snippet) + (overlay-put yas--active-field-overlay 'modification-hooks '(yas--on-field-overlay-modification)) + (overlay-put yas--active-field-overlay 'insert-in-front-hooks + '(yas--on-field-overlay-modification)) + (overlay-put yas--active-field-overlay 'insert-behind-hooks + '(yas--on-field-overlay-modification)))) + +(defun yas--skip-and-clear-field-p (field _beg _end &optional _length) + "Tell if newly modified FIELD should be cleared and skipped. +BEG, END and LENGTH like overlay modification hooks." + (and (not (yas--field-modified-p field)) + (= (point) (yas--field-start field)) + (require 'delsel) + ;; `yank' sets `this-command' to t during execution. + (let ((clearp (get (if (commandp this-command) this-command + this-original-command) + 'delete-selection))) + (when (and (not (memq clearp '(yank supersede kill))) + (functionp clearp)) + (setq clearp (funcall clearp))) + clearp))) + +(defun yas--on-field-overlay-modification (overlay after? beg end &optional length) + "Clears the field and updates mirrors, conditionally. + +Only clears the field if it hasn't been modified and point is at +field start. This hook does nothing if an undo is in progress." + (unless (or yas--inhibit-overlay-hooks + (not (overlayp yas--active-field-overlay)) ; Avoid Emacs bug #21824. + (yas--undo-in-progress)) + (let* ((field (overlay-get overlay 'yas--field)) + (snippet (overlay-get yas--active-field-overlay 'yas--snippet))) + (cond (after? + (yas--advance-end-maybe field (overlay-end overlay)) + (save-excursion + (yas--field-update-display field)) + (yas--update-mirrors snippet)) + (field + (when (yas--skip-and-clear-field-p field beg end) + (yas--skip-and-clear field)) + (setf (yas--field-modified-p field) t)))))) + +;;; Apropos protection overlays: +;; +;; These exist for nasty users who will try to delete parts of the +;; snippet outside the active field. Actual protection happens in +;; `yas--on-protection-overlay-modification'. +;; +;; As of github #537 this no longer inhibits the command by issuing an +;; error: all the snippets at point, including nested snippets, are +;; automatically commited and the current command can proceed. +;; +(defun yas--make-move-field-protection-overlays (snippet field) + "Place protection overlays surrounding SNIPPET's FIELD. + +Move the overlays, or create them if they do not exit." + (let ((start (yas--field-start field)) + (end (yas--field-end field))) + ;; First check if the (1+ end) is contained in the buffer, + ;; otherwise we'll have to do a bit of cheating and silently + ;; insert a newline. the `(1+ (buffer-size))' should prevent this + ;; when using stacked expansion + ;; + (when (< (buffer-size) end) + (save-excursion + (let ((yas--inhibit-overlay-hooks t)) + (goto-char (point-max)) + (newline)))) + ;; go on to normal overlay creation/moving + ;; + (cond ((and yas--field-protection-overlays + (every #'overlay-buffer yas--field-protection-overlays)) + (move-overlay (first yas--field-protection-overlays) (1- start) start) + (move-overlay (second yas--field-protection-overlays) end (1+ end))) + (t + (setq yas--field-protection-overlays + (list (make-overlay (1- start) start nil t nil) + (make-overlay end (1+ end) nil t nil))) + (dolist (ov yas--field-protection-overlays) + (overlay-put ov 'face 'yas--field-debug-face) + (overlay-put ov 'yas--snippet snippet) + ;; (overlay-put ov 'evaporate t) + (overlay-put ov 'modification-hooks '(yas--on-protection-overlay-modification))))))) + +(defun yas--on-protection-overlay-modification (_overlay after? _beg _end &optional _length) + "Signals a snippet violation, then issues error. + +The error should be ignored in `debug-ignored-errors'" + (unless (or yas--inhibit-overlay-hooks + after? + (yas--undo-in-progress)) + (let ((snippets (yas--snippets-at-point))) + (yas--message 3 "Comitting snippets. Action would destroy a protection overlay.") + (cl-loop for snippet in snippets + do (yas--commit-snippet snippet))))) + +(add-to-list 'debug-ignored-errors "^Exit the snippet first!$") + + +;;; Snippet expansion and "stacked" expansion: +;; +;; Stacked expansion is when you try to expand a snippet when already +;; inside a snippet expansion. +;; +;; The parent snippet does not run its fields modification hooks +;; (`yas--on-field-overlay-modification' and +;; `yas--on-protection-overlay-modification') while the child snippet +;; is active. This means, among other things, that the mirrors of the +;; parent snippet are not updated, this only happening when one exits +;; the child snippet. +;; +;; Unfortunately, this also puts some ugly (and not fully-tested) +;; bits of code in `yas-expand-snippet' and +;; `yas--commit-snippet'. I've tried to mark them with "stacked +;; expansion:". +;; +;; This was thought to be safer in an undo/redo perspective, but +;; maybe the correct implementation is to make the globals +;; `yas--active-field-overlay' and `yas--field-protection-overlays' be +;; snippet-local and be active even while the child snippet is +;; running. This would mean a lot of overlay modification hooks +;; running, but if managed correctly (including overlay priorities) +;; they should account for all situations... +;; +(defun yas-expand-snippet (content &optional start end expand-env) + "Expand snippet CONTENT at current point. + +Text between START and END will be deleted before inserting +template. EXPAND-ENV is a list of (SYM VALUE) let-style dynamic bindings +considered when expanding the snippet." + (cl-assert (and yas-minor-mode + (memq 'yas--post-command-handler post-command-hook)) + nil + "[yas] `yas-expand-snippet' needs properly setup `yas-minor-mode'") + (run-hooks 'yas-before-expand-snippet-hook) + + ;; + (let* ((yas-selected-text (or yas-selected-text + (and (region-active-p) + (buffer-substring-no-properties (region-beginning) + (region-end))))) + (start (or start + (and (region-active-p) + (region-beginning)) + (point))) + (end (or end + (and (region-active-p) + (region-end)) + (point))) + (to-delete (and start + end + (buffer-substring-no-properties start end))) + snippet) + (goto-char start) + (setq yas--indent-original-column (current-column)) + ;; Delete the region to delete, this *does* get undo-recorded. + ;; + (when (and to-delete + (> end start)) + (delete-region start end)) + + (cond ((listp content) + ;; x) This is a snippet-command + ;; + (yas--eval-lisp-no-saves content)) + (t + ;; x) This is a snippet-snippet :-) + ;; + ;; Narrow the region down to the content, shoosh the + ;; `buffer-undo-list', and create the snippet, the new + ;; snippet updates its mirrors once, so we are left with + ;; some plain text. The undo action for deleting this + ;; plain text will get recorded at the end. + ;; + ;; stacked expansion: also shoosh the overlay modification hooks + (let ((buffer-undo-list t)) + ;; snippet creation might evaluate users elisp, which + ;; might generate errors, so we have to be ready to catch + ;; them mostly to make the undo information + ;; + (setq yas--start-column (current-column)) + (let ((yas--inhibit-overlay-hooks t)) + (setq snippet + (if expand-env + (eval `(let* ,expand-env + (insert content) + (yas--snippet-create start (point)))) + (insert content) + (yas--snippet-create start (point)))))) + + ;; stacked-expansion: This checks for stacked expansion, save the + ;; `yas--previous-active-field' and advance its boundary. + ;; + (let ((existing-field (and yas--active-field-overlay + (overlay-buffer yas--active-field-overlay) + (overlay-get yas--active-field-overlay 'yas--field)))) + (when existing-field + (setf (yas--snippet-previous-active-field snippet) existing-field) + (yas--advance-end-maybe existing-field (overlay-end yas--active-field-overlay)))) + + ;; Exit the snippet immediately if no fields + ;; + (unless (yas--snippet-fields snippet) + (yas-exit-snippet snippet)) + + ;; Push two undo actions: the deletion of the inserted contents of + ;; the new snippet (without the "key") followed by an apply of + ;; `yas--take-care-of-redo' on the newly inserted snippet boundaries + ;; + ;; A small exception, if `yas-also-auto-indent-first-line' + ;; is t and `yas--indent' decides to indent the line to a + ;; point before the actual expansion point, undo would be + ;; messed up. We call the early point "newstart"". case, + ;; and attempt to fix undo. + ;; + (let ((newstart (overlay-start (yas--snippet-control-overlay snippet))) + (end (overlay-end (yas--snippet-control-overlay snippet)))) + (when (< newstart start) + (push (cons (make-string (- start newstart) ? ) newstart) buffer-undo-list)) + (push (cons newstart end) buffer-undo-list) + (push `(apply yas--take-care-of-redo ,start ,end ,snippet) + buffer-undo-list)) + ;; Now, schedule a move to the first field + ;; + (let ((first-field (car (yas--snippet-fields snippet)))) + (when first-field + (sit-for 0) ;; fix issue 125 + (yas--move-to-field snippet first-field))) + (yas--message 3 "snippet expanded.") + t)))) + +(defun yas--take-care-of-redo (_beg _end snippet) + "Commits SNIPPET, which in turn pushes an undo action for reviving it. + +Meant to exit in the `buffer-undo-list'." + ;; slightly optimize: this action is only needed for snippets with + ;; at least one field + (when (yas--snippet-fields snippet) + (yas--commit-snippet snippet))) + +(defun yas--snippet-revive (beg end snippet) + "Revives SNIPPET and creates a control overlay from BEG to END. + +BEG and END are, we hope, the original snippets boundaries. +All the markers/points exiting existing inside SNIPPET should point +to their correct locations *at the time the snippet is revived*. + +After revival, push the `yas--take-care-of-redo' in the +`buffer-undo-list'" + ;; Reconvert all the points to markers + ;; + (yas--points-to-markers snippet) + ;; When at least one editable field existed in the zombie snippet, + ;; try to revive the whole thing... + ;; + (let ((target-field (or (yas--snippet-active-field snippet) + (car (yas--snippet-fields snippet))))) + (when target-field + (setf (yas--snippet-control-overlay snippet) (yas--make-control-overlay snippet beg end)) + (overlay-put (yas--snippet-control-overlay snippet) 'yas--snippet snippet) + + (yas--move-to-field snippet target-field) + + (push `(apply yas--take-care-of-redo ,beg ,end ,snippet) + buffer-undo-list)))) + +(defun yas--snippet-create (begin end) + "Create a snippet from a template inserted at BEGIN to END. + +Returns the newly created snippet." + (save-restriction + (narrow-to-region begin end) + (let ((snippet (yas--make-snippet))) + (goto-char begin) + (yas--snippet-parse-create snippet) + + ;; Sort and link each field + (yas--snippet-sort-fields snippet) + + ;; Create keymap overlay for snippet + (setf (yas--snippet-control-overlay snippet) + (yas--make-control-overlay snippet (point-min) (point-max))) + + ;; Move to end + (goto-char (point-max)) + + snippet))) + + +;;; Apropos adjacencies and "fom's": +;; +;; Once the $-constructs bits like "$n" and "${:n" are deleted in the +;; recently expanded snippet, we might actually have many fields, +;; mirrors (and the snippet exit) in the very same position in the +;; buffer. Therefore we need to single-link the +;; fields-or-mirrors-or-exit (which I have abbreviated to "fom") +;; according to their original positions in the buffer. +;; +;; Then we have operation `yas--advance-end-maybe' and +;; `yas--advance-start-maybe', which conditionally push the starts and +;; ends of these foms down the chain. +;; +;; This allows for like the printf with the magic ",": +;; +;; printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);")} \ +;; $2${1:$(if (string-match "%" text) "\);" "")}$0 +;; +(defun yas--fom-start (fom) + (cond ((yas--field-p fom) + (yas--field-start fom)) + ((yas--mirror-p fom) + (yas--mirror-start fom)) + (t + (yas--exit-marker fom)))) + +(defun yas--fom-end (fom) + (cond ((yas--field-p fom) + (yas--field-end fom)) + ((yas--mirror-p fom) + (yas--mirror-end fom)) + (t + (yas--exit-marker fom)))) + +(defun yas--fom-next (fom) + (cond ((yas--field-p fom) + (yas--field-next fom)) + ((yas--mirror-p fom) + (yas--mirror-next fom)) + (t + (yas--exit-next fom)))) + +(defun yas--fom-parent-field (fom) + (cond ((yas--field-p fom) + (yas--field-parent-field fom)) + ((yas--mirror-p fom) + (yas--mirror-parent-field fom)) + (t + nil))) + +(defun yas--calculate-adjacencies (snippet) + "Calculate adjacencies for fields or mirrors of SNIPPET. + +This is according to their relative positions in the buffer, and +has to be called before the $-constructs are deleted." + (let* ((fom-set-next-fom + (lambda (fom nextfom) + (cond ((yas--field-p fom) + (setf (yas--field-next fom) nextfom)) + ((yas--mirror-p fom) + (setf (yas--mirror-next fom) nextfom)) + (t + (setf (yas--exit-next fom) nextfom))))) + (compare-fom-begs + (lambda (fom1 fom2) + (if (= (yas--fom-start fom2) (yas--fom-start fom1)) + (yas--mirror-p fom2) + (>= (yas--fom-start fom2) (yas--fom-start fom1))))) + (link-foms fom-set-next-fom)) + ;; make some yas--field, yas--mirror and yas--exit soup + (let ((soup)) + (when (yas--snippet-exit snippet) + (push (yas--snippet-exit snippet) soup)) + (dolist (field (yas--snippet-fields snippet)) + (push field soup) + (dolist (mirror (yas--field-mirrors field)) + (push mirror soup))) + (setq soup + (sort soup compare-fom-begs)) + (when soup + (reduce link-foms soup))))) + +(defun yas--calculate-mirrors-in-fields (snippet mirror) + "Attempt to assign a parent field of SNIPPET to the mirror MIRROR. + +Use the tightest containing field if more than one field contains +the mirror. Intended to be called *before* the dollar-regions are +deleted." + (let ((min (point-min)) + (max (point-max))) + (dolist (field (yas--snippet-fields snippet)) + (when (and (<= (yas--field-start field) (yas--mirror-start mirror)) + (<= (yas--mirror-end mirror) (yas--field-end field)) + (< min (yas--field-start field)) + (< (yas--field-end field) max)) + (setq min (yas--field-start field) + max (yas--field-end field)) + (setf (yas--mirror-parent-field mirror) field))))) + +(defun yas--advance-end-maybe (fom newend) + "Maybe advance FOM's end to NEWEND if it needs it. + +If it does, also: + +* call `yas--advance-start-maybe' on FOM's next fom. + +* in case FOM is field call `yas--advance-end-maybe' on its parent + field + +Also, if FOM is an exit-marker, always call +`yas--advance-start-maybe' on its next fom. This is because +exit-marker have identical start and end markers." + (cond ((and fom (< (yas--fom-end fom) newend)) + (set-marker (yas--fom-end fom) newend) + (yas--advance-start-maybe (yas--fom-next fom) newend) + (yas--advance-end-of-parents-maybe (yas--fom-parent-field fom) newend)) + ((yas--exit-p fom) + (yas--advance-start-maybe (yas--fom-next fom) newend)))) + +(defun yas--advance-start-maybe (fom newstart) + "Maybe advance FOM's start to NEWSTART if it needs it. + +If it does, also call `yas--advance-end-maybe' on FOM." + (when (and fom (< (yas--fom-start fom) newstart)) + (set-marker (yas--fom-start fom) newstart) + (yas--advance-end-maybe fom newstart))) + +(defun yas--advance-end-of-parents-maybe (field newend) + "Like `yas--advance-end-maybe' but for parent fields. + +Only works for fields and doesn't care about the start of the +next FOM. Works its way up recursively for parents of parents." + (when (and field + (< (yas--field-end field) newend)) + (set-marker (yas--field-end field) newend) + (yas--advance-end-of-parents-maybe (yas--field-parent-field field) newend))) + +(defvar yas--dollar-regions nil + "When expanding the snippet the \"parse-create\" functions add +cons cells to this var.") + +(defvar yas--backquote-markers-and-strings nil + "List of (MARKER . STRING) marking where the values from +backquoted Lisp expressions should be inserted at the end of +expansion.") + +(defun yas--snippet-parse-create (snippet) + "Parse a recently inserted snippet template, creating all +necessary fields, mirrors and exit points. + +Meant to be called in a narrowed buffer, does various passes" + (let ((parse-start (point))) + ;; Reset the yas--dollar-regions + ;; + (setq yas--dollar-regions nil) + ;; protect just the backquotes + ;; + (yas--protect-escapes nil '(?`)) + ;; replace all backquoted expressions + ;; + (goto-char parse-start) + (yas--save-backquotes) + ;; protect escaped characters + ;; + (yas--protect-escapes) + ;; parse fields with {} + ;; + (goto-char parse-start) + (yas--field-parse-create snippet) + ;; parse simple mirrors and fields + ;; + (goto-char parse-start) + (yas--simple-mirror-parse-create snippet) + ;; parse mirror transforms + ;; + (goto-char parse-start) + (yas--transform-mirror-parse-create snippet) + ;; calculate adjacencies of fields and mirrors + ;; + (yas--calculate-adjacencies snippet) + ;; Delete $-constructs + ;; + (save-restriction (widen) (yas--delete-regions yas--dollar-regions)) + ;; restore backquoted expression values + ;; + (yas--restore-backquotes) + ;; restore escapes + ;; + (goto-char parse-start) + (yas--restore-escapes) + ;; update mirrors for the first time + ;; + (yas--update-mirrors snippet) + ;; indent the best we can + ;; + (goto-char parse-start) + (yas--indent snippet))) + +(defun yas--indent-according-to-mode (snippet-markers) + "Indent current line according to mode, preserving SNIPPET-MARKERS." + ;;; Apropos indenting problems.... + ;; + ;; `indent-according-to-mode' uses whatever `indent-line-function' + ;; is available. Some implementations of these functions delete text + ;; before they insert. If there happens to be a marker just after + ;; the text being deleted, the insertion actually happens after the + ;; marker, which misplaces it. + ;; + ;; This would also happen if we had used overlays with the + ;; `front-advance' property set to nil. + ;; + ;; This is why I have these `trouble-markers', they are the ones at + ;; they are the ones at the first non-whitespace char at the line + ;; (i.e. at `yas--real-line-beginning'. After indentation takes place + ;; we should be at the correct to restore them to. All other + ;; non-trouble-markers have been *pushed* and don't need special + ;; attention. + ;; + (goto-char (yas--real-line-beginning)) + (let ((trouble-markers (remove-if-not #'(lambda (marker) + (= marker (point))) + snippet-markers))) + (save-restriction + (widen) + (condition-case _ + (indent-according-to-mode) + (error (yas--message 3 "Warning: `yas--indent-according-to-mode' having problems running %s" indent-line-function) + nil))) + (mapc #'(lambda (marker) + (set-marker marker (point))) + trouble-markers))) + +(defvar yas--indent-original-column nil) +(defun yas--indent (snippet) + (let ((snippet-markers (yas--collect-snippet-markers snippet))) + ;; Look for those $> + (save-excursion + (while (re-search-forward "$>" nil t) + (delete-region (match-beginning 0) (match-end 0)) + (when (not (eq yas-indent-line 'auto)) + (yas--indent-according-to-mode snippet-markers)))) + ;; Now do stuff for 'fixed and 'auto + (save-excursion + (cond ((eq yas-indent-line 'fixed) + (while (and (zerop (forward-line)) + (zerop (current-column))) + (indent-to-column yas--indent-original-column))) + ((eq yas-indent-line 'auto) + (let ((end (set-marker (make-marker) (point-max))) + (indent-first-line-p yas-also-auto-indent-first-line)) + (while (and (zerop (if indent-first-line-p + (prog1 + (forward-line 0) + (setq indent-first-line-p nil)) + (forward-line 1))) + (not (eobp)) + (<= (point) end)) + (yas--indent-according-to-mode snippet-markers)))) + (t + nil))))) + +(defun yas--collect-snippet-markers (snippet) + "Make a list of all the markers used by SNIPPET." + (let (markers) + (dolist (field (yas--snippet-fields snippet)) + (push (yas--field-start field) markers) + (push (yas--field-end field) markers) + (dolist (mirror (yas--field-mirrors field)) + (push (yas--mirror-start mirror) markers) + (push (yas--mirror-end mirror) markers))) + (let ((snippet-exit (yas--snippet-exit snippet))) + (when (and snippet-exit + (marker-buffer (yas--exit-marker snippet-exit))) + (push (yas--exit-marker snippet-exit) markers))) + markers)) + +(defun yas--real-line-beginning () + (let ((c (char-after (line-beginning-position))) + (n (line-beginning-position))) + (while (or (eql c ?\ ) + (eql c ?\t)) + (cl-incf n) + (setq c (char-after n))) + n)) + +(defun yas--escape-string (escaped) + (concat "YASESCAPE" (format "%d" escaped) "PROTECTGUARD")) + +(defun yas--protect-escapes (&optional text escaped) + "Protect all escaped characters with their numeric ASCII value. + +With optional string TEXT do it in string instead of buffer." + (let ((changed-text text) + (text-provided-p text)) + (mapc #'(lambda (escaped) + (setq changed-text + (yas--replace-all (concat "\\" (char-to-string escaped)) + (yas--escape-string escaped) + (when text-provided-p changed-text)))) + (or escaped yas--escaped-characters)) + changed-text)) + +(defun yas--restore-escapes (&optional text escaped) + "Restore all escaped characters from their numeric ASCII value. + +With optional string TEXT do it in string instead of the buffer." + (let ((changed-text text) + (text-provided-p text)) + (mapc #'(lambda (escaped) + (setq changed-text + (yas--replace-all (yas--escape-string escaped) + (char-to-string escaped) + (when text-provided-p changed-text)))) + (or escaped yas--escaped-characters)) + changed-text)) + +(defun yas--save-backquotes () + "Save all the \"`(lisp-expression)`\"-style expressions +with their evaluated value into `yas--backquote-markers-and-strings'." + (while (re-search-forward yas--backquote-lisp-expression-regexp nil t) + (let ((current-string (match-string-no-properties 1)) transformed) + (save-restriction (widen) + (delete-region (match-beginning 0) (match-end 0))) + (setq transformed (yas--eval-lisp (yas--read-lisp (yas--restore-escapes current-string '(?`))))) + (goto-char (match-beginning 0)) + (when transformed + (let ((marker (make-marker))) + (save-restriction + (widen) + (insert "Y") ;; quite horrendous, I love it :) + (set-marker marker (point)) + (insert "Y")) + (push (cons marker transformed) yas--backquote-markers-and-strings)))))) + +(defun yas--restore-backquotes () + "Replace markers in `yas--backquote-markers-and-strings' with their values." + (while yas--backquote-markers-and-strings + (let* ((marker-and-string (pop yas--backquote-markers-and-strings)) + (marker (car marker-and-string)) + (string (cdr marker-and-string))) + (save-excursion + (goto-char marker) + (save-restriction + (widen) + (delete-char -1) + (insert string) + (delete-char 1)) + (set-marker marker nil))))) + +(defun yas--scan-sexps (from count) + (ignore-errors + (save-match-data ; `scan-sexps' may modify match data. + (with-syntax-table (standard-syntax-table) + (scan-sexps from count))))) + +(defun yas--make-marker (pos) + "Create a marker at POS with nil `marker-insertion-type'." + (let ((marker (set-marker (make-marker) pos))) + (set-marker-insertion-type marker nil) + marker)) + +(defun yas--field-parse-create (snippet &optional parent-field) + "Parse most field expressions in SNIPPET, except for the simple one \"$n\". + +The following count as a field: + +* \"${n: text}\", for a numbered field with default text, as long as N is not 0; + +* \"${n: text$(expression)}, the same with a Lisp expression; + this is caught with the curiously named `yas--multi-dollar-lisp-expression-regexp' + +* the same as above but unnumbered, (no N:) and number is calculated automatically. + +When multiple expressions are found, only the last one counts." + ;; + (save-excursion + (while (re-search-forward yas--field-regexp nil t) + (let* ((real-match-end-0 (yas--scan-sexps (1+ (match-beginning 0)) 1)) + (number (and (match-string-no-properties 1) + (string-to-number (match-string-no-properties 1)))) + (brand-new-field (and real-match-end-0 + ;; break if on "$(" immediately + ;; after the ":", this will be + ;; caught as a mirror with + ;; transform later. + (not (string-match-p "\\`\\$[ \t\n]*(" + (match-string-no-properties 2))) + ;; allow ${0: some exit text} + ;; (not (and number (zerop number))) + (yas--make-field number + (yas--make-marker (match-beginning 2)) + (yas--make-marker (1- real-match-end-0)) + parent-field)))) + (when brand-new-field + (goto-char real-match-end-0) + (push (cons (1- real-match-end-0) real-match-end-0) + yas--dollar-regions) + (push (cons (match-beginning 0) (match-beginning 2)) + yas--dollar-regions) + (push brand-new-field (yas--snippet-fields snippet)) + (save-excursion + (save-restriction + (narrow-to-region (yas--field-start brand-new-field) (yas--field-end brand-new-field)) + (goto-char (point-min)) + (yas--field-parse-create snippet brand-new-field))))))) + ;; if we entered from a parent field, now search for the + ;; `yas--multi-dollar-lisp-expression-regexp'. This is used for + ;; primary field transformations + ;; + (when parent-field + (save-excursion + (while (re-search-forward yas--multi-dollar-lisp-expression-regexp nil t) + (let* ((real-match-end-1 (yas--scan-sexps (match-beginning 1) 1))) + ;; commit the primary field transformation if: + ;; + ;; 1. we don't find it in yas--dollar-regions (a subnested + ;; field) might have already caught it. + ;; + ;; 2. we really make sure we have either two '$' or some + ;; text and a '$' after the colon ':'. This is a FIXME: work + ;; my regular expressions and end these ugly hacks. + ;; + (when (and real-match-end-1 + (not (member (cons (match-beginning 0) + real-match-end-1) + yas--dollar-regions)) + (not (eq ?: + (char-before (1- (match-beginning 1)))))) + (let ((lisp-expression-string (buffer-substring-no-properties (match-beginning 1) + real-match-end-1))) + (setf (yas--field-transform parent-field) + (yas--read-lisp (yas--restore-escapes lisp-expression-string)))) + (push (cons (match-beginning 0) real-match-end-1) + yas--dollar-regions))))))) + +(defun yas--transform-mirror-parse-create (snippet) + "Parse the \"${n:$(lisp-expression)}\" mirror transformations in SNIPPET." + (while (re-search-forward yas--transform-mirror-regexp nil t) + (let* ((real-match-end-0 (yas--scan-sexps (1+ (match-beginning 0)) 1)) + (number (string-to-number (match-string-no-properties 1))) + (field (and number + (not (zerop number)) + (yas--snippet-find-field snippet number))) + (brand-new-mirror + (and real-match-end-0 + field + (yas--make-mirror (yas--make-marker (match-beginning 0)) + (yas--make-marker (match-beginning 0)) + (yas--read-lisp + (yas--restore-escapes + (buffer-substring-no-properties (match-beginning 2) + (1- real-match-end-0)))))))) + (when brand-new-mirror + (push brand-new-mirror + (yas--field-mirrors field)) + (yas--calculate-mirrors-in-fields snippet brand-new-mirror) + (push (cons (match-beginning 0) real-match-end-0) yas--dollar-regions))))) + +(defun yas--simple-mirror-parse-create (snippet) + "Parse the simple \"$n\" fields/mirrors/exitmarkers in SNIPPET." + (while (re-search-forward yas--simple-mirror-regexp nil t) + (let ((number (string-to-number (match-string-no-properties 1)))) + (cond ((zerop number) + + (setf (yas--snippet-exit snippet) + (yas--make-exit (yas--make-marker (match-end 0)))) + (save-excursion + (goto-char (match-beginning 0)) + (when yas-wrap-around-region + (cond (yas-selected-text + (insert yas-selected-text)) + ((and (eq yas-wrap-around-region 'cua) + cua-mode + (get-register ?0)) + (insert (prog1 (get-register ?0) + (set-register ?0 nil)))))) + (push (cons (point) (yas--exit-marker (yas--snippet-exit snippet))) + yas--dollar-regions))) + (t + (let ((field (yas--snippet-find-field snippet number))) + (if field + (let ((brand-new-mirror (yas--make-mirror + (yas--make-marker (match-beginning 0)) + (yas--make-marker (match-beginning 0)) + nil))) + (push brand-new-mirror + (yas--field-mirrors field)) + (yas--calculate-mirrors-in-fields snippet brand-new-mirror)) + (push (yas--make-field number + (yas--make-marker (match-beginning 0)) + (yas--make-marker (match-beginning 0)) + nil) + (yas--snippet-fields snippet)))) + (push (cons (match-beginning 0) (match-end 0)) + yas--dollar-regions)))))) + +(defun yas--delete-regions (regions) + "Sort disjuct REGIONS by start point, then delete from the back." + (mapc #'(lambda (reg) + (delete-region (car reg) (cdr reg))) + (sort regions + #'(lambda (r1 r2) + (>= (car r1) (car r2)))))) + +(defun yas--calculate-mirror-depth (mirror &optional traversed) + (let* ((parent (yas--mirror-parent-field mirror)) + (parents-mirrors (and parent + (yas--field-mirrors parent)))) + (or (yas--mirror-depth mirror) + (setf (yas--mirror-depth mirror) + (cond ((memq mirror traversed) + 0) + ((and parent parents-mirrors) + (1+ (reduce #'max + (mapcar #'(lambda (m) + (yas--calculate-mirror-depth m + (cons mirror + traversed))) + parents-mirrors)))) + (parent + 1) + (t + 0)))))) + +(defun yas--update-mirrors (snippet) + "Update all the mirrors of SNIPPET." + (save-excursion + (dolist (field-and-mirror (sort + ;; make a list of ((F1 . M1) (F1 . M2) (F2 . M3) (F2 . M4) ...) + ;; where F is the field that M is mirroring + ;; + (mapcan #'(lambda (field) + (mapcar #'(lambda (mirror) + (cons field mirror)) + (yas--field-mirrors field))) + (yas--snippet-fields snippet)) + ;; then sort this list so that entries with mirrors with parent + ;; fields appear before. This was important for fixing #290, and + ;; luckily also handles the case where a mirror in a field causes + ;; another mirror to need reupdating + ;; + #'(lambda (field-and-mirror1 field-and-mirror2) + (> (yas--calculate-mirror-depth (cdr field-and-mirror1)) + (yas--calculate-mirror-depth (cdr field-and-mirror2)))))) + (let* ((field (car field-and-mirror)) + (mirror (cdr field-and-mirror)) + (parent-field (yas--mirror-parent-field mirror))) + ;; before updating a mirror with a parent-field, maybe advance + ;; its start (#290) + ;; + (when parent-field + (yas--advance-start-maybe mirror (yas--fom-start parent-field))) + ;; update this mirror + ;; + (yas--mirror-update-display mirror field) + ;; `yas--place-overlays' is needed if the active field and + ;; protected overlays have been changed because of insertions + ;; in `yas--mirror-update-display' + ;; + (when (eq field (yas--snippet-active-field snippet)) + (yas--place-overlays snippet field)))))) + +(defun yas--mirror-update-display (mirror field) + "Update MIRROR according to FIELD (and mirror transform)." + + (let* ((mirror-parent-field (yas--mirror-parent-field mirror)) + (reflection (and (not (and mirror-parent-field + (yas--field-modified-p mirror-parent-field))) + (or (yas--apply-transform mirror field 'empty-on-nil) + (yas--field-text-for-display field))))) + (when (and reflection + (not (string= reflection (buffer-substring-no-properties (yas--mirror-start mirror) + (yas--mirror-end mirror))))) + (goto-char (yas--mirror-start mirror)) + (let ((yas--inhibit-overlay-hooks t)) + (insert reflection)) + (if (> (yas--mirror-end mirror) (point)) + (delete-region (point) (yas--mirror-end mirror)) + (set-marker (yas--mirror-end mirror) (point)) + (yas--advance-start-maybe (yas--mirror-next mirror) (point)) + ;; super-special advance + (yas--advance-end-of-parents-maybe mirror-parent-field (point)))))) + +(defun yas--field-update-display (field) + "Much like `yas--mirror-update-display', but for fields." + (when (yas--field-transform field) + (let ((transformed (and (not (eq (yas--field-number field) 0)) + (yas--apply-transform field field)))) + (when (and transformed + (not (string= transformed (buffer-substring-no-properties (yas--field-start field) + (yas--field-end field))))) + (setf (yas--field-modified-p field) t) + (goto-char (yas--field-start field)) + (let ((yas--inhibit-overlay-hooks t)) + (insert transformed) + (if (> (yas--field-end field) (point)) + (delete-region (point) (yas--field-end field)) + (set-marker (yas--field-end field) (point)) + (yas--advance-start-maybe (yas--field-next field) (point))) + t))))) + + +;;; Post-command hook: +;; +(defun yas--post-command-handler () + "Handles various yasnippet conditions after each command." + (cond ((eq 'undo this-command) + ;; + ;; After undo revival the correct field is sometimes not + ;; restored correctly, this condition handles that + ;; + (let* ((snippet (car (yas--snippets-at-point))) + (target-field (and snippet + (find-if-not #'(lambda (field) + (yas--field-probably-deleted-p snippet field)) + (remove nil + (cons (yas--snippet-active-field snippet) + (yas--snippet-fields snippet))))))) + (when target-field + (yas--move-to-field snippet target-field)))) + ((not (yas--undo-in-progress)) + ;; When not in an undo, check if we must commit the snippet + ;; (user exited it). + (yas--check-commit-snippet)))) + +;;; Fancy docs: +;; +;; The docstrings for some functions are generated dynamically +;; depending on the context. +;; +(put 'yas-expand 'function-documentation + '(yas--expand-from-trigger-key-doc t)) +(defun yas--expand-from-trigger-key-doc (context) + "A doc synthesizer for `yas--expand-from-trigger-key-doc'." + (let* ((yas-fallback-behavior (and context yas-fallback-behavior)) + (fallback-description + (cond ((eq yas-fallback-behavior 'call-other-command) + (let* ((fallback (yas--keybinding-beyond-yasnippet))) + (or (and fallback + (format "call command `%s'." + (pp-to-string fallback))) + "do nothing (`yas-expand' doesn't override\nanything)."))) + ((eq yas-fallback-behavior 'return-nil) + "do nothing.") + (t "defer to `yas-fallback-behavior' (which see).")))) + (concat "Expand a snippet before point. If no snippet +expansion is possible, " + fallback-description + "\n\nOptional argument FIELD is for non-interactive use and is an +object satisfying `yas--field-p' to restrict the expansion to."))) + +(put 'yas-expand-from-keymap 'function-documentation + '(yas--expand-from-keymap-doc t)) +(defun yas--expand-from-keymap-doc (context) + "A doc synthesizer for `yas--expand-from-keymap-doc'." + (add-hook 'temp-buffer-show-hook 'yas--snippet-description-finish-runonce) + (concat "Expand/run snippets from keymaps, possibly falling back to original binding.\n" + (when (and context (eq this-command 'describe-key)) + (let* ((vec (this-single-command-keys)) + (templates (mapcan #'(lambda (table) + (yas--fetch table vec)) + (yas--get-snippet-tables))) + (yas--direct-keymaps nil) + (fallback (key-binding vec))) + (concat "In this case, " + (when templates + (concat "these snippets are bound to this key:\n" + (yas--template-pretty-list templates) + "\n\nIf none of these expands, ")) + (or (and fallback + (format "fallback `%s' will be called." (pp-to-string fallback))) + "no fallback keybinding is called.")))))) + +(defun yas--template-pretty-list (templates) + (let ((acc) + (yas-buffer-local-condition 'always)) + (dolist (plate templates) + (setq acc (concat acc "\n*) " + (propertize (concat "\\\\snippet `" (car plate) "'") + 'yasnippet (cdr plate))))) + acc)) + +(define-button-type 'help-snippet-def + :supertype 'help-xref + 'help-function (lambda (template) (yas--visit-snippet-file-1 template)) + 'help-echo (purecopy "mouse-2, RET: find snippets's definition")) + +(defun yas--snippet-description-finish-runonce () + "Final adjustments for the help buffer when snippets are concerned." + (yas--create-snippet-xrefs) + (remove-hook 'temp-buffer-show-hook 'yas--snippet-description-finish-runonce)) + +(defun yas--create-snippet-xrefs () + (save-excursion + (goto-char (point-min)) + (while (search-forward-regexp "\\\\\\\\snippet[ \s\t]+`\\([^']+\\)'" nil t) + (let ((template (get-text-property (match-beginning 1) + 'yasnippet))) + (when template + (help-xref-button 1 'help-snippet-def template) + (kill-region (match-end 1) (match-end 0)) + (kill-region (match-beginning 0) (match-beginning 1))))))) + +;;; Utils + +(defvar yas-verbosity 4 + "Log level for `yas--message' 4 means trace most anything, 0 means nothing.") + +(defun yas--message (level message &rest args) + "When LEVEL is above `yas-verbosity-level', log MESSAGE and ARGS." + (when (> yas-verbosity level) + (message "%s" (apply #'yas--format message args)))) + +(defun yas--warning (format-control &rest format-args) + (let ((msg (apply #'format format-control format-args))) + (display-warning 'yasnippet msg :warning) + (yas--message 1 msg))) + +(defun yas--format (format-control &rest format-args) + (apply #'format (concat "[yas] " format-control) format-args)) + + +;;; Some hacks: +;; +;; The functions +;; +;; `locate-dominating-file' +;; `region-active-p' +;; +;; added for compatibility in emacsen < 23 +(unless (>= emacs-major-version 23) + (unless (fboundp 'region-active-p) + (defun region-active-p () (and transient-mark-mode mark-active))) + + (unless (fboundp 'locate-dominating-file) + (defvar locate-dominating-stop-dir-regexp + "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'" + "Regexp of directory names which stop the search in `locate-dominating-file'. +Any directory whose name matches this regexp will be treated like +a kind of root directory by `locate-dominating-file' which will stop its search +when it bumps into it. +The default regexp prevents fruitless and time-consuming attempts to find +special files in directories in which filenames are interpreted as hostnames, +or mount points potentially requiring authentication as a different user.") + + (defun locate-dominating-file (file name) + "Look up the directory hierarchy from FILE for a file named NAME. +Stop at the first parent directory containing a file NAME, +and return the directory. Return nil if not found." + ;; We used to use the above locate-dominating-files code, but the + ;; directory-files call is very costly, so we're much better off doing + ;; multiple calls using the code in here. + ;; + ;; Represent /home/luser/foo as ~/foo so that we don't try to look for + ;; `name' in /home or in /. + (setq file (abbreviate-file-name file)) + (let ((root nil) + try) + (while (not (or root + (null file) + ;; FIXME: Disabled this heuristic because it is sometimes + ;; inappropriate. + ;; As a heuristic, we stop looking up the hierarchy of + ;; directories as soon as we find a directory belonging + ;; to another user. This should save us from looking in + ;; things like /net and /afs. This assumes that all the + ;; files inside a project belong to the same user. + ;; (let ((prev-user user)) + ;; (setq user (nth 2 (file-attributes file))) + ;; (and prev-user (not (equal user prev-user)))) + (string-match locate-dominating-stop-dir-regexp file))) + (setq try (file-exists-p (expand-file-name name file))) + (cond (try (setq root file)) + ((equal file (setq file (file-name-directory + (directory-file-name file)))) + (setq file nil)))) + root)))) + + +;;; Backward compatibility to yasnippet <= 0.7 + +(defun yas-initialize () + "For backward compatibility, enable `yas-minor-mode' globally." + (declare (obsolete "Use (yas-global-mode 1) instead." "0.8")) + (yas-global-mode 1)) + +(defvar yas--backported-syms '(;; `defcustom's + ;; + yas-snippet-dirs + yas-prompt-functions + yas-indent-line + yas-also-auto-indent-first-line + yas-snippet-revival + yas-triggers-in-field + yas-fallback-behavior + yas-choose-keys-first + yas-choose-tables-first + yas-use-menu + yas-trigger-symbol + yas-wrap-around-region + yas-good-grace + yas-visit-from-menu + yas-expand-only-for-last-commands + yas-field-highlight-face + + ;; these vars can be customized as well + ;; + yas-keymap + yas-verbosity + yas-extra-modes + yas-key-syntaxes + yas-after-exit-snippet-hook + yas-before-expand-snippet-hook + yas-buffer-local-condition + yas-dont-activate + + ;; prompting functions + ;; + yas-x-prompt + yas-ido-prompt + yas-no-prompt + yas-completing-prompt + yas-dropdown-prompt + + ;; interactive functions + ;; + yas-expand + yas-minor-mode + yas-global-mode + yas-direct-keymaps-reload + yas-minor-mode-on + yas-load-directory + yas-reload-all + yas-compile-directory + yas-recompile-all + yas-about + yas-expand-from-trigger-key + yas-expand-from-keymap + yas-insert-snippet + yas-visit-snippet-file + yas-new-snippet + yas-load-snippet-buffer + yas-tryout-snippet + yas-describe-tables + yas-next-field-or-maybe-expand + yas-next-field + yas-prev-field + yas-abort-snippet + yas-exit-snippet + yas-exit-all-snippets + yas-skip-and-clear-or-delete-char + yas-initialize + + ;; symbols that I "exported" for use + ;; in snippets and hookage + ;; + yas-expand-snippet + yas-define-snippets + yas-define-menu + yas-snippet-beg + yas-snippet-end + yas-modified-p + yas-moving-away-p + yas-substr + yas-choose-value + yas-key-to-value + yas-throw + yas-verify-value + yas-field-value + yas-text + yas-selected-text + yas-default-from-field + yas-inside-string + yas-unimplemented + yas-define-condition-cache + yas-hippie-try-expand + + ;; debug definitions + ;; yas-debug-snippet-vars + ;; yas-exterminate-package + ;; yas-debug-test + + ;; testing definitions + ;; yas-should-expand + ;; yas-should-not-expand + ;; yas-mock-insert + ;; yas-make-file-or-dirs + ;; yas-variables + ;; yas-saving-variables + ;; yas-call-with-snippet-dirs + ;; yas-with-snippet-dirs +) + "Backported yasnippet symbols. + +They are mapped to \"yas/*\" variants.") + +(dolist (sym yas--backported-syms) + (let ((backported (intern (replace-regexp-in-string "^yas-" "yas/" (symbol-name sym))))) + (when (boundp sym) + (make-obsolete-variable backported sym "yasnippet 0.8") + (defvaralias backported sym)) + (when (fboundp sym) + (make-obsolete backported sym "yasnippet 0.8") + (defalias backported sym)))) + +(defvar yas--exported-syms + (let (exported) + (mapatoms (lambda (atom) + (if (and (or (and (boundp atom) + (not (get atom 'byte-obsolete-variable))) + (and (fboundp atom) + (not (get atom 'byte-obsolete-info)))) + (string-match-p "^yas-[^-]" (symbol-name atom))) + (push atom exported)))) + exported) + "Exported yasnippet symbols. + +i.e. the ones with \"yas-\" single dash prefix. I will try to +keep them in future yasnippet versions and other elisp libraries +can more or less safely rely upon them.") + + +(provide 'yasnippet) +;; Local Variables: +;; coding: utf-8 +;; indent-tabs-mode: nil +;; byte-compile-warnings: (not cl-functions) +;; End: +;;; yasnippet.el ends here diff --git a/.emacs.d/elpa/yasnippet-20160131.948/yasnippet.elc b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet.elc new file mode 100644 index 0000000..1c534f7 Binary files /dev/null and b/.emacs.d/elpa/yasnippet-20160131.948/yasnippet.elc differ diff --git a/.emacs.d/irony/bin/irony-server b/.emacs.d/irony/bin/irony-server new file mode 100755 index 0000000..937f6fc Binary files /dev/null and b/.emacs.d/irony/bin/irony-server differ diff --git a/.emacs.d/snippets/c++-mode/acc b/.emacs.d/snippets/c++-mode/acc new file mode 100644 index 0000000..f234a4c --- /dev/null +++ b/.emacs.d/snippets/c++-mode/acc @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: accumulate +# key: acc +# -- +std::accumulate(${1:v}.begin(), $1.end(), ${2:0}); diff --git a/.emacs.d/snippets/c++-mode/accl b/.emacs.d/snippets/c++-mode/accl new file mode 100644 index 0000000..c712dc1 --- /dev/null +++ b/.emacs.d/snippets/c++-mode/accl @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: accumulate_lambda +# key: accl +# -- +auto acc = [${3:}] (${4:auto} const& ${5:r}, ${6:auto} const& ${7:v}) { + $0 +}; +std::accumulate(${1:v}.begin(), $1.end(), ${2:0}, acc); diff --git a/.emacs.d/snippets/c++-mode/accl~ b/.emacs.d/snippets/c++-mode/accl~ new file mode 100644 index 0000000..a95cd62 --- /dev/null +++ b/.emacs.d/snippets/c++-mode/accl~ @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: accumulate_lambda +# key: accl +# -- +std::accumulate(${1:v}.begin(), $1.end(), ${2:0}, [${3:}] (${4:auto} const& ${5:r}, ${6:auto} const& ${7:v}) { + $0 + }); diff --git a/.emacs.d/snippets/c++-mode/cls b/.emacs.d/snippets/c++-mode/cls new file mode 100644 index 0000000..52178d7 --- /dev/null +++ b/.emacs.d/snippets/c++-mode/cls @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: class +# key: cls +# -- +class ${1:Name} { +public: + ${1:$(yas/substr yas-text "[^: ]*")}(); + ${2:virtual ~${1:$(yas/substr yas-text "[^: ]*")}();} +}; +$0 \ No newline at end of file diff --git a/.emacs.d/snippets/c++-mode/dcast b/.emacs.d/snippets/c++-mode/dcast new file mode 100644 index 0000000..7a53c6c --- /dev/null +++ b/.emacs.d/snippets/c++-mode/dcast @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: dynamic cast +# key: dcast +# -- +dynamic_cast<${1:type}>(${2:v}) diff --git a/.emacs.d/snippets/c++-mode/dpcast b/.emacs.d/snippets/c++-mode/dpcast new file mode 100644 index 0000000..384f202 --- /dev/null +++ b/.emacs.d/snippets/c++-mode/dpcast @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: dynamic pointer cast +# key: dpcast +# -- +std::dynamic_pointer_cast<${1:type}>(${2:v}) diff --git a/.emacs.d/snippets/c++-mode/forc b/.emacs.d/snippets/c++-mode/forc new file mode 100644 index 0000000..f598b12 --- /dev/null +++ b/.emacs.d/snippets/c++-mode/forc @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: for_c +# key: forc +# -- +for (${1:auto} ${2:i}: ${3:v}) { + $0 +} \ No newline at end of file diff --git a/.emacs.d/snippets/c++-mode/scast b/.emacs.d/snippets/c++-mode/scast new file mode 100644 index 0000000..2b042b3 --- /dev/null +++ b/.emacs.d/snippets/c++-mode/scast @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: static cast +# key: scast +# -- +static_cast<${1:type}>(${2:v}) diff --git a/.emacs.d/snippets/c++-mode/sct b/.emacs.d/snippets/c++-mode/sct new file mode 100644 index 0000000..648db90 --- /dev/null +++ b/.emacs.d/snippets/c++-mode/sct @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: struct +# key: sct +# -- +struct ${1:Name} { + ${1:$(yas/substr yas-text "[^: ]*")}(); + ${2:virtual ~${1:$(yas/substr yas-text "[^: ]*")}();} +}; +$0 \ No newline at end of file diff --git a/.emacs.d/snippets/c++-mode/spcast b/.emacs.d/snippets/c++-mode/spcast new file mode 100644 index 0000000..0f9f38d --- /dev/null +++ b/.emacs.d/snippets/c++-mode/spcast @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: static pointer cast +# key: spcast +# -- +std::static_pointer_cast<${1:type}>(${2:v}) diff --git a/.emacs.el b/.emacs.el new file mode 100755 index 0000000..daa782e --- /dev/null +++ b/.emacs.el @@ -0,0 +1,188 @@ +(require 'iso-transl) + +;; Packages +(require 'package) ;; You might already have this line +(add-to-list 'package-archives + '("melpa" . "http://melpa.org/packages/")) +(add-to-list 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/")) +(when (< emacs-major-version 24) + ;; For important compatibility libraries like cl-lib + (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))) +(package-initialize) ;; You might already have this line + +;; Encoding +(set-language-environment "UTF-8") +(delete-selection-mode 1) + +;; Indentation mode +(setq-default indent-tabs-mode nil) +(setq inhibit-startup-screen t) +(setq tab-width 4) + +;; Auto complete + +(yas-global-mode 1) + +(ac-config-default) + +(require 'auto-complete-clang-async) +(add-to-list 'ac-modes 'latex-mode) ; make auto-complete aware of `latex-mode` +(require 'ac-math) + +(defun ac-cc-mode-setup () + (require 'auto-complete-c-headers) + (setq ac-clang-complete-executable "~/.emacs.d/clang-complete") + (setq ac-clang-cflags (list "-std=c++11" "-I../inc")) + (setq ac-sources '(ac-source-clang-async)) + (add-to-list 'ac-sources 'ac-source-c-headers) + (ac-clang-launch-completion-process) + ) + +(defun ac-latex-mode-setup () ; add ac-sources to default ac-sources + (setq ac-sources + (append '(ac-source-math-unicode + ac-source-math-latex + ac-source-latex-commands) + ac-sources)) + ) + +(defun my-ac-config () + (add-hook 'c++-mode-common-hook 'ac-cc-mode-setup) + (add-hook 'c-mode-common-hook 'ac-cc-mode-setup) + (add-hook 'LaTeX-mode-hook 'ac-latex-mode-setup) + (add-hook 'auto-complete-mode-hook 'ac-common-setup) + (global-auto-complete-mode t)) + +(my-ac-config) + +(setq ac-math-unicode-in-math-p t) +(add-to-list 'ac-modes 'org-mode) +(ac-flyspell-workaround) + +;; Latex +(require 'tex-mik) +(setq TeX-auto-save t) +(setq TeX-parse-self t) +(setq-default TeX-master nil) + +(add-hook 'LaTeX-mode-hook 'visual-line-mode) +(add-hook 'LaTeX-mode-hook 'flyspell-mode) +(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) + +(add-hook 'LaTeX-mode-hook 'turn-on-reftex) +(setq reftex-plug-into-AUCTeX t) + +(require 'tex) +(TeX-global-PDF-mode t) + +;; C style +(setq c-default-style "k&r") +(setq c-basic-offset 4) + +;; CSS style +(setq css-indent-offset 2) + +;; No menu, scrollbar, display line and column +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) +(column-number-mode t) +(line-number-mode t) + +;; Markdown mode +(autoload 'markdown-mode "markdown-mode" + "Major mode for editing Markdown files" t) +(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode)) +(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) +(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) + +;; White space mode +(setq whitespace-line-column 100) +(add-hook 'python-mode-hook (lambda () (setq whitespace-line-column 140))) + +(global-whitespace-mode 1) + +;; Electric pair mode +(electric-pair-mode 1) +(show-paren-mode 1) +(setq show-paren-delay 0) + +;; R +(require 'ess-site) + +;; Run C programs directly from within emacs +(setq execute-command nil) +(setq compile-command nil) +(setq execute-buffer-name "*output*") +(setq execute-process-name "execute") + +(defun set-execute-command () + (interactive) + (setq sp (split-string (read-from-minibuffer "Execute command: "))) + (setq execute-command (combine-and-quote-strings (cons (file-truename (car sp)) (cdr sp))))) + +(defun kill-execute-c-program () + (interactive) + (if (get-process execute-process-name) + (delete-process (get-process execute-process-name)))) + +(defun execute-c-program () + (interactive) + (if (not execute-command) (set-execute-command)) + (kill-execute-c-program) + (setq old-buffer (current-buffer)) + (setq output-buffer (get-buffer-create execute-buffer-name)) + (switch-to-buffer-other-window output-buffer) + (end-of-buffer) + (insert (concat (propertize execute-command 'face 'bold) "\n")) + (switch-to-buffer-other-window old-buffer) + (start-process-shell-command execute-process-name execute-buffer-name execute-command) + ) + +(defun set-compile-command () + (interactive) + (setq compile-command (read-from-minibuffer "Compile command: "))) + +(defun compile-c-program () + (interactive) + (if (not compile-command) (set-compile-command)) + (compile compile-command)) + +(defun key-c-mode-setup () + (local-set-key [f1] 'compile-c-program) + (local-set-key [f2] 'execute-c-program) + (local-set-key [f3] 'kill-execute-c-program) + (local-set-key [f4] 'set-execute-command) + (local-set-key [f5] 'set-compile-command)) + +(add-hook 'c++-mode-common-hook 'key-c-mode-setup) +(add-hook 'c-mode-common-hook 'key-c-mode-setup) + +;; Flyspell dictionarie +(defun fd-switch-dictionary () + (interactive) + (let* ((dic ispell-current-dictionary) + (change (if (string= dic "francais") "english" "francais"))) + (ispell-change-dictionary change) + (message "Dictionary switched from %s to %s" dic change) + )) + +(defun key-latex-mode-setup () + (local-set-key [f8] 'fd-switch-dictionary)) + +(add-hook 'LaTeX-mode-hook 'key-latex-mode-setup) + +;; CUSTOM EMACS +(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. + '(safe-local-variable-values (quote ((encoding . utf-8))))) +(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. + )