Fwd: Re: [PATCH 21.5] Fix signs in time zone string.
10 years, 2 months
Adrian Aichner
(wasn't in the moderator queue either)
-------- Forwarded Message --------
Subject: Re: [PATCH 21.5] Fix signs in time zone string.
Date: Tue, 30 Sep 2014 12:38:25 +0200
From: Adrian Aichner <adrian.aichner(a)gmail.com>
To: xemacs-patches(a)xemacs.org
Hi Marcus, this patch looks wrong to me.
How could XEmacs and GNU Emacs both be wrong until now?
http://git.savannah.gnu.org/cgit/emacs.git/tree/src/editfns.c#n1937
suggests that they are not including a + character for positive offsets,
which surprised me.
But zone offsets > 0 do not include the - sign, which is the same logic
XEmacs uses before your patch.
Also, why are you removing the REST argument in passing without mention?
Adrian
On 30.09.2014 08:13, Marcus Crestani wrote:
> PATCH 21.5
>
> Currently, Fencode_time calculates wrong dates in respect to local
> timezones. The problem is caused by switched signs in the code that
> builds the time zone string, the attached patch fixes this.
>
> I'll push in two days if nobody objects.
>
>
> diff --git a/src/ChangeLog b/src/ChangeLog
> --- a/src/ChangeLog
> +++ b/src/ChangeLog
> @@ -1,3 +1,9 @@
> +2014-09-30 Marcus Crestani <crestani(a)informatik.uni-tuebingen.de>
> +
> + * editfns.c (Fencode_time): Switch signs when calculating the time
> + zone string. (The offset indicates the value one must add to the
> + local time to arrive at UTC.)
> +
> 2014-09-23 Jerry James <james(a)xemacs.org>
>
> * floatfns.c (round_two_bignum_1): Fix memory leak.
> diff --git a/src/editfns.c b/src/editfns.c
> --- a/src/editfns.c
> +++ b/src/editfns.c
> @@ -1155,7 +1155,7 @@
> Year numbers less than 100 are treated just like other year numbers.
> If you want them to stand for years in this century, you must do that yourself.
>
> -arguments: (SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE &rest REST)
> +arguments: (SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE)
> */
> (int nargs, Lisp_Object *args))
> {
> @@ -1192,7 +1192,7 @@
> int abszone = abs (XFIXNUM (zone));
> /* #### I have no idea what this conforms to,
> but the compiler has stopped whining. */
> - sprintf (tzbuf, "XXX%s%d:%02d:%02d", (XFIXNUM (zone) < 0) ? "-" : "+",
> + sprintf (tzbuf, "XXX%s%d:%02d:%02d", (XFIXNUM (zone) < 0) ? "+" : "-",
> abszone / (60*60), (abszone/60) % 60, abszone % 60);
> tzstring = tzbuf;
> }
>
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
Don't bail out on :package-version in `defcustom'
10 years, 2 months
Michael Sperber
I'm (once again ...) porting clojure-mode, and needed this patch.
2014-09-27 Michael Sperber <mike(a)xemacs.org>
* custom.el (defcustom):
(custom-handle-keyword): Handle :package-version without bailing out.
Will push Monday if nobody objects.
--
Regards,
Mike
diff --git a/lisp/custom.el b/lisp/custom.el
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -274,6 +274,15 @@
VALUE should be a string specifying that the variable was
first introduced, or its default value was changed, in Emacs
version VERSION.
+:package-version
+ VALUE should be a list with the form (PACKAGE . VERSION)
+ specifying that the variable was first introduced, or its
+ default value was changed, in PACKAGE version VERSION. This
+ keyword takes priority over :version. The PACKAGE and VERSION
+ must appear in the alist `customize-package-emacs-version-alist'.
+ Since PACKAGE must be unique and the user might see it in an
+ error message, a good choice is the official name of the
+ package, such as MH-E or Gnus.
:tag LABEL
Use LABEL, a string, instead of the item's name, to label the item
in customization menus and buffers.
@@ -458,6 +467,8 @@
(custom-add-to-group value symbol type))
((eq keyword :version)
(custom-add-version symbol value))
+ ((eq keyword :package-version)
+ (custom-add-package-version symbol value))
((eq keyword :link)
(custom-add-link symbol value))
((eq keyword :load)
@@ -507,6 +518,10 @@
"To the custom option SYMBOL add the version VERSION."
(put symbol 'custom-version version))
+(defun custom-add-package-version (symbol version)
+ "To the custom option SYMBOL add the package version VERSION."
+ (put symbol 'custom-package-version version))
+
(defun custom-add-load (symbol load)
"To the custom option SYMBOL add the dependency LOAD.
LOAD should be either a library file name, or a feature name."
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH 21.5] Fix signs in time zone string.
10 years, 2 months
Marcus Crestani
PATCH 21.5
Currently, Fencode_time calculates wrong dates in respect to local
timezones. The problem is caused by switched signs in the code that
builds the time zone string, the attached patch fixes this.
I'll push in two days if nobody objects.
diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-30 Marcus Crestani <crestani(a)informatik.uni-tuebingen.de>
+
+ * editfns.c (Fencode_time): Switch signs when calculating the time
+ zone string. (The offset indicates the value one must add to the
+ local time to arrive at UTC.)
+
2014-09-23 Jerry James <james(a)xemacs.org>
* floatfns.c (round_two_bignum_1): Fix memory leak.
diff --git a/src/editfns.c b/src/editfns.c
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1155,7 +1155,7 @@
Year numbers less than 100 are treated just like other year numbers.
If you want them to stand for years in this century, you must do that yourself.
-arguments: (SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE &rest REST)
+arguments: (SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE)
*/
(int nargs, Lisp_Object *args))
{
@@ -1192,7 +1192,7 @@
int abszone = abs (XFIXNUM (zone));
/* #### I have no idea what this conforms to,
but the compiler has stopped whining. */
- sprintf (tzbuf, "XXX%s%d:%02d:%02d", (XFIXNUM (zone) < 0) ? "-" : "+",
+ sprintf (tzbuf, "XXX%s%d:%02d:%02d", (XFIXNUM (zone) < 0) ? "+" : "-",
abszone / (60*60), (abszone/60) % 60, abszone % 60);
tzstring = tzbuf;
}
--
Marcus
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
Port `start-file-process' and `start-file-process-shell-command'
10 years, 2 months
Michael Sperber
More support for clojure-mode. Will push on Monday if nobody objects.
2014-09-27 Michael Sperber <mike(a)xemacs.org>
* simple-more.el (start-file-process):
* subr-more.el (start-file-process-shell-command): Port from GNU
Emacs.
---
Regards,
Mike
diff --git a/simple-more.el b/simple-more.el
--- a/simple-more.el
+++ b/simple-more.el
@@ -130,4 +130,24 @@
(setq rest (cdr rest)))
done))))
+;;;###autoload
+(defun start-file-process (name buffer program &rest program-args)
+ "Start a program in a subprocess. Return the process object for it.
+
+Similar to `start-process', but may invoke a file handler based on
+`default-directory'. See Info node `(elisp)Magic File Names'.
+
+This handler ought to run PROGRAM, perhaps on the local host,
+perhaps on a remote host that corresponds to `default-directory'.
+In the latter case, the local part of `default-directory' becomes
+the working directory of the process.
+
+PROGRAM and PROGRAM-ARGS might be file names. They are not
+objects of file handler invocation. File handlers might not
+support pty association, if PROGRAM is nil."
+ (let ((fh (find-file-name-handler default-directory 'start-file-process)))
+ (if fh (apply fh 'start-file-process name buffer program program-args)
+ (apply 'start-process name buffer program program-args))))
+
+
;;; simple-more.el ends here
diff --git a/subr-more.el b/subr-more.el
--- a/subr-more.el
+++ b/subr-more.el
@@ -195,4 +195,14 @@
tail (cdr tail)))
result))
+;;;###autoload
+(defun start-file-process-shell-command (name buffer &rest args)
+ "Start a program in a subprocess. Return the process object for it.
+Similar to `start-process-shell-command', but calls `start-file-process'."
+ (start-file-process
+ name buffer
+ (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
+ (if (file-remote-p default-directory) "-c" shell-command-switch)
+ (mapconcat 'identity args " ")))
+
;;; subr-more.el ends here
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/xemacs-base: sperber: Add `start-file-process' and `start-file-process-command'.
10 years, 2 months
Bitbucket
1 new commit in xemacs-base:
https://bitbucket.org/xemacs/xemacs-base/commits/8d5a9615314b/
Changeset: 8d5a9615314b
User: sperber
Date: 2014-09-27 12:21:15+00:00
Summary: Add `start-file-process' and `start-file-process-command'.
2014-09-27 Michael Sperber <mike(a)xemacs.org>
* simple-more.el (start-file-process):
* subr-more.el (start-file-process-shell-command): Port from GNU
Emacs.
Affected #: 3 files
diff -r ab20b62d00275b0b8d2caaf681aef0bc23ccbe73 -r 8d5a9615314b44c0bec0662e690f54c74ca7ce3f ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-27 Michael Sperber <mike(a)xemacs.org>
+
+ * simple-more.el (start-file-process):
+ * subr-more.el (start-file-process-shell-command): Port from GNU
+ Emacs.
+
2014-09-08 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 2.42 released.
diff -r ab20b62d00275b0b8d2caaf681aef0bc23ccbe73 -r 8d5a9615314b44c0bec0662e690f54c74ca7ce3f simple-more.el
--- a/simple-more.el
+++ b/simple-more.el
@@ -130,4 +130,22 @@
(setq rest (cdr rest)))
done))))
+;;;###autoload
+(defun start-file-process (name buffer program &rest program-args)
+ "Start a program in a subprocess. Return the process object for it.
+
+Similar to `start-process', but may invoke a file handler based on
+`default-directory'. See Info node `(elisp)Magic File Names'.
+
+This handler ought to run PROGRAM, perhaps on the local host,
+perhaps on a remote host that corresponds to `default-directory'.
+In the latter case, the local part of `default-directory' becomes
+the working directory of the process.
+
+PROGRAM and PROGRAM-ARGS might be file names."
+ (let ((fh (find-file-name-handler default-directory 'start-file-process)))
+ (if fh (apply fh 'start-file-process name buffer program program-args)
+ (apply 'start-process name buffer program program-args))))
+
+
;;; simple-more.el ends here
diff -r ab20b62d00275b0b8d2caaf681aef0bc23ccbe73 -r 8d5a9615314b44c0bec0662e690f54c74ca7ce3f subr-more.el
--- a/subr-more.el
+++ b/subr-more.el
@@ -195,4 +195,14 @@
tail (cdr tail)))
result))
+;;;###autoload
+(defun start-file-process-shell-command (name buffer &rest args)
+ "Start a program in a subprocess. Return the process object for it.
+Similar to `start-process-shell-command', but calls `start-file-process'."
+ (start-file-process
+ name buffer
+ (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
+ (if (file-remote-p default-directory) "-c" shell-command-switch)
+ (mapconcat 'identity args " ")))
+
;;; subr-more.el ends here
Repository URL: https://bitbucket.org/xemacs/xemacs-base/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH packages] Fix ignoring and cleaning of elcs (auctex)
10 years, 2 months
Jerry James
PATCH packages
This patch fixes .hgignore in the auctex package so that it properly
ignores byte compiled .elc files. It also adds a rule to the Makefile so
that those files are removed when "make clean" is invoked.
diff -r 5b9406bf4cbf xemacs-packages/auctex/.hgignore
--- a/xemacs-packages/auctex/.hgignore Sat Jul 05 21:17:10 2014 +0200
+++ b/xemacs-packages/auctex/.hgignore Mon Sep 29 16:16:55 2014 -0600
@@ -1,7 +1,6 @@
^#\..*#$
^\.#
~$
-\.elc$
\.html$
\.info$
^_pkg\.el$
@@ -12,6 +11,7 @@
^auto-autoloads\.el$
^custom-defines\.el$
^custom-load\.el$
+^etc/.*\.elc$
^package-info$
^pdepends\.mk$
^texi/tex-ref\.dvi$
diff -r 5b9406bf4cbf xemacs-packages/auctex/ChangeLog
--- a/xemacs-packages/auctex/ChangeLog Sat Jul 05 21:17:10 2014 +0200
+++ b/xemacs-packages/auctex/ChangeLog Mon Sep 29 16:16:55 2014 -0600
@@ -1,3 +1,8 @@
+2014-09-29 Jerry James <james(a)xemacs.org>
+
+ * .hgignore: Ignore .elcs in etc.
+ * Makefile (clean): Remove .elcs from etc.
+
2014-07-05 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.53 released.
diff -r 5b9406bf4cbf xemacs-packages/auctex/Makefile
--- a/xemacs-packages/auctex/Makefile Sat Jul 05 21:17:10 2014 +0200
+++ b/xemacs-packages/auctex/Makefile Mon Sep 29 16:16:55 2014 -0600
@@ -228,3 +228,6 @@
$(LATEX) '\nonstopmode \input preview.drv' && \
$(LATEX) '\nonstopmode \input preview.drv' && \
$(LATEX) '\nonstopmode \input preview.drv'
+
+clean::
+ @rm -f etc/*.elc
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH packages] Fix ethio-util compilation in mule-base
10 years, 2 months
Jerry James
PATCH packages
I messed up the logic for compiling ethio-util.el with a recent patch.
This fixes the Makefile so that ethio-util.el is not byte compiled when
building with 21.4, but is when building with 21.5
diff -r bfa0cf1e094d mule-packages/mule-base/ChangeLog
--- a/mule-packages/mule-base/ChangeLog Sun Jun 22 09:01:47 2014 +0200
+++ b/mule-packages/mule-base/ChangeLog Mon Sep 29 15:28:12 2014 -0600
@@ -1,3 +1,8 @@
+2014-09-29 Jerry James <james(a)xemacs.org>
+
+ * Makefile: Put ethio-util.el in EXTRA_SOURCES if building with
+ XEmacs 21.4, and ethio-util.elc in ELCS if XEmacs 21.5.
+
2014-06-22 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.59 released.
diff -r bfa0cf1e094d mule-packages/mule-base/Makefile
--- a/mule-packages/mule-base/Makefile Sun Jun 22 09:01:47 2014 +0200
+++ b/mule-packages/mule-base/Makefile Mon Sep 29 15:28:12 2014 -0600
@@ -29,11 +29,15 @@
cyril-util.elc kana-keyboard.elc korea-util.elc isearch-mule.elc \
japan-util.elc mule-cne.elc mule-diag.elc mule-keyboard.elc \
mule-trex.elc mule-util.elc thai-xtis-util.elc viet-util.elc \
- ethio-util.elc fsf-compat-unicode.elc
+ fsf-compat-unicode.elc
+
+include ../../Local.rules
# The following are shipped unbytecompiled if built by XEmacs 21.4 or
earlier
# because they aren't grokked by those versions.
ifeq ($(XEMACS_21_5),t)
+ELCS += ethio-util.elc
+else
EXTRA_SOURCES = ethio-util.el
endif
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH packages] Byte compile leim sources with 21.5
10 years, 2 months
Jerry James
PATCH packages
Some leim files cannot be byte compiled with 21.4, but they can be byte
compiled with 21.5. This patch uses the XEMACS_21_5 variable setting to
determine that it can safely byte compile those files.
diff -r 92387d42b154 mule-packages/leim/ChangeLog
--- a/mule-packages/leim/ChangeLog Mon Sep 08 10:02:47 2014 +0200
+++ b/mule-packages/leim/ChangeLog Mon Sep 29 15:28:12 2014 -0600
@@ -1,3 +1,8 @@
+2014-09-29 Jerry James <james(a)xemacs.org>
+
+ * Makefile: move elisp files in EXTRA_SOURCES to ELCS_1 instead if
+ XEMACS_21_5 is set.
+
2014-09-08 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.37 released.
diff -r 92387d42b154 mule-packages/leim/Makefile
--- a/mule-packages/leim/Makefile Mon Sep 08 10:02:47 2014 +0200
+++ b/mule-packages/leim/Makefile Mon Sep 29 15:28:12 2014 -0600
@@ -50,11 +50,17 @@
# under 21.4. They error when loaded in an XEmacs that doesn't support the
# characters needed.
-# #### Move these to ELCS_1 once 21.4 is deprecated.
+include ../../Local.rules
+ifeq ($(XEMACS_21_5),t)
+ELCS_1 += quail/cyrillic-tajik.elc quail/georgian.elc quail/hebrew.elc \
+ quail/ipa-21.5.elc quail/latin-ltx.elc quail/rfc1345.elc \
+ quail/sgml-input.elc quail/welsh.elc
+else
EXTRA_SOURCES= quail/cyrillic-tajik.el quail/georgian.el quail/hebrew.el \
quail/ipa-21.5.el quail/latin-ltx.el quail/rfc1345.el \
quail/sgml-input.el quail/welsh.el
+endif
ELCS_1_FILES = $(ELCS_1) $(ELCS_1:.elc=.el)
ELCS_1_DEST = $(PACKAGE)/quail
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/edit-utils: Jerry James: Append, rather than prepend, lazy-lock-after-change to after-change-functions.
10 years, 2 months
Bitbucket
1 new commit in edit-utils:
https://bitbucket.org/xemacs/edit-utils/commits/540d548b93b5/
Changeset: 540d548b93b5
User: Jerry James
Date: 2014-09-30 03:42:33+00:00
Summary: Append, rather than prepend, lazy-lock-after-change to after-change-functions.
See <CAHCOHQ=cZzs=nBYbXaj0zRmVAgSOuY1923sRbiM_hKQ7o5RqAw(a)mail.gmail.com> in
xemacs-patches, and also see xemacs-beta message
<CAHCOHQkkSQXUFbJ96o+DsFXM2VZ3n3LegGYNLmeB4ZiJO8q+8w(a)mail.gmail.com>.
Affected #: 3 files
diff -r e24f8c81c99181bc3121e3a43ecb0d72f589e6a3 -r 540d548b93b5ebad284c597e84722f125b5364a5 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-09-23 Jerry James <james(a)xemacs.org>
+
+ * lazy-lock.el (lazy-lock-install-hooks): Append, rather than
+ prepend, lazy-lock-after-change to after-change-functions.
+ (lazy-lock-unstall): Ditto for font-lock-after-change-function.
+ * lazy-shot.el (lazy-shot-install): Ditto for
+ lazy-shot-after-change-function.
+ (lazy-shot-unstall): Ditto for font-lock-after-change-function.
+
2014-05-26 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 2.55 released.
diff -r e24f8c81c99181bc3121e3a43ecb0d72f589e6a3 -r 540d548b93b5ebad284c597e84722f125b5364a5 lazy-lock.el
--- a/lazy-lock.el
+++ b/lazy-lock.el
@@ -571,7 +571,7 @@
;; Replace Font Lock mode hook.
(make-local-hook 'after-change-functions)
(remove-hook 'after-change-functions 'font-lock-after-change-function t)
- (add-hook 'after-change-functions 'lazy-lock-after-change nil t)
+ (add-hook 'after-change-functions 'lazy-lock-after-change t t)
;; FSF 21.2: Lots and lots of hooks here. Hooks for `outline', hooks for
;; `hideshow', hooks for redisplay-end-triggers, window-size-changed, and
@@ -616,7 +616,7 @@
(save-restriction
(widen)
(lazy-lock-fontify-region (point-min) (point-max))))))
- (add-hook 'after-change-functions 'font-lock-after-change-function nil t))
+ (add-hook 'after-change-functions 'font-lock-after-change-function t t))
;;
;; Remove the text properties.
(lazy-lock-after-unfontify-buffer)
diff -r e24f8c81c99181bc3121e3a43ecb0d72f589e6a3 -r 540d548b93b5ebad284c597e84722f125b5364a5 lazy-shot.el
--- a/lazy-shot.el
+++ b/lazy-shot.el
@@ -298,7 +298,7 @@
;; entire changed area.
(remove-hook 'after-change-functions 'font-lock-after-change-function t)
(make-local-hook 'after-change-functions)
- (add-hook 'after-change-functions 'lazy-shot-after-change-function nil t))
+ (add-hook 'after-change-functions 'lazy-shot-after-change-function t t))
;; Kludge needed untill lazy-lock-fontify-region is more intelligent
(defun lazy-shot-unstall-after-fontify ()
@@ -319,8 +319,7 @@
(lazy-shot-fontify-region (point-min) (point-max))))
(remove-hook 'after-change-functions 'lazy-shot-after-change-function t)
(if font-lock-mode
- (add-hook 'after-change-functions 'font-lock-after-change-function
- nil t)))
+ (add-hook 'after-change-functions 'font-lock-after-change-function t t)))
(provide 'lazy-shot)
Repository URL: https://bitbucket.org/xemacs/edit-utils/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches