Skip to content

Commit 3984c7c

Browse files
committed
update
1 parent 6d8b84d commit 3984c7c

20 files changed

+4442
-3070
lines changed

index.html

Lines changed: 428 additions & 448 deletions
Large diffs are not rendered by default.

starter-kit-bindings.html

Lines changed: 181 additions & 194 deletions
Large diffs are not rendered by default.

starter-kit-defuns.html

Lines changed: 150 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,117 @@
1-
<?xml version="1.0" encoding="iso-8859-1"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
44
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
55
<head>
66
<title>Starter Kit Defuns</title>
7-
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
8-
<meta name="title" content="Starter Kit Defuns"/>
9-
<meta name="generator" content="Org-mode"/>
10-
<meta name="generated" content="2011-12-23 11:23:57 MST"/>
11-
<meta name="author" content="Eric Schulte"/>
12-
<meta name="description" content=""/>
13-
<meta name="keywords" content=""/>
7+
<!-- 2014-10-13 Mon 22:00 -->
8+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
9+
<meta name="generator" content="Org-mode" />
1410
<style type="text/css">
1511
<!--/*--><![CDATA[/*><!--*/
16-
html { font-family: Times, serif; font-size: 12pt; }
1712
.title { text-align: center; }
18-
.todo { color: red; }
13+
.todo { font-family: monospace; color: red; }
1914
.done { color: green; }
20-
.tag { background-color: #add8e6; font-weight:normal }
21-
.target { }
15+
.tag { background-color: #eee; font-family: monospace;
16+
padding: 2px; font-size: 80%; font-weight: normal; }
2217
.timestamp { color: #bebebe; }
2318
.timestamp-kwd { color: #5f9ea0; }
24-
.right {margin-left:auto; margin-right:0px; text-align:right;}
25-
.left {margin-left:0px; margin-right:auto; text-align:left;}
26-
.center {margin-left:auto; margin-right:auto; text-align:center;}
27-
p.verse { margin-left: 3% }
19+
.right { margin-left: auto; margin-right: 0px; text-align: right; }
20+
.left { margin-left: 0px; margin-right: auto; text-align: left; }
21+
.center { margin-left: auto; margin-right: auto; text-align: center; }
22+
.underline { text-decoration: underline; }
23+
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
24+
p.verse { margin-left: 3%; }
2825
pre {
29-
border: 1pt solid #AEBDCC;
30-
background-color: #F3F5F7;
31-
padding: 5pt;
32-
font-family: courier, monospace;
33-
font-size: 90%;
34-
overflow:auto;
26+
border: 1px solid #ccc;
27+
box-shadow: 3px 3px 3px #eee;
28+
padding: 8pt;
29+
font-family: monospace;
30+
overflow: auto;
31+
margin: 1.2em;
3532
}
36-
table { border-collapse: collapse; }
37-
td, th { vertical-align: top; }
38-
th.right { text-align:center; }
39-
th.left { text-align:center; }
40-
th.center { text-align:center; }
41-
td.right { text-align:right; }
42-
td.left { text-align:left; }
43-
td.center { text-align:center; }
33+
pre.src {
34+
position: relative;
35+
overflow: visible;
36+
padding-top: 1.2em;
37+
}
38+
pre.src:before {
39+
display: none;
40+
position: absolute;
41+
background-color: white;
42+
top: -10px;
43+
right: 10px;
44+
padding: 3px;
45+
border: 1px solid black;
46+
}
47+
pre.src:hover:before { display: inline;}
48+
pre.src-sh:before { content: 'sh'; }
49+
pre.src-bash:before { content: 'sh'; }
50+
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
51+
pre.src-R:before { content: 'R'; }
52+
pre.src-perl:before { content: 'Perl'; }
53+
pre.src-java:before { content: 'Java'; }
54+
pre.src-sql:before { content: 'SQL'; }
55+
56+
table { border-collapse:collapse; }
57+
caption.t-above { caption-side: top; }
58+
caption.t-bottom { caption-side: bottom; }
59+
td, th { vertical-align:top; }
60+
th.right { text-align: center; }
61+
th.left { text-align: center; }
62+
th.center { text-align: center; }
63+
td.right { text-align: right; }
64+
td.left { text-align: left; }
65+
td.center { text-align: center; }
4466
dt { font-weight: bold; }
45-
div.figure { padding: 0.5em; }
46-
div.figure p { text-align: center; }
47-
div.inlinetask {
48-
padding:10px;
49-
border:2px solid gray;
50-
margin:10px;
67+
.footpara:nth-child(2) { display: inline; }
68+
.footpara { display: block; }
69+
.footdef { margin-bottom: 1em; }
70+
.figure { padding: 1em; }
71+
.figure p { text-align: center; }
72+
.inlinetask {
73+
padding: 10px;
74+
border: 2px solid gray;
75+
margin: 10px;
5176
background: #ffffcc;
5277
}
78+
#org-div-home-and-up
79+
{ text-align: right; font-size: 70%; white-space: nowrap; }
5380
textarea { overflow-x: auto; }
54-
.linenr { font-size:smaller }
55-
.code-highlighted {background-color:#ffff00;}
56-
.org-info-js_info-navigation { border-style:none; }
57-
#org-info-js_console-label { font-size:10px; font-weight:bold;
58-
white-space:nowrap; }
59-
.org-info-js_search-highlight {background-color:#ffff00; color:#000000;
60-
font-weight:bold; }
81+
.linenr { font-size: smaller }
82+
.code-highlighted { background-color: #ffff00; }
83+
.org-info-js_info-navigation { border-style: none; }
84+
#org-info-js_console-label
85+
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
86+
.org-info-js_search-highlight
87+
{ background-color: #ffff00; color: #000000; font-weight: bold; }
6188
/*]]>*/-->
62-
</style><link rel="stylesheet" href="emacs.css" type="text/css"/>
63-
<style type="text/css">
64-
pre{background:#232323; color:#E6E1DC;}
65-
code{font-size:10pt; color:#353535;}
66-
.outline-text-2{margin-left: 1em;}
67-
.outline-text-3{margin-left: 2em;}
68-
.outline-text-3{margin-left: 3em;}
6989
</style>
7090
<script type="text/javascript">
91+
/*
92+
@licstart The following is the entire license notice for the
93+
JavaScript code in this tag.
94+
95+
Copyright (C) 2012-2013 Free Software Foundation, Inc.
96+
97+
The JavaScript code in this tag is free software: you can
98+
redistribute it and/or modify it under the terms of the GNU
99+
General Public License (GNU GPL) as published by the Free Software
100+
Foundation, either version 3 of the License, or (at your option)
101+
any later version. The code is distributed WITHOUT ANY WARRANTY;
102+
without even the implied warranty of MERCHANTABILITY or FITNESS
103+
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
104+
105+
As additional permission under GNU GPL version 3 section 7, you
106+
may distribute non-source (e.g., minimized or compacted) forms of
107+
that code without the copy of the GNU GPL normally required by
108+
section 4, provided you include this license notice and a URL
109+
through which recipients can access the Corresponding Source.
110+
111+
112+
@licend The above is the entire license notice
113+
for the JavaScript code in this tag.
114+
*/
71115
<!--/*--><![CDATA[/*><!--*/
72116
function CodeHighlightOn(elem, id)
73117
{
@@ -89,77 +133,98 @@
89133
}
90134
/*]]>*///-->
91135
</script>
92-
93136
</head>
94137
<body>
95-
96-
<div id="preamble">
97-
98-
</div>
99-
100138
<div id="content">
101139
<h1 class="title">Starter Kit Defuns</h1>
102-
103-
<p>This is part of the <a href="starter-kit.html">Emacs Starter Kit</a>.
140+
<p>
141+
This is part of the <a href="starter-kit.html">Emacs Starter Kit</a>.
104142
</p>
105143

106-
<div id="outline-container-1" class="outline-2">
144+
<div id="outline-container-sec-1" class="outline-2">
107145
<h2 id="sec-1">The starter-kit-coding-hook:</h2>
108146
<div class="outline-text-2" id="text-1">
109-
110-
<p>A single hook holding those functions which should be run in <b>every</b>
147+
<p>
148+
A single hook holding those functions which should be run in <b>every</b>
111149
code buffer.
112150
</p>
151+
113152
<p>
114153
We have a number of turn-on-* functions since it's advised that lambda
115154
functions not go in hooks. Repeatedly evaling an add-to-list with a
116155
hook value will repeatedly add it since there's no way to ensure that
117156
a lambda doesn't already exist in the list.
118157
</p>
119158

159+
<div class="org-src-container">
120160

161+
<pre class="src src-emacs-lisp" id="starter-kit-hook-functions">(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">starter-kit-local-column-number-mode</span> ()
162+
(make-local-variable 'column-number-mode)
163+
(column-number-mode t))
121164

122-
<pre class="src src-emacs-lisp"><span class="org-starter-kit-paren">(</span><span class="org-keyword">defun</span> <span class="org-function-name">starter-kit-local-column-number-mode</span> <span class="org-starter-kit-paren">()</span>
123-
<span class="org-starter-kit-paren">(</span>make-local-variable 'column-number-mode<span class="org-starter-kit-paren">)</span>
124-
<span class="org-starter-kit-paren">(</span>column-number-mode t<span class="org-starter-kit-paren">))</span>
165+
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">starter-kit-local-comment-auto-fill</span> ()
166+
(set (make-local-variable 'comment-auto-fill-only-comments) t)
167+
(auto-fill-mode t))
125168

126-
<span class="org-starter-kit-paren">(</span><span class="org-keyword">defun</span> <span class="org-function-name">starter-kit-local-comment-auto-fill</span> <span class="org-starter-kit-paren">()</span>
127-
<span class="org-starter-kit-paren">(</span>set <span class="org-starter-kit-paren">(</span>make-local-variable 'comment-auto-fill-only-comments<span class="org-starter-kit-paren">)</span> t<span class="org-starter-kit-paren">)</span>
128-
<span class="org-starter-kit-paren">(</span>auto-fill-mode t<span class="org-starter-kit-paren">))</span>
169+
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">starter-kit-turn-on-save-place-mode</span> ()
170+
(setq save-place t))
129171

130-
<span class="org-starter-kit-paren">(</span><span class="org-keyword">defun</span> <span class="org-function-name">starter-kit-turn-on-save-place-mode</span> <span class="org-starter-kit-paren">()</span>
131-
<span class="org-starter-kit-paren">(</span>setq save-place t<span class="org-starter-kit-paren">))</span>
132-
133-
<span class="org-starter-kit-paren">(</span><span class="org-keyword">defun</span> <span class="org-function-name">starter-kit-turn-on-whitespace</span> <span class="org-starter-kit-paren">()</span>
134-
<span class="org-starter-kit-paren">(</span>whitespace-mode t<span class="org-starter-kit-paren">))</span>
172+
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">starter-kit-turn-on-whitespace</span> ()
173+
(whitespace-mode t))
135174
</pre>
175+
</div>
136176

177+
<div class="org-src-container">
137178

138-
139-
<pre class="src src-emacs-lisp"><span class="org-starter-kit-paren">(</span>add-hook 'starter-kit-coding-hook 'starter-kit-local-column-number-mode<span class="org-starter-kit-paren">)</span>
179+
<pre class="src src-emacs-lisp" id="starter-kit-add-local-column-number-mode">(add-hook 'starter-kit-coding-hook 'starter-kit-local-column-number-mode)
140180
</pre>
181+
</div>
141182

183+
<div class="org-src-container">
142184

143-
144-
<pre class="src src-emacs-lisp"><span class="org-starter-kit-paren">(</span>add-hook 'starter-kit-coding-hook 'starter-kit-local-comment-auto-fill<span class="org-starter-kit-paren">)</span>
185+
<pre class="src src-emacs-lisp" id="start-kit-add-local-comment-auto-fill">(add-hook 'starter-kit-coding-hook 'starter-kit-local-comment-auto-fill)
145186
</pre>
187+
</div>
146188

189+
<div class="org-src-container">
147190

148-
149-
<pre class="src src-emacs-lisp"><span class="org-starter-kit-paren">(</span><span class="org-keyword">when</span> <span class="org-starter-kit-paren">(</span>window-system<span class="org-starter-kit-paren">)</span>
150-
<span class="org-starter-kit-paren">(</span>add-hook 'starter-kit-coding-hook 'starter-kit-pretty-lambdas<span class="org-starter-kit-paren">))</span>
191+
<pre class="src src-emacs-lisp" id="starter-kit-add-pretty-lambdas">(<span style="font-weight: bold;">when</span> (window-system)
192+
(add-hook 'starter-kit-coding-hook 'starter-kit-pretty-lambdas))
151193
</pre>
194+
</div>
152195

196+
<div class="org-src-container">
153197

154-
155-
<pre class="src src-emacs-lisp"><span class="org-starter-kit-paren">(</span><span class="org-keyword">defun</span> <span class="org-function-name">run-starter-kit-coding-hook</span> <span class="org-starter-kit-paren">()</span>
156-
<span class="org-doc">"Enable things that are convenient across all coding buffers."</span>
157-
<span class="org-starter-kit-paren">(</span>run-hooks 'starter-kit-coding-hook<span class="org-starter-kit-paren">))</span>
198+
<pre class="src src-emacs-lisp" id="starter-kit-run-starter-kit-coding-hook">(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">run-starter-kit-coding-hook</span> ()
199+
<span style="font-style: italic;">"Enable things that are convenient across all coding buffers."</span>
200+
(run-hooks 'starter-kit-coding-hook))
158201
</pre>
202+
</div>
159203

204+
<div class="org-src-container">
205+
206+
<pre class="src src-emacs-lisp" id="starter-kit-recentf-ido-find-file">(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">recentf-ido-find-file</span> ()
207+
<span style="font-style: italic;">"Find a recent file using Ido."</span>
208+
(interactive)
209+
(<span style="font-weight: bold;">let*</span> ((file-assoc-list
210+
(mapcar (<span style="font-weight: bold;">lambda</span> (x)
211+
(cons (file-name-nondirectory x)
212+
x))
213+
recentf-list))
214+
(filename-list
215+
(remove-duplicates (mapcar #'car file-assoc-list)
216+
<span style="font-weight: bold;">:test</span> #'string=))
217+
(filename (ido-completing-read <span style="font-style: italic;">"Choose recent file: "</span>
218+
filename-list
219+
nil
220+
t)))
221+
(<span style="font-weight: bold;">when</span> filename
222+
(find-file (cdr (assoc filename
223+
file-assoc-list))))))
224+
</pre>
225+
</div>
160226
</div>
161227
</div>
162228
</div>
163-
164229
</body>
165230
</html>

0 commit comments

Comments
 (0)