
(defun d-beginning-of-defun ()
  (interactive)
  (push-mark (point) 'no-msg)
  (beginning-of-defun))

(defun d-end-of-defun ()
  (interactive)
  (push-mark (point) 'no-msg)
  (end-of-defun))

(if emacs-dialect--xemacs-p
    (progn
      (global-set-key [(control meta up)]
                      (function
                       (lambda () (interactive)
                         (d-scroll-up (- (window-height) 2)))))
      (global-set-key [(control meta down)]
                      (function
                       (lambda () (interactive)
                         (d-scroll-down (- (window-height) 2)))))
      )
  ;;(global-set-key [(control up)] 'd-beginning-of-defun)
  ;;(global-set-key [(control down)] 'd-end-of-defun)
  (global-set-key [(meta up)] 'd-beginning-of-defun)
  (global-set-key [(meta down)] 'd-end-of-defun)
  )

(provide 'd-begin-end)
;;; d-begin-end.el ends here
