Thien-Thi Nguyen [Thu, 13 Feb 2014 11:29:19 +0000 (12:29 +0100)]
[gnugo int] Add abstraction: gnugo--unclose-game
* packages/gnugo/gnugo.el (gnugo--unclose-game): New func.
(gnugo-magic-undo): Use it.
(boardsize, clear_board, fixed_handicap):
Likewise, in the value of the ‘:post-thunk’ property.
Thien-Thi Nguyen [Fri, 7 Feb 2014 09:34:22 +0000 (10:34 +0100)]
[gnugo int] Hang the sync-return-stash on the process object.
* packages/gnugo/gnugo.el (gnugo-synchronous-send/return):
Don't use ‘gnugo-put’, ‘gnugo-get’; instead, use
‘process-put’, ‘process-get’ with property ‘:srs’.
Thien-Thi Nguyen [Thu, 6 Feb 2014 09:59:30 +0000 (10:59 +0100)]
[gnugo int] Use ‘number-sequence’ more.
* packages/gnugo/gnugo.el (gnugo-animate-group):
For image display ‘spec’ handling, don't map over
an exploded string, ignoring the individual characters,
and manually toggling the state; instead, map over an
integer, using the number's divisibility by two to select.
Thien-Thi Nguyen [Mon, 3 Feb 2014 17:42:58 +0000 (18:42 +0100)]
[gnugo maint] Update a musing item in HACKING; nfc.
Although it would be nice to avoid a "merge commit" through constant
rebase (such that the final merge can be a fast-forward operation),
that makes it painful / difficult for others to follow.
Thien-Thi Nguyen [Mon, 3 Feb 2014 09:36:46 +0000 (10:36 +0100)]
[gnugo] Indicate buffer not modified after save.
* packages/gnugo/gnugo.el (gnugo-animate-group): Use current
value of ‘buffer-modified-p’ in loop instead of ‘t’.
(gnugo-write-sgf-file): Clear buffer-modified state.
Thien-Thi Nguyen [Fri, 31 Jan 2014 12:51:08 +0000 (13:51 +0100)]
[gnugo int] Use ‘(split-string STR SEP t)’.
* packages/gnugo/gnugo.el (gnugo-animate-group): ...here,
instead of manually deleting the empty strings
returned from a two-arg call to ‘split-string’.
Thien-Thi Nguyen [Thu, 30 Jan 2014 19:52:17 +0000 (20:52 +0100)]
[gnugo] Don't use ‘process-kill-buffer-query-function’.
* packages/gnugo/gnugo.el (gnugo-board-mode):
Make ‘kill-buffer-query-functions’ buffer-local and
then remove ‘process-kill-buffer-query-function’ from it.
Thien-Thi Nguyen [Thu, 30 Jan 2014 12:26:41 +0000 (13:26 +0100)]
[gnugo] Use ‘cl-labels’ instead of ‘flet’.
* packages/gnugo/gnugo.el: Don't require ‘cl’;
instead, require ‘cl-lib’; do ‘s/flet/cl-labels/g’.
(gnugo-note): Use #'mog instead of 'mog as ‘mapcar’ 1st arg.
(gnugo-toggle-dead-group): Use #'populate.
(:gnugo-gtp-command-spec defgtp): Use #'jam, #'add.
(gnugo/sgf-write-file): Use #'one, #'two.
Michal Nazarewicz [Mon, 24 Feb 2014 00:28:48 +0000 (01:28 +0100)]
* num3-mode.el: Catch strings looking like hex number even w/o 0x prefix.
Update `num3--number-re' to catch strings which are a whole word, have
only hexadecimal digits and have at least one non-decimal hexadecimal
digit (i.e. letter from A to F), and treat them as hexadecimal number.
Also update `num3--number-re' to properly catch Emacs Lisp's
Andrey Kotlarski [Sun, 23 Feb 2014 15:33:35 +0000 (17:33 +0200)]
* packages/vlf: Version 1.5. Add hexl-mode integration and hook
extensibility.
* vlf.el: (vlf-before-batch-functions, vlf-after-batch-functions):
New hooks.
(vlf-mode): Play well with hexl-mode. Don't disable mode in case
user has declined to reload whole file.
(vlf-keep-alive, vlf-hexl-before, vlf-hexl-after): New functions.
Use them in hooks.
(vlf-hexl-save, vlf-hexl-scroll-up, vlf-hexl-scroll-down): New
advices.
* vlf-write.el (vlf-write): Run batch hooks. Check if tramp is
loaded.
* vlf-search.el (vlf-re-search, vlf-goto-line): Run batch hooks.
Check if tramp is loaded.
* vlf-occur.el (vlf-occur): Run batch hooks.
(vlf-build-occur): Check if tramp is loaded.
* vlf-integrate.el: Minor whitespace adjustment.
* vlf-ediff.el: Enable lexical scoping.
(vlf-ediff-next): Run batch hooks. Check if tramp is loaded.
* vlf-base.el (vlf-before-chunk-update, vlf-after-chunk-update):
New hooks.
(vlf-move-to-chunk-1, vlf-move-to-chunk-2): Run them.
(vlf-move-to-chunk-2): Delete undo info only in case it's not
disabled.
(vlf-insert-file-contents-1): Use insert-file-contents instead of
manual decoding and remove position parameter.
(vlf-insert-file-contents, vlf-adjust-start): Adjust calls.
Leo Liu [Thu, 13 Feb 2014 09:59:45 +0000 (17:59 +0800)]
Expire project info in ggtags-update-tags
1. Tweak ggtags-project-expired-p to treat negative timestamp as
expiration.
2. Enhance ggtags-make-project to allow updating project info.
3. Teach ggtags-find-project to update project info if expired so that
all buffer-local values of ggtags-project get the new value.
* vlf-base.el (vlf-move-to-chunk): Handle cases where chunk
outside file size is requested.
(vlf-delete-region): New function.
(vlf-move-to-chunk-1): Use it. Optimize jumps to next/previous
chunk.
(vlf-insert-file-contents-safe): Rename to `vlf-insert-file-contents-1'.
(vlf-adjust-start): Simplify.
(vlf-adjust-end): Remove.
* packages/vlf/vlf-write.el: New file.
* packages/vlf/vlf-search.el: New file.
* packages/vlf/vlf-occur.el: New file.
* packages/vlf/vlf-integrate.el: New file.
* packages/vlf/vlf-follow.el: New file.
* packages/vlf/vlf-base.el: New file.
Andrey Kotlarski [Sat, 1 Feb 2014 16:45:15 +0000 (18:45 +0200)]
* packages/vlf/vlf.el: Add recenter around chunk functionality.
(vlf-follow-timer): New variable.
(vlf-partial-decode-shown, vlf-min-chunk-size): New constants.
(vlf-with-undo-disabled): Restore previous undo list.
(vlf-shift-undo-list): New function.
(vlf-mode): Stop follow timer if active.
("etags"): Don't apply automatically VLF over TAGS files.
(vlf-move-to-chunk, vlf-move-to-chunk-1, vlf-move-to-chunk-2):
Return number of bytes added to beginning and end for proper
decoding.
(vlf-move-to-chunk-1): Adjust undo list when chunk start has
changed. Ignore moving by just a few bytes.
(vlf-adjust-start, vlf-adjust-end, vlf-insert-content-safe): New functions.
(vlf-adjust-chunk): Use them. Rename to `vlf-insert-file-contents'.
(vlf-recenter): New function.
(vlf-stop-following, vlf-start-following): New commands.