Changeset 33 for lang/elisp/twittering-mode/branches
- Timestamp:
- 04/26/08 15:46:34 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/elisp/twittering-mode/branches/tsuyoshi/twittering-mode.el
r31 r33 946 946 (let ((pos)) 947 947 (setq pos (twittering-get-next-username-face-pos (point))) 948 (when pos 949 (goto-char pos)))) 948 (if pos 949 (goto-char pos) 950 (message "End of status.")))) 950 951 951 952 (defun twittering-get-next-username-face-pos (pos) 952 953 (interactive) 953 954 (let ((prop)) 954 (while (not (eq prop twittering-username-face)) 955 (setq pos (next-single-property-change pos 'face)) 956 (setq prop (get-text-property pos 'face))) 955 (catch 'not-found 956 (while (and pos (not (eq prop twittering-username-face))) 957 (setq pos (next-single-property-change pos 'face)) 958 (when (eq pos nil) (throw 'not-found 0)) 959 (setq prop (get-text-property pos 'face)))) 957 960 pos)) 958 961 … … 962 965 (let ((pos)) 963 966 (setq pos (twittering-get-previous-username-face-pos (point))) 964 (when pos 965 (goto-char pos)))) 967 (if pos 968 (goto-char pos) 969 (message "Start of status.")))) 966 970 967 971 (defun twittering-get-previous-username-face-pos (pos) 968 972 (interactive) 969 973 (let ((prop)) 970 (while (not (eq prop twittering-username-face)) 971 (setq pos (previous-single-property-change pos 'face)) 972 (setq prop (get-text-property pos 'face))) 974 (catch 'not-found 975 (while (and pos (not (eq prop twittering-username-face))) 976 (setq pos (previous-single-property-change pos 'face)) 977 (when (eq pos nil) (throw 'not-found 0)) 978 (setq prop (get-text-property pos 'face)))) 973 979 pos)) 974 980 … … 978 984 (let ((user-name (twittering-get-username-at-pos (point))) 979 985 (pos (twittering-get-next-username-face-pos (point)))) 980 (while (not (equal (twittering-get-username-at-pos pos) user-name)) 981 (setq pos (twittering-get-next-username-face-pos pos))) 982 (goto-char pos))) 986 (catch 'not-found 987 (while (not (equal (twittering-get-username-at-pos pos) user-name)) 988 (setq pos (twittering-get-next-username-face-pos pos)) 989 (when (eq pos nil) (throw 'not-found 0)))) 990 (if pos 991 (goto-char pos) 992 (message "End of %s's status." user-name)))) 983 993 984 994 (defun twittering-goto-previous-status-of-user () … … 987 997 (let ((user-name (twittering-get-username-at-pos (point))) 988 998 (pos (twittering-get-previous-username-face-pos (point)))) 989 (while (not (equal (twittering-get-username-at-pos pos) user-name)) 990 (setq pos (twittering-get-previous-username-face-pos pos))) 991 (goto-char pos))) 999 (catch 'not-found 1000 (while (not (equal (twittering-get-username-at-pos pos) user-name)) 1001 (setq pos (twittering-get-previous-username-face-pos pos)) 1002 (when (eq pos nil) (throw 'not-found 0)))) 1003 (if pos 1004 (goto-char pos) 1005 (message "Start of %s's status." user-name)))) 992 1006 993 1007 (defun twittering-get-username-at-pos (pos)