1 |
;;; gnus-util.el --- utility functions for Gnus |
;;; gnus-util.el --- utility functions for Gnus |
2 |
;; Copyright (C) 1996, 1997, 1998, 1999, 2000 |
;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002 |
3 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
612 |
It is safe to use gnus-atomic-progn-assign with long computations. |
It is safe to use gnus-atomic-progn-assign with long computations. |
613 |
|
|
614 |
Note that if any of the symbols in PROTECT were unbound, they will be |
Note that if any of the symbols in PROTECT were unbound, they will be |
615 |
set to nil on a sucessful assignment. In case of an error or other |
set to nil on a successful assignment. In case of an error or other |
616 |
non-local exit, it will still be unbound." |
non-local exit, it will still be unbound." |
617 |
(let* ((temp-sym-map (mapcar (lambda (x) (list (make-symbol |
(let* ((temp-sym-map (mapcar (lambda (x) (list (make-symbol |
618 |
(concat (symbol-name x) |
(concat (symbol-name x) |
804 |
;;; |
;;; |
805 |
|
|
806 |
(defun gnus-parse-netrc (file) |
(defun gnus-parse-netrc (file) |
807 |
"Parse FILE and return an list of all entries in the file." |
"Parse FILE and return a list of all entries in the file." |
808 |
(when (file-exists-p file) |
(when (file-exists-p file) |
809 |
(with-temp-buffer |
(with-temp-buffer |
810 |
(let ((tokens '("machine" "default" "login" |
(let ((tokens '("machine" "default" "login" |
984 |
(property value start end properties &optional object) |
(property value start end properties &optional object) |
985 |
"Like `gnus-add-text-properties', only applied on where PROPERTY is VALUE." |
"Like `gnus-add-text-properties', only applied on where PROPERTY is VALUE." |
986 |
(let (point) |
(let (point) |
987 |
(while (and start |
(while (and start |
988 |
(setq point (text-property-not-all start end property value))) |
(setq point (text-property-not-all start end property value))) |
989 |
(gnus-add-text-properties start point properties object) |
(gnus-add-text-properties start point properties object) |
990 |
(setq start (text-property-any point end property value))) |
(setq start (text-property-any point end property value))) |
995 |
(property value start end properties &optional object) |
(property value start end properties &optional object) |
996 |
"Like `remove-text-properties', only applied on where PROPERTY is VALUE." |
"Like `remove-text-properties', only applied on where PROPERTY is VALUE." |
997 |
(let (point) |
(let (point) |
998 |
(while (and start |
(while (and start |
999 |
(setq point (text-property-not-all start end property value))) |
(setq point (text-property-not-all start end property value))) |
1000 |
(remove-text-properties start point properties object) |
(remove-text-properties start point properties object) |
1001 |
(setq start (text-property-any point end property value))) |
(setq start (text-property-any point end property value))) |