Skip to content

Commit

Permalink
Update init-tabbar.el
Browse files Browse the repository at this point in the history
  • Loading branch information
lawlist committed Jan 20, 2014
1 parent 88c93a0 commit 24477e9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions init-tabbar.el
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
(throw 'matched t)))))))

;; http://www.emacswiki.org/emacs/frame-fns.el
;; author: Drew Adams
(defun get-frame-name (&optional frame)
"Return the string that names FRAME (a frame). Default is selected frame."
(unless frame (setq frame (selected-frame)))
Expand All @@ -269,6 +270,7 @@
(error "Function `get-frame-name': Argument not a frame: `%s'" frame)))

;; http://www.emacswiki.org/emacs/frame-fns.el
;; author: Drew Adams
(defun get-frame (frame)
"Return a frame, if any, named FRAME (a frame or a string).
If none, return nil.
Expand Down Expand Up @@ -296,6 +298,7 @@
(setq frames (cdr frames))))))))

;; https://github.com/alpaker/Frame-Bufs
;; NOTES: Al Parker wrote the Frame-Bufs, and @lawlist has modified a few functions.
(defun lawlist-buffer-list (frame)
;; Remove dead buffers.
(set-frame-parameter frame 'lawlist-buffer-list
Expand All @@ -305,12 +308,14 @@
(frame-parameter frame 'lawlist-buffer-list) )

;; https://github.com/alpaker/Frame-Bufs
;; NOTES: Al Parker wrote the Frame-Bufs, and @lawlist has modified a few functions.
(defun lawlist-remove-buffer (buf frame)
"Remove BUF from FRAME's associated-buffer list."
(set-frame-parameter frame 'lawlist-buffer-list
(delq buf (frame-parameter frame 'lawlist-buffer-list))))

;; https://github.com/alpaker/Frame-Bufs
;; NOTES: Al Parker wrote the Frame-Bufs, and @lawlist has modified a few functions.
(defun lawlist-add-buffer (buf frame)
"Add BUF to FRAME's associated-buffer list if not already present."
(unless (bufferp buf)
Expand All @@ -322,11 +327,13 @@
(tabbar-display-update)))

;; https://github.com/alpaker/Frame-Bufs
;; NOTES: Al Parker wrote the Frame-Bufs, and @lawlist has modified a few functions.
(defun associate-current-buffer ()
(interactive)
(lawlist-add-buffer (get-buffer (current-buffer)) (selected-frame)))

;; https://github.com/alpaker/Frame-Bufs
;; NOTES: Al Parker wrote the Frame-Bufs, and @lawlist has modified a few functions.
(defun disassociate-current-buffer (&optional buf frame)
(interactive)
(unless buf (setq buf (current-buffer)))
Expand All @@ -342,6 +349,7 @@
(switch-to-buffer (format "%s" (car (lawlist-buffer-list (selected-frame)))))))

;; https://github.com/alpaker/Frame-Bufs
;; NOTES: Al Parker wrote the Frame-Bufs, and @lawlist has modified a few functions.
(defun lawlist-buffer-list-reset ()
"Wipe the entire slate clean for the selected frame."
(interactive)
Expand Down

0 comments on commit 24477e9

Please sign in to comment.