From: ueno Date: Fri, 23 May 2003 02:01:35 +0000 (+0000) Subject: * liece-misc.el (liece-insert-timestamp): Abolish. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04ca5a15a76d359d7f3a728fa38e7cb4c189466b;p=elisp%2Fliece.git * liece-misc.el (liece-insert-timestamp): Abolish. (liece-own-frozen): Abolish. (liece-own-message): Abolish. (liece-scroll-if-visible): Abolish. (liece-generate-hex-timestamp): Abolish. (liece-hex-timestamp-valid): Abolish. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8eada22..dc1834c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2003-05-23 Daiki Ueno + + * liece-misc.el (liece-insert-timestamp): Abolish. + (liece-own-frozen): Abolish. + (liece-own-message): Abolish. + (liece-scroll-if-visible): Abolish. + (liece-generate-hex-timestamp): Abolish. + (liece-hex-timestamp-valid): Abolish. + 2003-05-22 Daiki Ueno * liece-commands.el (liece-command-tag-region): Simplify. diff --git a/lisp/liece-misc.el b/lisp/liece-misc.el index fcf7006..96c86ee 100644 --- a/lisp/liece-misc.el +++ b/lisp/liece-misc.el @@ -55,9 +55,6 @@ (defmacro liece-insert-info (buffer msg) `(liece-insert ,buffer (concat liece-info-prefix ,msg))) -(defmacro liece-insert-timestamp (buffer msg) - `(liece-insert ,buffer (concat liece-timestamp-prefix ,msg))) - (defmacro liece-insert-dcc (buffer msg) `(liece-insert ,buffer (concat liece-dcc-prefix ,msg))) @@ -173,9 +170,6 @@ liece-own-freeze-indicator (if liece-own-freeze "M" "-")) (force-mode-line-update))) -(defun liece-own-frozen (buffer) - (with-current-buffer buffer liece-own-freeze)) - (defun liece-ignore-this-p (nick user-at-host) ;; Remove entries which are expired. (let ((time (current-time)) expire-time) @@ -243,11 +237,6 @@ (liece-message-direction 'outgoing)) (liece-display-message ,message))) -(defmacro liece-own-message (message) - `(if (eq liece-command-buffer-mode 'channel) - (liece-own-channel-message ,message) - (liece-own-channel-message ,message))) - (defvar liece-idle-point nil "Timestamp of last idle reset.") (defmacro liece-reset-idle () @@ -328,9 +317,6 @@ (concat "[" ,hostname "]") ,hostname))) -(defmacro liece-scroll-if-visible (window) - `(if ,window (set-window-point ,window (point-max)))) - (defmacro liece-pick-buffer-1 (chnl) `(cdr (string-assoc-ignore-case ,chnl liece-channel-buffer-alist))) @@ -451,13 +437,6 @@ (floor (mod seconds 65536)) (floor (* (- seconds (ffloor seconds)) 1000000)))) -(defun liece-generate-hex-timestamp (&optional time) - "Generate timestamp string as hexadecimal. -If optional argument TIME is nil, calculate timestamp using current time." - (or time - (setq time (current-time))) - (format "%04x%04x" (car time) (cadr time))) - (defmacro liece-hex-char-to-integer (character) "Convert single hex digit CHARACTER to integer." `(if (and (>= ,character ?0) (<= ,character ?9)) @@ -477,20 +456,6 @@ If optional argument TIME is nil, calculate timestamp using current time." (setq hex-string (substring hex-string 1))) hex-num)) -(defmacro liece-hex-timestamp-valid (timestamp limit) - "Is TIMESTAMP valid within LIMIT?" - `(let (t1 t2 diff (timestamp ,timestamp)) - (if (not (and (stringp timestamp) - (string-match - "^[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$" timestamp))) - nil - (setq t1 (liece-hex-string-to-integer (substring timestamp 0 4)) - t2 (liece-hex-string-to-integer (substring timestamp 4 8)) - diff (liece-time-difference - (list t1 t2 0) (current-time))) - (or (>= ,limit 0) - (and (< diff ,limit) (> diff (- 0 ,limit))))))) - (provide 'liece-misc) ;;; liece-misc.el ends here