Emacs-Lisp

;;comment-region replace by cr  
(defun cr (beg end &optional arg)
    "same to comment-region   more help please see comment-region"    
    (interactive "*r\nP")    
    (message "comment region :beg:%d   end:%d" beg end)
    (comment-region beg end arg)    )
;;uncomment-region replace by ucr  
(defun ucr (beg end)
  "same to comment-region  more help please see comment-region"
  (interactive "*r\n")    
  (message "uncomment region :beg:%d   end:%d" beg end)    
  (uncomment-region beg end)    ) 
(defun find-matching-paren ()
  "Locate the matching parenthtical" 
  (interactive)    
  (cond ((looking-at "[[({]") (forward-sexp 1) (backward-char 1))
	((looking-at "[])}]") (forward-char 1) (backward-sexp 1))
	(t (ding))          )    ) 
(defun mark-beginning-of-buffer ()    
  "mark to the beginning of buffer"
  (interactive)
  (push-mark (point) nil t)
  (goto-char (point-min))    )
(defun mark-end-of-buffer ()
  "mark to the end of buffer"
  (interactive)
  (push-mark (point) nil t)
  (goto-char (point-max))    )
;line-to-top-of-window  
(defun line-to-top-of-window ()
  "line to the top of current window"
  (interactive)    (recenter 0)    )