Skip to content

Instantly share code, notes, and snippets.

View antifuchs's full-sized avatar
🕴️

Andreas Fuchs antifuchs

🕴️
View GitHub Profile
@antifuchs
antifuchs / asf-rustdoc-edit.el
Last active January 17, 2020 02:44
This sets up a key binding for C-c ' in rust-mode, which acts very similarly to org-src's key binding, except the other direction: If you use it on a rustdoc comment, it'll open another buffer with the comment in it, in markdown-mode.
;;; Copyright (C) 2018, 2019 Andreas Fuchs <[email protected]>
;;; Made available to you under the terms of GPLv2 or later: https://choosealicense.com/licenses/gpl-2.0/
(use-package edit-indirect
:straight t)
(defconst asf--rustdoc-line-prefixes (concat "^\\([\t ]*" (regexp-opt '("///" "//!")) "\\)"))
(defun asf--rustdoc-current-comment-block-region ()
(save-excursion
;;; vrl-mode.el --- Major mode for Vector Remap Language code -*- lexical-binding: t; -*-
;; Version: 0.0.1
;; Keywords: VRL major mode
;; Author: Stephen Wakely
;; Package-Requires: ((emacs "26.1"))
;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify