From: yamaoka Date: Tue, 6 Jul 1999 10:08:45 +0000 (+0000) Subject: (gnus-point-at-eol, gnus-point-at-bol): Use `static-cond'. X-Git-Tag: et-gnus-6_11_05-01~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=aea236844c73935d072b2fc843d0693103cf7857;p=elisp%2Fgnus.git- (gnus-point-at-eol, gnus-point-at-bol): Use `static-cond'. --- diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index e524daa..0b287cb 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -110,61 +110,34 @@ (when (gnus-buffer-exists-p buf) (kill-buffer buf)))) -(static-if (fboundp 'static-cond) - (progn - (static-cond - ((fboundp 'point-at-bol) - (fset 'gnus-point-at-bol 'point-at-bol)) - ((fboundp 'line-beginning-position) - (fset 'gnus-point-at-bol 'line-beginning-position)) - (t - (defun gnus-point-at-bol () - "Return point at the beginning of the line." - (let ((p (point))) - (beginning-of-line) - (prog1 - (point) - (goto-char p)))) - )) - (static-cond - ((fboundp 'point-at-eol) - (fset 'gnus-point-at-eol 'point-at-eol)) - ((fboundp 'line-end-position) - (fset 'gnus-point-at-eol 'line-end-position)) - (t - (defun gnus-point-at-eol () - "Return point at the end of the line." - (let ((p (point))) - (end-of-line) - (prog1 - (point) - (goto-char p)))) - )) - ) - ;; The following parts will be abolished in the future. - (static-if (fboundp 'point-at-bol) - (fset 'gnus-point-at-bol 'point-at-bol) - (static-if (fboundp 'line-beginning-position) - (fset 'gnus-point-at-bol 'line-beginning-position) - (defun gnus-point-at-bol () - "Return point at the beginning of the line." - (let ((p (point))) - (beginning-of-line) - (prog1 - (point) - (goto-char p)))))) - (static-if (fboundp 'point-at-eol) - (fset 'gnus-point-at-eol 'point-at-eol) - (static-if (fboundp 'line-end-position) - (fset 'gnus-point-at-eol 'line-end-position) - (defun gnus-point-at-eol () - "Return point at the end of the line." - (let ((p (point))) - (end-of-line) - (prog1 - (point) - (goto-char p)))))) - ) +(static-cond + ((fboundp 'point-at-bol) + (fset 'gnus-point-at-bol 'point-at-bol)) + ((fboundp 'line-beginning-position) + (fset 'gnus-point-at-bol 'line-beginning-position)) + (t + (defun gnus-point-at-bol () + "Return point at the beginning of the line." + (let ((p (point))) + (beginning-of-line) + (prog1 + (point) + (goto-char p)))) + )) +(static-cond + ((fboundp 'point-at-eol) + (fset 'gnus-point-at-eol 'point-at-eol)) + ((fboundp 'line-end-position) + (fset 'gnus-point-at-eol 'line-end-position)) + (t + (defun gnus-point-at-eol () + "Return point at the end of the line." + (let ((p (point))) + (end-of-line) + (prog1 + (point) + (goto-char p)))) + )) (defun gnus-delete-first (elt list) "Delete by side effect the first occurrence of ELT as a member of LIST."