mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
*** empty log message ***
This commit is contained in:
parent
4de86b1629
commit
492878e483
@ -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))
|
||||
|
@ -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)
|
||||
|
22
lisp/subr.el
22
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
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user