help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with cyrillic input


From: kilim
Subject: Problem with cyrillic input
Date: Tue, 15 Feb 2005 18:01:04 +0100
User-agent: Mutt/1.4.1i

Hello,

I have the following:

-GNU Emacs 21.3.1 (i386--freebsd, X toolkit, Xaw3d scroll bars) plus
leim
-X.org 6.8.1
-FreeBSD 5.3

When I set: 

        (set-language-environment 'cyrillic-iso)
        (set-input-method 'cyrillic-serbian)

and I start to type text I notice that the first buffer I go into
(have open for text entering) is *Quail Completions* and not
*scratch*.

That is not the problem, the problem is that when I do 'C-\' to switch
to cyrillic all the characters are typed in twice. But if I open any
other buffer, regardless whether it contains cyrillic or not, I can
type in just as expected.

What could be the problem ?

Thanks !


This is my .emacs:


(set-language-environment 'cyrillic-iso)
(set-input-method 'cyrillic-serbian)


;; tool bar
(tool-bar-mode 0)

;; use tabs for each buffer
(require 'tabbar)
(tabbar-mode)

(global-set-key (kbd "M-1") 'tabbar-forward)
(global-set-key (kbd "M-2") 'tabbar-backward)

;; syntax highlighting
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)

;; Meta
(global-set-key "\M-\C-h" 'backward-kill-word)
(global-set-key "\M-\C-r" 'query-replace)
(global-set-key "\M-r" 'replace-string)
(global-set-key "\M-g" 'goto-line)
(global-set-key "\M-h" 'help-command)

;; Control
(global-set-key "\C-h"  'backward-delete-char)
(global-set-key "\C-c#" 'comment-region)
;; Fx
(global-set-key [f9] 'word-count-buffer)

;; Treat 'y' or <CR> as yes, 'n' as no.
(fset 'yes-or-no-p 'y-or-n-p)
(define-key query-replace-map [return] 'act)
(define-key query-replace-map [?\C-m] 'act)

;; enable highlighting of selected text
(transient-mark-mode t)

;; wheel mouse
(global-set-key [mouse-4] 'scroll-down)
(global-set-key [mouse-5] 'scroll-up)

;; mpg123 player
(autoload 'mpg123 "mpg123" "A Front-end to mpg123" t)

;; dos2unix from Benjamin Rutt's .emacs
(defun d2u () (interactive)
  (goto-char (point-min))
  (while (search-forward "\r" nil t) (replace-match "")))

;; unix2dos from Benjamin Rutt's .emacs
(defun u2d () (interactive)
  (goto-char (point-min))
  (while (search-forward "\n" nil t) (replace-match "\r\n")))

;; auto load the following modes
(require 'python-mode)
(setq auto-mode-alist
      (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
      (cons '("python" . python-mode)
            interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)

(setq auto-mode-alist
      (cons '("mutt*" . mail-mode) auto-mode-alist))


;;(load-library "/usr/local/share/bicyclerepairman/bike.el")

;; Load packages
(require 'desktop)
(require 'tar-mode)
(require 'dired-x)

;; defer loading jde until its required
(setq defer-loading-jde t)
(if defer-loading-jde

    (progn
      (autoload 'jde-mode "jde" "JDE mode." t)
      (setq auto-mode-alist
            (append
             '(("\\.java\\'" . jde-mode))
             auto-mode-alist)))
  (require 'jde))


(provide `word-count)

(defun word-count-buffer ()
  "Count the words in a buffer.
Gives a quick word count for the buffer in the message line. 
This removes the need to use the shell command."
  (interactive)                 ; available at a user level
  (word-count-region (point-min) (point-max) (buffer-name)))


(defun word-count-region (start end &optional description)
  "Count the words in a region.
This counts the number of words within a region including numbers, but
not punctuation. It has no special knowledge of TeX or LaTeX commands
so counts these as well. Uses forward-word as a guide to the next word."
  (interactive "r")             ; gets the region if not already given
  (let ((words 0))              ; local variable counts words-so-far
    (save-excursion             ; don`t muck up the pointer and mark
      (goto-char start)         ; go to the beginning of the buffer/region
      (while (< (point) end) (setq words (1+ words)) (forward-word 1))
      (backward-word 1)         ; fix for that one-word-out bug
      (if (> (point) end) (setq words (1- words))))
    (if (eq words 1)            ; let`s try to be user-friendly
        (message "There is only 1 word in %s" (or description "the region"))
      (message "There are %d words in %s" words 
               (or description "the region")))))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]