Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added ne2wm:*-buffer-p functions

  • Loading branch information...
commit 55ac6f172eead5a717dc06eba9870a07a94bf3f1 1 parent 821641f
@tkf authored
Showing with 73 additions and 0 deletions.
  1. +73 −0 ne2wm-buffer-p.el
View
73 ne2wm-buffer-p.el
@@ -0,0 +1,73 @@
+;;; ne2wm-buffer-p.el --- ne2wm:*-buffer-p functions
+
+;; Copyright (C) 2012 Takafumi Arakaki
+
+;; Author: Takafumi Arakaki
+;; Keywords: tools, window manager
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'e2wm)
+(require 'howm nil t)
+
+
+;;; monky/magit
+(defun ne2wm:vcs-status-buffer-p (buf)
+ "Return non-nil when the buffer BUF is VCS status buffer."
+ (let ((buf-name (buffer-name buf)))
+ (when (or (string-match "\\*\\(magit\\|monky\\): .*\\*" buf-name)
+ (string-match "\\*monky-queue\\*" buf-name))
+ (e2wm:message ">>> '%s' is magit or monky status buffer" buf-name)
+ t)))
+
+(defun ne2wm:vcs-log-buffer-p (buf)
+ "Return non-nil when the buffer BUF is VCS log buffer."
+ (let ((buf-name (buffer-name buf)))
+ (when (string-match "\\*\\(magit\\|monky\\|vc-change\\)-log\\*"
+ buf-name)
+ (e2wm:message ">>> '%s' is magit or monky log buffer" buf-name)
+ t)))
+
+(defun ne2wm:vcs-commit-buffer-p (buf)
+ "Return non-nil when the buffer BUF is VCS commit buffer."
+ (let ((buf-name (buffer-name buf)))
+ (when (string-match "\\*\\(magit\\|monky\\)-commit\\*" buf-name)
+ (e2wm:message ">>> '%s' is magit- or monky-commit buffer" buf-name)
+ t)))
+
+
+;;; howm
+(defun ne2wm:howm-summary-buffer-p (buf)
+ "Return non-nil when the buffer BUF is howm summary (*howmS*) buffer."
+ (let ((buf-name (buffer-name buf)))
+ (when (and (boundp 'howm-view-summary-name)
+ (string-equal howm-view-summary-name buf-name))
+ (e2wm:message ">>> '%s' is howm summary buffer" buf-name)
+ t)))
+
+(defun ne2wm:howm-contents-buffer-p (buf)
+ "Return non-nil when the buffer BUF is howm contents (*howmC*) buffer."
+ (let ((buf-name (buffer-name buf)))
+ (when (and (boundp 'howm-view-contents-name)
+ (string-equal howm-view-contents-name buf-name))
+ (e2wm:message ">>> '%s' is howm contents buffer" buf-name)
+ t)))
+
+
+(provide 'ne2wm-buffer-p)
+;;; ne2wm-buffer-p.el ends here
Please sign in to comment.
Something went wrong with that request. Please try again.