3 ms·
Kinda ugly, but: (defun my-rename-symbol-at-point () (interactive) (let* ((curword (thing-at-point 'symbol)) (to-word nil)) (if (
by swah 15y ago
Kinda ugly, but:
(defun my-rename-symbol-at-point ()
(interactive)
(let* ((curword (thing-at-point 'symbol))
(to-word nil))
(if (null curword)
(message "No symbol at point!")
(progn
(setq to-word (read-string (concat "Replace " curword " with: ")))
(save-excursion
(goto-char (point-min))
(replace-regexp re-curword to-word))))))