Module | El4r::ELMethodsMixin
In: | bin/el4r-instance

EmacsLisp wrapper methods

### Methods

_handle_attrs _init_eval_after_load ad_do_it bufstr defadvice define_derived_mode define_key define_minor_mode defun defvar el el_lambda el_load el_require eval_after_load funcall funcall_internal getq let method_missing newbuf require set setq symbol_value with with_preserved_block

### Public Instance methods

_handle_attrs(attrs, forms, quote)
_init_eval_after_load()
ad_do_it()
bufstr(buf=current_buffer)

Extended buffer-string. `buf` is a buffer object.

defadvice(func, *args, &block)

EmacsLisp‘s defadvice. `func` is Symbol or String refering to the function. `args` is parameters to defadvice such as :before, :after, :around, :activate. In the block, you can call `ad_do_it`. [around advice]

define_derived_mode(child, parent, name, docstring=nil, &block)

EmacsLisp‘s define-derived-mode.

define_key(map, key, command = nil, &block)

EmacsLisp‘s define-key.

`map` is a `Symbol` or `ELObject` refering to a keymap object. This method can be called with block.

define_minor_mode(mode, doc, init_value=nil, lighter=nil, keymap=nil, &block)

EmacsLisp‘s define-minor-mode

defun(name, attrs = nil, &block)

EmacsLisp‘s defun.

`attrs` is a Hash.

attrs[:interactive]: | If the function is interactive, set `true` or String.
attrs[:docstring]: | The docstring.

The function arguments are block arguments.

defvar(name, value=nil, docstring="")
el(expression)

Bare EmacsLisp expression.

el_lambda(attr = nil, &block)

EmacsLisp‘s lambda.

el_load(*args)

EmacsLisp‘s load.

el_require(*args)

EmacsLisp‘s require.

eval_after_load(lib, &block)

EmacsLisp‘s eval-after-load

funcall(name_or_lambda, *args, &block)

Call an EmacsLisp function

funcall_internal(funcexpr, *args, &block)
getq(name)

Alias for symbol_value

let(*name_and_value_list, &block)

EmacsLisp‘s let. `name_and_value_list` is [variable_name, value, variable_name, value…]. +name_and_value_list.length+ must be even. `variable_name` is a Symbol.

method_missing(name_or_lambda, *args, &block)

Alias for funcall

newbuf(x) {|| ...}

Create a new buffer with some initialization. With block, newbuf execute it by the context of the generated buffer.

A parameter is a Hash.

:name : | buffer-name
:file : | find-file-noselect / insert-file-contents [with :name]
:contents : | buffer-string
:line : | goto-line
:point : | goto-char [default is (point-max)]
:display : | :pop / :only / true
:current : | set-buffer
:read_only : | buffer-read-only
:bury : | bury-buffer

require(*args)

Ruby‘s require.

set(name, value)

Alias for setq

setq(name, value)
symbol_value(name)
with(name, *args, &block)

Call (func FORMS…) type function

with_preserved_block(funcexpr, mode, *args, &block)

Call defun-type macro. `mode’ is an EmacsLisp function to define. Most case the first argument is the function name.

`define_derived_mode’ and `define_minor_mode’ are examples of this method‘s usage.

[Validate]