[PATCH] Make the X11 font menu work again.
17 years, 8 months
Aidan Kehoe
lisp/ChangeLog addition:
2007-01-02 Aidan Kehoe <kehoea(a)parhasard.net>
* cus-face.el (custom-set-face-update-spec):
Fix some formatting.
* faces.el (reset-face):
reset-face resets other faces to behave like the default face--it
shouldn't do anything if it's handed the default face.
* font-menu.el:
* font-menu.el (font-menu-set-font):
If the font was initialised from X resources (the tag-set
contains 'x-resource) pretend to Custom that it has
responsibility for those settings.
* x-faces.el:
Add a couple of fontconfig functions to the
globally-declare-fboundp, to eliminate a couple of byte-compile
warnings.
* x-faces.el ('x-resource)): New specifier tag, used to mark when
a face's font or other attributes have been initialised from X
resources.
* x-faces.el (x-init-face-from-resources):
Use the new specifier tag; also, instead of using a fragile
explicit list of what would incidentally be specified for the X11
Unicode fonts in faces.c, pay attention to the new specifier tag
created in that file for the specific purpose of grouping those
instantiators together.
src/ChangeLog addition:
2007-01-02 Aidan Kehoe <kehoea(a)parhasard.net>
* faces.c:
* faces.c (syms_of_faces):
* faces.c (complex_vars_of_faces):
New symbol and corresponding specifier tag,
x-coverage-instantiator, used to group those fonts used for their
extensive coverage for obscure characters in x-faces.el.
* specifier.c (setup_device_initial_specifier_tags):
Fix a bug where the mswindows specifier tag was matching X11
devices, because the format of the DEVICE_USER_SPECIFIED_TAGS list
wasn't being respected correctly.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: src/specifier.c
===================================================================
RCS src/faces.c
===================================================================
RCS lisp/x-faces.el
===================================================================
RCS lisp/font-menu.el
===================================================================
RCS lisp/faces.el
===================================================================
RCS lisp/cus-face.el
===================================================================
RCS
Index: lisp/cus-face.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/cus-face.el,v
retrieving revision 1.12
diff -u -u -r1.12 cus-face.el
--- lisp/cus-face.el 2005/10/25 11:28:24 1.12
+++ lisp/cus-face.el 2007/01/01 23:36:44
@@ -282,7 +282,7 @@
;;;###autoload
(defun custom-set-face-update-spec (face display plist)
"Customize the FACE for display types matching DISPLAY, merging
- in the new items from PLIST."
+in the new items from PLIST."
(let ((spec (face-spec-update-all-matching (custom-face-get-spec face)
display plist)))
(put face 'customized-face spec)
Index: lisp/faces.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/faces.el,v
retrieving revision 1.39
diff -u -u -r1.39 faces.el
--- lisp/faces.el 2006/11/05 22:31:32 1.39
+++ lisp/faces.el 2007/01/01 23:36:45
@@ -398,10 +398,10 @@
The arguments LOCALE, TAG-SET and EXACT-P are the same as for
`remove-specifier'."
- (mapc (lambda (x)
- (remove-specifier (face-property face x) locale tag-set exact-p))
- built-in-face-specifiers)
- nil)
+ ;; Don't reset the default face.
+ (unless (eq 'default face)
+ (dolist (x built-in-face-specifiers nil)
+ (remove-specifier (face-property face x) locale tag-set exact-p))))
(defun set-face-parent (face parent &optional locale tag-set how-to-add)
"Set the parent of FACE to PARENT, for all properties.
Index: lisp/font-menu.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/font-menu.el,v
retrieving revision 1.9
diff -u -u -r1.9 font-menu.el
--- lisp/font-menu.el 2005/11/26 11:45:54 1.9
+++ lisp/font-menu.el 2007/01/01 23:36:46
@@ -365,13 +365,32 @@
(/ (or size from-size)
(specifier-instance font-menu-size-scaling
(selected-device))))
- "pt"))))
+ "pt")))
+ new-spec-list)
+ ;; If the font was initialised from X resources (the tag-set
+ ;; contains 'x-resource) pretend to Custom that it has
+ ;; responsibility for those settings.
+ (map-specifier (face-font 'default)
+ (lambda (spec locale inst-list arg)
+ (loop
+ for (tag-set . inst)
+ in inst-list
+ do (setq tag-set (delq 'x-resource tag-set)
+ tag-set (delq 'custom tag-set)
+ tag-set (cons 'custom tag-set))
+ (push (cons tag-set inst) new-spec-list)
+ ;; Need to return nil, else map-specifier stops
+ finally return nil))
+ nil nil '(x-resource))
+ (remove-specifier (face-font 'default) nil '(x-resource))
+ (when new-spec-list
+ (add-spec-list-to-specifier (face-font 'default)
+ (list (cons 'global new-spec-list))))
(custom-set-face-update-spec 'default
(list (list 'type (device-type)))
(list :family (or family from-family)
:size fsize))))
(message "Font %s" (face-font-name 'default))))
-
;; #### This should be called `font-menu-maybe-change-face'
;; I wonder if a better API wouldn't (face attribute from to)
Index: lisp/x-faces.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/x-faces.el,v
retrieving revision 1.27
diff -u -u -r1.27 x-faces.el
--- lisp/x-faces.el 2006/12/17 11:25:59 1.27
+++ lisp/x-faces.el 2007/01/01 23:36:49
@@ -74,11 +74,11 @@
fc-font-name-slant-oblique fc-font-name-slant-italic
fc-font-name-slant-roman))
(globally-declare-fboundp
- '(fc-pattern-del-size fc-pattern-get-size fc-pattern-add-size
- fc-pattern-del-style fc-pattern-duplicate fc-copy-pattern-partial
- fc-pattern-add-weight fc-pattern-del-weight fc-try-font
- fc-pattern-del-slant fc-pattern-add-slant fc-name-unparse
- fc-pattern-get-pixelsize)))
+ '(fc-font-match fc-pattern-del-size fc-pattern-get-size
+ fc-pattern-add-size fc-pattern-del-style fc-pattern-duplicate
+ fc-copy-pattern-partial fc-pattern-add-weight fc-pattern-del-weight
+ fc-try-font fc-pattern-del-slant fc-pattern-add-slant fc-name-parse
+ fc-name-unparse fc-pattern-get-pixelsize)))
(defconst x-font-regexp nil)
(defconst x-font-regexp-head nil)
@@ -653,6 +653,9 @@
;;; state where signalling an error or entering the debugger would likely
;;; result in a crash.
+;; When we initialise a face from an X resource, note that we did so.
+(define-specifier-tag 'x-resource)
+
(defun x-init-face-from-resources (face &optional locale set-anyway)
;;
@@ -681,6 +684,7 @@
;; specs.
(x-tag-set '(x default))
(tty-tag-set '(tty default))
+ (our-tag-set '(x x-resource))
(device-class nil)
(face-sym (face-name face))
(name (symbol-name face-sym))
@@ -738,7 +742,8 @@
(if device-class
(setq tag-set (cons device-class tag-set)
x-tag-set (cons device-class x-tag-set)
- tty-tag-set (cons device-class tty-tag-set)))
+ tty-tag-set (cons device-class tty-tag-set)
+ our-tag-set (cons device-class our-tag-set)))
;;
;; If this is the default face, then any unspecified properties should
@@ -782,28 +787,22 @@
;; globally. This means we should override global
;; defaults for all X device classes.
(remove-specifier (face-font face) locale x-tag-set nil))
- (set-face-font face fn locale 'x append)
- ;
- ; (debug-print "the face is %s, locale %s, specifier %s"
- ; face locale (face-font face))
- ;
+ (set-face-font face fn locale our-tag-set append)
+
;; And retain some of the fallbacks in the generated default face,
;; since we don't want to try andale-mono's ISO-10646-1 encoding for
- ;; Amharic or Thai. This is fragile; it depends on the code in
- ;; faces.c.
- (unless (featurep 'xft-fonts)
- (dolist (assocked '((x encode-as-utf-8 initial)
- (x two-dimensional initial)
- (x one-dimensional final)
- (x two-dimensional final)))
- (when (and (specifierp (face-font face))
- (consp (specifier-fallback (face-font face)))
- (setq assocked
- (assoc assocked
- (specifier-fallback
- (face-font face)))))
- (set-face-font face (cdr assocked) locale
- (nreverse (car assocked)) append)))))
+ ;; Amharic or Thai.
+ (when (and (specifierp (face-font face))
+ (consp (specifier-fallback (face-font face))))
+ (loop
+ for (tag-set . instantiator)
+ in (specifier-fallback (face-font face))
+ if (memq 'x-coverage-instantiator tag-set)
+ do (add-spec-list-to-specifier
+ (face-font face)
+ (list (cons (or locale 'global)
+ (list (cons tag-set instantiator))))
+ append))))
;; Kludge-o-rooni. Set the foreground and background resources for
;; X devices only -- otherwise things tend to get all messed up
@@ -814,14 +813,14 @@
locale
x-tag-set)
(remove-specifier (face-foreground face) locale x-tag-set nil))
- (set-face-foreground face fg locale 'x append))
+ (set-face-foreground face fg locale our-tag-set append))
(when bg
(if device-class
(remove-specifier-specs-matching-tag-set-cdrs (face-background face)
locale
x-tag-set)
(remove-specifier (face-background face) locale x-tag-set nil))
- (set-face-background face bg locale 'x append))
+ (set-face-background face bg locale our-tag-set append))
(when bgp
(if device-class
(remove-specifier-specs-matching-tag-set-cdrs (face-background-pixmap
@@ -829,7 +828,7 @@
locale
x-tag-set)
(remove-specifier (face-background-pixmap face) locale x-tag-set nil))
- (set-face-background-pixmap face bgp locale nil append))
+ (set-face-background-pixmap face bgp locale our-tag-set append))
(when ulp
(if device-class
(remove-specifier-specs-matching-tag-set-cdrs (face-property
@@ -838,7 +837,7 @@
tty-tag-set)
(remove-specifier (face-property face 'underline) locale
tty-tag-set nil))
- (set-face-underline-p face ulp locale nil append))
+ (set-face-underline-p face ulp locale our-tag-set append))
(when stp
(if device-class
(remove-specifier-specs-matching-tag-set-cdrs (face-property
@@ -847,7 +846,7 @@
tty-tag-set)
(remove-specifier (face-property face 'strikethru)
locale tty-tag-set nil))
- (set-face-strikethru-p face stp locale nil append))
+ (set-face-strikethru-p face stp locale our-tag-set append))
(when hp
(if device-class
(remove-specifier-specs-matching-tag-set-cdrs (face-property
@@ -856,7 +855,7 @@
tty-tag-set)
(remove-specifier (face-property face 'highlight)
locale tty-tag-set nil))
- (set-face-highlight-p face hp locale nil append))
+ (set-face-highlight-p face hp locale our-tag-set append))
(when dp
(if device-class
(remove-specifier-specs-matching-tag-set-cdrs (face-property
@@ -864,7 +863,7 @@
locale
tty-tag-set)
(remove-specifier (face-property face 'dim) locale tty-tag-set nil))
- (set-face-dim-p face dp locale nil append))
+ (set-face-dim-p face dp locale our-tag-set append))
(when bp
(if device-class
(remove-specifier-specs-matching-tag-set-cdrs (face-property
@@ -873,7 +872,7 @@
tty-tag-set)
(remove-specifier (face-property face 'blinking) locale
tty-tag-set nil))
- (set-face-blinking-p face bp locale nil append))
+ (set-face-blinking-p face bp locale our-tag-set append))
(when rp
(if device-class
(remove-specifier-specs-matching-tag-set-cdrs (face-property
@@ -882,7 +881,7 @@
tty-tag-set)
(remove-specifier (face-property face 'reverse) locale
tty-tag-set nil))
- (set-face-reverse-p face rp locale nil append))
+ (set-face-reverse-p face rp locale our-tag-set append))
))
;; GNU Emacs compatibility. (move to obsolete.el?)
Index: src/faces.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/faces.c,v
retrieving revision 1.53
diff -u -u -r1.53 faces.c
--- src/faces.c 2006/12/17 11:26:09 1.53
+++ src/faces.c 2007/01/01 23:36:52
@@ -2011,7 +2011,7 @@
#ifdef MULE
-Lisp_Object Qone_dimensional, Qtwo_dimensional;
+Lisp_Object Qone_dimensional, Qtwo_dimensional, Qx_coverage_instantiator;
DEFUN ("specifier-tag-one-dimensional-p",
Fspecifier_tag_one_dimensional_p,
@@ -2108,6 +2108,8 @@
#ifdef MULE
DEFSYMBOL (Qone_dimensional);
DEFSYMBOL (Qtwo_dimensional);
+ DEFSYMBOL (Qx_coverage_instantiator);
+
/* I would much prefer these were in Lisp. */
DEFSUBR (Fspecifier_tag_one_dimensional_p);
DEFSUBR (Fspecifier_tag_two_dimensional_p);
@@ -2307,6 +2309,13 @@
define_specifier_tag (Qencode_as_utf_8, Qnil,
intern("specifier-tag-encode-as-utf-8-p"));
+
+ /* This tag is used to group those instantiators made available in the
+ fallback for the sake of coverage of obscure characters, notably
+ Markus Kuhn's misc-fixed fonts. They will be copied from the fallback
+ when the default face is determined from X resources at startup. */
+ define_specifier_tag (Qx_coverage_instantiator, Qnil, Qnil);
+
#endif /* MULE */
#ifdef USE_XFT
@@ -2333,7 +2342,7 @@
inst_list =
Fcons
(Fcons
- (list3(device_symbol, Qtwo_dimensional, Qfinal),
+ (list4(device_symbol, Qtwo_dimensional, Qfinal, Qx_coverage_instantiator),
build_string
("-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1")),
inst_list);
@@ -2345,7 +2354,7 @@
inst_list =
Fcons
(Fcons
- (list3(device_symbol, Qone_dimensional, Qfinal),
+ (list4(device_symbol, Qone_dimensional, Qfinal, Qx_coverage_instantiator),
build_string
("-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")),
inst_list);
@@ -2365,7 +2374,7 @@
inst_list =
Fcons
(Fcons
- (list3(device_symbol, Qencode_as_utf_8, Qinitial),
+ (list4(device_symbol, Qencode_as_utf_8, Qinitial, Qx_coverage_instantiator),
build_string
("-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")),
inst_list);
Index: src/specifier.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/specifier.c,v
retrieving revision 1.51
diff -u -u -r1.51 specifier.c
--- src/specifier.c 2006/12/11 12:22:52 1.51
+++ src/specifier.c 2007/01/01 23:36:57
@@ -1310,18 +1310,17 @@
assert(3 == list_len);
device_predicate = XCADR(XCAR (rest));
- charset_predicate = XCADDR(XCAR (rest));
if (NILP (device_predicate))
{
- XCDR (XCAR (rest2)) = list2(Qt, charset_predicate);
+ XCDR (XCAR (rest2)) = Qt;
}
else
{
device_predicate = !NILP (call_critical_lisp_code
(d, device_predicate, device))
? Qt : Qnil;
- XCDR (XCAR (rest2)) = list2(device_predicate, charset_predicate);
+ XCDR (XCAR (rest2)) = device_predicate;
}
}
}
--
When I was in the scouts, the leader told me to pitch a tent. I couldn't
find any pitch, so I used creosote.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Only call charset-registries in the font menu if it's available
17 years, 8 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
lisp/ChangeLog addition:
2007-04-22 Aidan Kehoe <kehoea(a)parhasard.net>
* x-font-menu.el (x-reset-device-font-menus-core):
Only call charset-registries in the font menu if it's
available. Restores font menu functionality on non-Mule.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: lisp/x-font-menu.el
===================================================================
RCS
Index: lisp/x-font-menu.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/x-font-menu.el,v
retrieving revision 1.18
diff -u -u -r1.18 x-font-menu.el
--- lisp/x-font-menu.el 2006/11/05 22:31:32 1.18
+++ lisp/x-font-menu.el 2007/04/22 09:23:05
@@ -157,7 +157,10 @@
;; #### - this should implement a `menus-only' option, which would
;; recalculate the menus from the cache w/o having to do font-list again.
(unless x-font-regexp-ascii
- (setq x-font-regexp-ascii (elt (charset-registries 'ascii) 0)))
+ (setq x-font-regexp-ascii
+ (if (fboundp 'charset-registries)
+ (elt (charset-registries 'ascii) 0)
+ "iso8859-1")))
(setq x-font-menu-registry-encoding
(if (featurep 'mule) "*-*" "iso8859-1"))
(let ((case-fold-search t)
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[xemacs-base] Partial fix for comint-carriage-motion
17 years, 8 months
Stephen J. Turnbull
xemacs-base
This patch fixes one problem with `comint-carriage-motion', so that
setting `comint-inhibit-carriage-motion' nil doesn't cause an error on
every bare CR. Ie, `comint-carriage-motion' is useful and bearable now.
However, there remains some bug such that the hook doesn't always
clean up a line terminated with a bare CR. I've added a mention of
this to the docstring for `comint-inhibit-carriage-motion'.
I'd like to commit, as I really don't know when I'll have time and
energy to work on the harder bug. Comments?
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/ChangeLog,v
retrieving revision 1.194
diff -u -r1.194 ChangeLog
--- ChangeLog 2007/03/07 07:28:47 1.194
+++ ChangeLog 2007/04/02 14:10:14
@@ -0,0 +1,4 @@
+2007-04-02 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * comint.el (comint-output-filter): Avoid error if filter deletes.
+ (comint-inhibit-carriage-motion): Comment on remaining bug.
+
Index: comint.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/comint.el,v
retrieving revision 1.20
diff -u -r1.20 comint.el
--- comint.el 2007/03/07 04:18:40 1.20
+++ comint.el 2007/04/02 14:10:16
@@ -1692,7 +1692,10 @@
;; XEmacs change: don't interpret carriage control characters by default
(defvar comint-inhibit-carriage-motion t
"If nil, Comint will interpret `carriage control' characters in output.
-See `comint-carriage-motion' for details.")
+See `comint-carriage-motion' for details..
+Note: currently this does not work perfectly. Specifically a bare ASCII
+CR will usually, but not always, result in the current line being erased
+(giving the effect of overwriting it).")
;; When non-nil, this is an extent over the last recognized prompt in
;; the buffer; it is used when highlighting the prompt.
@@ -1790,6 +1793,11 @@
(force-mode-line-update)
(unless comint-inhibit-carriage-motion
+ ;; oend needs to be adjusted if the buffer content is changed.
+ ;; Specifically, an error occurs if oend points beyond EOB.
+ ;; Use of a marker seems to (mostly) work (see docstring of
+ ;; `comint-inhibit-carriage-motion').
+ (setq oend (copy-marker oend))
;; Interpret any carriage motion characters (newline, backspace)
(comint-carriage-motion comint-last-output-start (point)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [AC21.5] Simplify redisplay-x/separate_textual_runs
17 years, 8 months
Stephen J. Turnbull
APPROVE COMMIT 21.5
Per comments by Vin and Olivier.
Vin Shelton writes:
> Yup - much better! Please commit. :-)
Thanks for the confirmation, Vin! Sorry about the brain damage, I
actually noticed it in the patch but didn't realize that it wasn't
intentional.
src/ChangeLog addition:
2007-04-16 Stephen J. Turnbull <stephen(a)xemacs.org>
* redisplay-x.c (separate_textual_runs_nomule): Oops. We agreed
that memcpy didn't work, and used it anyway. Fix it.
21.5 source patch:
Diff command: cvs -q diff -u
Index: src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.1054
diff -u -u -r1.1054 ChangeLog
--- src/ChangeLog 14 Apr 2007 16:10:53 -0000 1.1054
+++ src/ChangeLog 16 Apr 2007 13:47:03 -0000
@@ -1,18 +1,7 @@
+2007-04-16 Stephen J. Turnbull <stephen(a)xemacs.org>
+ * redisplay-x.c (separate_textual_runs_nomule): Oops. We agreed
+ that memcpy didn't work, and used it anyway. Fix it.
2007-04-01 Stephen J. Turnbull <stephen(a)xemacs.org>
Index: src/redisplay-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay-x.c,v
retrieving revision 1.47
diff -u -u -r1.47 redisplay-x.c
--- src/redisplay-x.c 5 Apr 2007 02:27:11 -0000 1.47
+++ src/redisplay-x.c 16 Apr 2007 13:47:05 -0000
@@ -145,7 +145,8 @@
run_storage[0].dimension = 1;
run_storage[0].charset = Qnil;
- memcpy (text_storage, str, len);
+ while (len--)
+ *text_storage++ = *str++;
return 1;
}
#endif
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [Q] Implement FcConfig handling (95%)
17 years, 8 months
Michael Sperber
"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
> Michael Sperber writes:
>
> > +XEmacs: signals out-of-memory if FcConfigBuildFonts fails
> >
> > Why *out of memory*?
>
> Because that's the way it is documented that FcConfigBuildFonts can
> fail.
Ah, OK. Thanks!
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Sync with Emacs CVS
17 years, 8 months
Jeff Miller
I plan on committing this Sun evening.
Jeff
ChangeLog addition:
2007-04-14 Jeff Miller <jeff.miller(a)xemacs.org>
* cal-html.el (cal-html-comment): replace call to
replace-regexp-in-string with replace-in-string
* cal-html.el (cal-html-year-dir-ask-user): Account for difference in
read-directory-name between XEmacs & Emacs
* cal-html.el (cal-html-htmlify-string): replace call to
replace-regexp-in-string with equivalent workaround
* all: update copyrights to 2007
2007-03-27 Glenn Morris <rgm(a)gnu.org>
* calendar/calendar.el (calendar-mode-hook): Declare it.
* calendar/diary-lib.el (diary-live-p): Do not check for
diary-selective-display.
2007-03-21 Ulf Jasper <ulf.jasper(a)web.de>
* calendar/icalendar.el (icalendar-version): Increase to 0.15.
(icalendar--get-unfolded-buffer): Define actual arguments rather
than just using &rest. Check replace-in-string is fbound.
(icalendar-import-buffer): Doc fix.
(icalendar--convert-ical-to-diary): Set diary-file.
Check diary-file before inserting final newline.
(icalendar--add-diary-entry): Return diary-file.
2007-03-21 Glenn Morris <rgm(a)gnu.org>
* calendar/calendar.el (diary-set-maybe-redraw): Autoload it.
(diary-display-hook): Add custom :set function.
* calendar/diary-lib.el (diary-header-line-flag): Doc fix.
Add custom :set function.
(diary-header-line-format): Doc fix.
(diary-set-maybe-redraw): New function.
(number-of-diary-entries): Change :set to use diary-set-maybe-redraw.
(diary-list-entries): Always run diary-mode.
2007-03-20 Glenn Morris <rgm(a)gnu.org>
* calendar/diary-lib.el (diary-live-p): New function.
(number-of-diary-entries): Add a :set function to redisplay diary
when necessary.
2007-03-12 Glenn Morris <rgm(a)gnu.org>
* calendar/cal-china.el,cal-dst.el,calendar.el,diary-lib.el:
* calendar/lunar.el,solar.el: Replace "daylight savings" with
"daylight saving" in text.
calendar source patch:
Diff command: cvs -q diff -uN
Files affected: todo-mode.el timeclock.el solar.el lunar.el icalendar.el holidays.el diary-lib.el calendar.el cal-xemacs.el cal-x.el cal-tex.el cal-persia.el cal-move.el cal-mayan.el cal-julian.el cal-iso.el cal-islam.el cal-html.el cal-hebrew.el cal-french.el cal-dst.el cal-coptic.el cal-china.el cal-bahai.el appt.el
Index: appt.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/appt.el,v
retrieving revision 1.12
diff -u -u -r1.12 appt.el
--- appt.el 2006/10/23 01:25:27 1.12
+++ appt.el 2007/04/14 18:10:02
@@ -1,7 +1,7 @@
;;; appt.el --- appointment notification functions
;; Copyright (C) 1989, 1990, 1994, 1998, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Neil Mager <neilm(a)juliet.ll.mit.edu>
;; Maintainer: Glenn Morris <rgm(a)gnu.org>
@@ -24,7 +24,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-bahai.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-bahai.el,v
retrieving revision 1.1
diff -u -u -r1.1 cal-bahai.el
--- cal-bahai.el 2006/10/23 01:25:27 1.1
+++ cal-bahai.el 2007/04/14 18:10:02
@@ -1,6 +1,6 @@
;;; cal-bahai.el --- calendar functions for the Baha'i calendar.
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: John Wiegley <johnw(a)gnu.org>
@@ -24,7 +24,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-china.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-china.el,v
retrieving revision 1.5
diff -u -u -r1.5 cal-china.el
--- cal-china.el 2006/10/23 01:25:27 1.5
+++ cal-china.el 2007/04/14 18:10:02
@@ -1,6 +1,6 @@
;;; cal-china.el --- calendar functions for the Chinese calendar
-;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
@@ -85,8 +85,8 @@
; The correct value is as follows, but the Chinese calendrical
; authorities do NOT use DST in determining astronomical events:
; 60
- "*Number of minutes difference between daylight savings and standard time
-for Chinese calendar. Default is for no daylight savings time."
+ "*Number of minutes difference between daylight saving and standard time
+for Chinese calendar. Default is for no daylight saving time."
:type 'integer
:group 'chinese-calendar)
@@ -101,7 +101,7 @@
:group 'chinese-calendar)
(defcustom chinese-calendar-daylight-time-zone-name "CDT"
- "*Abbreviated name of daylight-savings time zone used for Chinese calendar."
+ "*Abbreviated name of daylight saving time zone used for Chinese calendar."
:type 'string
:group 'chinese-calendar)
@@ -111,8 +111,8 @@
; '(cond ((< 1986 year) (calendar-nth-named-day 1 0 4 year 10))
; ((= 1986 year) '(5 4 1986))
; (t nil))
- "*Sexp giving the date on which daylight savings time starts for Chinese
-calendar. Default is for no daylight savings time. See documentation of
+ "*Sexp giving the date on which daylight saving time starts for Chinese
+calendar. Default is for no daylight saving time. See documentation of
`calendar-daylight-savings-starts'."
:type 'sexp
:group 'chinese-calendar)
@@ -121,21 +121,21 @@
; The correct value is as follows, but the Chinese calendrical
; authorities do NOT use DST in determining astronomical events:
; '(if (<= 1986 year) (calendar-nth-named-day 1 0 9 year 11))
- "*Sexp giving the date on which daylight savings time ends for Chinese
-calendar. Default is for no daylight savings time. See documentation of
+ "*Sexp giving the date on which daylight saving time ends for Chinese
+calendar. Default is for no daylight saving time. See documentation of
`calendar-daylight-savings-ends'."
:type 'sexp
:group 'chinese-calendar)
(defcustom chinese-calendar-daylight-savings-starts-time 0
- "*Number of minutes after midnight that daylight savings time starts for
-Chinese calendar. Default is for no daylight savings time."
+ "*Number of minutes after midnight that daylight saving time starts for
+Chinese calendar. Default is for no daylight saving time."
:type 'integer
:group 'chinese-calendar)
(defcustom chinese-calendar-daylight-savings-ends-time 0
- "*Number of minutes after midnight that daylight savings time ends for
-Chinese calendar. Default is for no daylight savings time."
+ "*Number of minutes after midnight that daylight saving time ends for
+Chinese calendar. Default is for no daylight saving time."
:type 'integer
:group 'chinese-calendar)
Index: cal-coptic.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-coptic.el,v
retrieving revision 1.5
diff -u -u -r1.5 cal-coptic.el
--- cal-coptic.el 2006/10/23 01:25:28 1.5
+++ cal-coptic.el 2007/04/14 18:10:02
@@ -1,6 +1,6 @@
;;; cal-coptic.el --- calendar functions for the Coptic/Ethiopic calendars
-;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-dst.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-dst.el,v
retrieving revision 1.8
diff -u -u -r1.8 cal-dst.el
--- cal-dst.el 2007/01/27 21:43:26 1.8
+++ cal-dst.el 2007/04/14 18:10:02
@@ -1,13 +1,13 @@
-;;; cal-dst.el --- calendar functions for daylight savings rules
+;;; cal-dst.el --- calendar functions for daylight saving rules
;; Copyright (C) 1993, 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Paul Eggert <eggert(a)twinsun.com>
;; Edward M. Reingold <reingold(a)cs.uiuc.edu>
;; Maintainer: Glenn Morris <rgm(a)gnu.org>
;; Keywords: calendar
-;; Human-Keywords: daylight savings time, calendar, diary, holidays
+;; Human-Keywords: daylight saving time, calendar, diary, holidays
;; This file is part of XEmacs.
@@ -26,12 +26,12 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
;; This collection of functions implements the features of calendar.el and
-;; holiday.el that deal with daylight savings time.
+;; holiday.el that deal with daylight saving time.
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science
@@ -48,11 +48,11 @@
"Non-nil means to check each year for DST transitions as needed.
Otherwise assume the next two transitions found after the
current date apply to all years. This is faster, but not always
-correct, since the dates of Daylight Saving transitions sometimes
+correct, since the dates of daylight saving transitions sometimes
change."
-:type 'boolean
-:version "22.1"
-:group 'calendar)
+:type 'boolean
+:version "22.1"
+:group 'calendar)
(defvar calendar-current-time-zone-cache nil
"Cache for result of `calendar-current-time-zone'.")
@@ -144,8 +144,8 @@
(defun calendar-time-zone-daylight-rules (abs-date utc-diff)
"Return daylight transition rule for ABS-DATE, UTC-DIFF sec offset from UTC.
-ABS-DATE must specify a day that contains a daylight savings transition.
-The result has the proper form for calendar-daylight-savings-starts'."
+ABS-DATE must specify a day that contains a daylight saving transition.
+The result has the proper form for `calendar-daylight-savings-starts'."
(let* ((date (calendar-gregorian-from-absolute abs-date))
(weekday (% abs-date 7))
(m (extract-calendar-month date))
@@ -217,7 +217,7 @@
;; See thread
;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2006-11/msg00060.html
(defun calendar-dst-find-data (&optional time)
- "Find data on the first Daylight Saving Time transitions after TIME.
+ "Find data on the first daylight saving time transitions after TIME.
TIME defaults to `current-time'. Return value is as described
for `calendar-current-time-zone'."
(let* ((t0 (or time (current-time)))
@@ -230,9 +230,9 @@
(let* ((t1 (calendar-next-time-zone-transition t0))
(t2 (and t1 (calendar-next-time-zone-transition t1))))
(if (not t2)
- ;; This locale does not have daylight savings time.
+ ;; This locale does not have daylight saving time.
(list (/ t0-utc-diff 60) 0 t0-name t0-name nil nil 0 0)
- ;; Use heuristics to find daylight savings parameters.
+ ;; Use heuristics to find daylight saving parameters.
(let* ((t1-zone (current-time-zone t1))
(t1-utc-diff (car t1-zone))
(t1-name (car (cdr t1-zone)))
@@ -256,14 +256,14 @@
)))))))))
(defvar calendar-dst-transition-cache nil
- "Internal cal-dst variable storing date of Daylight Saving Time transitions.
+ "Internal cal-dst variable storing date of daylight saving time transitions.
Value is a list with elements of the form (YEAR START END), where
START and END are expressions that when evaluated return the
start and end dates (respectively) for DST in YEAR. Used by the
function `calendar-dst-find-startend'.")
(defun calendar-dst-find-startend (year)
- "Find the dates in YEAR on which Daylight Saving Time starts and ends.
+ "Find the dates in YEAR on which daylight saving time starts and ends.
Returns a list (YEAR START END), where START and END are
expressions that when evaluated return the start and end dates,
respectively. This function first attempts to use pre-calculated
@@ -290,16 +290,16 @@
UTC-DIFF is an integer specifying the number of minutes difference between
standard time in the current time zone and Coordinated Universal Time
(Greenwich Mean Time). A negative value means west of Greenwich.
-DST-OFFSET is an integer giving the daylight savings time offset in minutes.
+DST-OFFSET is an integer giving the daylight saving time offset in minutes.
STD-ZONE is a string giving the name of the time zone when no seasonal time
adjustment is in effect.
DST-ZONE is a string giving the name of the time zone when there is a seasonal
time adjustment in effect.
DST-STARTS and DST-ENDS are sexps in the variable `year' giving the daylight
- savings time start and end rules, in the form expected by
+ saving time start and end rules, in the form expected by
`calendar-daylight-savings-starts'.
DST-STARTS-TIME and DST-ENDS-TIME are integers giving the number of minutes
- after midnight that daylight savings time starts and ends.
+ after midnight that daylight saving time starts and ends.
If the local area does not use a seasonal time adjustment, STD-ZONE and
DST-ZONE are equal, and all the DST-* integer variables are 0.
@@ -310,7 +310,7 @@
(unless calendar-current-time-zone-cache
(setq calendar-current-time-zone-cache (calendar-dst-find-data))))
-;;; The following eight defvars relating to daylight savings time should NOT be
+;;; The following eight defvars relating to daylight saving time should NOT be
;;; marked to go into loaddefs.el where they would be evaluated when Emacs is
;;; dumped. These variables' appropriate values depend on the conditions under
;;; which the code is INVOKED; so it's inappropriate to initialize them when
@@ -326,9 +326,9 @@
(defvar calendar-daylight-time-offset
(or (car (cdr calendar-current-time-zone-cache)) 60)
- "*Number of minutes difference between daylight savings and standard time.
+ "*Number of minutes difference between daylight saving and standard time.
-If the locale never uses daylight savings time, set this to 0.")
+If the locale never uses daylight saving time, set this to 0.")
(defvar calendar-standard-time-zone-name
(or (car (nthcdr 2 calendar-current-time-zone-cache)) "EST")
@@ -337,12 +337,12 @@
(defvar calendar-daylight-time-zone-name
(or (car (nthcdr 3 calendar-current-time-zone-cache)) "EDT")
- "*Abbreviated name of daylight-savings time zone at `calendar-location-name'.
+ "*Abbreviated name of daylight saving time zone at `calendar-location-name'.
For example, \"EDT\" in New York City, \"PDT\" for Los Angeles.")
(defun calendar-dst-starts (year)
- "Return the date of YEAR on which Daylight Saving Time starts.
+ "Return the date of YEAR on which daylight saving time starts.
This function respects the value of `calendar-dst-check-each-year-flag'."
(or (let ((expr (if calendar-dst-check-each-year-flag
(cadr (calendar-dst-find-startend year))
@@ -353,7 +353,7 @@
(calendar-nth-named-day 2 0 3 year))))
(defun calendar-dst-ends (year)
- "Return the date of YEAR on which Daylight Saving Time ends.
+ "Return the date of YEAR on which daylight saving time ends.
This function respects the value of `calendar-dst-check-each-year-flag'."
(or (let ((expr (if calendar-dst-check-each-year-flag
(nth 2 (calendar-dst-find-startend year))
@@ -368,13 +368,13 @@
(put 'calendar-daylight-savings-starts 'risky-local-variable t)
(defvar calendar-daylight-savings-starts
'(calendar-dst-starts year)
- "*Sexp giving the date on which daylight savings time starts.
+ "*Sexp giving the date on which daylight saving time starts.
This is an expression in the variable `year' whose value gives the Gregorian
-date in the form (month day year) on which daylight savings time starts. It is
-used to determine the starting date of daylight savings time for the holiday
+date in the form (month day year) on which daylight saving time starts. It is
+used to determine the starting date of daylight saving time for the holiday
list and for correcting times of day in the solar and lunar calculations.
-For example, if daylight savings time is mandated to start on October 1,
+For example, if daylight saving time is mandated to start on October 1,
you would set `calendar-daylight-savings-starts' to
'(10 1 year)
@@ -383,35 +383,35 @@
'(calendar-nth-named-day 1 0 4 year)
-If the locale never uses daylight savings time, set this to nil.")
+If the locale never uses daylight saving time, set this to nil.")
;;;###autoload
(put 'calendar-daylight-savings-ends 'risky-local-variable t)
(defvar calendar-daylight-savings-ends
'(calendar-dst-ends year)
- "*Sexp giving the date on which daylight savings time ends.
+ "*Sexp giving the date on which daylight saving time ends.
This is an expression in the variable `year' whose value gives the Gregorian
-date in the form (month day year) on which daylight savings time ends. It is
-used to determine the starting date of daylight savings time for the holiday
+date in the form (month day year) on which daylight saving time ends. It is
+used to determine the starting date of daylight saving time for the holiday
list and for correcting times of day in the solar and lunar calculations.
-For example, if daylight savings time ends on the last Sunday in October:
+For example, if daylight saving time ends on the last Sunday in October:
'(calendar-nth-named-day -1 0 10 year)
-If the locale never uses daylight savings time, set this to nil.")
+If the locale never uses daylight saving time, set this to nil.")
(defvar calendar-daylight-savings-starts-time
(or (car (nthcdr 6 calendar-current-time-zone-cache)) 120)
- "*Number of minutes after midnight that daylight savings time starts.")
+ "*Number of minutes after midnight that daylight saving time starts.")
(defvar calendar-daylight-savings-ends-time
(or (car (nthcdr 7 calendar-current-time-zone-cache))
calendar-daylight-savings-starts-time)
- "*Number of minutes after midnight that daylight savings time ends.")
+ "*Number of minutes after midnight that daylight saving time ends.")
(defun dst-in-effect (date)
- "True if on absolute DATE daylight savings time is in effect.
+ "True if on absolute DATE daylight saving time is in effect.
Fractional part of DATE is local standard time of day."
(let* ((year (extract-calendar-year
(calendar-gregorian-from-absolute (floor date))))
@@ -440,10 +440,10 @@
decimal fraction time, and `zone' is a string.
Optional parameter STYLE forces the result time to be standard time when its
-value is 'standard and daylight savings time (if available) when its value is
+value is 'standard and daylight saving time (if available) when its value is
'daylight.
-Conversion to daylight savings time is done according to
+Conversion to daylight saving time is done according to
`calendar-daylight-savings-starts', `calendar-daylight-savings-ends',
`calendar-daylight-savings-starts-time',
`calendar-daylight-savings-ends-time', and
Index: cal-french.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-french.el,v
retrieving revision 1.5
diff -u -u -r1.5 cal-french.el
--- cal-french.el 2006/10/23 01:25:28 1.5
+++ cal-french.el 2007/04/14 18:10:02
@@ -1,7 +1,7 @@
;;; cal-french.el --- calendar functions for the French Revolutionary calendar
;; Copyright (C) 1988, 1989, 1992, 1994, 1995, 1997, 2001, 2002, 2003,
-;; 2004, 2005, 2006 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
;; Maintainer: Glenn Morris <rgm(a)gnu.org>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
;; This collection of functions implements the features of calendar.el and
Index: cal-hebrew.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-hebrew.el,v
retrieving revision 1.7
diff -u -u -r1.7 cal-hebrew.el
--- cal-hebrew.el 2006/10/23 01:25:28 1.7
+++ cal-hebrew.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-hebrew.el --- calendar functions for the Hebrew calendar
-;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Nachum Dershowitz <nachum(a)cs.uiuc.edu>
@@ -26,7 +26,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-html.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-html.el,v
retrieving revision 1.1
diff -u -u -r1.1 cal-html.el
--- cal-html.el 2006/11/13 04:22:12 1.1
+++ cal-html.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-html.el --- functions for printing HTML calendars
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Anna M. Bigatti <bigatti(a)dima.unige.it>
;; Keywords: calendar
@@ -37,30 +37,30 @@
(defgroup calendar-html nil
"Options for HTML calendars."
-:prefix "cal-html-"
-:group 'calendar)
+:prefix "cal-html-"
+:group 'calendar)
(defcustom cal-html-directory "~/public_html"
"Directory for HTML pages generated by cal-html."
-:type 'string
-:group 'calendar-html)
+:type 'string
+:group 'calendar-html)
(defcustom cal-html-print-day-number-flag nil
"Non-nil means print the day-of-the-year number in the monthly cal-html page."
-:type 'boolean
-:group 'calendar-html)
+:type 'boolean
+:group 'calendar-html)
(defcustom cal-html-year-index-cols 3
"Number of columns in the cal-html yearly index page."
-:type 'integer
-:group 'calendar-html)
+:type 'integer
+:group 'calendar-html)
(defcustom cal-html-day-abbrev-array
(calendar-abbrev-construct calendar-day-abbrev-array
calendar-day-name-array)
"Array of seven strings for abbreviated day names (starting with Sunday)."
-:type '(vector string string string string string string string)
-:group 'calendar-html)
+:type '(vector string string string string string string string)
+:group 'calendar-html)
(defcustom cal-html-css-default
(concat
@@ -80,8 +80,8 @@
" SPAN.BLOCK { color: #048; font-style: italic; }\n"
"</STYLE>\n\n")
"Default cal-html css style. You can override this with a \"cal.css\" file."
-:type 'string
-:group 'calendar-html)
+:type 'string
+:group 'calendar-html)
;;; End customizable variables.
@@ -138,7 +138,9 @@
(defun cal-html-comment (string)
"Return STRING as html comment."
(format "<!-- ====== %s ====== -->\n"
- (replace-regexp-in-string "--" "++" string)))
+ ;; XEmacs change
+ ;; Emacs uses replace-regexp-in-string
+ (replace-in-string string "--" "++")))
(defun cal-html-href (link string)
"Return a hyperlink to url LINK with text STRING."
@@ -195,6 +197,13 @@
(expand-file-name (read-directory-name
"Enter HTML calendar directory name: "
(expand-file-name (format "%d" year)
+ cal-html-directory)
+ ;; XEmacs change
+ ;; account for difference in read-directory-name
+ ;; between XEmacs and Emacs
+ ;; If user just hits return to accept prompted dir
+ ;; then default-directory is used.
+ (expand-file-name (format "%d" year)
cal-html-directory))))
;;------------------------------------------------------------
@@ -301,13 +310,20 @@
"Protect special characters in STRING from HTML.
Characters are replaced according to `cal-html-html-subst-list'."
(if (stringp string)
- (replace-regexp-in-string
- (regexp-opt (mapcar 'car cal-html-html-subst-list))
- (lambda (x)
- (cdr (assoc x cal-html-html-subst-list)))
- string)
+ ;; XEmacs change
+ ;; Emacs uses replace-regexp-in-string
+ ;; Can't use replace-in-string since it doesn't support passing
+ ;; a function as the replace argument
+ (let ((rep-list (mapcar 'car cal-html-html-subst-list)))
+ (mapc (lambda (x)
+ (setq string
+ (replace-in-string
+ string
+ x
+ (cdr (assoc x cal-html-html-subst-list)))))
+ rep-list)
+ string)
""))
-
(defun cal-html-htmlify-entry (entry)
"Convert a diary entry ENTRY to html with the appropriate class specifier."
Index: cal-islam.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-islam.el,v
retrieving revision 1.5
diff -u -u -r1.5 cal-islam.el
--- cal-islam.el 2006/10/23 01:25:28 1.5
+++ cal-islam.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-islam.el --- calendar functions for the Islamic calendar
-;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-iso.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-iso.el,v
retrieving revision 1.5
diff -u -u -r1.5 cal-iso.el
--- cal-iso.el 2006/10/23 01:25:28 1.5
+++ cal-iso.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-iso.el --- calendar functions for the ISO calendar
-;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-julian.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-julian.el,v
retrieving revision 1.5
diff -u -u -r1.5 cal-julian.el
--- cal-julian.el 2006/10/23 01:25:28 1.5
+++ cal-julian.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-julian.el --- calendar functions for the Julian calendar
-;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-mayan.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-mayan.el,v
retrieving revision 1.6
diff -u -u -r1.6 cal-mayan.el
--- cal-mayan.el 2006/10/23 01:25:28 1.6
+++ cal-mayan.el 2007/04/14 18:10:03
@@ -1,7 +1,7 @@
;;; cal-mayan.el --- calendar functions for the Mayan calendars
;; Copyright (C) 1992, 1993, 1995, 1997, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Stewart M. Clamen <clamen(a)cs.cmu.edu>
;; Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -26,7 +26,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-move.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-move.el,v
retrieving revision 1.5
diff -u -u -r1.5 cal-move.el
--- cal-move.el 2006/10/23 01:25:28 1.5
+++ cal-move.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-move.el --- calendar functions for movement in the calendar
-;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-persia.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-persia.el,v
retrieving revision 1.5
diff -u -u -r1.5 cal-persia.el
--- cal-persia.el 2006/10/23 01:25:28 1.5
+++ cal-persia.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-persia.el --- calendar functions for the Persian calendar
-;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-tex.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-tex.el,v
retrieving revision 1.6
diff -u -u -r1.6 cal-tex.el
--- cal-tex.el 2006/10/23 01:25:28 1.6
+++ cal-tex.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-tex.el --- calendar functions for printing calendars with LaTeX
-;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Steve Fisk <fisk(a)bowdoin.edu>
@@ -26,7 +26,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
@@ -79,8 +79,8 @@
(defcustom cal-tex-rules nil
"*If t, pages will be ruled in some styles."
-:type 'boolean
-:group 'calendar-tex)
+:type 'boolean
+:group 'calendar-tex)
(defcustom cal-tex-daily-string
'(let* ((year (extract-calendar-year date))
@@ -127,9 +127,9 @@
"A string giving extra LaTeX commands to insert in the calendar preamble.
For example, to include extra packages:
\"\\\\usepackage{foo}\\n\\\\usepackage{bar}\\n\"."
-:type 'string
-:group 'calendar-tex
-:version "22.1")
+:type 'string
+:group 'calendar-tex
+:version "22.1")
(defcustom cal-tex-hook nil
"*List of functions called after any LaTeX calendar buffer is generated.
@@ -137,28 +137,28 @@
characters with diacritical marks to their LaTeX equivalents, use
(add-hook 'cal-tex-hook
'(lambda () (iso-iso2tex (point-min) (point-max))))"
-:type 'hook
-:group 'calendar-tex)
+:type 'hook
+:group 'calendar-tex)
(defcustom cal-tex-year-hook nil
"*List of functions called after a LaTeX year calendar buffer is generated."
-:type 'hook
-:group 'calendar-tex)
+:type 'hook
+:group 'calendar-tex)
(defcustom cal-tex-month-hook nil
"*List of functions called after a LaTeX month calendar buffer is generated."
-:type 'hook
-:group 'calendar-tex)
+:type 'hook
+:group 'calendar-tex)
(defcustom cal-tex-week-hook nil
"*List of functions called after a LaTeX week calendar buffer is generated."
-:type 'hook
-:group 'calendar-tex)
+:type 'hook
+:group 'calendar-tex)
(defcustom cal-tex-daily-hook nil
"*List of functions called after a LaTeX daily calendar buffer is generated."
-:type 'hook
-:group 'calendar-tex)
+:type 'hook
+:group 'calendar-tex)
;;;
;;; Definitions for LaTeX code
Index: cal-x.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-x.el,v
retrieving revision 1.6
diff -u -u -r1.6 cal-x.el
--- cal-x.el 2006/10/23 01:25:29 1.6
+++ cal-x.el 2007/04/14 18:10:03
@@ -1,6 +1,6 @@
;;; cal-x.el --- calendar windows in dedicated frames in X
-;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer(a)cs.sunysb.edu>
@@ -26,7 +26,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: cal-xemacs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/cal-xemacs.el,v
retrieving revision 1.10
diff -u -u -r1.10 cal-xemacs.el
--- cal-xemacs.el 2006/10/23 01:25:29 1.10
+++ cal-xemacs.el 2007/04/14 18:10:03
@@ -1,7 +1,7 @@
;;; cal-xemacs.el --- calendar functions for menu bar and popup menu support
;;; Original file is cal-menu.el.
-;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
@@ -27,7 +27,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; The Emacs counterpart is named cal-menu.el
;;; Commentary:
Index: calendar.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/calendar.el,v
retrieving revision 1.14
diff -u -u -r1.14 calendar.el
--- calendar.el 2007/01/27 21:43:26 1.14
+++ calendar.el 2007/04/14 18:10:04
@@ -1,7 +1,7 @@
;;; calendar.el --- calendar functions
;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997,
-;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
;; Maintainer: Glenn Morris <rgm(a)gnu.org>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
@@ -59,7 +59,7 @@
;; appt.el Appointment notification
;; cal-china.el Chinese calendar
;; cal-coptic.el Coptic/Ethiopic calendars
-;; cal-dst.el Daylight savings time rules
+;; cal-dst.el Daylight saving time rules
;; cal-hebrew.el Hebrew calendar
;; cal-islam.el Islamic calendar
;; cal-bahai.el Baha'i calendar
@@ -303,6 +303,11 @@
:type 'boolean
:group 'holidays)
+(defcustom calendar-mode-hook nil
+ "Hook run when entering `calendar-mode'."
+:type 'hook
+:group 'calendar-hooks)
+
;;;###autoload
(defcustom calendar-load-hook nil
"List of functions to be called after the calendar is first loaded.
@@ -580,8 +585,8 @@
:type 'boolean
;; Without :initialize (require 'calendar) throws an error because
;; american-calendar is undefined at this point.
-:initialize 'custom-initialize-default
-:set (lambda (symbol value)
+:initialize 'custom-initialize-default
+:set (lambda (symbol value)
(if value
(european-calendar)
(american-calendar)))
@@ -773,6 +778,8 @@
:type 'hook
:group 'diary)
+(autoload 'diary-set-maybe-redraw "diary-lib")
+
;;;###autoload
(defcustom diary-display-hook nil
"List of functions that handle the display of the diary.
@@ -797,6 +804,8 @@
diary buffer, set the variable `diary-list-include-blanks' to t."
:type 'hook
:options '(fancy-diary-display)
+:initialize 'custom-initialize-default
+:set 'diary-set-maybe-redraw
:group 'diary)
;;;###autoload
@@ -1164,7 +1173,7 @@
(funcall
'holiday-sexp
calendar-daylight-savings-starts
- '(format "Daylight Savings Time Begins %s"
+ '(format "Daylight Saving Time Begins %s"
(if (fboundp 'atan)
(solar-time-string
(/ calendar-daylight-savings-starts-time (float 60))
@@ -1173,7 +1182,7 @@
(funcall
'holiday-sexp
calendar-daylight-savings-ends
- '(format "Daylight Savings Time Ends %s"
+ '(format "Daylight Saving Time Ends %s"
(if (fboundp 'atan)
(solar-time-string
(/ calendar-daylight-savings-ends-time (float 60))
@@ -2355,8 +2364,7 @@
(defvar calendar-mode-line-format
(list
- (propertize (substitute-command-keys
- "\\<calendar-mode-map>\\[scroll-calendar-left]")
+ (propertize "<"
'help-echo "mouse-2: scroll left"
'mouse-face 'modeline-mousable
'keymap (cal-make-mode-line-mouse-map 'button2
@@ -2385,8 +2393,7 @@
'mouse-face 'modeline-mousable
'keymap (cal-make-mode-line-mouse-map 'button2 #'calendar-goto-today)))
'(calendar-date-string (calendar-current-date) t)
- (propertize (substitute-command-keys
- "\\<calendar-mode-map>\\[scroll-calendar-right]")
+ (propertize ">"
'help-echo "mouse-2: scroll right"
'mouse-face 'modeline-mousable
'keymap (cal-make-mode-line-mouse-map
Index: diary-lib.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/diary-lib.el,v
retrieving revision 1.8
diff -u -u -r1.8 diary-lib.el
--- diary-lib.el 2006/10/23 01:25:29 1.8
+++ diary-lib.el 2007/04/14 18:10:05
@@ -1,7 +1,7 @@
;;; diary-lib.el --- diary functions
;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2001, 2002, 2003,
-;; 2004, 2005, 2006 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
;; Maintainer: Glenn Morris <rgm(a)gnu.org>
@@ -24,7 +24,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; XEmacs has extra function `diary-countdown'
;;; Commentary:
@@ -270,10 +270,12 @@
;; This can be removed once the kill/yank treatment of invisible text
;; (see etc/TODO) is fixed. -- gm
(defcustom diary-header-line-flag t
- "If non-nil, `diary-simple-display' will show a header line.
+ "If non-nil, `simple-diary-display' will show a header line.
The format of the header is specified by `diary-header-line-format'."
:group 'diary
:type 'boolean
+:initialize 'custom-initialize-default
+:set 'diary-set-maybe-redraw
:version "22.1")
(defvar diary-selective-display nil)
@@ -285,7 +287,7 @@
before edit/copy"
"Diary"))
?\s (frame-width)))
- "Format of the header line displayed by `diary-simple-display'.
+ "Format of the header line displayed by `simple-diary-display'.
Only used if `diary-header-line-flag' is non-nil."
:group 'diary
:type 'sexp
@@ -293,6 +295,33 @@
(defvar diary-saved-point) ; internal
+;; The first version of this also checked for diary-selective-display
+;; in the non-fancy case. This was an attempt to distinguish between
+;; displaying the diary and just visiting the diary file. However,
+;; when using fancy diary, calling diary when there are no entries to
+;; display does not create the fancy buffer, nor does it switch on
+;; selective-display in the diary buffer. This means some
+;; customizations will not take effect, eg:
+;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00466.html
+;; So the check for selective-display was dropped. This means the
+;; diary will be displayed if one customizes a diary variable while
+;; just visiting the diary-file. This is i) unlikely, and ii) no great loss.
+(defun diary-live-p ()
+ "Return non-nil if the diary is being displayed."
+ (or (get-buffer fancy-diary-buffer)
+ (and diary-file
+ (find-buffer-visiting (substitute-in-file-name diary-file)))))
+
+(defun diary-set-maybe-redraw (symbol value)
+ "Set SYMBOL's value to VALUE, and redraw the diary if necessary.
+Redraws the diary if it is being displayed (note this is not the same as
+just visiting the `diary-file'), and SYMBOL's value is to be changed."
+ (let ((oldvalue (eval symbol)))
+ (custom-set-default symbol value)
+ (and (not (equal value oldvalue))
+ (diary-live-p)
+ ;; Note this assumes diary was called without prefix arg.
+ (diary))))
(defcustom number-of-diary-entries 1
"Specifies how many days of diary entries are to be displayed initially.
@@ -303,10 +332,10 @@
day's and the next day's entries will be displayed.
The value can also be a vector such as [0 2 2 2 2 4 1]; this value
-says to display no diary entries on Sunday, the display the entries
-for the current date and the day after on Monday through Thursday,
-display Friday through Monday's entries on Friday, and display only
-Saturday's entries on Saturday.
+says to display no diary entries on Sunday, the entries for
+the current date and the day after on Monday through Thursday,
+Friday through Monday's entries on Friday, and only Saturday's
+entries on Saturday.
This variable does not affect the diary display with the `d' command
from the calendar; in that case, the prefix argument controls the
@@ -320,6 +349,8 @@
(integer :tag "Thursday")
(integer :tag "Friday")
(integer :tag "Saturday")))
+:initialize 'custom-initialize-default
+:set 'diary-set-maybe-redraw
:group 'diary)
@@ -413,7 +444,10 @@
(or (verify-visited-file-modtime diary-buffer)
(revert-buffer t t))))
;; Setup things like the header-line-format and invisibility-spec.
- (when (eq major-mode default-major-mode) (diary-mode))
+ ;; This used to only run if the major-mode was default-major-mode,
+ ;; but that meant eg changes to header-line-format did not
+ ;; take effect from one diary invocation to the next.
+ (diary-mode)
;; d-s-p is passed to the diary display function.
(let ((diary-saved-point (point)))
(save-excursion
Index: holidays.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/holidays.el,v
retrieving revision 1.7
diff -u -u -r1.7 holidays.el
--- holidays.el 2006/10/23 01:25:29 1.7
+++ holidays.el 2007/04/14 18:10:05
@@ -1,7 +1,7 @@
;;; holidays.el --- holiday functions for the calendar package
;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1997, 2001, 2002, 2003,
-;; 2004, 2005, 2006 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
;; Maintainer: Glenn Morris <rgm(a)gnu.org>
@@ -24,7 +24,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
Index: icalendar.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/icalendar.el,v
retrieving revision 1.2
diff -u -u -r1.2 icalendar.el
--- icalendar.el 2007/01/27 21:43:26 1.2
+++ icalendar.el 2007/04/14 18:10:06
@@ -1,6 +1,6 @@
;;; icalendar.el --- iCalendar implementation -*-coding: utf-8 -*-
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper(a)web.de>
;; Created: August 2002
@@ -24,7 +24,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
@@ -103,7 +103,7 @@
;;; Code:
-(defconst icalendar-version "0.14"
+(defconst icalendar-version "0.15"
"Version number of icalendar.el.")
;; ======================================================================
@@ -111,8 +111,8 @@
;; ======================================================================
(defgroup icalendar nil
"Icalendar support."
-:prefix "icalendar-"
-:group 'calendar)
+:prefix "icalendar-"
+:group 'calendar)
(defcustom icalendar-import-format
"%s%d%l%o"
@@ -126,64 +126,64 @@
%s Summary, see `icalendar-import-format-summary'
%t Status, see `icalendar-import-format-status'
%u URL, see `icalendar-import-format-url'"
-:type 'string
-:group 'icalendar)
+:type 'string
+:group 'icalendar)
(defcustom icalendar-import-format-summary
"%s"
"Format string defining how the summary element is formatted.
This applies only if the summary is not empty! `%s' is replaced
by the summary."
-:type 'string
-:group 'icalendar)
+:type 'string
+:group 'icalendar)
(defcustom icalendar-import-format-description
"\n Desc: %s"
"Format string defining how the description element is formatted.
This applies only if the description is not empty! `%s' is
replaced by the description."
-:type 'string
-:group 'icalendar)
+:type 'string
+:group 'icalendar)
(defcustom icalendar-import-format-location
"\n Location: %s"
"Format string defining how the location element is formatted.
This applies only if the location is not empty! `%s' is replaced
by the location."
-:type 'string
-:group 'icalendar)
+:type 'string
+:group 'icalendar)
(defcustom icalendar-import-format-organizer
"\n Organizer: %s"
"Format string defining how the organizer element is formatted.
This applies only if the organizer is not empty! `%s' is
replaced by the organizer."
-:type 'string
-:group 'icalendar)
+:type 'string
+:group 'icalendar)
(defcustom icalendar-import-format-url
"\n URL: %s"
"Format string defining how the URL element is formatted.
This applies only if the URL is not empty! `%s' is replaced by
the URL."
-:type 'string
-:group 'icalendar)
+:type 'string
+:group 'icalendar)
(defcustom icalendar-import-format-status
"\n Status: %s"
"Format string defining how the status element is formatted.
This applies only if the status is not empty! `%s' is replaced by
the status."
-:type 'string
-:group 'icalendar)
+:type 'string
+:group 'icalendar)
(defcustom icalendar-import-format-class
"\n Class: %s"
"Format string defining how the class element is formatted.
This applies only if the class is not empty! `%s' is replaced by
the class."
-:type 'string
-:group 'icalendar)
+:type 'string
+:group 'icalendar)
(defvar icalendar-debug nil
"Enable icalendar debug messages.")
@@ -228,24 +228,17 @@
(replace-match "" nil nil)))
unfolded-buffer))
-;; XEmacs change.
-;; As originally written, icalendar--rris assumed replace-regexp-in-string
-;; and replace-in-string used the same number of args and in the same order.
-;; They don't, so expand the args and use the appropriate ones.
-(defsubst icalendar--rris (regexp newtext str &optional fixed-case literal)
+(defsubst icalendar--rris (regexp rep string &optional fixedcase literal)
"Replace regular expression in string.
-Pass ARGS to `replace-regexp-in-string' (Emacs) or to
-`replace-in-string' (XEmacs)."
- (if (fboundp 'replace-regexp-in-string)
- ;; Emacs:
- ;;(apply 'replace-regexp-in-string args)
- ;; XEmacs change, use the args
- (replace-regexp-in-string regexp newtext str args fixed-case literal)
- ;; XEmacs:
- (save-match-data ;; apparently XEmacs needs save-match-data
- ;;(apply 'replace-in-string args))))
- ;; XEmacs change, use the args
- (replace-in-string str regexp newtext literal ))))
+Pass arguments REGEXP REP STRING FIXEDCASE LITERAL to
+`replace-regexp-in-string' (Emacs) or to `replace-in-string' (XEmacs)."
+ (cond ((fboundp 'replace-regexp-in-string)
+ ;; Emacs:
+ (replace-regexp-in-string regexp rep string fixedcase literal))
+ ((fboundp 'replace-in-string)
+ ;; XEmacs:
+ (save-match-data ;; apparently XEmacs needs save-match-data
+ (replace-in-string string regexp rep literal)))))
(defun icalendar--read-element (invalue inparams)
"Recursively read the next iCalendar element in the current buffer.
@@ -1482,8 +1475,8 @@
DIARY-FILE.
It will ask for each appointment whether to add it to the diary
-when DO-NOT-ASK is non-nil. When called interactively,
-DO-NOT-ASK is set to t, so that you are asked fore each event.
+unless DO-NOT-ASK is non-nil. When called interactively,
+DO-NOT-ASK is nil, so that you are asked for each event.
NON-MARKING determines whether diary events are created as
non-marking.
@@ -1679,8 +1672,11 @@
(concat diary-string " "
(icalendar--format-ical-event e)))
(if do-not-ask (setq summary nil))
- (icalendar--add-diary-entry diary-string diary-file
- non-marking summary))
+ ;; add entry to diary and store actual name of diary
+ ;; file (in case it was nil)
+ (setq diary-file
+ (icalendar--add-diary-entry diary-string diary-file
+ non-marking summary)))
;; event was not ok
(setq found-error t)
(setq error-string
@@ -1694,13 +1690,15 @@
(setq error-string (format "%s\n%s\nCannot handle this event: %s"
error-val error-string e))
(message "%s" error-string))))
+
;; insert final newline
- (let ((b (find-buffer-visiting diary-file)))
- (when b
- (save-current-buffer
- (set-buffer b)
- (goto-char (point-max))
- (insert "\n"))))
+ (if diary-file
+ (let ((b (find-buffer-visiting diary-file)))
+ (when b
+ (save-current-buffer
+ (set-buffer b)
+ (goto-char (point-max))
+ (insert "\n")))))
(if found-error
(save-current-buffer
(set-buffer (get-buffer-create "*icalendar-errors*"))
@@ -1953,7 +1951,9 @@
(setq diary-file
(read-file-name "Add appointment to this diary file: ")))
;; Note: make-diary-entry will add a trailing blank char.... :(
- (make-diary-entry string non-marking diary-file))))
+ (make-diary-entry string non-marking diary-file)))
+ ;; return diary-file in case it has been changed interactively
+ diary-file)
(provide 'icalendar)
Index: lunar.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/lunar.el,v
retrieving revision 1.7
diff -u -u -r1.7 lunar.el
--- lunar.el 2006/10/23 01:25:30 1.7
+++ lunar.el 2007/04/14 18:10:06
@@ -1,7 +1,7 @@
;;; lunar.el --- calendar functions for phases of the moon
;; Copyright (C) 1992, 1993, 1995, 1997, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
;; Maintainer: Glenn Morris <rgm(a)gnu.org>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
@@ -379,7 +379,7 @@
"Astronomical (Julian) day number of first new moon on or after astronomical
\(Julian) day number d. The fractional part is the time of day.
-The date and time are local time, including any daylight savings rules,
+The date and time are local time, including any daylight saving rules,
as governed by the values of calendar-daylight-savings-starts,
calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
Index: solar.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/solar.el,v
retrieving revision 1.9
diff -u -u -r1.9 solar.el
--- solar.el 2006/10/23 01:25:30 1.9
+++ solar.el 2007/04/14 18:10:06
@@ -1,7 +1,7 @@
;;; solar.el --- calendar functions for solar events
;; Copyright (C) 1992, 1993, 1995, 1997, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold(a)cs.uiuc.edu>
;; Denis B. Roegel <Denis.Roegel(a)loria.fr>
@@ -27,7 +27,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Commentary:
@@ -509,7 +509,7 @@
(defun solar-date-next-longitude (d l)
"First moment on or after Julian day number D when sun's longitude is a
multiple of L degrees at calendar-location-name with that location's
-local time (including any daylight savings rules).
+local time (including any daylight saving rules).
L must be an integer divisor of 360.
Index: timeclock.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/timeclock.el,v
retrieving revision 1.5
diff -u -u -r1.5 timeclock.el
--- timeclock.el 2006/11/23 00:11:58 1.5
+++ timeclock.el 2007/04/14 18:10:06
@@ -1,6 +1,6 @@
;;; timeclock.el --- mode for keeping track of how much you work
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: John Wiegley <johnw(a)gnu.org>
@@ -25,7 +25,7 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; and contrib/timeclock.el from
;;; http://arch.gna.org/planner-el/archive-2006/planner-el--devel--0/
Index: todo-mode.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/calendar/todo-mode.el,v
retrieving revision 1.2
diff -u -u -r1.2 todo-mode.el
--- todo-mode.el 2006/10/23 01:25:30 1.2
+++ todo-mode.el 2007/04/14 18:10:07
@@ -1,6 +1,6 @@
;;; todo-mode.el --- major mode for editing TODO list files
-;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Free Software Foundation, Inc.
;; Author: Oliver Seidel <os10000(a)seidel-space.de>
@@ -256,7 +256,7 @@
;; Oliver Seidel
;; (Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany)
-;;; Synched up with: FSF Emacs 22.1 CVS 2006-09-15
+;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
;;; Code:
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[AC21.5] Some minor fixes for font-mgr.c
17 years, 8 months
Stephen J. Turnbull
APPROVE COMMIT 21.5
Minor, non-controversial fixes. The printer method for fc-pattern
objects is just a stub, but better than nothing I guess.
src/ChangeLog addition:
2007-04-15 Stephen J. Turnbull <stephen(a)xemacs.org>
* font-mgr.c: Update FSF copyrights.
* font-mgr.c (print_fc_pattern): New facility for fc-pattern
objects. Comment on need/implementation for equal/hash.
* font-mgr.c (build_fcapi_string): New convenience macro.
* font-mgr.c (Ffc_name_unparse):
* font-mgr.c (Ffc_pattern_get):
Use it.
* font-mgr.c (Ffc_name_parse):
* font-mgr.c (Ffc_font_match):
Remove incorrect comments about memory leaks.
21.5 source patch:
Diff command: cvs -q diff -u
Files affected: src/font-mgr.c
Index: src/font-mgr.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/font-mgr.c,v
retrieving revision 1.4
diff -u -u -r1.4 font-mgr.c
--- src/font-mgr.c 23 Jun 2006 15:45:02 -0000 1.4
+++ src/font-mgr.c 14 Apr 2007 15:55:45 -0000
@@ -2,13 +2,13 @@
Copyright (C) 2003 Eric Knauel and Matthias Neubauer
Copyright (C) 2005 Eric Knauel
-Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Authors: Eric Knauel <knauel(a)informatik.uni-tuebingen.de>
Matthias Neubauer <neubauer(a)informatik.uni-freiburg.de>
Stephen J. Turnbull <stephen(a)xemacs.org>
Created: 27 Oct 2003
-Updated: 05 Mar 2005 by Stephen J. Turnbull
+Updated: 14 April 2007 by Stephen J. Turnbull
This file is part of XEmacs.
@@ -96,14 +96,48 @@
}
}
+static void
+print_fc_pattern (Lisp_Object obj, Lisp_Object printcharfun,
+ int UNUSED(escapeflag))
+{
+ struct fc_pattern *c = XFCPATTERN (obj);
+ if (print_readably)
+ printing_unreadable_object ("#<fc-pattern 0x%x>", c->header.uid);
+ write_fmt_string (printcharfun, "#<fc-pattern 0x%x>", c->header.uid);
+}
+
+/* #### We really need an equal method and a hash method (required if you
+ have an equal method). For the equal method, we can probably use one
+ or both of
+
+ -- Function: FcBool FcPatternEqual (const FcPattern *pa, const
+ FcPattern *pb);
+ Returns whether PA and PB are exactly alike.
+
+ -- Function: FcBool FcPatternEqualSubset (const FcPattern *pa, const
+ FcPattern *pb, const FcObjectSet *os)
+ Returns whether PA and PB have exactly the same values for all of
+ the objects in OS.
+
+ For the hash, we'll have to extract some subset of attributes.
+
+ #### Crap. It's altogether unobvious what we need. x_color_instance
+ does have a hash method, but fonts are apparently special. I get the
+ feeling that for this to work properly we're going to need to switch
+ to fontconfig-based font specifications (although we can allow the
+ platform syntaxes, the underlying specification object will need to
+ conform to the fontconfig API, or more precisely the font-mgr API).
+
+ I think the whole `font-truename' interface needs to be dropped. */
+
static const struct memory_description fcpattern_description [] = {
/* #### nothing here, is this right?? */
{ XD_END }
};
-DEFINE_LRECORD_IMPLEMENTATION("fc-pattern", fc_pattern,
- 0, 0, 0, finalize_fc_pattern, 0, 0,
- fcpattern_description,
+DEFINE_LRECORD_IMPLEMENTATION("fc-pattern", fc_pattern, 0,
+ 0, print_fc_pattern, finalize_fc_pattern,
+ 0, 0, fcpattern_description,
struct fc_pattern);
/*
@@ -122,6 +156,9 @@
#define extract_fcapi_string(str) \
(NEW_LISP_STRING_TO_EXTERNAL ((str), Qfc_font_name_encoding))
+#define build_fcapi_string(str) \
+ (build_ext_string ((Extbyte *) (str), Qfc_font_name_encoding))
+
/* #### This homebrew lashup should be replaced with FcConstants.
fontconfig assumes that objects (property names) are statically allocated,
@@ -205,7 +242,7 @@
struct fc_pattern *fcpat =
ALLOC_LCRECORD_TYPE (struct fc_pattern, &lrecord_fc_pattern);
- CHECK_STRING(name); /* #### MEMORY LEAK!! maybe not ... */
+ CHECK_STRING(name);
fcpat->fcpatPtr = FcNameParse ((FcChar8 *) extract_fcapi_string (name));
return wrap_fcpattern(fcpat);
@@ -219,12 +256,7 @@
(pattern))
{
CHECK_FCPATTERN(pattern);
- {
- Extbyte *temp = (Extbyte *) FcNameUnparse(XFCPATTERN_PTR(pattern));
- Lisp_Object res = build_ext_string (temp, Qfc_font_name_encoding);
- free (temp);
- return res;
- }
+ return build_fcapi_string (FcNameUnparse (XFCPATTERN_PTR (pattern)));
}
DEFUN("fc-pattern-duplicate", Ffc_pattern_duplicate, 1, 1, 0, /*
@@ -426,8 +458,7 @@
case FcTypeString:
return ((!NILP (type) && !EQ (type, Qstring))
? Qfc_result_type_mismatch
- : build_ext_string ((Extbyte *) fc_value.u.s,
- Qfc_font_name_encoding));
+ : build_fcapi_string (fc_value.u.s));
case FcTypeBool:
return ((!NILP (type) && !EQ (type, Qboolean))
? Qfc_result_type_mismatch : fc_value.u.b ? Qt : Qnil);
@@ -466,16 +497,16 @@
(device, pattern))
{
FcResult res;
+ struct fc_pattern *res_fcpat;
- struct fc_pattern *res_fcpat =
- ALLOC_LCRECORD_TYPE (struct fc_pattern, &lrecord_fc_pattern);
- CHECK_FCPATTERN(pattern); /* #### MEMORY LEAKS!!! */
+ CHECK_FCPATTERN(pattern);
if (NILP(device))
return Qnil;
CHECK_X_DEVICE(device);
if (!DEVICE_LIVE_P(XDEVICE(device)))
return Qnil;
+ res_fcpat = ALLOC_LCRECORD_TYPE (struct fc_pattern, &lrecord_fc_pattern);
{
FcPattern *p = XFCPATTERN_PTR(pattern);
FcConfig *fcc = FcConfigGetCurrent ();
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[AC web] Add loi de robien to created.html
17 years, 9 months
Stephen J. Turnbull
APPROVE COMMIT web
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacsweb/About/ChangeLog,v
retrieving revision 1.209
diff -u -r1.209 ChangeLog
--- ChangeLog 12 Mar 2007 10:59:04 -0000 1.209
+++ ChangeLog 8 Apr 2007 08:09:36 -0000
@@ -0 +1,4 @@
+2007-04-08 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * created.content: Add "Loi de Robien".
+
Index: created.content
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacsweb/About/created.content,v
retrieving revision 1.91
diff -u -r1.91 created.content
--- created.content 12 Mar 2007 10:59:04 -0000 1.91
+++ created.content 8 Apr 2007 08:09:36 -0000
@@ -329,6 +329,8 @@
<a href="http://www.statistiker-wg.de/">statistiker-wg</a></li>
<li>
<a href="http://www.schrijftraining.net/">schrijftraining.net</a></li>
+ <li>
+ <a href="http://investir.robien.free.fr/ ">Loi de Robien - Déclaration 2044 Spéciale - Site non commercial</a></li>
</ul>
<!--
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[AC21.5] Simplify redisplay-x/separate_textual_runs
17 years, 9 months
Stephen J. Turnbull
APPROVE COMMIT 21.5
Stephen J. Turnbull writes:
> Olivier Galibert writes:
> > On Sun, Apr 01, 2007 at 11:53:12PM +0900, Stephen J. Turnbull wrote:
> > > Also, I'd like to suggest the patch below (to be applied *on top of*
> > > your patch).
>
> > I like it.
>
> OK, I think you can apply your patch, and once I've negotiated some
> wording with Aidan, I plan to apply mine.
I've updated the comments somewhat per discussion with Aidan (he
basically said "do what you want", so he's not responsible for the
final wording), and done separate commits of OG's patch (he's
currently commit-challenged), then mine.
Thanks to Mike and Aidan for reviews.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Simplify redisplay-x/separate_textual_runs
17 years, 9 months
Olivier Galibert
separate_textual_runs was a nice, simple function ages ago, but not
anymore. Now it's a not very readable ifdef mess. Building 4
functions for the mule/nomule, xft/xlib cases allows for drastic
simplifications for most of them.
Please review (it's hairy code, another pair of eyes is no luxury) and
apply if happy. It's probably easier in that specific case to check
the result rather than the diff.
OG.
2007-03-30 Olivier Galibert <galibert(a)pobox.com>
* redisplay-x.c (separate_textual_runs_xft_mule): Create.
(separate_textual_runs_xft_nomule): Create.
(separate_textual_runs_mule): Create.
(separate_textual_runs_nomule): Create.
(separate_textual_runs): Split the ifdef mess into 4 separate
functions and simplify each.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches