Show
Ignore:
Timestamp:
04/07/07 15:49:28 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/calendar/icalendar.el

    r4190 r4200  
    102102;;; Code: 
    103103 
    104 (defconst icalendar-version "0.14
     104(defconst icalendar-version "0.15
    105105  "Version number of icalendar.el.") 
    106106 
     
    227227    unfolded-buffer)) 
    228228 
    229 (defsubst icalendar--rris (&rest args
     229(defsubst icalendar--rris (regexp rep string &optional fixedcase literal
    230230  "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)))) 
     231Pass 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))))) 
    239240 
    240241(defun icalendar--read-element (invalue inparams) 
     
    14731474 
    14741475It will ask for each appointment whether to add it to the diary 
    1475 when DO-NOT-ASK is non-nil.  When called interactively, 
    1476 DO-NOT-ASK is set to t, so that you are asked fore each event. 
     1476unless DO-NOT-ASK is non-nil.  When called interactively, 
     1477DO-NOT-ASK is nil, so that you are asked for each event. 
    14771478 
    14781479NON-MARKING determines whether diary events are created as 
     
    16701671                                (icalendar--format-ical-event e))) 
    16711672                  (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))) 
    16741678              ;; event was not ok 
    16751679              (setq found-error t) 
     
    16851689                                    error-val error-string e)) 
    16861690         (message "%s" error-string)))) 
     1691 
    16871692    ;; 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"))))) 
    16941700    (if found-error 
    16951701        (save-current-buffer 
     
    19441950              (read-file-name "Add appointment to this diary file: "))) 
    19451951      ;; 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) 
    19471955 
    19481956(provide 'icalendar)