[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/dired-git-info fb1b475 02/33: Rename internal symbols acc
From: |
Clemens Radermacher |
Subject: |
[elpa] scratch/dired-git-info fb1b475 02/33: Rename internal symbols accord. to elisp conventions |
Date: |
Sun, 17 Feb 2019 13:03:27 -0500 (EST) |
branch: scratch/dired-git-info
commit fb1b4759bf1ee3da27200e2eceb8612f50224f78
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Rename internal symbols accord. to elisp conventions
---
dired-git-info.el | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/dired-git-info.el b/dired-git-info.el
index b226b39..3cad73d 100644
--- a/dired-git-info.el
+++ b/dired-git-info.el
@@ -29,8 +29,6 @@
;;; Code:
-(defvar dgi-commit-ovs nil
- "Overlays which show the commit messages.")
(defface dgi-commit-message-face
'((t (:inherit font-lock-comment-face)))
@@ -244,14 +242,16 @@ The placeholders are (from git-log PRETTY FORMATS):
is inserted immediately before the expansion if and only
if the placeholder expands to a non-empty string.")
+(defvar dgi--commit-ovs nil
+ "Overlays which show the commit messages.")
-(defun dgi-command-to-string (program &rest args)
+(defun dgi--command-to-string (program &rest args)
"Execute PROGRAM with arguments ARGS and return output string."
(with-output-to-string
(with-current-buffer standard-output
(apply #'process-file program nil t nil args))))
-(defun dgi-get-commit-info (&optional file gitf)
+(defun dgi--get-commit-info (&optional file gitf)
"Get commit message info.
FILE default to current dired file. GITF determines the commit
@@ -266,7 +266,7 @@ info format and defaults to `dgi-commit-message-format'."
(buffer-substring (point) (line-end-position))))))
(when (and lfile
(not (member lfile '(".." "."))))
- (let ((msg (dgi-command-to-string
+ (let ((msg (dgi--command-to-string
"git" "log" "-1"
(concat "--pretty="
(or gitf dgi-commit-message-format))
@@ -290,11 +290,16 @@ info format and defaults to `dgi-commit-message-format'."
(dired-goto-file file)
(dired-mark 1)))))))
+(defun dgi--cleanup ()
+ (dolist (ov dgi--commit-ovs)
+ (delete-overlay ov))
+ (setq dgi--commit-ovs nil))
+
(defun dgi-toggle-git-info ()
"Toggle git message info in current dired buffer."
(interactive)
- (if dgi-commit-ovs
- (dgi-cleanup)
+ (if dgi--commit-ovs
+ (dgi--cleanup)
(let* ((files (dgi-save-marked
(dired-unmark-all-marks)
(dired-toggle-marks)
@@ -305,7 +310,7 @@ info format and defaults to `dgi-commit-message-format'."
(minspc (1+ (length (file-name-nondirectory (car files))))))
(save-excursion
(dolist (file files)
- (let ((msg (dgi-get-commit-info file)))
+ (let ((msg (dgi--get-commit-info file)))
(when msg
(let ((spc (make-string
(- minspc (length (file-name-nondirectory file)))
@@ -317,19 +322,13 @@ info format and defaults to `dgi-commit-message-format'."
(propertize
msg 'face 'dgi-commit-message-face)
"\n")))
- (push ov dgi-commit-ovs)
+ (push ov dgi--commit-ovs)
;; I don't use after-string because I didn't get it to work
;; in combination with hl-line-mode overlay
(overlay-put ov 'display ovs)
;; hl line mode should have priority
(overlay-put ov 'priority -60))))))))))
-(defun dgi-cleanup ()
- (dolist (ov dgi-commit-ovs)
- (delete-overlay ov))
- (setq dgi-commit-ovs nil))
-
-
(provide 'dired-git-info)
;;; dgi.el ends here
- [elpa] branch scratch/dired-git-info created (now cd60dd4), Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info fb1b475 02/33: Rename internal symbols accord. to elisp conventions,
Clemens Radermacher <=
- [elpa] scratch/dired-git-info 19d9570 04/33: Fix macro name, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 64901c7 11/33: Show error if not in a repo, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 2374729 06/33: Update config instructions, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 03c1711 19/33: Fixes according to checkdoc, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 2d57f89 12/33: Check for non existing files, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info e4090fa 01/33: Initial commit, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 23b3d1e 18/33: Improve auto hide details, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info f7b5920 26/33: Improve dgi--get-commit-messages, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 2e986ce 25/33: Allow command to run for dired derived modes, as well, Clemens Radermacher, 2019/02/17
- [elpa] scratch/dired-git-info 11a6cce 05/33: Update install instructions, Clemens Radermacher, 2019/02/17