GTK does this, and I think it’s a reasonable binding. It is a shame that
there’s no easy way to do it on the TTY.
diff -r 8139bdf8db04 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Aug 03 20:25:03 2014 +0100
+++ b/lisp/ChangeLog Tue Aug 05 00:17:51 2014 +0100
@@ -1,3 +1,17 @@
+2014-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * keymap.el:
+ * keymap.el (event-apply-modifiers):
+ When a character keysym has case information, apply the shift
+ modifier to it by upcasing it.
+ * keymap.el (synthesize-keysym):
+ Document this a little.
+ * keymap.el (synthesize-unicode-codepoint): New.
+ Like #'synthesize-keysym, but synthesizing a Unicode codepoint.
+ * keymap.el (function-key-map-parent): Bind control shift u to
+ synthesize a Unicode character input, as does GTK+ and as
+ specified by ISO 14755.
+
2014-07-14 Aidan Kehoe <kehoea(a)parhasard.net>
* simple.el (raw-append-message):
diff -r 8139bdf8db04 lisp/keymap.el
--- a/lisp/keymap.el Sun Aug 03 20:25:03 2014 +0100
+++ b/lisp/keymap.el Tue Aug 05 00:17:51 2014 +0100
@@ -445,7 +445,7 @@
"Return the next key event, with a list of modifiers applied.
LIST describes the names of these modifier, a list of symbols.
`function-key-map' is scanned for prefix bindings."
- (let (events binding)
+ (let (events binding key-sequence-list-description symbol-name)
;; read keystrokes scanning `function-key-map'
(while (keymapp
(setq binding
@@ -465,11 +465,21 @@
(mapcar 'character-to-event (cdr events))))
(setq unread-command-events (cdr events)))
;; add modifiers LIST to the first keystroke or event
+ (setf key-sequence-list-description
+ (aref (key-sequence-list-description (car events)) 0))
+ (if (and (member 'shift list)
+ (symbolp (car (last key-sequence-list-description)))
+ (eql 1 (length
+ (setq symbol-name
+ (symbol-name
+ (car (last key-sequence-list-description))))))
+ (not (eql (aref symbol-name 0) (upcase (aref symbol-name 0)))))
+ (setf (car (last key-sequence-list-description))
+ (intern (upcase symbol-name))
+ list (remove* 'shift list)))
(vector
(append list
- (set-difference (aref (key-sequence-list-description (car events))
- 0)
- list :stable t)))))
+ (set-difference key-sequence-list-description list :stable t)))))
(defun event-apply-modifier (symbol)
"Return the next key event, with a single modifier applied.
@@ -480,6 +490,10 @@
"Read a sequence of characters, and return the corresponding keysym.
The characters must be ?-, or ?_, or have word syntax. Reading is
terminated by RET (which is discarded)."
+ ;; This has the disadvantage that only X11 keysyms (and space, backspace
+ ;; and friends, together with the trivial one-character keysyms) are
+ ;; recognised, and then only on a build with X11 support which has had an
+ ;; X11 frame open at some point.
(let ((continuep t)
event char list)
(while continuep
@@ -501,6 +515,32 @@
(error "Event has no character equivalent: %s" event))))
(vector (intern (concat "" (nreverse list))))))
+(defun synthesize-unicode-codepoint (ignore-prompt)
+ "Read a sequence of hexadecimal digits and return a one-char keyboard macro.
+
+The character has the Unicode code point corresponding to those hexadecimal
+digits."
+ (symbol-macrolet ((first-prompt "Unicode hex input: u"))
+ (let* ((prompt first-prompt) (integer 0)
+ (extent (make-extent (1- (length first-prompt))
+ (length first-prompt) prompt))
+ character digit-char-p)
+ (setf (extent-face extent) 'underline
+ (extent-property extent 'duplicable) t)
+ (while (not (member (setq character
+ ;; Discard non-enter non-hex-digit characters,
+ ;; as GTK does.
+ (read-char-exclusive prompt))
+ '(?\r ?\n)))
+ (when (setq digit-char-p (digit-char-p character 16))
+ (setq integer (logior (lsh integer 4) digit-char-p)
+ prompt (concat prompt (list character)))
+ (if (>= integer #x110000)
+ (error 'args-out-of-range "Not a Unicode code point" integer))
+ (set-extent-endpoints extent (1- (length first-prompt))
+ (length prompt) prompt)))
+ (vector (list (decode-char 'ucs integer))))))
+
(define-key function-key-map-parent [?\C-x ?@ ?h] 'event-apply-hyper-modifier)
(define-key function-key-map-parent [?\C-x ?@ ?s] 'event-apply-super-modifier)
(define-key function-key-map-parent [?\C-x ?@ ?m] 'event-apply-meta-modifier)
@@ -508,6 +548,7 @@
(define-key function-key-map-parent [?\C-x ?@ ?c] 'event-apply-control-modifier)
(define-key function-key-map-parent [?\C-x ?@ ?a] 'event-apply-alt-modifier)
(define-key function-key-map-parent [?\C-x ?@ ?k] 'synthesize-keysym)
+(define-key function-key-map-parent [(control U)] 'synthesize-unicode-codepoint)
;; The autoloads for the compose map, and their bindings in
;; function-key-map-parent are used by GTK as well as X11. And Julian
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/1b984807a299/
Changeset: 1b984807a299
User: kehoea
Date: 2014-08-22 11:58:09
Summary: Support control shift u for Unicode input as does GTK.
lisp/ChangeLog addition:
2014-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
* keymap.el:
* keymap.el (event-apply-modifiers):
When a character keysym has case information, apply the shift
modifier to it by upcasing it.
* keymap.el (synthesize-keysym):
Document this a little.
* keymap.el (synthesize-unicode-codepoint): New.
Like #'synthesize-keysym, but synthesizing a Unicode codepoint.
* keymap.el (function-key-map-parent): Bind control shift u to
synthesize a Unicode character input, as does GTK+ and as
specified by ISO 14755.
Affected #: 2 files
diff -r 080c1762f7a1120e28013da8acf4ad1d91b7f0ba -r 1b984807a2990fb31c0f6ae2b7c6bd833ed36394 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,17 @@
+2014-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * keymap.el:
+ * keymap.el (event-apply-modifiers):
+ When a character keysym has case information, apply the shift
+ modifier to it by upcasing it.
+ * keymap.el (synthesize-keysym):
+ Document this a little.
+ * keymap.el (synthesize-unicode-codepoint): New.
+ Like #'synthesize-keysym, but synthesizing a Unicode codepoint.
+ * keymap.el (function-key-map-parent): Bind control shift u to
+ synthesize a Unicode character input, as does GTK+ and as
+ specified by ISO 14755.
+
2014-08-06 Aidan Kehoe <kehoea(a)parhasard.net>
* fontconfig.el (fc-name-parse-harder):
diff -r 080c1762f7a1120e28013da8acf4ad1d91b7f0ba -r 1b984807a2990fb31c0f6ae2b7c6bd833ed36394 lisp/keymap.el
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -445,7 +445,7 @@
"Return the next key event, with a list of modifiers applied.
LIST describes the names of these modifier, a list of symbols.
`function-key-map' is scanned for prefix bindings."
- (let (events binding)
+ (let (events binding key-sequence-list-description symbol-name)
;; read keystrokes scanning `function-key-map'
(while (keymapp
(setq binding
@@ -465,11 +465,21 @@
(mapcar 'character-to-event (cdr events))))
(setq unread-command-events (cdr events)))
;; add modifiers LIST to the first keystroke or event
+ (setf key-sequence-list-description
+ (aref (key-sequence-list-description (car events)) 0))
+ (if (and (member 'shift list)
+ (symbolp (car (last key-sequence-list-description)))
+ (eql 1 (length
+ (setq symbol-name
+ (symbol-name
+ (car (last key-sequence-list-description))))))
+ (not (eql (aref symbol-name 0) (upcase (aref symbol-name 0)))))
+ (setf (car (last key-sequence-list-description))
+ (intern (upcase symbol-name))
+ list (remove* 'shift list)))
(vector
(append list
- (set-difference (aref (key-sequence-list-description (car events))
- 0)
- list :stable t)))))
+ (set-difference key-sequence-list-description list :stable t)))))
(defun event-apply-modifier (symbol)
"Return the next key event, with a single modifier applied.
@@ -480,6 +490,10 @@
"Read a sequence of characters, and return the corresponding keysym.
The characters must be ?-, or ?_, or have word syntax. Reading is
terminated by RET (which is discarded)."
+ ;; This has the disadvantage that only X11 keysyms (and space, backspace
+ ;; and friends, together with the trivial one-character keysyms) are
+ ;; recognised, and then only on a build with X11 support which has had an
+ ;; X11 frame open at some point.
(let ((continuep t)
event char list)
(while continuep
@@ -501,6 +515,32 @@
(error "Event has no character equivalent: %s" event))))
(vector (intern (concat "" (nreverse list))))))
+(defun synthesize-unicode-codepoint (ignore-prompt)
+ "Read a sequence of hexadecimal digits and return a one-char keyboard macro.
+
+The character has the Unicode code point corresponding to those hexadecimal
+digits."
+ (symbol-macrolet ((first-prompt "Unicode hex input: u"))
+ (let* ((prompt first-prompt) (integer 0)
+ (extent (make-extent (1- (length first-prompt))
+ (length first-prompt) prompt))
+ character digit-char-p)
+ (setf (extent-face extent) 'underline
+ (extent-property extent 'duplicable) t)
+ (while (not (member (setq character
+ ;; Discard non-enter non-hex-digit characters,
+ ;; as GTK does.
+ (read-char-exclusive prompt))
+ '(?\r ?\n)))
+ (when (setq digit-char-p (digit-char-p character 16))
+ (setq integer (logior (lsh integer 4) digit-char-p)
+ prompt (concat prompt (list character)))
+ (if (>= integer #x110000)
+ (error 'args-out-of-range "Not a Unicode code point" integer))
+ (set-extent-endpoints extent (1- (length first-prompt))
+ (length prompt) prompt)))
+ (vector (list (decode-char 'ucs integer))))))
+
(define-key function-key-map-parent [?\C-x ?@ ?h] 'event-apply-hyper-modifier)
(define-key function-key-map-parent [?\C-x ?@ ?s] 'event-apply-super-modifier)
(define-key function-key-map-parent [?\C-x ?@ ?m] 'event-apply-meta-modifier)
@@ -508,6 +548,7 @@
(define-key function-key-map-parent [?\C-x ?@ ?c] 'event-apply-control-modifier)
(define-key function-key-map-parent [?\C-x ?@ ?a] 'event-apply-alt-modifier)
(define-key function-key-map-parent [?\C-x ?@ ?k] 'synthesize-keysym)
+(define-key function-key-map-parent [(control U)] 'synthesize-unicode-codepoint)
;; The autoloads for the compose map, and their bindings in
;; function-key-map-parent are used by GTK as well as X11. And Julian
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
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
Hi Mike,
The introduction of idna.el in net-utils triggered a problem with byte
compiling two defcustom forms in gnus. This patch fixes this, at least
until some better solution is found, by using nil as default and not
calculating a value.
(I could also argue that calculating a default on the machine where
the file is compiled seems not to be a good idea. It should be
calculated on the machine where it is loaded. I don't know if the
:initialize property can be put to use here but the size of the
problem might suggest that a simple default can be used and the user
can customize a proper value himself!?)
diff -r 075087fcf346 ChangeLog
--- a/ChangeLog Sun Jun 22 09:03:58 2014 +0200
+++ b/ChangeLog Tue Aug 19 07:31:08 2014 +0200
@@ -1,3 +1,9 @@
+2014-08-17 Mats Lidell <matsl(a)xemacs.org>
+
+ * lisp/message.el (message-use-idna): Use nil as default since
+ calculated value will not byte-compile.
+ * lisp/gnus-art.el (gnus-use-idna): Ditto.
+
2014-06-22 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.99 released.
diff -r 075087fcf346 lisp/gnus-art.el
--- a/lisp/gnus-art.el Sun Jun 22 09:03:58 2014 +0200
+++ b/lisp/gnus-art.el Tue Aug 19 07:31:08 2014 +0200
@@ -1517,9 +1517,10 @@
(defvar gnus-article-wash-function nil
"Function used for converting HTML into text.")
-(defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error))
- (mm-coding-system-p 'utf-8)
- (executable-find idna-program))
+; (defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error))
+; (mm-coding-system-p 'utf-8)
+; (executable-find idna-program))
+(defcustom gnus-use-idna nil
"Whether IDNA decoding of headers is used when viewing messages.
This requires GNU Libidn, and by default only enabled if it is found."
:version "22.1"
diff -r 075087fcf346 lisp/message.el
--- a/lisp/message.el Sun Jun 22 09:03:58 2014 +0200
+++ b/lisp/message.el Tue Aug 19 07:31:08 2014 +0200
@@ -1475,13 +1475,14 @@
:type '(radio (const :format "%v " nil)
(string :format "FQDN: %v")))
-(defcustom message-use-idna (and (condition-case nil (require 'idna)
- (file-error))
- (mm-coding-system-p 'utf-8)
- (executable-find idna-program)
- (string= (idna-to-ascii "räksmörgås")
- "xn--rksmrgs-5wao1o")
- t)
+; (defcustom message-use-idna (and (condition-case nil (require 'idna)
+; (file-error))
+; (mm-coding-system-p 'utf-8)
+; (executable-find idna-program)
+; (string= (idna-to-ascii "räksmörgås")
+; "xn--rksmrgs-5wao1o")
+; t)
+(defcustom message-use-idna nil
"Whether to encode non-ASCII in domain names into ASCII according to IDNA.
GNU Libidn, and in particular the elisp package \"idna.el\" and
the external program \"idn\", must be installed for this
Yours
--
%% Mats
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
PATCH packages (edit-utils)
On Mon, Aug 11, 2014 at 9:15 AM, Jerry James <james(a)xemacs.org> wrote:
> I use cc-mode's electric behavior, which is great, except that whenever I
> type a '}' as the last character in a buffer, I get something like this:
>
[snip]
> So the bug is in, I think, xemacs-packages/edit-utils/lazy-lock.el, which
> does this:
>
> (add-hook 'after-change-functions 'lazy-lock-after-change nil t)
>
> when I think it should be doing this:
>
> (add-hook 'after-change-functions 'lazy-lock-after-change t t)
>
I think that lazy-lock-after-change, which does not alter the region,
should definitely come at the end of the after-change-functions list, after
any hook functions which may change the region, not just c-after-change.
Here is a patch to accomplish that.
diff -r e24f8c81c991 ChangeLog
--- a/ChangeLog Fri May 30 14:33:15 2014 +0200
+++ b/ChangeLog Fri Aug 15 10:45:56 2014 -0600
@@ -1,3 +1,8 @@
+2014-08-15 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.
+
2014-05-26 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 2.55 released.
diff -r e24f8c81c991 lazy-lock.el
--- a/lazy-lock.el Fri May 30 14:33:15 2014 +0200
+++ b/lazy-lock.el Fri Aug 15 10:45:56 2014 -0600
@@ -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
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
COMMIT
On Tue, Aug 12, 2014 at 1:12 AM, Michael Sperber <sperber(a)deinprogramm.de>
wrote:
>
> APPROVE
Thanks for the review, Mike. I have committed this patch.
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/080c1762f7a1/
Changeset: 080c1762f7a1
User: Jerry James
Date: 2014-08-15 18:39:19
Summary: Use CPPFLAGS when building modules. See xemacs-patches message
<CAHCOHQn_3ca3-LoXVo+9rYn-dFPMh3mE2__dSWO5AH_Bsn1u9g(a)mail.gmail.com>.
Affected #: 2 files
diff -r 2dee57a2c2d6579c30cc5cc74181cd42a3873bf5 -r 080c1762f7a1120e28013da8acf4ad1d91b7f0ba modules/ChangeLog
--- a/modules/ChangeLog
+++ b/modules/ChangeLog
@@ -1,3 +1,7 @@
+2014-08-11 Jerry James <james(a)xemacs.org>
+
+ * common/Makefile.common (CPPFLAGS): New variable.
+
2013-06-23 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.34 "kale" is released.
diff -r 2dee57a2c2d6579c30cc5cc74181cd42a3873bf5 -r 080c1762f7a1120e28013da8acf4ad1d91b7f0ba modules/common/Makefile.common
--- a/modules/common/Makefile.common
+++ b/modules/common/Makefile.common
@@ -35,6 +35,7 @@
RM=rm -f
PROGNAME=@PROGNAME@
CFLAGS=@XE_CFLAGS@
+CPPFLAGS=@CPPFLAGS@
INSTALL=@INSTALL@
version=@version@
prefix=@prefix@
@@ -67,7 +68,7 @@
all: $(OBJECT_TO_BUILD)
.c.o:
- $(MODCC) $(MODCFLAGS) -c $<
+ $(MODCC) $(MODCFLAGS) $(CPPFLAGS) -c $<
$(MODNAME).ell: $(OBJS) $(MODNAME)_i.o $(IMPORT_LIB)
$(MODCC) --mode=link --mode=verbose --mod-output=$@ \
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
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 21.5
The lack of this causes my TLS-ized source tree to fail to build when I
enable modules, because the necessary -I flags are not being passed to the
compiler. This seems like a good idea, anyway, as modules may very well
depend on nonstandard include paths that were passed to configure.
diff -r 2dee57a2c2d6 modules/ChangeLog
--- a/modules/ChangeLog Wed Aug 06 10:19:25 2014 +0100
+++ b/modules/ChangeLog Mon Aug 11 15:04:24 2014 -0600
@@ -1,3 +1,7 @@
+2014-08-11 Jerry James <james(a)xemacs.org>
+
+ * common/Makefile.common (CPPFLAGS): New variable.
+
2013-06-23 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.34 "kale" is released.
diff -r 2dee57a2c2d6 modules/common/Makefile.common
--- a/modules/common/Makefile.common Wed Aug 06 10:19:25 2014 +0100
+++ b/modules/common/Makefile.common Mon Aug 11 15:01:27 2014 -0600
@@ -35,6 +35,7 @@
RM=rm -f
PROGNAME=@PROGNAME@
CFLAGS=@XE_CFLAGS@
+CPPFLAGS=@CPPFLAGS@
INSTALL=@INSTALL@
version=@version@
prefix=@prefix@
@@ -67,7 +68,7 @@
all: $(OBJECT_TO_BUILD)
.c.o:
- $(MODCC) $(MODCFLAGS) -c $<
+ $(MODCC) $(MODCFLAGS) $(CPPFLAGS) -c $<
$(MODNAME).ell: $(OBJS) $(MODNAME)_i.o $(IMPORT_LIB)
$(MODCC) --mode=link --mode=verbose --mod-output=$@ \
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
Uwe Brauer writes:
> Coding system for saving this buffer:
> CText -- ctext-unix
This is why it happened. This coding system should be ISO-2022-JP, or
ISO-2022-7.
> And more importantly the file was open when I applied diff. I closed the
> file and applied diff again and now everything looks alright. Sorry for
> the inconvenience.
Yes, it looks fine to me.
I have a pile of work for GSoC for the next week/10 days (we're coming
up on "pencils down", and I ended up being responsible for 3
students). If I (or somebody else) doesn't pick up on this by the
21st, feel free to ping.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches