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.
848 849 850 851 852 853 854 855 856 857 858 |
# File 'lib/textbringer/buffer.rb', line 848 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 |