 
 ;; Miscellaneous functions:
 
+(defun my-toggle-fullscreen ()
+  (interactive)
+  (cond ((eq window-system 'x)
+         (let ((fullp (frame-parameter nil 'fullscreen)))
+           (set-frame-parameter nil 'fullscreen
+                                (if fullp nil 'fullscreen))))))
+
 ;; If there is a visible "rspec" (*_spec.rb) buffer in the
 ;; current frame, running a "rspec" command is a shell process,
 ;; will run rspec against that buffer's file name (at the line

(defun my-shell-erase-buffer ()
  (interactive)
  (erase-buffer)
  (comint-next-input t))

(add-hook 'shell-mode-hook
          (lambda ()

(global-set-key (kbd "C-o") 'ffap)
(global-set-key (kbd "C-n") 'execute-extended-command)
(global-set-key (kbd "C-p") 'shell)
;;(global-set-key (kbd "C-q") 'ido-switch-buffer)
(global-set-key (kbd "C-r") 'isearch-forward)
(global-set-key (kbd "C-s") 'save-buffer)
(global-set-key (kbd "C-t") 'ido-switch-buffer)
(global-set-key (kbd "C-v") 'clipboard-yank)
(global-set-key (kbd "C-w") 'my-kill-current-buffer)
(global-set-key (kbd "C-z") 'undo)

(global-set-key (kbd "C-x C-q") 'quoted-insert) ; was toggle-read-only
