emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-contacts d0caf96afd 015/154: Replace org-mode-p wit


From: ELPA Syncer
Subject: [elpa] externals/org-contacts d0caf96afd 015/154: Replace org-mode-p with usual (eq major-mode 'org-mode) check
Date: Fri, 9 Sep 2022 15:58:22 -0400 (EDT)

branch: externals/org-contacts
commit d0caf96afd910e06245cb61db39c97ae20a600d1
Author: Tassilo Horn <tassilo@member.fsf.org>
Commit: Bastien Guerry <bzg@altern.org>

    Replace org-mode-p with usual (eq major-mode 'org-mode) check
    
    Additionally, replace one
    
      (or (org-mode-p) (derived-mode-p 'org-mode))
    
    with
    
      (derived-mode-p 'org-mode)
    
    cause that is reflexive anyway (returns true, if the current mode is
    org-mode).
    
    Delete one check testing for org-mode or org derived mode
---
 org-contacts.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index 4b21d26372..74d68dc36d 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -157,7 +157,7 @@ If both match values are nil, return all contacts."
     (dolist (file (org-contacts-files))
       (org-check-agenda-file file)
       (with-current-buffer (org-get-agenda-file-buffer file)
-        (unless (org-mode-p)
+        (unless (eq major-mode 'org-mode)
           (error "File %s is no in `org-mode'" file))
         (org-scan-tags
          '(add-to-list 'markers (set-marker (make-marker) (point)))
@@ -262,7 +262,7 @@ If both match values are nil, return all contacts."
     (when marker
       (switch-to-buffer-other-window (marker-buffer marker))
       (goto-char marker)
-      (when (org-mode-p)
+      (when (eq major-mode 'org-mode)
         (org-show-context 'agenda)
         (save-excursion
           (and (outline-next-heading)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]