Changeset 4200 for trunk/lisp/calendar/icalendar.el
- Timestamp:
- 04/07/07 15:49:28 (2 years ago)
- Files:
-
- trunk/lisp/calendar/icalendar.el (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/calendar/icalendar.el
r4190 r4200 102 102 ;;; Code: 103 103 104 (defconst icalendar-version "0.1 4"104 (defconst icalendar-version "0.15" 105 105 "Version number of icalendar.el.") 106 106 … … 227 227 unfolded-buffer)) 228 228 229 (defsubst icalendar--rris ( &rest args)229 (defsubst icalendar--rris (regexp rep string &optional fixedcase literal) 230 230 "Replace regular expression in string. 231 Pass ARGS to `replace-regexp-in-string' (Emacs) or to 232 `replace-in-string' (XEmacs)." 233 (if (fboundp 'replace-regexp-in-string) 234 ;; Emacs: 235 (apply 'replace-regexp-in-string args) 236 ;; XEmacs: 237 (save-match-data ;; apparently XEmacs needs save-match-data 238 (apply 'replace-in-string args)))) 231 Pass arguments REGEXP REP STRING FIXEDCASE LITERAL to 232 `replace-regexp-in-string' (Emacs) or to `replace-in-string' (XEmacs)." 233 (cond ((fboundp 'replace-regexp-in-string) 234 ;; Emacs: 235 (replace-regexp-in-string regexp rep string fixedcase literal)) 236 ((fboundp 'replace-in-string) 237 ;; XEmacs: 238 (save-match-data ;; apparently XEmacs needs save-match-data 239 (replace-in-string string regexp rep literal))))) 239 240 240 241 (defun icalendar--read-element (invalue inparams) … … 1473 1474 1474 1475 It will ask for each appointment whether to add it to the diary 1475 whenDO-NOT-ASK is non-nil. When called interactively,1476 DO-NOT-ASK is set to t, so that you are asked foreeach event.1476 unless DO-NOT-ASK is non-nil. When called interactively, 1477 DO-NOT-ASK is nil, so that you are asked for each event. 1477 1478 1478 1479 NON-MARKING determines whether diary events are created as … … 1670 1671 (icalendar--format-ical-event e))) 1671 1672 (if do-not-ask (setq summary nil)) 1672 (icalendar--add-diary-entry diary-string diary-file 1673 non-marking summary)) 1673 ;; add entry to diary and store actual name of diary 1674 ;; file (in case it was nil) 1675 (setq diary-file 1676 (icalendar--add-diary-entry diary-string diary-file 1677 non-marking summary))) 1674 1678 ;; event was not ok 1675 1679 (setq found-error t) … … 1685 1689 error-val error-string e)) 1686 1690 (message "%s" error-string)))) 1691 1687 1692 ;; insert final newline 1688 (let ((b (find-buffer-visiting diary-file))) 1689 (when b 1690 (save-current-buffer 1691 (set-buffer b) 1692 (goto-char (point-max)) 1693 (insert "\n")))) 1693 (if diary-file 1694 (let ((b (find-buffer-visiting diary-file))) 1695 (when b 1696 (save-current-buffer 1697 (set-buffer b) 1698 (goto-char (point-max)) 1699 (insert "\n"))))) 1694 1700 (if found-error 1695 1701 (save-current-buffer … … 1944 1950 (read-file-name "Add appointment to this diary file: "))) 1945 1951 ;; Note: make-diary-entry will add a trailing blank char.... :( 1946 (make-diary-entry string non-marking diary-file)))) 1952 (make-diary-entry string non-marking diary-file))) 1953 ;; return diary-file in case it has been changed interactively 1954 diary-file) 1947 1955 1948 1956 (provide 'icalendar)
