Changeset 3877
- Timestamp:
- 2005年09月16日 19時47分53秒 (3 years ago)
- Files:
-
- branches/2.0/lisp/ChangeLog.Meadow (modified) (1 diff)
- branches/2.0/lisp/mw32scroll.el (modified) (3 diffs)
- branches/2.0/src/ChangeLog.Meadow (modified) (1 diff)
- branches/2.0/src/indent.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.0/lisp/ChangeLog.Meadow
r3867 r3877 1 2005-09-16 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 3 * mw32scroll.el (w32-scroll-bar-drag-1): Removed. 4 (w32-scroll-bar-drag): Bug fix of previous change. Fixed issue 5 MW137. 6 1 7 2005-09-10 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 8 branches/2.0/lisp/mw32scroll.el
r3867 r3877 28 28 (beginning-of-line) 29 29 (point))) 30 31 ;; Scroll the window to the proper position for EVENT.32 (defsubst w32-scroll-bar-drag-1 (event)33 (let* ((start-position (event-start event))34 (window (nth 0 start-position))35 (portion-whole (nth 2 start-position)))36 (save-excursion37 (set-buffer (window-buffer window))38 ;; Calculate position relative to the accessible part of the buffer.39 (goto-char (+ (point-min)40 (scroll-bar-scale portion-whole41 (- (point-max) (point-min)))))42 (vertical-motion 0)43 (set-window-start window (point)))))44 30 45 31 ;;; for normal dragging … … 61 47 (setq before-scroll 62 48 (or before-scroll (point)))) 63 (w32-scroll-bar-drag-1 event)64 49 (save-excursion 65 50 (set-buffer (window-buffer window)) … … 73 58 (nth 2 start-position) 74 59 (- (point-max) (point-min))))) 75 (vertical-motion 0) 76 (set-window-start window (point))) 77 (t 60 (back-to-previous-visible-line-start window) 61 (set-window-start 62 window 63 (car 64 (compute-motion (line-beginning-position) 65 '(0 . 0) 66 (point-max) 67 (cons 0 68 (nth 2 69 (compute-motion 70 (line-beginning-position) 71 '(0 . 0) 72 (point) 73 (cons (window-width) 74 (window-height)) 75 (window-width) 76 (cons (window-hscroll) 0) 77 window))) 78 (window-width) 79 (cons (window-hscroll) 0) 80 window))) 81 (goto-char 82 (car 83 (compute-motion 84 (window-start window) 85 '(0 . 0) 86 (point-max) 87 (cons 0 (/ (window-height) 2)) 88 (window-width) 89 (cons (window-hscroll) 0) 90 window)))) 91 (t 78 92 ;; Exit when we get the drag event; store unread-command-events 79 93 (setq unread-command-events branches/2.0/src/ChangeLog.Meadow
r3581 r3877 1 2005-09-16 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 3 * indent.c (back-to-previous-visible-line-start): New lisp 4 function. 5 1 6 2005-01-04 Masayuki FUJII <boochang@m4.kcn.ne.jp> 2 7 branches/2.0/src/indent.c
r3104 r3877 1956 1956 } 1957 1957 1958 #ifdef MEADOW 1959 DEFUN ("back-to-previous-visible-line-start", 1960 Fback_to_previous_visible_line_start, 1961 Sback_to_previous_visible_line_start, 0, 1, 0, 1962 "If position is invisible, back to beginning of preveous visible line.") 1963 (window) 1964 Lisp_Object window; 1965 { 1966 struct window *w; 1967 struct it it; 1968 struct text_pos pt; 1969 1970 if (! NILP (window)) 1971 CHECK_WINDOW (window, 0); 1972 else 1973 window = selected_window; 1974 w = XWINDOW (window); 1975 1976 SET_TEXT_POS (pt, PT, PT_BYTE); 1977 start_display (&it, w, pt); 1978 1979 while (it.selective > 0 && IT_CHARPOS (it) > BEGV) 1980 { 1981 double val; 1982 int opt, opt_byte; 1983 1984 opt = PT; 1985 opt_byte = PT_BYTE; 1986 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 1987 while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n') 1988 scan_newline (PT - 1, PT_BYTE - 1, BEGV, BEGV_BYTE, -1, 0); 1989 1990 val = position_indentation (PT_BYTE); 1991 SET_PT_BOTH (opt, opt_byte); 1992 1993 if (val < (double)it.selective) break; 1994 1995 /* back to previous line start */ 1996 IT_CHARPOS (it) = find_next_newline_no_quit (IT_CHARPOS (it) - 1, -1); 1997 IT_BYTEPOS (it) = CHAR_TO_BYTE (IT_CHARPOS (it)); 1998 } 1999 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 2000 2001 return Qnil; 2002 } 2003 #endif /* MEADOW */ 2004 1958 2005 DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0, 1959 2006 "Move point to start of the screen line LINES lines down.\n\ … … 2025 2072 indent_tabs_mode = 1; 2026 2073 2074 #ifdef MEADOW 2075 defsubr (&Sback_to_previous_visible_line_start); 2076 #endif 2027 2077 defsubr (&Scurrent_indentation); 2028 2078 defsubr (&Sindent_to);
