Skip to content

Instantly share code, notes, and snippets.

(display "Hello, Gist!\n")
diff --git a/js2-mode.el b/js2-mode.el
index 62a9da4..ec261e7 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -3302,7 +3302,9 @@ Note that a let declaration such as let x=6, y=7 is a `js2-var-decl-node'."
(defun js2-print-let-node (n i)
(insert (js2-make-pad i) "let (")
- (js2-print-ast (js2-let-node-vars n) 0)
+ (let ((p (point)))
{-# LANGUAGE FlexibleContexts #-}
module Lexer ( tokenize, token, tokenEq, tokenChar, tokenString
, BaseToken, BaseLexer, BaseParser
) where
import Control.Applicative
import Control.Monad.Identity
import Text.Parsec hiding (token)
import qualified Text.Parsec as Parsec (token)
@gengar
gengar / ref.scm
Last active October 29, 2015 06:56
(define ~/default
(case-lambda
((obj index default)
(ref obj index default))
((obj index i x . xs)
(apply ~/default
(ref obj index)
i x xs))))
(define-syntax ~~
(use util.match)
(use gauche.record)
(define-syntax m
(er-macro-transformer
(^ (form r c)
(match form
((_ name)
`(,(r 'define-record-type)
,(r name)
// ==UserScript==
// @name puyopContestManager
// @namespace https://twitter.com/kaki_puyo
// @description ぷよパークの3DSぷよ通対戦会の登録を補助する
// @include http://www.puyop.com/Contest
// @version 0.1.0
// @grant unsafeWindow
// @grant GM_xmlhttpRequest
// ==/UserScript==
@gengar
gengar / c-grammar.scm.patch
Last active October 3, 2019 15:23
c-wrapperがMojave+Xcode11で動かなかったので
--- c-grammar.scm.orig 2019-10-04 00:07:42.000000000 +0900
+++ c-grammar.scm 2019-10-03 22:17:39.000000000 +0900
@@ -19,7 +19,7 @@
XOR_ASSIGN OR_ASSIGN TYPENAME
TYPEDEF EXTERN STATIC AUTO REGISTER INLINE RESTRICT
- SIGNED UNSIGNED CONST VOLATILE
+ SIGNED UNSIGNED CONST VOLATILE NULLABLE NONNULL
STRUCT UNION ENUM ELLIPSIS RANGE
#define PP_AUX_STR(s) #s
#define PP_STR(s) PP_AUX_STR(s)
#define PP_AUX_CAT(x, y) x ## y
#define PP_CAT(x, y) PP_AUX_CAT(x, y)
#define PP_ARG_HEAD(arg, ...) arg
#define PP_ARG_TAIL(arg, ...) __VA_ARGS__
#define PP_AUX_ARG_GET_0(a0, ...) a0
@gengar
gengar / function-try-block.el
Created May 26, 2020 15:54
c++-modeがfunction-try-blockのインデントでおかしいのをadviceで修正する試み
;; c-beginning-of-statement-1 は function-try-block のとき、
;; (1) メンバ初期化があれば、最初のメンバ初期化の先頭
;; (2) さもなくば、 try の先頭
;; まで point が動く。try の先頭位置から再び c-beginning-of-statement-1 すると期待する場所へ動く。
(defun my:c-beginning-of-statement-1 (orig &rest args)
(let* ((ret (apply orig args))
(try-pos (and (eq 'c++-mode major-mode)
(save-excursion
(or (and (looking-at-p "try")
(point))
@gengar
gengar / fcontrol.rkt
Created July 7, 2020 17:14
fcontrol/runってこういう理解でOK?
#lang racket
(require racket/control)
(define (call-with-run thunk proc)
(call/prompt thunk
(default-continuation-prompt-tag)
proc))
(define-syntax run
(syntax-rules ()