New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smartly reactivate beginend when narrowing is in effect #33
Conversation
2a7b34c
to
427d20c
Compare
427d20c
to
576dc2a
Compare
Up |
(defun beginend--out-of-bounds-p (point) | ||
"Return non-nil if POINT is outside [`point-min', `point-max']. | ||
This is possible if buffer was narrowed after POINT was stored." | ||
(not (<= (point-min) point (point-max)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works in 25+. Is that our lowest-supported version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently this got added in Emacs 24.4:
Numeric comparison functions =, <, >, <=, >= can now take many arguments.
That's good enough for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added tests and Travis builds this package on Emacs 24.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, okey. Somehow I was under the impression it's a 25+ feature. Let's go ahead with this then. But we should probably add a version constraint to the requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we should probably add a version constraint to the requirements.
beginend.el already contains:
;; Package-Requires: ((emacs "24.4"))
Do you have something else in mind?
6131afb
to
30ac9ee
Compare
Instead of just deactivating beginend when a buffer is narrowed, this patch widens the buffer, applies the beginend procedure, and checks if point has moved outside the original narrowed region.
30ac9ee
to
5a7e470
Compare
Instead of just deactivating beginend when a buffer is narrowed, this
patch widens the buffer, applies the beginend procedure, and checks if
point has moved outside the original narrowed region.