<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikemacs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rosaly</id>
	<title>WikEmacs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wikemacs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rosaly"/>
	<link rel="alternate" type="text/html" href="https://wikemacs.org/wiki/Special:Contributions/Rosaly"/>
	<updated>2026-04-27T12:35:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wikemacs.org/index.php?title=Emacs_Lisp&amp;diff=47152</id>
		<title>Emacs Lisp</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Emacs_Lisp&amp;diff=47152"/>
		<updated>2015-10-28T19:22:09Z</updated>

		<summary type="html">&lt;p&gt;Rosaly: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox major-mode&lt;br /&gt;
|title = Emacs Lisp&lt;br /&gt;
|library = lisp-mode&lt;br /&gt;
|command = emacs-lisp-mode&lt;br /&gt;
|builtin = yes&lt;br /&gt;
|auto activates = *.el, .emacs, _emacs&lt;br /&gt;
}}&lt;br /&gt;
'''Emacs Lisp''' is a dialect of the [[Lisp]] programming language used by GNU Emacs. Most of the editing functionality built into Emacs is written in Emacs Lisp, with the remainder being written in C (as is the Lisp interpreter itself). Users of Emacs commonly write Emacs Lisp code to customize and extend Emacs.&lt;br /&gt;
&lt;br /&gt;
Emacs Lisp is also commonly referred to as &amp;quot;elisp&amp;quot; or &amp;quot;Elisp&amp;quot;. Files containing Emacs Lisp code use the &amp;lt;tt&amp;gt;.el&amp;lt;/tt&amp;gt; filename suffix; when [[byte-compile]]d, the same filename prefix is used but with the &amp;lt;tt&amp;gt;.elc&amp;lt;/tt&amp;gt; filename suffix.&lt;br /&gt;
&lt;br /&gt;
Emacs Lisp is a [https://hornbeck.wordpress.com/2009/07/05/lisp-1-vs-lisp-2/ Lisp-2], which means that a single identifier (in Lisp terminology, &amp;quot;symbol&amp;quot;) can simultaneously exist as (&amp;quot;be bound to&amp;quot;) both a function and a variable.&lt;br /&gt;
&lt;br /&gt;
== Basic setup ==&lt;br /&gt;
&lt;br /&gt;
You can customize the way Emacs edits and displays this and all other [[:Category:Lisp|lisp languages]] with  {{CustomizeGroup|lisp}}.&lt;br /&gt;
&lt;br /&gt;
== Helpful keybindings ==&lt;br /&gt;
&lt;br /&gt;
; {{Keys|M-TAB}}&lt;br /&gt;
: Complete at point&lt;br /&gt;
&lt;br /&gt;
; {{Keys|C-M-q}}&lt;br /&gt;
: Indent the [[S-expression]] following [[point and mark|point]]&lt;br /&gt;
&lt;br /&gt;
; {{Keys|C-M-x}}&lt;br /&gt;
: Evaluate the &amp;lt;code&amp;gt;defun&amp;lt;/code&amp;gt; at [[point and mark|point]]&lt;br /&gt;
&lt;br /&gt;
== Common customizations ==&lt;br /&gt;
&lt;br /&gt;
=== Outlining ===&lt;br /&gt;
&lt;br /&gt;
For [[Org]]-style outlining, add the following snippet to your {{EmacsConfigFile}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
;; Turn on outline minor mode&lt;br /&gt;
(add-hook 'emacs-lisp-mode-hook  'outline-minor-mode)&lt;br /&gt;
&lt;br /&gt;
;; Add key bindings for Org-style outline cycling&lt;br /&gt;
(add-hook 'outline-minor-mode-hook&lt;br /&gt;
  (lambda ()&lt;br /&gt;
    (define-key outline-minor-mode-map [(control tab)] 'org-cycle)&lt;br /&gt;
    (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle)))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now visit any elisp file (say {{Command|find-library RET outline}}) and keep pressing {{Keys|S-TAB}} and see what happens.  Experiment similarly with {{Keys|C-TAB}}.&lt;br /&gt;
&lt;br /&gt;
=== Indentation ===&lt;br /&gt;
&lt;br /&gt;
Add the following snippet to your {{EmacsConfigFile}}, so that you don't have to indent deliberately. See {{Command|reindent-then-newline-and-indent}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(add-hook 'emacs-lisp-mode-hook&lt;br /&gt;
	  (lambda nil&lt;br /&gt;
	    (local-set-key [(return)] 'reindent-then-newline-and-indent)))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Always keep parentheses balanced ===&lt;br /&gt;
&lt;br /&gt;
See [[Skeleton#Keep some chars always balanced]]&lt;br /&gt;
&lt;br /&gt;
=== Scope ===&lt;br /&gt;
By default elisp uses [[dynamic scope]]. Since Emacs 24 [[lexical scope]] has been added. &amp;lt;br/&amp;gt;&lt;br /&gt;
To use lexical binding, an Emacs-lisp source file must set a file-variable {{Variable|lexical-binding}} to &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt; in the file header, e.g., by using a first line like: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ;;; -*- lexical-binding: t -*-&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
=== Lisp editing ===&lt;br /&gt;
[[lisp editing]] here on wikemacs.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.gnu.org/software/emacs/manual/html_node/elisp/index.html Emacs Lisp manual]&lt;br /&gt;
* [http://libreplanet.org/wiki/Programming_in_elisp Programming in elisp], libreplanet.org wiki&lt;br /&gt;
* [http://www.nongnu.org/emacs-tiny-tools/elisp-coding/ Rules on Elisp coding], on nongnu.org&lt;br /&gt;
* [https://github.com/bbatsov/emacs-lisp-style-guide Emacs Lisp Style Guide], on Github&lt;br /&gt;
&lt;br /&gt;
[[Category:Lisp]]&lt;br /&gt;
[[Category:Emacs Lisp]]&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Programming languages]]&lt;/div&gt;</summary>
		<author><name>Rosaly</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Lexical_scope&amp;diff=47151</id>
		<title>Lexical scope</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Lexical_scope&amp;diff=47151"/>
		<updated>2015-10-28T19:19:22Z</updated>

		<summary type="html">&lt;p&gt;Rosaly: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Emacs_Lisp#Scope|'''Lexical scope''']] in general is the idea that:&lt;br /&gt;
&lt;br /&gt;
*an identifier at a particular place in a program always refers to the same variable location — where “always” means “every time that the containing expression is executed”, and that&lt;br /&gt;
*the variable location to which it refers can be determined by static examination of the source code context in which that identifier appears, without having to consider the flow of execution through the program as a whole.&lt;br /&gt;
&lt;br /&gt;
In practice, lexical scoping is the norm for most programming languages, and probably corresponds to what you would intuitively consider to be “normal”. You may even be wondering how the situation could possibly — and usefully — be otherwise.&lt;/div&gt;</summary>
		<author><name>Rosaly</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Lexical_scope&amp;diff=47150</id>
		<title>Lexical scope</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Lexical_scope&amp;diff=47150"/>
		<updated>2015-10-28T19:14:54Z</updated>

		<summary type="html">&lt;p&gt;Rosaly: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Lexical scope''' in general is the idea that:&lt;br /&gt;
&lt;br /&gt;
*an identifier at a particular place in a program always refers to the same variable location — where “always” means “every time that the containing expression is executed”, and that&lt;br /&gt;
*the variable location to which it refers can be determined by static examination of the source code context in which that identifier appears, without having to consider the flow of execution through the program as a whole.&lt;br /&gt;
&lt;br /&gt;
In practice, lexical scoping is the norm for most programming languages, and probably corresponds to what you would intuitively consider to be “normal”. You may even be wondering how the situation could possibly — and usefully — be otherwise.&lt;br /&gt;
&lt;br /&gt;
Put&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
;;; -*- lexical-binding: t; -*-&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
at the top of a file to enable lexical scope for that file.&lt;/div&gt;</summary>
		<author><name>Rosaly</name></author>
	</entry>
	<entry>
		<id>https://wikemacs.org/index.php?title=Zygospore&amp;diff=47149</id>
		<title>Zygospore</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Zygospore&amp;diff=47149"/>
		<updated>2015-10-28T19:11:01Z</updated>

		<summary type="html">&lt;p&gt;Rosaly: Created page with &amp;quot;{{Package |name=Zygospore |description=reversible C-x 1 (delete-other-windows) |author=Louis Kottmann |maintainer=Louis Kottmann |source=https://github.com/LouisKottmann/zygos...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Package&lt;br /&gt;
|name=Zygospore&lt;br /&gt;
|description=reversible C-x 1 (delete-other-windows)&lt;br /&gt;
|author=Louis Kottmann&lt;br /&gt;
|maintainer=Louis Kottmann&lt;br /&gt;
|source=https://github.com/LouisKottmann/zygospore.el&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A simple package for undoing the delete-other-windows command. Convenient for needing more space in one buffer temporarily or not having to worry about losing a specific setup.&lt;br /&gt;
&lt;br /&gt;
= Basic setup =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lisp&amp;quot;&amp;gt;&lt;br /&gt;
(global-set-key (kbd &amp;quot;C-x 1&amp;quot;) 'zygospore-toggle-delete-other-windows)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Third Party Package]]&lt;/div&gt;</summary>
		<author><name>Rosaly</name></author>
	</entry>
</feed>