Method: Textbringer::Buffer#push_mark
- Defined in:
- lib/textbringer/buffer.rb
#push_mark(pos = @point) ⇒ Object
Set mark at pos, and push the mark on the mark ring. Unlike Emacs, the new mark is pushed on the mark ring instead of the old one.
882 883 884 885 886 887 888 889 890 891 892 |
# File 'lib/textbringer/buffer.rb', line 882 def push_mark(pos = @point) @mark = new_mark @mark.location = pos @mark_ring.push(@mark) if self != Buffer.minibuffer global_mark_ring = Buffer.global_mark_ring if global_mark_ring.empty? || global_mark_ring.current.buffer != self push_global_mark(pos) end end end |