Skip to content
Browse files

Added some comments in rudel-mode.el

* rudel-mode.el (rudel-auto-publish-not-excluded-p): added comments
  (rudel-auto-maybe-publish-buffer): added comments
  • Loading branch information...
1 parent ce1933a commit b22c7e05112e26cb267f77b6a31131919efaac36 @scymtym scymtym committed
Showing with 13 additions and 6 deletions.
  1. +13 −6 rudel-mode.el
19 rudel-mode.el
@@ -592,18 +592,25 @@ This ensures:
+ BUFFER's name does not look like `rudel-auto-publish-exclude-regexp'
+ there is no document named like BUFFER
+ BUFFER does not have an associated document"
- (and (not (string-match-p rudel-auto-publish-exclude-regexp
- (buffer-name buffer)))
- (not (rudel-find-document
- rudel-current-session (buffer-name buffer)))
- (not (with-current-buffer buffer
- rudel-buffer-document))))
+ (and
+ ;; Buffer name does not match exclude regexp
+ (not (string-match-p rudel-auto-publish-exclude-regexp
+ (buffer-name buffer)))
+ ;; No document is named like the buffer
+ (not (rudel-find-document
+ rudel-current-session (buffer-name buffer)))
+ ;; Buffer does not have a document
+ (not (with-current-buffer buffer
+ rudel-buffer-document))))
(defun rudel-auto-maybe-publish-buffer (&optional buffer)
"Publish BUFFER if it satisfies `rudel-auto-publish-predicate'.
If BUFFER is nil, use the current buffer."
(when (not buffer)
(setq buffer (current-buffer)))
+ ;; If there is a session and BUFFER has not been excluded via
+ ;; `rudel-auto-publish-predicate', publish it.
(when (and rudel-current-session
(funcall rudel-auto-publish-predicate buffer))
(rudel-publish-buffer buffer)))

0 comments on commit b22c7e0

Please sign in to comment.
Something went wrong with that request. Please try again.