Skip to content

Instantly share code, notes, and snippets.

(require 'flymake)
(require 'd-mode)
(defun flymake-D-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name)))
(opts_ (concat (file-name-directory buffer-file-name)
@gmfawcett
gmfawcett / gist:7829710
Created December 6, 2013 18:21
initializing a board from a string, at compile-time
enum COLOR : byte { BLANK, BLACK, WHITE };
enum TYPE : byte { NA, MAN, KING };
struct Piece {
COLOR color; TYPE type;
string toString() {
if (color == COLOR.BLANK)
return ".";
if (color == COLOR.WHITE)
return (type == TYPE.MAN) ? "w" : "W";
@gmfawcett
gmfawcett / gist:2858627
Created June 2, 2012 14:26
d-mode working for me
;;; d-mode.el --- D Programming Language mode for (X)Emacs
;;; Requires a cc-mode of version 5.30 or greater
;; Author: 2007 William Baxter
;; Contributors: Andrei Alexandrescu
;; Maintainer: William Baxter
;; Created: March 2007
;; Version: 2.0.4 (February 2008)
;; Keywords: D programming language emacs cc-mode