;; iso.el -- implement ISO extension chracters ;; SCCS Status : @(#)@ iso.el 1.5 ;; Author : Johan Vromans ;; Created On : Mon Nov 26 15:52:42 1990 ;; Last Modified By: Johan Vromans ;; Last Modified On: Wed Sep 11 15:31:34 1991 ;; Update Count : 25 ;; Status : OK ;; Modified by Arnaldo Mandel in a sort of trivial way. ;; Portug-mode, instead of ISO, and a font change to ISO-font, if necessary. ;; This module defines the following functions ;; ;; (ISO-build-ext-map) creates and fills ISO-key-map ;; (ISO-text-mode off) to switch ISO text mode ;; ;; Calling ISO-text-mode usually suffices, since this creates the keymap (once) ;; and sets the mode accordingly. ;; ;; >>> The keymap is now created upon loading. This is faster <<< (require 'backquote) (require 'iso-syntax) (load "el-accents" t t nil) (defvar Portug-mode nil) (setq minor-mode-alist (append minor-mode-alist '((Portug-mode " Portug" )))) (defun show-accents () "Toggles showing of accents for the current buffer." (interactive) (standard-display-european)) (defun Portug-mode (&optional off) "Enables (with ARG: disables) ISO text mode for the current buffer." (interactive "P") (make-local-variable 'Portug-mode) (if off (progn (setq Portug-mode nil) (standard-display-european -1) (local-set-key "\e " nil) (electric-accents t)) (standard-display-european 1) (setq Portug-mode t) (electric-accents) ) (set-buffer-modified-p (buffer-modified-p)) (redraw-display)) (defun Portug () "Toggles Portug-mode. In Portug mode, the keys '`\"~^ work as accents toward the following letter; one gets c-cedilla with 'c. A double accent inserts itself. Case fold search also folds accents. " (interactive) (if Portug-mode (Portug-mode t) (Portug-mode)) )