summary refs log tree commit diff
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2018-11-26 12:42:39 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2018-11-26 14:53:45 +0100
commit51002b723dbd24805f5071c895b0c9cd6c7bf395 (patch)
treeafef18ebb8b7bebb588b1a7ece153ba3e8aa1e02
parent7628ff1fc04e2a338660e9c40c094e914e0f4b62 (diff)
downloadguix-51002b723dbd24805f5071c895b0c9cd6c7bf395.tar.gz
gnu: Add emacs-clang-rename.
* gnu/packages/llvm.scm (emacs-clang-rename): New variable.
-rw-r--r--gnu/packages/llvm.scm22
1 files changed, 22 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 6a452f48c6..276a89c2a0 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -460,3 +460,25 @@ code analysis tools.")
 to fix its formatting.  @code{clang-format} is a tool that formats
 C/C++/Obj-C code according to a set of style options, see
 @url{http://clang.llvm.org/docs/ClangFormatStyleOptions.html}.")))
+
+(define-public emacs-clang-rename
+  (package
+    (inherit clang)
+    (name "emacs-clang-rename")
+    (build-system emacs-build-system)
+    (inputs
+     `(("clang" ,clang)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((clang (assoc-ref inputs "clang")))
+               (copy-file "tools/clang-rename/clang-rename.el" "clang-rename.el")
+               (emacs-substitute-variables "clang-rename.el"
+                 ("clang-rename-binary"
+                  (string-append clang "/bin/clang-rename"))))
+             #t)))))
+    (synopsis "Rename every occurrence of a symbol using clang-rename")
+    (description "This package renames every occurrence of a symbol at point
+using @code{clang-rename}.")))