Skip to content

Commit

Permalink
Update desc.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Aug 9, 2020
1 parent a7ca435 commit 03ea816
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

# line-reminder
> Line annotation similar to Visual Studio.
> Line annotation for changed and saved lines.
| Line Reminder in Emacs Comparison | Visual Studio Comparison |
|:--------------------------------------:|:-----------------------------------:|
Expand Down
20 changes: 10 additions & 10 deletions line-reminder.el
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
;;; line-reminder.el --- Line annotation similar to Visual Studio -*- lexical-binding: t; -*-
;;; line-reminder.el --- Line annotation for changed and saved lines -*- lexical-binding: t; -*-

;; Copyright (C) 2018 Shen, Jen-Chieh
;; Created date 2018-05-25 15:10:29

;; Author: Shen, Jen-Chieh <[email protected]>
;; Description: Line annotation similar to Visual Studio.
;; Description: Line annotation for changed and saved lines.
;; Keyword: annotation line number linum reminder
;; Version: 0.4.1
;; Package-Requires: ((emacs "24.4") (indicators "0.0.4"))
Expand All @@ -27,15 +27,15 @@

;;; Commentary:
;;
;; Line annotation similar to Visual Studio.
;; Line annotation for changed and saved lines.
;;

;;; Code:

(require 'cl-lib)

(defgroup line-reminder nil
"Visual Studio like line annotation in Emacs."
"Line annotation for changed and saved lines."
:prefix "line-reminder-"
:group 'tool
:link '(url-link :tag "Repository" "https://github.com/jcs-elpa/line-reminder"))
Expand Down Expand Up @@ -383,7 +383,7 @@ or less than zero line in current buffer."
(dolist (ln line-reminder--saved-lines)
(line-reminder--mark-line-by-linum ln 'line-reminder-saved-sign-face)))))

(defun line-reminder-before-change-functions (begin end)
(defun line-reminder--before-change-functions (begin end)
"Do stuff before buffer is changed with BEGIN and END."
(when (and (not (memq this-command line-reminder-disable-commands))
(line-reminder--is-valid-line-reminder-situation begin end))
Expand All @@ -398,7 +398,7 @@ or less than zero line in current buffer."
(setq line-reminder--before-end-pt end)
(setq line-reminder--before-end-linum (line-reminder--line-number-at-pos end)))))

(defun line-reminder-after-change-functions (begin end length)
(defun line-reminder--after-change-functions (begin end length)
"Do stuff after buffer is changed with BEGIN, END and LENGTH."
(when (and (not (memq this-command line-reminder-disable-commands))
(line-reminder--is-valid-line-reminder-situation begin end))
Expand Down Expand Up @@ -468,14 +468,14 @@ or less than zero line in current buffer."
(setq-local linum-format 'line-reminder--linum-format))
('indicators
(require 'indicators)))
(add-hook 'before-change-functions #'line-reminder-before-change-functions nil t)
(add-hook 'after-change-functions #'line-reminder-after-change-functions nil t)
(add-hook 'before-change-functions #'line-reminder--before-change-functions nil t)
(add-hook 'after-change-functions #'line-reminder--after-change-functions nil t)
(advice-add 'save-buffer :after #'line-reminder-transfer-to-saved-lines))

(defun line-reminder--disable ()
"Disable `line-reminder' in current buffer."
(remove-hook 'before-change-functions #'line-reminder-before-change-functions t)
(remove-hook 'after-change-functions #'line-reminder-after-change-functions t)
(remove-hook 'before-change-functions #'line-reminder--before-change-functions t)
(remove-hook 'after-change-functions #'line-reminder--after-change-functions t)
(advice-remove 'save-buffer #'line-reminder-transfer-to-saved-lines)
(line-reminder-clear-reminder-lines-sign))

Expand Down

0 comments on commit 03ea816

Please sign in to comment.