1 ;;; riece-inlines.el --- inline functions
2 ;; Copyright (C) 1998-2003 Daiki Ueno
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
6 ;; Keywords: IRC, riece
8 ;; This file is part of Riece.
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
27 (defsubst string-equal-ignore-case (s1 s2)
28 (string-equal (upcase s1) (upcase s2)))
30 (defsubst string-list-member-ignore-case (thing list)
31 "Returns t if thing is member of list, not funcallable"
34 (if (and (stringp (car list))
35 (string-equal-ignore-case (car list) thing))
37 (setq list (cdr list))))))
39 (defsubst string-list-delete-ignore-case (thing list)
40 (let ((pointer (string-list-member-ignore-case thing list)))
42 (delq (car pointer) list)
45 (defsubst string-list-delete (thing list)
46 (let ((pointer (member thing list)))
48 (delq (car pointer) list)
51 (defsubst string-list-modify-ignore-case (modifiers list)
53 (let ((pointer (string-list-member-ignore-case
54 (car (car modifiers)) list)))
56 (setcar pointer (cdr (car modifiers))))
57 (setq modifiers (cdr modifiers)))))
59 (defsubst string-assoc-ignore-case (key list)
62 (if (and (car-safe (car list))
63 (string-equal-ignore-case key (car (car list))))
64 (throw 'found (car list))
65 (setq list (cdr list))))))
67 (provide 'riece-inlines)
69 ;;; riece-inlines.el ends here