Skip to content
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

Diff 12 #13

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions line-reminder.el
Original file line number Diff line number Diff line change
Expand Up @@ -414,22 +414,15 @@ LINE : pass in by `linum-format' variable."
(line-reminder--ind-clear-indicators-absolute)
(line-reminder--thumb-delete-ovs))

(defun line-reminder--custom-file-saving ()
"Return t if we are saving `custom-file'."
(and (or print-escape-control-characters inhibit-read-only)
(equal (buffer-file-name) (ignore-errors (expand-file-name custom-file)))))

(defun line-reminder--is-valid-situation-p (&optional beg end)
"Return non-nil, if the conditions are matched.

Arguments BEG and END are passed in by before/after change functions."
(and
(not (line-reminder--custom-file-saving))
(not buffer-read-only)
(not (line-reminder--contain-list-string-regexp
line-reminder-ignore-buffer-names (buffer-name)))
(not (memq this-command line-reminder-disable-commands))
(if (and beg end) (and (<= beg (point-max)) (<= end (point-max))) t)))
(and (not buffer-read-only)
(not (line-reminder--contain-list-string-regexp
line-reminder-ignore-buffer-names (buffer-name)))
(not (memq this-command line-reminder-disable-commands))
(if (and beg end) (and (<= beg (point-max)) (<= end (point-max))) t)))

(defun line-reminder--shift-all-lines (start delta)
"Shift all `change`/`saved` lines by from START line with DELTA."
Expand Down