summaryrefslogtreecommitdiff
path: root/tex-conf.el
diff options
context:
space:
mode:
Diffstat (limited to 'tex-conf.el')
-rw-r--r--tex-conf.el21
1 files changed, 20 insertions, 1 deletions
diff --git a/tex-conf.el b/tex-conf.el
index 89065ea..5245c21 100644
--- a/tex-conf.el
+++ b/tex-conf.el
@@ -320,7 +320,7 @@ The list is in the variable `durand-o-things-list'"
(t
(user-error "Weird associated: %S" associated))))))
-;; Automatic braces
+;;; Automatic braces
(setq TeX-electric-sub-and-superscript t)
@@ -329,5 +329,24 @@ The list is in the variable `durand-o-things-list'"
;; (setq-default TeX-master nil)
+;;; hieroglyphs
+
+(defun durand-tex-hiero ()
+ "Translate the hieroglyph code in the region to proper latex
+ code."
+ (interactive)
+ (let ((text (cond ((use-region-p)
+ (buffer-substring-no-properties
+ (region-beginning)
+ (region-end)))
+ ((buffer-substring-no-properties
+ (point-min) (point-max)))))
+ (temp-buffer (get-buffer-create "*temp*")))
+ (call-process-region
+ text nil "sesh" nil temp-buffer)
+ (with-current-buffer temp-buffer
+ (kill-new (buffer-string)))
+ (kill-buffer temp-buffer)))
+
(provide 'tex-conf)
;;; tex-conf.el ends here