diff options
author | Jim Blandy <jimb@redhat.com> | 1992-06-10 02:47:07 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-06-10 02:47:07 +0000 |
commit | c9efec0ec06f2211a9c17332e77e7632a90520a3 (patch) | |
tree | 1e32f750877618723c2af744a3cd769f65b6d889 /lisp | |
parent | 8a142e81f846537295e04eee527358f46c5ad88b (diff) | |
download | emacs-c9efec0ec06f2211a9c17332e77e7632a90520a3.tar.gz |
*** empty log message ***
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emulation/vi.el | 15 | ||||
-rw-r--r-- | lisp/startup.el | 8 | ||||
-rw-r--r-- | lisp/subr.el | 22 | ||||
-rw-r--r-- | lisp/sun-fns.el | 3 | ||||
-rw-r--r-- | lisp/telnet.el | 13 | ||||
-rw-r--r-- | lisp/term/x-win.el | 33 | ||||
-rw-r--r-- | lisp/window.el | 7 |
7 files changed, 53 insertions, 48 deletions
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index fb76742c295..37293e9008f 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -1077,15 +1077,12 @@ If the optional after-p is given, put after/below the cursor." (error "Nothing in register %c" reg) (if (null reg) (setq reg ?1)) ; the default is the last text killed (setq put-text - (if (and (>= reg ?1) (<= reg ?9)) - (let ((ring-length (length kill-ring))) - (setq this-command 'yank) ; So we may yank-pop !! - (nth (% (+ (- reg ?0 1) (- ring-length - (length kill-ring-yank-pointer))) - ring-length) kill-ring)) - (if (stringp (get-register reg)) - (get-register reg) - (error "Register %c is not containing text string" reg)))) + (cond + ((and (>= reg ?1) (<= reg ?9)) + (setq this-command 'yank) ; So we may yank-pop !! + (current-kill (- reg ?0 1) 'do-not-rotate)) + ((stringp (get-register reg)) (get-register reg)) + (t (error "Register %c is not containing text string" reg)))) (if (vi-string-end-with-nl-p put-text) ; put back text as lines (if after-p (progn (next-line 1) (beginning-of-line)) diff --git a/lisp/startup.el b/lisp/startup.el index 0afe3d934e8..067ecc28745 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -132,13 +132,7 @@ directory name of the directory where the `.emacs' file was looked for.") (setq default-directory (file-name-as-directory value)))))) '("PWD" "HOME"))) - (let ((tail directory-abbrev-alist)) - (while tail - (if (string-match (car (car tail)) default-directory) - (setq default-directory - (concat (cdr (car tail)) - (substring default-directory (match-end 0))))) - (setq tail (cdr tail)))) + (setq default-directory (abbreviate-file-name default-directory)) (unwind-protect (command-line) (run-hooks 'emacs-startup-hook) diff --git a/lisp/subr.el b/lisp/subr.el index 05395c26c97..de97d76b426 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1,12 +1,11 @@ ;;; subr.el --- basic lisp subroutines for Emacs - -;; Copyright (C) 1985, 1986 Free Software Foundation, Inc. +;;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 1, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -19,12 +18,15 @@ ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -(defun one-window-p (&optional arg) +(defun one-window-p (&optional nomini) "Returns non-nil if there is only one window. Optional arg NOMINI non-nil means don't count the minibuffer even if it is active." - (eq (selected-window) - (next-window (selected-window) (if arg 'arg)))) + (let ((base-window (selected-window))) + (if (and nomini (eq base-window (minibuffer-window))) + (setq base-window (next-window base-window))) + (eq base-window + (next-window base-window (if nomini 'arg))))) (defun walk-windows (proc &optional minibuf all-screens) "Cycle through all visible windows, calling PROC for each one. @@ -202,10 +204,10 @@ The normal global definition of the character C-x indirects to this keymap.") (fset 'ctl-x-4-prefix ctl-x-4-map) (define-key ctl-x-map "4" 'ctl-x-4-prefix) -(defvar ctl-x-3-map (make-sparse-keymap) +(defvar ctl-x-5-map (make-sparse-keymap) "Keymap for screen commands.") -(fset 'ctl-x-3-prefix ctl-x-3-map) -(define-key ctl-x-map "3" 'ctl-x-3-prefix) +(fset 'ctl-x-5-prefix ctl-x-5-map) +(define-key ctl-x-map "5" 'ctl-x-5-prefix) (defun run-hooks (&rest hooklist) @@ -349,5 +351,3 @@ and then modifies one entry in it." instead of having to write (function (lambda ...)) or '(lambda ...), the latter of which won't get byte-compiled." (` (function (lambda (,@ cdr))))) - -;;; subr.el ends here diff --git a/lisp/sun-fns.el b/lisp/sun-fns.el index 00fbcc4715a..95ed1ed50b3 100644 --- a/lisp/sun-fns.el +++ b/lisp/sun-fns.el @@ -231,8 +231,7 @@ See mouse-mark-thing for a description of the objects recognized." (if (eq last-command 'yank) (let ((before (< (point) (mark)))) (delete-region (point) (mark)) - (rotate-yank-pointer 1) - (insert (car kill-ring-yank-pointer)) + (insert (current-kill 1)) (if before (exchange-point-and-mark))) (yank)) (setq this-command 'yank)) diff --git a/lisp/telnet.el b/lisp/telnet.el index 834885e8df0..ee11af6f63a 100644 --- a/lisp/telnet.el +++ b/lisp/telnet.el @@ -1,12 +1,11 @@ ;;; telnet.el --- run a telnet session from within an Emacs buffer - -;; Copyright (C) 1985, 1988 Free Software Foundation, Inc. +;;; Copyright (C) 1985, 1988, 1992 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 1, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -29,6 +28,7 @@ ;; manner (require 'comint) + (defvar telnet-new-line "\r") (defvar telnet-mode-map nil) (defvar telnet-prompt-pattern "^[^#$%>]*[#$%>] *") @@ -120,6 +120,7 @@ rejecting one login and prompting for the again for a username and password.") (set-buffer (process-buffer proc)) (goto-char (process-mark proc)) (let ((now (point))) + ;; Insert STRING, omitting all C-m characters. (let ((index 0) c-m) (while (setq c-m (string-match "\C-m" string index)) (insert-before-markers (substring string index c-m)) @@ -137,7 +138,11 @@ rejecting one login and prompting for the again for a username and password.") (defun telnet-send-input () (interactive) - (comint-send-input telnet-new-line telnet-remote-echoes)) +; (comint-send-input telnet-new-line telnet-remote-echoes) + (comint-send-input) + (if telnet-remote-echoes + (delete-region comint-last-input-start + comint-last-input-end))) ;;;###autoload (defun telnet (arg) diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 368e333d5cc..3f6cefe0a6f 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -437,25 +437,36 @@ This returns ARGS with the arguments that have been processed removed." (x-open-connection (or x-display-name (setq x-display-name (getenv "DISPLAY")))) -;; xterm.c depends on using interrupt-driven input, but we don't want -;; the fcntls to apply to the terminal, so we do this after opening -;; the display. +;;; xterm.c depends on using interrupt-driven input, but we don't want +;;; the fcntls to apply to the terminal, so we do this after opening +;;; the display. (set-input-mode t nil t) (setq screen-creation-function 'x-create-screen) (setq suspend-hook '(lambda () (error "Suspending an emacs running under X makes no sense"))) -(setq interprogram-cut-function 'x-select-text) -;; Make TEXT, a string, the primary and clipboard X selections. -;; If you are running xclipboard, this means you can effectively -;; have a window on a copy of the kill-ring. +;;; Make TEXT, a string, the primary and clipboard X selections. +;;; If you are running xclipboard, this means you can effectively +;;; have a window on a copy of the kill-ring. +;;; Also, set the value of X cut buffer 0, for backward compatibility +;;; with older X application. (defun x-select-text (text) - (if (eq window-system 'x) - (progn - (x-own-selection text 'clipboard) - (x-own-selection text)))) + (x-own-selection text 'cut-buffer0) + (x-own-selection text 'clipboard) + (x-own-selection text)) + +;;; Return the value of the current X selection. For compatibility +;;; with older X applications, this checks cut buffer 0 before +;;; retrieving the value of the primary selection. +(defun x-cut-buffer-or-selection-value () + (or (x-selection-value 'cut-buffer0) + (x-selection-value))) + +;;; Arrange for the kill and yank functions to set and check the clipboard. +(setq interprogram-cut-function 'x-select-text) +(setq interprogram-paste-function 'x-cut-buffer-or-selection-value) ;;; Turn off window-splitting optimization; X is usually fast enough ;;; that this is only annoying. diff --git a/lisp/window.el b/lisp/window.el index e8ed74a9553..25d90e777cf 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1,12 +1,11 @@ ;;; windows.el --- GNU Emacs window commands aside from those written in C. - -;; Copyright (C) 1985, 1989 Free Software Foundation, Inc. +;;; Copyright (C) 1985, 1989, 1992 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 1, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -119,7 +118,7 @@ Use with a register previously set with \\[window-config-to-register]." (set-window-configuration (get-register name))) (define-key ctl-x-map "2" 'split-window-vertically) -(define-key ctl-x-map "5" 'split-window-horizontally) +(define-key ctl-x-map "3" 'split-window-horizontally) (define-key ctl-x-map "6" 'window-config-to-register) (define-key ctl-x-map "7" 'register-to-window-config) (define-key ctl-x-map "}" 'enlarge-window-horizontally) |