/[erbot]/erbot/erbot.el
ViewVC logotype

Diff of /erbot/erbot.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by deego, Sat Jan 8 17:53:08 2005 UTC revision 1.28 by deego, Tue Mar 29 19:14:26 2005 UTC
# Line 1  Line 1 
1  ;;; erbot.el --- Another robot for ERC.  ;;; erbot.el --- Another robot for ERC.
2  ;; Time-stamp: <2005-01-08 12:52:18 deego>  ;; Time-stamp: <2005-03-29 13:59:29 deego>
3  ;; Emacs Lisp Archive entry  ;; Emacs Lisp Archive entry
4  ;; Filename: erbot.el  ;; Filename: erbot.el
5  ;; Package: erbot  ;; Package: erbot
# Line 654  those things.. Line 654  those things..
654             lines))))))             lines))))))
655    
656    
657    (defcustom erbot-setf-p nil
658      "If you want your bot to allow setf, set this symbol to non-nil at
659    the beginning of your .emacs")
660    
661      
662  ;;;###autoload  ;;;###autoload
663  (defun erbot-install ()  (defun erbot-install ()
664    "Run this function AFTER loading all the files..."    "Run this function AFTER loading all the files..."
# Line 674  those things.. Line 679  those things..
679           (add-hook 'erc-server-376-hook           (add-hook 'erc-server-376-hook
680                     'erbot-autojoin-channels))                     'erbot-autojoin-channels))
681          )          )
682    (erbot-install-symbols))    (erbot-install-symbols)
683      (when erbot-setf-p (erbot-install-setf))
684      )
685    
686    
687    
688    (defun erbot-install-setf ()
689      (interactive)
690      (defalias 'fs-setf 'setf)
691      (require 'cl)
692      (let*
693          ((syms
694            (apropos-internal "" (lambda (a) (get a 'setf-method))))
695           (fssyms
696            (mapcar
697             (lambda (a) (intern (format "fs-%s" a)))
698             syms))
699           (fsisyms
700            (mapcar
701             (lambda (a) (intern (format "fsi-%s" a)))
702             syms)))
703        (mapcar*
704         (lambda (a b c)
705           (let ((foo (get a 'setf-method)))
706             (put b 'setf-method foo)
707             (put c 'setf-method foo)))
708         syms fssyms fsisyms)))
709    
710    
711    
712    

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26