Class: Relisp::Marker
- Defined in:
- lib/relisp/type_conversion/editing_types.rb
Overview
A proxy to an Emacs marker.
Instance Attribute Summary
Attributes inherited from Proxy
Instance Method Summary collapse
-
#initialize(*args) ⇒ Marker
constructor
args can be any of these forms: * (symbol, slave = Relisp.default_slave) * (slave = Relisp.default_slave).
- #insertion_type=(type) ⇒ Object
- #set(new_position, new_buffer = nil) ⇒ Object (also: #move, #position=)
Methods inherited from Proxy
elisp_alias, from_elisp, #makunbound, #to_elisp
Constructor Details
#initialize(*args) ⇒ Marker
args can be any of these forms:
-
(symbol, slave = Relisp.default_slave)
-
(slave = Relisp.default_slave)
When a symbol is given it is considered to be the name of a pre-existing marker in the slave process. Otherwise a new, empty marker is created (make-marker
).
260 261 262 263 264 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 260 def initialize(*args) super do @slave.elisp_exec( "(setq #{@elisp_variable} (make-marker))" ) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Relisp::Proxy
Instance Method Details
#insertion_type=(type) ⇒ Object
275 276 277 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 275 def insertion_type=(type) @slave.elisp_eval( "(set-marker-insertion-type #{@elisp_variable} #{type.to_elisp})" ) end |
#set(new_position, new_buffer = nil) ⇒ Object Also known as: move, position=
279 280 281 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 279 def set(new_position, new_buffer=nil) @slave.elisp_exec( "(set-marker #{@elisp_variable} #{new_position} #{new_buffer})" ) end |