Difference between revisions of "Emacs Lisp Cheat Sheet"
Jump to navigation
Jump to search
Line 30: | Line 30: | ||
==Standard Library== | ==Standard Library== | ||
+ | |||
+ | === Number === | ||
+ | |||
+ | === Character === | ||
+ | |||
+ | === String === | ||
+ | |||
+ | === List === | ||
+ | |||
+ | === Vector === | ||
+ | |||
+ | === Sequence === | ||
+ | |||
+ | === Hash Tables === | ||
+ | |||
+ | === Symbols === | ||
+ | |||
+ | === Minibuffer === | ||
+ | |||
+ | === Keymaps === | ||
+ | |||
+ | === File === | ||
=== Buffer === | === Buffer === | ||
Line 54: | Line 76: | ||
| Creating Buffers || get-buffer-creat generate-new-buffer | | Creating Buffers || get-buffer-creat generate-new-buffer | ||
|- | |- | ||
− | | Killing Buffers || kill-buffer kill-buffer-query-function ''kill-buffer-hook'' ''buffer-offer-save | + | | Killing Buffers || kill-buffer kill-buffer-query-function ''kill-buffer-hook'' ''buffer-offer-save'' buffer-save-without-query buffer-live-p |
|- | |- | ||
| Indirect Buffers || make-indirect-buffer clone-indirect-buffer buffer-base-buffer | | Indirect Buffers || make-indirect-buffer clone-indirect-buffer buffer-base-buffer | ||
Line 63: | Line 85: | ||
|} | |} | ||
+ | === Windows === | ||
+ | |||
+ | === Frames === | ||
+ | |||
+ | === Positons === | ||
+ | |||
+ | === Marker === | ||
+ | |||
+ | === Text (unfinished) === | ||
+ | '''Text''' is manipulated through '''Buffer''' object with '''point''' and '''marker'''. | ||
+ | {| class="wikitable" | ||
+ | |+ Text related function and ''Vairalbe'' | ||
+ | |- | ||
+ | | Category || Function ''Variable'' | ||
+ | |- | ||
+ | | Near Point || char-after char-before following-char preceding-char bobp eobp bolp eolp | ||
+ | |- | ||
+ | | Examining Buffer Contents || buffer-substring buffer-substring-no-properties buffer-string filter-buffer-substring ''filter-buffer-substring-function'' ''buffer-substring-filters'' current-word thing-at-point | ||
+ | |- | ||
+ | | Comparing Text || compare-buffer-substrings | ||
+ | |- | ||
+ | | Inserting Text || insert insert-before-markers insert-char insert-buffer-substring insert-buffer-substring-no-properties | ||
+ | |- | ||
+ | | User-Level Insertion Commands || insert-buffer self-insert-command newline ''overwrite-mode'' | ||
+ | |- | ||
+ | | Deleting Text || erase-buffer delete-region delete-and-extract-region delete-char delete-backward-char backwar-delete-char-untabify ''backward-delete-char-untabify-method'' | ||
+ | |- | ||
+ | | User-Level Deletion Commands || delete-horizontal-space delete-indentation fixup-whitespace just-one-space delete-blank-lines | ||
+ | |} | ||
[[Category:Emacs Lisp]] | [[Category:Emacs Lisp]] |
Revision as of 13:18, 5 April 2012
Special form
special form has its own rule for which arguments are evaluated
Purpose | Forms |
Definition | defconst defun defvar |
Binding constructs | let let* function |
Conditional evaluation | and cond if or |
Sequential evaluation | prog1 prog2 progn |
Iteration | while function |
Syntactic extension | defmacro |
Quoting | quote |
Assignment | setq setq-default |
Nonlocal Exits | catch condition-case unwind-protect |
Save | save-current-buffer save-excursion save-restriction save-window-excursion |
Other | interactive track-mouse with-output-to-temp-buffer |
Standard Library
Number
Character
String
List
Vector
Sequence
Hash Tables
Symbols
Minibuffer
Keymaps
File
Buffer
buffer is a lisp object containing text to be edited
Category | Functions Variable |
Basic | bufferp current-buffer set-buffer save-current-buffer with-current-buffer with-temp-buffer |
Buffer Names | buffer-name rename-buffer get-buffer generate-new-buffer-name |
Buffer File Name | buffer-file-name buffer-file-name buffer-file-truename buffer-file-number get-file-buffer find-buffer-visting set-visted-file-name list-buffers-directory |
Buffer Modification | buffer-modified-p set-buffer-modified-p restore-buffer-modified-p not-modified buffer-modified-tick buffer-chars-modified-tick |
Buffer Modification Time | verify-visited-file-modtime clear-visited-file-modtime visited-file-modtime set-visited-file-modtime ask-user-about-supersession-threat |
Read-Only Buffers | buffer-read-only inhibit-read-only toggle-read-only barf-if-buffer-read-only |
Buffer List | buffer-list other-buffer last-buffer bury-buffer unbury-buffer |
Creating Buffers | get-buffer-creat generate-new-buffer |
Killing Buffers | kill-buffer kill-buffer-query-function kill-buffer-hook buffer-offer-save buffer-save-without-query buffer-live-p |
Indirect Buffers | make-indirect-buffer clone-indirect-buffer buffer-base-buffer |
Swapping Text Between Two Buffers | buffer-swap-text |
Buffer Gap | gap-position gap-size |
Windows
Frames
Positons
Marker
Text (unfinished)
Text is manipulated through Buffer object with point and marker.
Category | Function Variable |
Near Point | char-after char-before following-char preceding-char bobp eobp bolp eolp |
Examining Buffer Contents | buffer-substring buffer-substring-no-properties buffer-string filter-buffer-substring filter-buffer-substring-function buffer-substring-filters current-word thing-at-point |
Comparing Text | compare-buffer-substrings |
Inserting Text | insert insert-before-markers insert-char insert-buffer-substring insert-buffer-substring-no-properties |
User-Level Insertion Commands | insert-buffer self-insert-command newline overwrite-mode |
Deleting Text | erase-buffer delete-region delete-and-extract-region delete-char delete-backward-char backwar-delete-char-untabify backward-delete-char-untabify-method |
User-Level Deletion Commands | delete-horizontal-space delete-indentation fixup-whitespace just-one-space delete-blank-lines |