SavchenkoValeriy / emacs-powerthesaurus

Powerthesaurus integration for Emacs
GNU General Public License v3.0
269 stars 11 forks source link

Fails with an error if mark is undefined #1

Closed ndw closed 6 years ago

ndw commented 6 years ago

As a consequence of (interactive "r"), if you're typing away in a buffer that has no mark, calling powerthesaurus-lookup-word raises an error:

Debugger entered--Lisp error: (error "The mark is not set now, so there is no region")
  call-interactively(powerthesaurus-lookup-word nil nil)
  command-execute(powerthesaurus-lookup-word)

I expect the workaround will be managing the beginning and end by hand. I made a brief attempt to write such a wrapper but wasn't satisfied with the results.

SavchenkoValeriy commented 6 years ago

I see the problem. I will refactor lookup-word function to be just interactive. Thank you for your feedback!