commit c2208b3d913c2e53b96d7f11b31422a57366f601 (HEAD, refs/remotes/origin/master) Author: Daniel Colascione Date: Fri Jan 9 22:44:31 2015 -0800 Better binding for vc-delete-file * lisp/vc/vc-hooks.el (vc-prefix-map): Bind vc-delete-file to C-x v x, by analogy with dired. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c7ad41a..fc7f5e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-01-10 Daniel Colascione + + * vc/vc-hooks.el (vc-prefix-map): Bind vc-delete-file to C-x v x, + by analogy with dired. + 2015-01-09 Daniel Colascione * progmodes/js.el (js--function-heading-1-re) diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 3b1f6c7..7801f4f 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -886,7 +886,7 @@ current, and kill the buffer that visits the link." (define-key map "=" 'vc-diff) (define-key map "D" 'vc-root-diff) (define-key map "~" 'vc-revision-other-window) - (define-key map "[delete]" 'vc-delete-file) + (define-key map "x" 'vc-delete-file) map)) (fset 'vc-prefix-map vc-prefix-map) (define-key ctl-x-map "v" 'vc-prefix-map) commit 087a4d2f0ea3203d875b21222541803efb830cbe Author: Daniel Colascione Date: Fri Jan 9 22:18:04 2015 -0800 Tweak NEWS * etc/NEWS: Fix typo diff --git a/etc/ChangeLog b/etc/ChangeLog index c72c560..7a27312 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2015-01-10 Daniel Colascione + + * NEWS: Fix typo + 2015-01-04 Paul Eggert batch write-region no longer says "Wrote FOO" diff --git a/etc/NEWS b/etc/NEWS index 1f503ce..59d90ab 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -611,7 +611,7 @@ Horizontal scroll bars are turned off by default. `scroll-bar-height'. +++ -** The height of a frame's menu and tool bar are no more counted in the +** The height of a frame's menu and tool bar are no longer counted in the frame's text height. This means that the text height stands only for the height of the frame's root window plus that of the echo area (if present). This was already the behavior for frames with external tool commit 9c64c52b27bbef0f252c19fd978feb81d53a4093 Author: Daniel Colascione Date: Fri Jan 9 10:25:50 2015 -0800 Teach js-mode about ES6 generators * lisp/progmodes/js.el (js--function-heading-1-re) (js--function-prologue-beginning): Parse ES6 generator function declarations. (That is, "function* name()"). diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bca8d28..c7ad41a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-01-09 Daniel Colascione + + * progmodes/js.el (js--function-heading-1-re) + (js--function-prologue-beginning): Parse ES6 generator function + declarations. (That is, "function* name()"). + 2015-01-08 Stefan Monnier * emacs-lisp/eieio.el (defclass): Move from eieio-defclass all the code diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index de6a339..c25e52c 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -248,7 +248,7 @@ name as matched contains (defconst js--function-heading-1-re (concat - "^\\s-*function\\s-+\\(" js--name-re "\\)") + "^\\s-*function\\(?:\\s-\\|\\*\\)+\\(" js--name-re "\\)") "Regexp matching the start of a JavaScript function header. Match group 1 is the name of the function.") @@ -796,6 +796,9 @@ determined. Otherwise, return nil." (let ((name t)) (forward-word) (forward-comment most-positive-fixnum) + (when (eq (char-after) ?*) + (forward-char) + (forward-comment most-positive-fixnum)) (when (looking-at js--name-re) (setq name (match-string-no-properties 0)) (goto-char (match-end 0))) commit d1f848ffb9896fe2bd8eb9e7d70a49ca9ff9522f Author: Paul Eggert Date: Fri Jan 9 08:04:36 2015 -0800 Refactor pointer-to-integer conversion * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): Rename and move to lisp.h. All uses changed. * lisp.h (XINTPTR, make_pointer_integer): New inline functions, which are renamed from gfilenotify.c's lisp_to_monitor and monitor_to_lisp, and with more-generic void * signatures. diff --git a/src/ChangeLog b/src/ChangeLog index c302f95..c11ba11 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2015-01-09 Paul Eggert + + Refactor pointer-to-integer conversion + * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): + Rename and move to lisp.h. All uses changed. + * lisp.h (XINTPTR, make_pointer_integer): New inline functions, + which are renamed from gfilenotify.c's lisp_to_monitor and + monitor_to_lisp, and with more-generic void * signatures. + 2015-01-08 Eli Zaretskii * dispnew.c (buffer_posn_from_coords): Fix the value of the column diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 88222b5..e03bec9 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c @@ -31,22 +31,6 @@ along with GNU Emacs. If not, see . */ static Lisp_Object watch_list; -/* Convert a monitor to a Lisp integer and back. On all known glib - platforms, converting the sum of MONITOR and Lisp_Int0 directly to - a Lisp_Object value results in a Lisp integer, which is safe. */ - -static Lisp_Object -monitor_to_lisp (GFileMonitor *monitor) -{ - return XIL (TAG_PTR (Lisp_Int0, monitor)); -} - -static GFileMonitor * -lisp_to_monitor (Lisp_Object watch_descriptor) -{ - return XUNTAG (watch_descriptor, Lisp_Int0); -} - /* This is the callback function for arriving signals from g_file_monitor. It shall create a Lisp event, and put it into Emacs input queue. */ @@ -93,7 +77,7 @@ dir_monitor_callback (GFileMonitor *monitor, } /* Determine callback function. */ - monitor_object = monitor_to_lisp (monitor); + monitor_object = make_pointer_integer (monitor); eassert (INTEGERP (monitor_object)); watch_object = assq_no_quit (monitor_object, watch_list); @@ -192,9 +176,9 @@ will be reported only in case of the 'moved' event. */) if (! monitor) xsignal2 (Qfile_notify_error, build_string ("Cannot watch file"), file); - Lisp_Object watch_descriptor = monitor_to_lisp (monitor); + Lisp_Object watch_descriptor = make_pointer_integer (monitor); - /* Check the dicey assumption that monitor_to_lisp is safe. */ + /* Check the dicey assumption that make_pointer_integer is safe. */ if (! INTEGERP (watch_descriptor)) { g_object_unref (monitor); @@ -225,7 +209,7 @@ WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */) watch_descriptor); eassert (INTEGERP (watch_descriptor)); - GFileMonitor *monitor = lisp_to_monitor (watch_descriptor); + GFileMonitor *monitor = XINTPTR (watch_descriptor); if (!g_file_monitor_cancel (monitor)) xsignal2 (Qfile_notify_error, build_string ("Could not rm watch"), watch_descriptor); diff --git a/src/lisp.h b/src/lisp.h index 5a4198e..4571c45 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1112,6 +1112,25 @@ make_lisp_proc (struct Lisp_Process *p) #define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR)) #define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE)) +/* Efficiently convert a pointer to a Lisp object and back. The + pointer is represented as a Lisp integer, so the garbage collector + does not know about it. The pointer should not have both Lisp_Int1 + bits set, which makes this conversion inherently unportable. */ + +INLINE void * +XINTPTR (Lisp_Object a) +{ + return XUNTAG (a, Lisp_Int0); +} + +INLINE Lisp_Object +make_pointer_integer (void *p) +{ + Lisp_Object a = XIL (TAG_PTR (Lisp_Int0, p)); + eassert (INTEGERP (a) && XINTPTR (a) == p); + return a; +} + /* Type checking. */ LISP_MACRO_DEFUN_VOID (CHECK_TYPE,