Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
better comment-dwim
(defun dwim-entire-line (function)
(if (region-active-p)
(funcall function (region-beginning) (region-end))
;; else
(funcall function (point-at-bol) (point-at-beginning-of-next-line))))
(global-set-key (kbd "M-;") (lambda () (interactive)
(dwim-entire-line 'comment-or-uncomment-region)))
@thanthese

This comment has been minimized.

Copy link

commented Jan 27, 2015

funcall: Symbol's function definition is void: point-at-beginning-of-next-line

Looks like point-at-beginning-of-next-line is a custom function of yours. Source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.