Changeset 3875
- Timestamp:
- 09/16/05 18:33:32 (3 years ago)
- Files:
-
- branches/2.1/lisp/ChangeLog.Meadow (modified) (1 diff)
- branches/2.1/lisp/mw32scroll.el (modified) (3 diffs)
- branches/2.1/src/ChangeLog.Meadow (modified) (1 diff)
- branches/2.1/src/indent.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.1/lisp/ChangeLog.Meadow
r3864 r3875 1 2005-09-16 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 3 * mw32scroll.el (w32-scroll-bar-drag-1): Bug fix of previous 4 change. Fixed issue MW137. 5 (w32-scroll-bar-drag): Ditto. 6 1 7 2005-09-10 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 8 branches/2.1/lisp/mw32scroll.el
r3864 r3875 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.1/src/ChangeLog.Meadow
r3858 r3875 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-09-08 MIYOSHI Masanori <miyoshi@meadowy.org> 2 7 branches/2.1/src/indent.c
r3212 r3875 1975 1975 } 1976 1976 1977 #ifdef MEADOW 1978 DEFUN ("back-to-previous-visible-line-start", 1979 Fback_to_previous_visible_line_start, 1980 Sback_to_previous_visible_line_start, 0, 1, 0, 1981 "If position is invisible, back to beginning of preveous visible line.") 1982 (window) 1983 Lisp_Object window; 1984 { 1985 struct window *w; 1986 struct it it; 1987 struct text_pos pt; 1988 1989 if (! NILP (window)) 1990 CHECK_WINDOW (window, 0); 1991 else 1992 window = selected_window; 1993 w = XWINDOW (window); 1994 1995 SET_TEXT_POS (pt, PT, PT_BYTE); 1996 start_display (&it, w, pt); 1997 1998 while (it.selective > 0 && IT_CHARPOS (it) > BEGV) 1999 { 2000 double val; 2001 int opt, opt_byte; 2002 2003 opt = PT; 2004 opt_byte = PT_BYTE; 2005 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 2006 while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n') 2007 scan_newline (PT - 1, PT_BYTE - 1, BEGV, BEGV_BYTE, -1, 0); 2008 2009 val = position_indentation (PT_BYTE); 2010 SET_PT_BOTH (opt, opt_byte); 2011 2012 if (val < (double)it.selective) break; 2013 2014 /* back to previous line start */ 2015 IT_CHARPOS (it) = find_next_newline_no_quit (IT_CHARPOS (it) - 1, -1); 2016 IT_BYTEPOS (it) = CHAR_TO_BYTE (IT_CHARPOS (it)); 2017 } 2018 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 2019 2020 return Qnil; 2021 } 2022 #endif /* MEADOW */ 2023 1977 2024 DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0, 1978 2025 "Move point to start of the screen line LINES lines down.\n\ … … 2053 2100 indent_tabs_mode = 1; 2054 2101 2102 #ifdef MEADOW 2103 defsubr (&Sback_to_previous_visible_line_start); 2104 #endif 2055 2105 defsubr (&Scurrent_indentation); 2056 2106 defsubr (&Sindent_to);
