Mercurial > emacs
changeset 707:e4253da532fb
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 10 Jun 1992 02:47:07 +0000 |
parents | 86cb5db0b6c3 |
children | 030fb4635335 |
files | lisp/emulation/vi.el lisp/startup.el lisp/subr.el lisp/sun-fns.el lisp/telnet.el lisp/term/x-win.el lisp/window.el |
diffstat | 7 files changed, 54 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emulation/vi.el Wed Jun 10 02:25:55 1992 +0000 +++ b/lisp/emulation/vi.el Wed Jun 10 02:47:07 1992 +0000 @@ -1077,15 +1077,12 @@ (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))
--- a/lisp/startup.el Wed Jun 10 02:25:55 1992 +0000 +++ b/lisp/startup.el Wed Jun 10 02:47:07 1992 +0000 @@ -132,13 +132,7 @@ (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)
--- a/lisp/subr.el Wed Jun 10 02:25:55 1992 +0000 +++ b/lisp/subr.el Wed Jun 10 02:47:07 1992 +0000 @@ -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 @@ (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 @@ 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
--- a/lisp/sun-fns.el Wed Jun 10 02:25:55 1992 +0000 +++ b/lisp/sun-fns.el Wed Jun 10 02:47:07 1992 +0000 @@ -231,8 +231,7 @@ (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))
--- a/lisp/telnet.el Wed Jun 10 02:25:55 1992 +0000 +++ b/lisp/telnet.el Wed Jun 10 02:47:07 1992 +0000 @@ -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 @@ (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 @@ (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)
--- a/lisp/term/x-win.el Wed Jun 10 02:25:55 1992 +0000 +++ b/lisp/term/x-win.el Wed Jun 10 02:47:07 1992 +0000 @@ -437,25 +437,36 @@ (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. +;;; Also, set the value of X cut buffer 0, for backward compatibility +;;; with older X application. +(defun x-select-text (text) + (x-own-selection text 'cut-buffer0) + (x-own-selection text 'clipboard) + (x-own-selection 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. -(defun x-select-text (text) - (if (eq window-system 'x) - (progn - (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.
--- a/lisp/window.el Wed Jun 10 02:25:55 1992 +0000 +++ b/lisp/window.el Wed Jun 10 02:47:07 1992 +0000 @@ -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 @@ (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)