hey guys,
I wrote code like this:
I wrote code like this:
(defun copy-char-from-line-above ()
"Copies one character from same column but previous row"
(interactive)
(let (c)
(save-excursion
(previous-line)
(setq c (buffer-substring-no-properties (point) (+ (point) 1)))
)
(insert c)
)
)
(defalias 'cup 'copy-char-from-line-above)
(global-set-key "\C-i" 'copy-char-from-line-above)
When I run M-x cup many times it runs ok. Same, if I press C-i C-g C-i C-g ... . Problem is, when I press C-i C-i C-i ... which was my usage intention. It copies always the same letter. Why is it like so?