;; -*- lexical-binding: nil; -*-
;; This file:
;;   http://angg.twu.net/.emacs.unibyte.html
;;   http://angg.twu.net/.emacs.unibyte
;;           (find-angg ".emacs.unibyte")
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;;
;; (load (buffer-file-name))
;; (defun e () (interactive) (find-angg ".emacs.unibyte"))

;; .ee-tag-re	(to "ee-tag-re")
;; .unaccent	(to "unaccent")
;; .fossils	(to "fossils")



;; ee-tag-re  (to ".ee-tag-re")
;; (find-angg ".emacs" "ee-tag-re")
;; (eek "M-h M-k  M-h M-w  ;; ee-copy-this-line-to-kill-ring")
;; (find-efunction 'ee-copy-this-line-to-kill-ring)
;; (find-efunction 'ee-copy-preceding-tag-to-kill-ring)
;; (find-efunction 'ee-tag-re)
;; (find-eev "eev-codings.el" "ee-tolatin1-re")
;;
(setq  ee-tag-re-raw-text "\\([!-~]+\\)")
(defun ee-tag-re ()
  (let ((bfcs buffer-file-coding-system))
    (cond ((eq bfcs 'raw-text-unix) ee-tag-re-raw-text)
	  (t                        ee-tag-re-utf-8))))


;; unaccent  (to ".unaccent")
;; (find-blogmefile "blogme2-outer.lua" "unaccent_from, unaccent_to =")
;; (find-efunction 'translate-region)
;; (find-node "(recode)Concept Index")
(defun unaccent (s e)
  (interactive "r")
  (let ((coding-system-for-read 'latin-1-unix)
        (coding-system-for-write 'latin-1-unix))
    (shell-command-on-region
     s e
     (concat "tr ''"
	     "   'AAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuy'")
     nil t)))


;; fossils  (to ".fossils")
;; From: (find-es "emacs" "iso-accents")

(defun iso-math () (interactive)
  (if iso-accents-mode (iso-accents-mode 0)
    (iso-accents-by-strings "math850"
			    "'aeiouAEIOUcC<>"
			    "^aeouAEO"
			    "`aeiouAEOU"
			    "~aoAO"
			    "\"aeiouAOU")))

(defalias 'iso- 'iso-math)
;;; Two important fossils: my original definitions for iso-math and
;; iso-alt-list; the present ones may not be working correctly (I'm in
;; the middle of the conversion from math850 to latinmath).
;;
'(defun iso-math () (interactive)
  (if iso-accents-mode (iso-accents-mode 0)
    (iso-accents-by-strings "math850"
			    "'aeiouAEIOUcC<>"
			    "^aeouAEO"
			    "`aeiouAEOU"
			    "~aoAO"
			    "\"aeiouAOU")))
'(setq iso-alt-list
  '("&&" ? "--" ? "-1" ? "-o" ? ".." ? "/O" ? "88" ? "<<" ?
    ">=" ? ">>" ? "AE" ? "CC" ? "In" ? "NN" ? "Om" ? "PP" ?
    "TT" ? "_a" ? "_o" ? "ae" ? "am" ? "bf" ? "bl" ? "bo" ?
    "bq" ? "ca" ? "cc" ? "cu" ? "dd" ? "ee" ? "ex" ? "fa" ?
    "in" ? "ka" ? "ku" ? "la" ? "ll" ? "lo" ? "na" ? "nn" ?
    "nu" ? "o+" ? "oo" ? "ot" ? "ox" ? "pa" ? "pe" ? "pp" ?
    "ro" ? "ss" ? "te" ? "to" ? "xx" ?))






;; Local Variables:
;; mode:                 emacs-lisp
;; coding:               raw-text-unix
;; End:
