(make-variable-buffer-local 'its-previous-select-func)
(put 'its-previous-select-func 'permanent-local t)
-(defvar its-current-language)
+(defvar its-current-language nil)
(make-variable-buffer-local 'its-current-language)
(put 'its-current-language 'permanent-local t)
\f
(if (consp (cdr syl))
(cons (its-get-output syl) (its-get-keyseq-syl syl))
syl))
-
+
;;
;;
(define-key map "\M-y" 'its-yank-pop)
(define-key map [backspace] 'its-delete-backward-SYL)
(define-key map [delete] 'its-delete-backward-SYL)
- (define-key map [M-backspace] 'its-delete-backward-SYL-by-keystroke)
- (define-key map [M-delete] 'its-delete-backward-SYL-by-keystroke)
+ (define-key map [(meta backspace)] 'its-delete-backward-SYL-by-keystroke)
+ (define-key map [(meta delete)] 'its-delete-backward-SYL-by-keystroke)
(define-key map [right] 'its-forward-SYL)
(define-key map [left] 'its-backward-SYL)
(while (< i 127)
(setq state next-state))
((null build-if-none)
(error "No such state (%s)" input))
- (t
+ (t
(if (not (or brand-new (= i 1) (its-get-kst/t state)))
(its-set-interim-terminal-state state))
(setq state (its-make-next-state state key
(signal 'beginning-of-buffer nil))
(delete-region p (point))
(if (> len n)
- (its-state-machine-keyseq (substring keyseq 0 (- len n))
+ (its-state-machine-keyseq (substring keyseq 0 (- len n))
'its-buffer-ins/del-SYL)
(its-set-cursor-status
(if (or (null its-delete-by-keystroke)
(princ (documentation 'its-mode))
(help-setup-xref (cons #'help-xref-mode (current-buffer)) (interactive-p))))
+;; The `point-left' hook function will never be called in Emacs 21.2.50
+;; when the command `next-line' is used in the last line of a buffer
+;; which isn't terminated with a newline or the command `previous-line'
+;; is used in the first line of a buffer.
+(defun its-next-line (&optional arg)
+ "Go to the end of the line if the line isn't terminated with a newline,
+otherwise run `next-line' as usual."
+ (interactive "p")
+ (if (= (line-end-position) (point-max))
+ (end-of-line)
+ (next-line arg)))
+
+(defun its-previous-line (&optional arg)
+ "Go to the beginning of the line if it is called in the first line of a
+buffer, otherwise run `previous-line' as usual."
+ (interactive "p")
+ (if (= (line-beginning-position) (point-mim))
+ (beginning-of-line)
+ (previous-line arg)))
+
+(substitute-key-definition 'next-line 'its-next-line
+ its-mode-map global-map)
+(substitute-key-definition 'previous-line 'its-previous-line
+ its-mode-map global-map)
+
(provide 'its)
-;;; its.el ends here.
+
+;;; its.el ends here