shit-mode minor mode skel is ready

This commit is contained in:
Sameer Rahmani 2011-01-02 17:09:49 +03:30
parent 03d82a841e
commit ed5f2574a0
2 changed files with 70 additions and 8 deletions

View File

@ -16,6 +16,25 @@ fff;; Shit - My personal emacs IDE configuration
;; This file will define the most popular modes for ShitIDE
;; ---------------------------------------------------------------------
;; Hooks
;; ---------------------------------------------------------------------
(defvar shit-preinit-mode-hook '()
"This hook runs before initializing the 'shit-mode' minor mode."
)
(defvar shit-postinit-mode-hook '()
"This hook runs after 'shit-mode' minor mode initialized."
)
(defvar shit-prerm-mode-hook '()
"This hook runs before deactivating 'shit-mode' minor mode."
)
(defvar shit-postrm-mode-hook '()
"This hook runs after 'shit-mode' minor mode deactivated."
)
;; ---------------------------------------------------------------------
;; Keymaps
;; ---------------------------------------------------------------------
@ -57,6 +76,21 @@ This mode provide a basic configuration for an IDE."
:group 'shit-group
(if (not shit-mode)
(menu/init-menu)
)
)
;; shit-mode is not loaded
(let ()
;; before initiazing mode
(run-hooks shit-preinit-mode-hook)
;; after mode was initialized
(run-hooks shit-postinit-mode-hook)
)
;; shit-mode already loaded
(let ()
;; before deactivating mode
(run-hooks shit-prerm-mode-hook)
;; after deactivating mode
(run-hooks shit-postrm-mode-hook)
)
)
)

View File

@ -14,12 +14,39 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq DEBUG 1)
(setq ROOTPATH nil)
(setq LIBPATH nil)
(setq PLUGINPATH nil)
(setq TEMPLATESPATH nil)
;; --------------------------------------------------------------------
;; Global variables
;; --------------------------------------------------------------------
;; Turning on debuggin for development
(defvar DEBUG 1
"Shit IDE will produce more output in the debug mode (DEBUG = 1). log
function outputs will appear in *Messages* buffer."
)
(defvar ROOTPATH nil
"This variable refer to absolute path to Shit IDE source tree."
)
(defvar LIBPATH nil
"This variable refer to 'lib' directory of Shit IDE that contains the
internal libraries for ShitIDE."
)
(defvar PLUGINPATH nil
"This variable refer to 'plugin' directory of ShitIDE that contains
Shit plugins."
)
(defvar TEMPLATESPATH nil
"This variable refer to 'template' directory of ShitIDE where plugins
store their code templates."
)
;; -------------------------------------------------------------------
;; Functions
;; -------------------------------------------------------------------
(defun strip-el-ext (STR) "strinp the lastest elist extension suffix"
(let (ext)
(setq ext (replace-regexp-in-string "\.el$" "" STR))
@ -94,3 +121,4 @@ function."
)
(start-shit)