Skip to content

Conversation

@klausweiss
Copy link

When buffer's mark has never been set, (mark) returns nil:

Return this buffer’s mark value as integer, or nil if never set.

This in turn causes (- (mark) (point)) to fail with (wrong-type-argument number-or-marker-p nil).
mark-excursion is only ever used further down the line if (use-region-p) is true.

I'm using emacs-27.0.91. After opening emacs, switching to *scratch* buffer and trying smart-shift-up or smart-shift-down said error occurrs. This PR fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant