Article View: fj.editor.xemacs
Article #302Re: c-quick
From: Seiichi Namba
Date: Wed, 16 May 2001 10:09
Date: Wed, 16 May 2001 10:09
55 lines
3465 bytes
3465 bytes
้ฃๆณขใงใใ
IMAI Hidetoshi <hidepin@infonets.hiroshima-u.ac.jp> ใใ writes:
> ้ฃๆณขใใใซๆใใฆใใใ ใใ
>
> http://www.asahi-net.or.jp/~pi9s-nnb/basic4d.tar.gz
>
> ใชใใฐๅใใๆบ่ถณใฎใใใใฎใ ใฃใใฎใงใใใๅ่ใซ
> ไธๆบใช็นใ่งฃๆถใใใใใซๆ้ใฎใใใจใใซ
> .emacs ใ็ทจ้ใใใใจๆใฃใฆใใพใใ
smooth-scroll-up ใใใพใๅคๆดใใใซๅฉ็จใใใใจใใใใจใงใใใฐใ
smooth-scroll-up ใฎๅ
้ ญ้จๅใ
(defun smooth-scroll-up (arg)
"Moves cursor down keeping cursor within 1/3 to 2/3 area of current window.
Scroll the window in need.
It's convenient to bind this command to down arrow key."
(interactive "p")
(let* ((height (1- (window-height)))
(parity (% height 2))
;; `conservative-scroll' fix Wed May 16 18:36:33 2001 s.n. ->
;;(top-edge (/ (1- height) 4))
(top-edge 0)
;;(btm-edge (+ (1+ parity) (* top-edge 3)))
(btm-edge (- height 2))
;; `conservative-scroll' fix Wed May 16 18:36:33 2001 s.n. <-
(c-line (current-line-in-window))
(bob-not-shown ;; var. to duck ding.
(not (pos-visible-in-window-p (point-min)))))
;: ไปฅไธๅใ
ใชใฉใจ็ดใใฐใๅธๆใฎๅไฝใซใชใใฎใใใใใพใใใ
ใใฎ็จๅบฆใ ใจ็ก้งใๅคใใฎใงใใฃใจใใฅใผใใณใฐใฏใงใใใจๆใใพใใใ
่ฆใใใซ window ใใใซใผใฝใซใๅบใใใซใชใฃใใใ็งปๅใใใ้๏ผarg๏ผๅ
ใ ใในใฏใญใผใซใใใจใใๅ
ๅฎนใซใใใฐ่ฏใใใใงใใ
ใชใใemacs-21 ็ณปใงใฏใline-spacing ๏ผใ ใฃใ๏ผใซใใฃใฆ่ก้ใๅคใใฆใๆใฏ
window-height() ใไฝใใๅฎ็ถใซๅใใชใๅคใ่ฟใ(emacs-21.0.103 ใไฝฟ็จไธญ)
ใใใชใฎใงใไธใฎ็ดใใ ใใงใฏๅ้กใฎใธใฃใณใใ่ตทใใฆใใพใใพใใ
smooth-scroll-up() ใฎใใใฉใซใใฎ่จญๅฎใ ใจใใชใใๅใใ้ใใชใไฝใซใใ
ๆใใฆใใชใใฃใใฎใงใใใไปๅไธใฎใใใซ็ดใใฆใฟใฆๆฐใใคใใพใใใ
ใจใใใใ๏ผไปๆงใงใใใฐใๆฌๆฅใฎ่ชฟๆด็จใฎๅคๆฐใชใ้ขๆฐใใใใใใ ใ๏ผใ
(defun emacs21-window-height ()
(save-excursion (move-to-window-line -1)
(forward-line 0)
(+ 3 (current-line-in-window))))
ใชใฉใจใใใฎใๆธใใฆใฟใพใใใใใใฎ window-height() ใฎๆๅใฏใใฐใชใฎ
ใไปๆงใชใฎใใใๅคใใชใใฎใงใbasic.el ใซๆก็จใใใใฉใใใฏๆฑบใใใญใฆใ
ใพใใ
Technical Details
Message-ID:
<9dtjlj$iv$1@sn.asahi-net.email.ne.jp>Path:
arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.mesh.ad.jp!newsfeed.media.kyoto-u.ac.jp!Q.T.Honey!nf.asahi-net.or.jp!not-for-mailReferences:
<xl9ae4qbytr.wl@cal.infonets.hiroshima-u.ac.jp> <9dflp2$i4kv0$1@ID-74790.news.dfncis.de> <xl9wv7o2el4.wl@cal.infonets.hiroshima-u.ac.jp> <9dlu5v$iibf2$1@ID-74790.news.dfncis.de> <xl9zochcrf7.wl@cal.infonets.hiroshima-u.ac.jp> <9dn8bk$j9c1d$1@ID-74790.news.dfncis.de> <xl94ruo7ibk.wl@cal.infonets.hiroshima-u.ac.jp>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 1107f7,d85f8a971aa300cf X-Google-Attributes: gid1107f7,public X-Google-ArrivalTime: 2001-05-16 03:13:27 PST Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.mesh.ad.jp!newsfeed.media.kyoto-u.ac.jp!Q.T.Honey!nf.asahi-net.or.jp!not-for-mail From: Seiichi Namba <sn@asahi-net.email.ne.jp> Newsgroups: fj.editor.xemacs Subject: Re: c-quick Date: 16 May 2001 19:09:53 +0900 Organization: Smoke Message-ID: <9dtjlj$iv$1@sn.asahi-net.email.ne.jp> References: <xl9ae4qbytr.wl@cal.infonets.hiroshima-u.ac.jp> <9dflp2$i4kv0$1@ID-74790.news.dfncis.de> <xl9wv7o2el4.wl@cal.infonets.hiroshima-u.ac.jp> <9dlu5v$iibf2$1@ID-74790.news.dfncis.de> <xl9zochcrf7.wl@cal.infonets.hiroshima-u.ac.jp> <9dn8bk$j9c1d$1@ID-74790.news.dfncis.de> <xl94ruo7ibk.wl@cal.infonets.hiroshima-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 8bit Lines: 55 NNTP-Posting-Host: f078190.ppp.asahi-net.or.jp X-Trace: 990008006 news3.asahi-net.or.jp 18683 211.120.78.190 X-Complaints-To: ap-net@asahi-net.or.jp