Nix wrote: > On 13 Feb 2007, Len Trigg told this: > > I had a bit of a hack and this is what I came up with (bits were > > copied from the beginning of bbdb-annotate-message-sender). Basically > > it sets bbdb-readonly-p to true if there's a field called readonly > > associated with the record (if any). Please show me if there's a > > better way to accomplish this (in particular how it interacts with > > typical use of bbdb-readonly-p): > > I'd expect that you can use the bbdb-change-hook for that (although > I haven't tried it).
By that time it's already too late, the annotations have already been determined (and questions asked etc). Same applies to bbdb-notice-hook. Alternatives (that involve changing bbdb itself): * Have a bbdb-annotate-message-sender-hook (but whether to have that invoked with original arguments, or after any pre-existing record is located)? * Allow bbdb-readonly-p to be a function that takes a record as a parameter, e.g. (defun my-bbdb-readonly-p (record) (or bbdb-readonly-p (and record (listp (bbdb-record-raw-notes record)) (cdr (assq 'readonly (bbdb-record-raw-notes record)))))) (setq bbdb-readonly-p 'my-bbdb-readonly-p) Cheers, Len. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/