HOME > > Emacs <

Emacs <

腟贋逸2008/01/30(羂)

  • 若ゃ潟c潟違紊
  • map ∽違ч≪
  • 膰吾鴻鴻祉ゃ

    Emacs Lisp

    Emacs 若ゃ潟c潟違紊

    紊翫絎鴻e墾鐚鐚鐚

    篏鐚潟潟鐚鐚若激若宴潟刻蚊篁с
    鴻違綽荀
    
    (a) √潟潟
    Ctrl-c 若筝絖若若銀膣若激若宴潟鴻
    綣違筝у蚊篁 膂≦鐚篁ヤ茯障с鐚
    箴 (global-set-key "\C-ca" 'fill-region)
    
    (b) ∽潟潟綣違筝蚊篁  茯綽荀鐚綣鐚
    
    箴 (global-set-key "\C-ca" 
      (lambda () (interactive) (backward-delete-char 2)))
    
    (c) 篏潟潟篏蚊篁  茯綽荀鐚潟潟篏鐚
    
    箴 
    (defun my-command ()
      (interactive)
      (insert "a"))
    (global-set-key "\C-ca" 'my-command)
    
    (d) Ctrl-c 若筝絖若若銀膣若激若宴潟剛札紊
    若激若宴潟鴻蚊篁 茯綽荀鐚≪若祉鐚
    
    箴
    (add-hook 'text-mode-hook
                 (lambda ()
    	       (local-set-key "\t" 'self-insert-command)))
    

    Emacs 若ゃ潟c潟域┃絎絎茵c<違腟с帥

    潟潟篏

    (lambda (a b) (+ a b))
    綣≦∽違筝ゃ綵≪с
    
    (fset 'aplusb (lambda (a b) (+ a b)))
    激潟 aplusb ∽違祉綣ャ
    綣激潟 aplusb ∽医臂c荐
    
    
    (defun aplusb (a b)
       (+ a b))
    c純
    
    (funcall (lambda (a b) (+ a b)) 1 2)
    
    (funcall 'aplusb 1 2)
    
    
    ((lambda (a b) (+ a b)) 1 2)
    => 3
    鴻荅箴<膃筝荀膣∽違絎茵
    
    (aplusb 1 2)
    => 3
    綣腟鴻荅箴<
    膃筝荀膣激潟с∽違祉絎鴻違絎茵
    
    (symbol-function 'aplusb)
    с激潟筝∽医臂緇сc
    
    ((symbol-function 'aplusb) 1 2)
    c若鴻荅箴<荀膣荅箴<
    с
    
    (setq aplusb (lambda (a b) (- b a)))
    激潟 aplusb ゃ祉ャ綣ャc
    
    (aplusb 1 2)
    => 3
    腟緇障障
    鴻荅箴<膃筝荀膣∽違祉絎鴻絎茵с
    ゃ祉ャ祉綣
    
    (funcall 'aplusb 1 2)
    => 3
    翫
    
    (funcall aplusb 1 2)
    => 1
    aplusb c荅箴<ゃ祉ャ祉綣
    
    (lambda () (insert "a"))
    <絖 a 水ャ綣
    
    (functionp (lambda ()(insert "a")))
    => t
    綣∽違
    
    (commandp (lambda () (insert "a")))
    => nil
    潟潟с
    
    (commandp (lambda () (interactive) (insert "a")))
    => (interactive)
    鴻激c若鐚綣筝腮鐚 interactive ∽違筝
    ∽違潟潟鐚絲乗援若喝冴∽逸с絎hс
    祉祉ゃ t с nil с
    (commandp (byte-compile (lambda () (interactive) 1)))
    => t
    帥ゃ潟潟ゃ t 菴
    
    (defun inserta ()
      (insert "a"))
    ∽違祉綣ャc激潟罕с
    
    (commandp 'inserta)
    => nil
    с潟潟荐
    
    (defun inserta ()
      (interactive)
      (insert "a"))
    潟潟с絎h違
    
    (commandp 'inserta)
    => (Interactive)
    激潟潟潟帥
    
    

    若吾

    
    (global-set-key "\C-cz" (insert "a"))
    若ゃ潟c潟違茯ゃ
    鴻膃筝荀膣篁紙綣сс
    
    (global-set-key "\C-cz" (lambda () (insert "a")))
    膃筝荀膣綣障篏睡若冴
    ∽違с薈
    
    (global-set-key "\C-cz" (lambda () (interactive )(insert "a")))
    潟潟絎h∽違障
    
    (global-set-key "\C-cz" 'inserta)
    ∽違
    ∽違祉潟潟ャ激潟篏帥с
    

    (lookup-key global-map "\t")
    => indent-for-tab-command
    違若若с帥
    indent-for-tab-command 蚊篁
    
    (lookup-key lisp-mode-map "\t")
    => lisp-indent-line
    若若蚊 Lisp ≪若
    帥 lisp-indent-line 蚊ゃ
    
    (lookup-key c-mode-map "\t")
    => c-indent-line
    障鴻ゃ若≪若蚊 C ≪若с
    帥 c-indent-line 蚊篁
    <若吾c≪若違若
    
    
    (minor-mode-key-binding "\t")
    => ((skk-j-mode . skk-insert))
    羇紙уゃ若≪若荅峨潟違
    私箴с憜帥若 skk-j-mode ゃ若≪若
    skk-insert 蚊篁
    
    (key-binding "\t")
    => skk-insert
    惹「膣∽ゃ若≪若潟違
    globa-set-key с帥絅純帥潟潟ゃ潟
    号翫腮篏馹с絨
    ゃ若≪若筝吾荀
    若≪若吾号帥
    
    (local-set-key "\t" (lambda () (interactive )(insert "a")))
    憜≦ц箴<違若若吾
     .emacs 吾≪若ャ荅箴<障
    潟
    
    (define-key text-mode-map "\t" (lambda () (interactive) (insert "a")))
     .emacs 吾若若贋・筝吾
    障翫
    Lisp ≪若鴻≪若с純с nroff ≪若с薈c
    Lisp ≪若鴻≪若.emacs 茯粋昭
    篏 .emacs у翫純nroff ≪若
    .emacs 茯粋昭水 nroff ≪若ャc篏с
    с篏帥箴違
    
    (add-hook 'text-mode-hook 
    	  (lambda () 
    	    (insert "a")))
    障c荅箴<鴻≪若ャc翫
    < a 絖水ャ綣綏沿箴≦鐚荅箴<
    荳菴吾с鐚 add-hook 綣膃筝荀膣
    若紊т紊с
    
    (defun inserta () (insert "a"))
    (add-hook 'text-mode-hook 'inserta)
    ∽違祉∽違ャ激潟 add-hook 鴻膃2荀膣
    <若薈若激潟
          荅箴<ゃ祉絎鴻菴
    
    (add-hook 'text-mode-hook
    	  (lambda ()
    	    (local-set-key "\t" 'self-insert-command)))
    帥若с帥筝ゃャ
    
    (add-hook 'text-mode-hook
    	  (lambda ()
    	    (local-set-key "\t" (lambda ()
    			          (interactive)
    			          (insert "[TAB]")))))
    帥若с[TAB] 絖水ャ
    Emacs Lisp ャ≪泣ゃ違絎臂∽違
    緇絎茵鐚篋羝с鐚
    腱 Emacs 違絎茵
    

    帥篏

    Emacs с帥若若≪若c膣帥絖水ャс違腱医鴻≪若с帥若ゃ潟∽違 indent-relative с翫茵ゃ潟潟激с潟∞ tab-to-tabstop 篏帥

    tab-to-tabstop 帥絖祉鴻若鴻篏帥c絖с tab-stop-list 紊違с鴻с (8 16 24 32 40 48 56 64 72 80 88 96 104 112 120) 綵≪鴻edit-tab-stops 絲乗援∽違ц┃絎с荀鴻茵医膈綏医cゃ障帥鴻膈сс

    tab-to-tabstop 帥絖cゃ潟潟激с潟茵с帥絖ゃ潟潟激с潟 tab-width 紊違鴻若膈ゃ潟潟激с潟絎憗сtab-to-tabstop tab-stop-list у篏臀障с吾c潟障帥篏帥c帥鴻若鴻усEmacs ゃ潟潟激с潟篋篁腟帥у憗

    帥絖с鴻若鴻<<ccс育紫篆罩c茵吾翫帥絖1 鴻若ф鴻若鴻g水ャ医篁ヤ鴻若鴻若若脂≫帥х冴腥咲鴻若鴻х冴腥咲阪ャゃс綽荀篁ヤ羔サ腮с障tab-width 紊眼茵綵≪障

    鐚indent-tabs-mode nil 荐絎tab-to-tabstop с鴻若鴻篏帥untabify 帥鴻若鴻紊帥箴水筝紊宴鐚

    紮帥篏絎

    絲障紮絲上帥若<筝帥絖ュゃ障C-q [TAB] с違違若若ゃ潟c潟違≪若ャc筝吾障荐絎<ゃ篏帥c紊眼≪若絎綽荀違鴻≪若

    (add-hook 'text-mode-hook
                 (lambda ()
    	       (local-set-key "\t" 'self-insert-command)))
    

    吾違

    紮帥綛荐絎

    帥綛 tab-width ф浦紮

    (set 'tab-width 2)
    

    綣綵荅蚊<ц箴<違tab-width <若紊違сゃ障荐絎篁<綵演帥違若ゃ (default-value 'tab-width) 荅箴<ャс<若ゃ tab-width 荅箴<違違若ゃ荐絎(setq-default tab-width 2) 違

    map ∽

    map ∽違c

    (defun my-insert (x)
      (insert x))
    (mapcar 'my-insert '("a" "b" "c"))
    

    < abc 水ャ

    (defun my-insert (x)
      (insert x))
    (setq y "a")
    (mapcar 'my-insert '(y "b" "c"))
    

    (defun my-insert (x)
      (insert (eval x)))
    (setq y "a")
    (mapcar 'my-insert '(y "b" "c"))
    

    鐚鐚鐚"b" "c" eval 障障с羈鐚

    my-insert ∽違祉違

    (defun my-insert (x)
      (insert x))
    (setq y "a")
    (mapcar '(lambda (z) (my-insert (eval z))) '(y "b" "c"))
    

    (insert "a") "a" insert с(eval "a") insert map ∽違с顑

    膰吾鴻鴻祉ゃ

    Emacs с鴻<ゃ篏 LaTeX у医激罔羣鴻眼膂≧医激< dvi <ゃ√с

    篋冴紊綵吟с腟膂≦医激純腱ャ帥罔吾сEmacs 絎眼紫贋・膰吾潟с

    сEmacs Lisp х研吾 Postscript <ゃ帥篏c翫ф潟若c潟逸筝吟違c宴鐚馹莎激ゃф

    tatepri-08.el с

    絲乗援篏睡∽違篁ヤ筝ゃс

    tatepri 憜荐<絎鴻膰吾鴻鴻<ゃlpr 阪
    tatepri-edit-ps 域<阪
    tatepri-gv gv 阪

    鐚Vine Linux + 鴻鴻潟帥篁c吾菴Ubuntu + 鴻鴻潟帥ц絨c障ghostscript ユ茯茵腓冴с潟荐絎綽荀潟 Ryumin-Light cсhint <ゃ Alias 吾鏆荀障鴻鴻祉<ゃ贋・ lpr 潟潟 cups API 潟у阪<羯倶吟cps2ps х浸荐潟c障c鐚

    膣泣ゃ冴≫臀鐚腴篏緒潟泣ゃ冴茵荐絎 tatepri.el 篏祉吾 :-)

    医決┃絎<ゃ荀<ゃ若紊違с
    鐚 http://www.gnu.org/software/emacs/manual/emacs.html#File%20Variables
    ユ茯 http://flex.ee.uec.ac.jp/texi/emacs-jp/emacs-jp_214.html#SEC236鐚

    篁ヤ鴻<ゃ菴遵<ゃ茯粋昭紊違荐絎鐚膩筝<ゃ違c篆絖 revert-buffer 綽荀鐚tatepri.el 罘純сEmacs c罘純с

    ;;; Local Variables: ***
    ;;; tatepri-paper-position: landscape ***
    ;;; tatepri-paper-rotation: nil ***
    ;;; tatepri-right-margin: 113.38582677165354 ***
    ;;; tatepri-upper-margin: 113.38582677165354 ***
    ;;; tatepri-font-size: 10.0 ***
    ;;; tatepri-okuri: 18.0 ***
    ;;; tatepri-chars-per-line: 40 ***
    ;;; tatepri-lines-per-page: 35 ***
    ;;; tatepri-show-handura: nil ***
    ;;; tatepri-tate-jp-font: "/Ryumin-Light-V" ***
    ;;; tatepri-yoko-jp-font: "/Ryumin-Light-H" ***
    ;;; tatepri-tate-ascii-font: "/Courier" ***
    ;;; tatepri-yoko-ascii-font: "/Courier" ***
    ;;; comment-start: ";;; "  ***
    ;;; comment-end:"***" ***
    ;;; End: ***
    

    障号膣泣ゃ冴荐絎с障篏ゃ潟膊吾違ゃ潟膊∽違 tatepri.el ャcс違(pt (cm 4)) C-x C-e ц箴<c cm ゃ潟膊с

    с鴻鴻<ゃ篏 emacs -batch -load /somewhere/tatepri.el -file source.txt -funcall tatepri-edit-ps -f save-buffer 篆絖<ゃ絨сュ腥堺綺若鴻号с鴻鴻<ゃ gv ц

  • 罨≠
    HOME
    
    
    紕膣
    薤藕
    
    茯絖
    沿
    ユ茯
    
    
    遵医