                                  'bookmark-history)))
       (if (string-equal "" str) default str))))
 
+(defun clear-shell ()
+   (interactive)
+   (cond ((eq major-mode 'eshell-mode)
+          (let ((eshell-buffer-maximum-lines 0))
+            (eshell-truncate-buffer)))
+         ((derived-mode-p 'comint-mode)
+          (let ((comint-buffer-maximum-size 0))
+            (comint-truncate-buffer)))))
 
 (provide 'config-base)
 ;;; config-base.el ends here ---

  (interactive)
  (toggle-shell-buffer eshell-buffer-name 'eshell)
  )

(defun toggle-shell-buffer (shell-buffer-name shell-command)
  (if (equal (buffer-name (current-buffer)) shell-buffer-name)

;;; config-base.el --- һЩãЩûı Emacs ۻ߶Դ󲿷ģʽ
;; Time-stamp: <2013-10-16 23:29:55 Jerry Xu>

(require 'eshell)
(require 'ido)
