;;; toggle-ws.jl --- Go to a set workspace. If already on this one, return to the origating workspace
;; Copyright 2009 by Jonathan BISSON <bissonjonathan_host_com>
;; Replace the _host_com by the google gmail thing
;;
;; Based on the idea of Home-ws by Dave Pearson
;;
;; $Revision: 1.0 $

;; toggle-ws.jl is free software distributed under the terms of the GNU
;; General Public Licence, version 2 or later. For details see the file COPYING or http://www.gnu.org/licenses/gpl.html.

;;; Commentary:
;;
;; toggle-ws.jl is a very simple sawmill package that makes sawmill
;; automaticly switch to your "toggle" workspace, then back
;;
;; To enable this feature simply drop this file into your `load-path' and
;; add this:
;;
;; (require 'toggle-ws)
;;
;; to your ~/.sawmillrc file.

;;; Code:

;; Customise options.

(defgroup toggle-ws-change "Toggle workspace change")

(defcustom toggle-ws-change-workspace 0
  "Location of your toggled workspace"
  :group toggle-ws-change
  :type  number
  :range (0 . nil))

(define (toggle-ws-change)
   "Toggle Workspace"
(if (/= toggle-ws-change-workspace current-workspace)
(setq old-workspace current-workspace)
)
 (if (= toggle-ws-change-workspace current-workspace) (select-workspace-from-first old-workspace) (select-workspace-from-first toggle-ws-change-workspace))
)
(define-command 'Toggle-workspace-change toggle-ws-change)

;;; toggle-ws.jl ends here
