diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2019-11-22 22:37:00 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2019-12-20 23:48:33 +0100 |
| commit | ee0d78f730ffc2859d2c9a37245417b35d9ecd5a (patch) | |
| tree | 1b2547feff158d46b87127ce2b1c999d4b573a6a /lisp | |
| parent | bbb755267a5373774e6b0e61fbc486ea485fad93 (diff) | |
magit--overlay-at: Move definition
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/Makefile | 2 | ||||
| -rw-r--r-- | lisp/magit-section.el | 12 | ||||
| -rw-r--r-- | lisp/magit-utils.el | 10 |
3 files changed, 11 insertions, 13 deletions
diff --git a/lisp/Makefile b/lisp/Makefile index 6138bab..0f70446 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -11,7 +11,7 @@ all: lisp git-commit.elc: magit-utils.elc: -magit-section.elc: magit-utils.elc +magit-section.elc: ifeq "$(BUILD_MAGIT_LIBGIT)" "true" magit-libgit.elc: magit-git.elc: magit-utils.elc magit-section.elc magit-libgit.elc diff --git a/lisp/magit-section.el b/lisp/magit-section.el index 283ea1d..64984df 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -37,8 +37,6 @@ (require 'benchmark) (require 'subr-x)) -(require 'magit-utils) - (declare-function magit-maybe-make-margin-overlay "magit-margin" ()) (declare-function magit-repository-local-get "magit-mode" (key &optional default repository)) @@ -1674,6 +1672,16 @@ Configuration'." (benchmark-elapse (apply entry args))) (apply entry args))))))) +(cl-defun magit--overlay-at (pos prop &optional (val nil sval) testfn) + (cl-find-if (lambda (o) + (let ((p (overlay-properties o))) + (and (plist-member p prop) + (or (not sval) + (funcall (or testfn #'eql) + (plist-get p prop) + val))))) + (overlays-at pos t))) + ;;; _ (provide 'magit-section) ;;; magit-section.el ends here diff --git a/lisp/magit-utils.el b/lisp/magit-utils.el index 81b83b3..5883168 100644 --- a/lisp/magit-utils.el +++ b/lisp/magit-utils.el @@ -932,16 +932,6 @@ one trailing newline is added." (and (eq trim ?\n) "\n")) str))) -(cl-defun magit--overlay-at (pos prop &optional (val nil sval) testfn) - (cl-find-if (lambda (o) - (let ((p (overlay-properties o))) - (and (plist-member p prop) - (or (not sval) - (funcall (or testfn #'eql) - (plist-get p prop) - val))))) - (overlays-at pos t))) - ;;; Kludges for Emacs Bugs (defun magit-file-accessible-directory-p (filename) |
