* Adjustments to fix made for issue 90, faq updated

* Added google analytics tracking to html docs (experimental)
This commit is contained in:
capitaomorte 2009-09-09 16:55:56 +00:00
parent a993b9b4f6
commit 931253f9b8
11 changed files with 150 additions and 16 deletions

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>ChangeLog</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
</head>
@ -355,6 +355,16 @@ details.</li>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>Moved</title>
<meta content="3; URL=index.html" http-equiv="Refresh" />
<link rel="stylesheet" href="styles.css" type="text/css" />
@ -63,6 +63,16 @@ does not automatically redirect you</p>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>Frequently Asked Questions</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
</head>
@ -132,8 +132,26 @@ latter's <tt class="docutils literal"><span class="pre">priority</span></tt> pro
emacs-lisp and can solve this problem, drop a line in the <a class="reference external" href="http://groups.google.com/group/smart-snippet">discussion
group</a>.</p>
</div>
<div class="section" id="how-do-i-turn-off-the-minor-mode-where-in-some-buffers">
<h1>How do I turn off the minor mode where in some buffers</h1>
<p>The best way, since version 0.6.1c, is to set the default value of the
variable <tt class="docutils literal"><span class="pre">yas/dont-activate</span></tt> to a lambda function like so:</p>
<div class="highlight"><pre>(set-default &#39;yas/dont-activate
#&#39;(lambda ()
(and yas/root-directory
(null (yas/get-snippet-tables)))))
</pre></div>
<p>This is also the default value starting for that version. It skips the
minor mode in buffers where it is not applicable (no snippet tables),
but only once you have setup your yas/root-directory.</p>
</div>
<div class="section" id="how-do-i-define-an-abbrev-key-containing-characters-not-supported-by-the-filesystem">
<h1>How do I define an abbrev key containing characters not supported by the filesystem?</h1>
<dl class="docutils">
<dt><strong>Note</strong>: This question applies if you're still defining snippets</dt>
<dd>whose key <em>is</em> the filename. This is behavior stil provided by
version 0.6 for backward compatibilty, but is somewhat deprecated...</dd>
</dl>
<p>For example, you want to define a snippet by the key <tt class="docutils literal"><span class="pre">&lt;</span></tt> which is
not a valid character for filename on Windows. This means you can't
use the filename as a trigger key in this case.</p>
@ -153,6 +171,16 @@ valid filename, <tt class="docutils literal"><span class="pre">lt.yasnippet</spa
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>

View File

@ -1,6 +1,6 @@
==========================
Frequently Asked Questions
==========================
============================
Frequently Asked Questions
============================
Why is there an extra newline?
==============================
@ -102,9 +102,31 @@ latter's ``priority`` property to something big. If you know
emacs-lisp and can solve this problem, drop a line in the `discussion
group`_.
How do I turn off the minor mode where in some buffers
======================================================
The best way, since version 0.6.1c, is to set the default value of the
variable ``yas/dont-activate`` to a lambda function like so:
.. sourcecode:: lisp
(set-default 'yas/dont-activate
#'(lambda ()
(and yas/root-directory
(null (yas/get-snippet-tables)))))
This is also the default value starting for that version. It skips the
minor mode in buffers where it is not applicable (no snippet tables),
but only once you have setup your yas/root-directory.
How do I define an abbrev key containing characters not supported by the filesystem?
====================================================================================
**Note**: This question applies if you're still defining snippets
whose key *is* the filename. This is behavior stil provided by
version 0.6 for backward compatibilty, but is somewhat deprecated...
For example, you want to define a snippet by the key ``<`` which is
not a valid character for filename on Windows. This means you can't
use the filename as a trigger key in this case.

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>Yet Another Snippet extension</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
</head>
@ -186,6 +186,16 @@ including snippets, please post to the <a class="reference external" href="http:
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>Writing snippets</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
</head>
@ -597,6 +597,16 @@ that.</p>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>

View File

@ -415,6 +415,16 @@ Emacs's syntax rule mean.</p>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>

View File

@ -126,6 +126,16 @@ variables.</p>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>

View File

@ -273,6 +273,16 @@ trigger.</p>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>

View File

@ -54,4 +54,14 @@
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%%3E%%3C/script%%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
%(body_suffix)s

View File

@ -649,27 +649,27 @@ Here's an example:
["Wrap region in exit marker"
(setq yas/wrap-around-region
(not yas/wrap-around-region))
:help "If t automatically wrap the selected text in the $0 snippet exit"
: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 t allow snippets to be triggered inside other snippet fields"
: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 t allow snippets to become active again after undo"
: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 t don't raise errors in bad embedded eslip in snippets"
:help "If non-nil don't raise errors in bad embedded eslip in snippets"
:style toggle :selected yas/good-grace]
["Ignore filenames as triggers"
(setq yas/ignore-filenames-as-triggers
(not yas/ignore-filenames-as-triggers))
:help "If t don't derive tab triggers from filenames"
:help "If non-nil don't derive tab triggers from filenames"
:style toggle :selected yas/ignore-filenames-as-triggers]
)
"----"
@ -737,7 +737,9 @@ Key bindings:
(> (hash-table-count yas/snippet-tables) 0))
(yas/reload-all))))
(defvar yas/dont-activate nil
(defvar yas/dont-activate #'(lambda ()
(and yas/root-directory
(null (yas/get-snippet-tables))))
"If non-nil don't let `yas/minor-mode-on' active yas for this buffer.
`yas/minor-mode-on' is usually called by `yas/global-mode' so
@ -752,8 +754,10 @@ behaviour.")
Do this unless `yas/dont-activate' is t or the function
`yas/get-snippet-tables' (which see), returns an empty list."
(interactive)
(unless (or yas/dont-activate
(null (yas/get-snippet-tables)))
(unless (or (and (functionp yas/dont-activate)
(funcall yas/dont-activate))
(and (not (functionp yas/dont-activate))
yas/dont-activate))
(yas/minor-mode 1)))
(defun yas/minor-mode-off ()