help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to do it a command automatically


From: collger
Subject: Re: how to do it a command automatically
Date: 3 Feb 2007 07:28:09 -0800
User-agent: G2/1.0

define this new command, and then ......

(defun print-chinese-date-sh ()
  "A silly way to print current chinese date.\nYou Can add other
outputs after the 'set-buffer call"
  (interactive) ;become a command
  (save-excursion)
  (calendar)
  (set-buffer (get-buffer "*Calendar*"))
  (calendar-print-chinese-date)
  (kill-buffer-and-window) ;close the calendar, remove it if you want
  )



reply via email to

[Prev in Thread] Current Thread [Next in Thread]