Class: Relisp::Overlay

Inherits:
Proxy show all
Defined in:
lib/relisp/type_conversion/editing_types.rb

Overview

A proxy to an Emacs Overlay

Instance Attribute Summary

Attributes inherited from Proxy

#elisp_variable, #slave

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Proxy

elisp_alias, from_elisp, #makunbound, #to_elisp

Constructor Details

#initialize(*args) ⇒ Overlay

args can be any of these forms:

  • (symbol, slave = Relisp.default_slave)

  • (start, end, buffer = nil, front_advance = nil, rear_advance = nil, slave = Relisp.default_slave)

  • (start, end, buffer = nil, slave = Relisp.default_slave)

  • (start, end, slave = Relisp.default_slave)

When a symbol is given it is considered to be the name of a pre-existing overlay in the slave process. Otherwise a new overlay is created (make-overlay).



1001
1002
1003
1004
1005
# File 'lib/relisp/type_conversion/editing_types.rb', line 1001

def initialize(*args)
  super do |sargs|
    @slave.elisp_exec( "(setq #{@elisp_variable} (make-overlay #{sargs.join(' ')}))" )
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Relisp::Proxy

Class Method Details

.prop_reader(name) ⇒ Object



1040
1041
1042
1043
1044
1045
1046
# File 'lib/relisp/type_conversion/editing_types.rb', line 1040

def self.prop_reader name
  class_eval <<-EOM
  def #{name}
      get_property :#{name}
    end
  EOM
end

.prop_writer(name) ⇒ Object



1048
1049
1050
1051
1052
1053
1054
# File 'lib/relisp/type_conversion/editing_types.rb', line 1048

def self.prop_writer name
  class_eval <<-EOM
  def #{name}=(new_value)
      set_property :#{name}, new_value
    end
  EOM
end

Instance Method Details

#after_stringObject

:method: after_string= :call-seq:

after_string=(new_value)


1180
# File 'lib/relisp/type_conversion/editing_types.rb', line 1180

prop_writer :after_string

#before_stringObject

:method: before_string= :call-seq:

before_string=(new_value)


1171
# File 'lib/relisp/type_conversion/editing_types.rb', line 1171

prop_writer :before_string

#categoryObject

:method: category= :call-seq:

category=(new_value)


1081
# File 'lib/relisp/type_conversion/editing_types.rb', line 1081

prop_writer :category

#displayObject

:method: display= :call-seq:

display=(new_value)


1108
# File 'lib/relisp/type_conversion/editing_types.rb', line 1108

prop_writer :display

#evaporateObject

:method: evaporate= :call-seq:

evaporate=(new_value)


1189
# File 'lib/relisp/type_conversion/editing_types.rb', line 1189

prop_writer :evaporate

#faceObject

:method: face= :call-seq:

face=(new_value)


1090
# File 'lib/relisp/type_conversion/editing_types.rb', line 1090

prop_writer :face

#help_echoObject

:method: help_echo= :call-seq:

help_echo=(new_value)


1117
# File 'lib/relisp/type_conversion/editing_types.rb', line 1117

prop_writer :help_echo

#insert_behind_hooksObject

:method: insert_behind_hooks= :call-seq:

insert_behind_hooks=(new_value)


1144
# File 'lib/relisp/type_conversion/editing_types.rb', line 1144

prop_writer :insert_behind_hooks

#insert_in_front_hooksObject

:method: insert_in_front_hooks= :call-seq:

insert_in_front_hooks=(new_value)


1135
# File 'lib/relisp/type_conversion/editing_types.rb', line 1135

prop_writer :insert_in_front_hooks

#intangibleObject

:method: intangible= :call-seq:

intangible=(new_value)


1162
# File 'lib/relisp/type_conversion/editing_types.rb', line 1162

prop_writer :intangible

#invisibleObject

:method: invisible= :call-seq:

invisible=(new_value)


1153
# File 'lib/relisp/type_conversion/editing_types.rb', line 1153

prop_writer :invisible

#keymapObject

:method: keymap= :call-seq:

keymap=(new_value)


1207
# File 'lib/relisp/type_conversion/editing_types.rb', line 1207

prop_writer :keymap

#local_mapObject

:method: local_map= :call-seq:

local_map=(new_value)


1198
# File 'lib/relisp/type_conversion/editing_types.rb', line 1198

prop_writer :local_map

#modification_hooksObject

:method: modification_hooks= :call-seq:

modification_hooks=(new_value)


1126
# File 'lib/relisp/type_conversion/editing_types.rb', line 1126

prop_writer :modification_hooks

#mouse_faceObject

:method: mouse_face= :call-seq:

mouse_face=(new_value)


1099
# File 'lib/relisp/type_conversion/editing_types.rb', line 1099

prop_writer :mouse_face

#priorityObject

:method: priority= :call-seq:

priority=(new_value)


1063
# File 'lib/relisp/type_conversion/editing_types.rb', line 1063

prop_writer :priority

#windowObject

:method: window= :call-seq:

window=(new_value)


1072
# File 'lib/relisp/type_conversion/editing_types.rb', line 1072

prop_writer :window