es-lib

https://github.com/sabof/es-lib.git

git clone 'git://github.com/sabof/es-lib.git'
12

es-lib

A collecton of emacs utilities, and basis for several of my packages. Here are some highlights:

Packages:

Functions:

Index:

Auto-generated before each commit. Total items in the library: 100

Table of contents:

es-lib-buffer-local-set-key

Defvars:

Non-interactive:

es-lib-core-functions

Defvars:

Commands:

Set ack root directory for one buffer only.
Ack won't prompt for a directory name in that buffer.
Repalace symbol at point, or region contents in multiple
files.

(fn FROM-SYMBOL-OR-STRING TO-SYMBOL-OR-STRING &key DIRECTORY AUTO-SAVE FINISH-FUNC SILENT)
A simplee version of expand-region for c-like languages.
Marks the symbol on first call, then marks the statement.
Insert a figlet-formatted phrase at point:
 _____ _       _      _
|  ___(_) __ _| | ___| |_
| |_  | |/ _` | |/ _ \ __|
|  _| | | (_| | |  __/ |_
|_|   |_|\__, |_|\___|\__|
         |___/
Fixup white space between objects around point.
Leave one space or none, according to the context.

An improvment over the built-in fixup-whitespace.
You might want to do (defalias 'fixup-whitespace 'es-fixup-whitespace)
Like `highlight-symbol-at-point', but will also (un)highlight a phrase if the region is active.
Choose from a concatenated list of buffers and recent files.
end-of-line + newline.
Similar to what happends when emacs is about to quit.
beginning-of-line + open line.

Non-interactive:

Insert THING at end of line.
If the line is empty, insert at the end of next line.
Will omit special and tag buffers.
Syntax example:
(es-define-keys fundamental-mode-map
  (kbd "h") 'backward-char
  (kbd "l") 'forward-char)
 Returns the keymap in the end.

(fn KEYMAP &rest BINDINGS)
Multiple duplicates will be listed muliple times.
The "originals" won't be included.
Return all windows from all frames
Each member can also be a string

(fn PROMPT ALIST &rest REST)
Perform FUNCTION inside a buffer with each member of BUFFER-LIST as current.
FUNCTION does not accept arguments
For each member of ALIST, replace all occurances of car with cdr.
car is a literal string, not a regular expression.
By default acts on the whole buffer.
By default acts on the whole buffer.
Get variable documentation, or nil if there isn't one.
In all frames.

es-lib-core-macros

Macros:

`eval-after-load' MODE evaluate BODY.
Syntax example:
(es-define-buffer-local-vars
 mvi-current-image-file nil)
A helper for loading packages.
Example of usage:

(es-preserve-functions
  (default-function-i-like1
    default-function-i-like2)
(require 'some-package-that-redefines-them-at-top-level)
)

This is a hack, and in no way it excuses package-authors who do that.
They should provide initialization functions that execute the redefinitions.

(fn (&rest FUNCS) &rest BODY)

es-lib-duplicate

Commands:

Duplicate current line.
Duplicate the active region.

es-lib-lexical

Commands:

Accepts a time-limit in minutes.

Non-interactive:

Like (apply-partially), but adds arguments to the end.
Same as clojure's (comp).
Same as clojure's (complement).
Same as clojure's (constantly).
Create a function with FUNC's arguments reversed.

es-lib-number-at-point

Commands:

See documentation for `es-increase-number-at-point'.
Increases the digit at point.
The increment some power of 10, depending on the positon of the cursor. If there
is no number at point, will try to increment the previous number on the same
line.

Non-interactive:

es-lib-text-navigate

Non-interactive:

Like (current-indentation), but counts tabs as single characters.
Like goto-line, but simplified for programmatic use.
Check whether the line contains a multiline folding.

es-lib-total-line

Commands:

Interactive version of `es-total-line-beginning-position'.
Interactive version of `es-total-line-end-position'.

Non-interactive:

Kind of like (min (beginning-of-line) (beginning-of-visual-line)).
Kind of like (max (end-of-line) (end-of-visual-line)).