aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2004-02-19 13:25:32 +0000
committerKaroly Lorentey2004-02-19 13:25:32 +0000
commitbfdfad9294d072ad12b670d23912998f7e439394 (patch)
tree0e83846ea270896631e403d0faf48190c22926c9 /lisp
parent24268213e13b61f2cb8f88e69164161e84f08f5f (diff)
parent1d71218362bb1c75ed0c630d80b9710637538bcc (diff)
downloademacs-bfdfad9294d072ad12b670d23912998f7e439394.tar.gz
emacs-bfdfad9294d072ad12b670d23912998f7e439394.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-103 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-82
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/progmodes/executable.el8
-rw-r--r--lisp/simple.el37
3 files changed, 37 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eb668cd6b22..f5e51f9a093 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,17 @@
12004-02-18 Markus Rost <rost@mathematik.uni-bielefeld.de>
2
3 * progmodes/executable.el (executable-command-find-posix-p): Fix
4 choice of the directory.
5
62004-02-17 Luc Teirlinck <teirllm@auburn.edu>
7
8 * simple.el (interprogram-cut-function)
9 (interprogram-paste-function, kill-new, kill-append):
10 Doc fixes.
11 (kill-region): Make it return nil. Doc fix.
12 (yank-pop): Make its argument optional.
13 (yank): Make ARG `-' equivalent to `-1'.
14
12004-02-17 Eli Zaretskii <eliz@elta.co.il> 152004-02-17 Eli Zaretskii <eliz@elta.co.il>
2 16
3 * mail/rmail.el (rmail-get-new-mail): Don't reference 17 * mail/rmail.el (rmail-get-new-mail): Don't reference
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index b301d84d144..a5d401a5f5e 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -145,12 +145,8 @@ See `compilation-error-regexp-alist'.")
145 "Check if PROGRAM handles arguments Posix-style. 145 "Check if PROGRAM handles arguments Posix-style.
146If PROGRAM is non-nil, use that instead of \"find\"." 146If PROGRAM is non-nil, use that instead of \"find\"."
147 ;; Pick file to search from location we know 147 ;; Pick file to search from location we know
148 (let* ((dir (car load-path)) 148 (let* ((dir (file-truename data-directory))
149 (file (find-if 149 (file (car (directory-files dir nil "^[^.]"))))
150 (lambda (x)
151 ;; Filter directories . and ..
152 (not (string-match "^\\.\\.?$" x)))
153 (directory-files dir))))
154 (with-temp-buffer 150 (with-temp-buffer
155 (call-process (or program "find") 151 (call-process (or program "find")
156 nil 152 nil
diff --git a/lisp/simple.el b/lisp/simple.el
index 8017878dd2a..d3e189dbe13 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -505,7 +505,7 @@ that uses or sets the mark."
505 (save-excursion 505 (save-excursion
506 (save-restriction 506 (save-restriction
507 (widen) 507 (widen)
508 (message "line %d (narrowed line %d)" 508 (message "line %d (narrowed line %d)"
509 (+ n (line-number-at-pos start) -1) n)))))) 509 (+ n (line-number-at-pos start) -1) n))))))
510 510
511(defun count-lines (start end) 511(defun count-lines (start end)
@@ -1779,8 +1779,8 @@ programs.
1779The function takes one or two arguments. 1779The function takes one or two arguments.
1780The first argument, TEXT, is a string containing 1780The first argument, TEXT, is a string containing
1781the text which should be made available. 1781the text which should be made available.
1782The second, PUSH, if non-nil means this is a \"new\" kill; 1782The second, optional, argument PUSH, has the same meaning as the
1783nil means appending to an \"old\" kill.") 1783similar argument to `x-set-cut-buffer', which see.")
1784 1784
1785(defvar interprogram-paste-function nil 1785(defvar interprogram-paste-function nil
1786 "Function to call to get text cut from other programs. 1786 "Function to call to get text cut from other programs.
@@ -1793,7 +1793,8 @@ text that other programs have provided for pasting.
1793The function should be called with no arguments. If the function 1793The function should be called with no arguments. If the function
1794returns nil, then no other program has provided such text, and the top 1794returns nil, then no other program has provided such text, and the top
1795of the Emacs kill ring should be used. If the function returns a 1795of the Emacs kill ring should be used. If the function returns a
1796string, that string should be put in the kill ring as the latest kill. 1796string, then the caller of the function \(usually `current-kill')
1797should put this string in the kill ring as the latest kill.
1797 1798
1798Note that the function should return a string only if a program other 1799Note that the function should return a string only if a program other
1799than Emacs has provided a string for pasting; if Emacs provided the 1800than Emacs has provided a string for pasting; if Emacs provided the
@@ -1834,7 +1835,7 @@ the front of the kill ring, rather than being added to the list.
1834Optional third arguments YANK-HANDLER controls how the STRING is later 1835Optional third arguments YANK-HANDLER controls how the STRING is later
1835inserted into a buffer; see `insert-for-yank' for details. 1836inserted into a buffer; see `insert-for-yank' for details.
1836When a yank handler is specified, STRING must be non-empty (the yank 1837When a yank handler is specified, STRING must be non-empty (the yank
1837handler is stored as a `yank-handler' text property on STRING). 1838handler, if non-nil, is stored as a `yank-handler' text property on STRING).
1838 1839
1839When the yank handler has a non-nil PARAM element, the original STRING 1840When the yank handler has a non-nil PARAM element, the original STRING
1840argument is not used by `insert-for-yank'. However, since Lisp code 1841argument is not used by `insert-for-yank'. However, since Lisp code
@@ -1861,11 +1862,12 @@ argument should still be a \"useful\" string for such uses."
1861(defun kill-append (string before-p &optional yank-handler) 1862(defun kill-append (string before-p &optional yank-handler)
1862 "Append STRING to the end of the latest kill in the kill ring. 1863 "Append STRING to the end of the latest kill in the kill ring.
1863If BEFORE-P is non-nil, prepend STRING to the kill. 1864If BEFORE-P is non-nil, prepend STRING to the kill.
1864Optional third argument YANK-HANDLER specifies the yank-handler text 1865Optional third argument YANK-HANDLER, if non-nil, specifies the
1865property to be set on the combined kill ring string. If the specified 1866yank-handler text property to be set on the combined kill ring
1866yank-handler arg differs from the yank-handler property of the latest 1867string. If the specified yank-handler arg differs from the
1867kill string, this function adds the combined string to the kill 1868yank-handler property of the latest kill string, this function
1868ring as a new element, instead of replacing the last kill with it. 1869adds the combined string to the kill ring as a new element,
1870instead of replacing the last kill with it.
1869If `interprogram-cut-function' is set, pass the resulting kill to it." 1871If `interprogram-cut-function' is set, pass the resulting kill to it."
1870 (let* ((cur (car kill-ring))) 1872 (let* ((cur (car kill-ring)))
1871 (kill-new (if before-p (concat string cur) (concat cur string)) 1873 (kill-new (if before-p (concat string cur) (concat cur string))
@@ -1934,8 +1936,9 @@ If the previous command was also a kill command,
1934the text killed this time appends to the text killed last time 1936the text killed this time appends to the text killed last time
1935to make one entry in the kill ring. 1937to make one entry in the kill ring.
1936 1938
1937In Lisp code, optional third arg YANK-HANDLER specifies the yank-handler 1939In Lisp code, optional third arg YANK-HANDLER, if non-nil,
1938text property to be set on the killed text. See `insert-for-yank'." 1940specifies the yank-handler text property to be set on the killed
1941text. See `insert-for-yank'."
1939 (interactive "r") 1942 (interactive "r")
1940 (condition-case nil 1943 (condition-case nil
1941 (let ((string (delete-and-extract-region beg end))) 1944 (let ((string (delete-and-extract-region beg end)))
@@ -1945,7 +1948,8 @@ text property to be set on the killed text. See `insert-for-yank'."
1945 (kill-append string (< end beg) yank-handler) 1948 (kill-append string (< end beg) yank-handler)
1946 (kill-new string nil yank-handler))) 1949 (kill-new string nil yank-handler)))
1947 (when (or string (eq last-command 'kill-region)) 1950 (when (or string (eq last-command 'kill-region))
1948 (setq this-command 'kill-region))) 1951 (setq this-command 'kill-region))
1952 nil)
1949 ((buffer-read-only text-read-only) 1953 ((buffer-read-only text-read-only)
1950 ;; The code above failed because the buffer, or some of the characters 1954 ;; The code above failed because the buffer, or some of the characters
1951 ;; in the region, are read-only. 1955 ;; in the region, are read-only.
@@ -1957,7 +1961,7 @@ text property to be set on the killed text. See `insert-for-yank'."
1957 (setq this-command 'kill-region) 1961 (setq this-command 'kill-region)
1958 ;; This should barf, if appropriate, and give us the correct error. 1962 ;; This should barf, if appropriate, and give us the correct error.
1959 (if kill-read-only-ok 1963 (if kill-read-only-ok
1960 (message "Read only text copied to kill ring") 1964 (progn (message "Read only text copied to kill ring") nil)
1961 ;; Signal an error if the buffer is read-only. 1965 ;; Signal an error if the buffer is read-only.
1962 (barf-if-buffer-read-only) 1966 (barf-if-buffer-read-only)
1963 ;; If the buffer isn't read-only, the text is. 1967 ;; If the buffer isn't read-only, the text is.
@@ -2051,7 +2055,7 @@ Function is called with two parameters, START and END corresponding to
2051the value of the mark and point; it is guaranteed that START <= END. 2055the value of the mark and point; it is guaranteed that START <= END.
2052Normally set from the UNDO element of a yank-handler; see `insert-for-yank'.") 2056Normally set from the UNDO element of a yank-handler; see `insert-for-yank'.")
2053 2057
2054(defun yank-pop (arg) 2058(defun yank-pop (&optional arg)
2055 "Replace just-yanked stretch of killed text with a different stretch. 2059 "Replace just-yanked stretch of killed text with a different stretch.
2056This command is allowed only immediately after a `yank' or a `yank-pop'. 2060This command is allowed only immediately after a `yank' or a `yank-pop'.
2057At such a time, the region contains a stretch of reinserted 2061At such a time, the region contains a stretch of reinserted
@@ -2068,6 +2072,7 @@ comes the newest one."
2068 (if (not (eq last-command 'yank)) 2072 (if (not (eq last-command 'yank))
2069 (error "Previous command was not a yank")) 2073 (error "Previous command was not a yank"))
2070 (setq this-command 'yank) 2074 (setq this-command 'yank)
2075 (unless arg (setq arg 1))
2071 (let ((inhibit-read-only t) 2076 (let ((inhibit-read-only t)
2072 (before (< (point) (mark t)))) 2077 (before (< (point) (mark t))))
2073 (if before 2078 (if before
@@ -2103,7 +2108,7 @@ See also the command \\[yank-pop]."
2103 (push-mark (point)) 2108 (push-mark (point))
2104 (insert-for-yank (current-kill (cond 2109 (insert-for-yank (current-kill (cond
2105 ((listp arg) 0) 2110 ((listp arg) 0)
2106 ((eq arg '-) -1) 2111 ((eq arg '-) -2)
2107 (t (1- arg))))) 2112 (t (1- arg)))))
2108 (if (consp arg) 2113 (if (consp arg)
2109 ;; This is like exchange-point-and-mark, but doesn't activate the mark. 2114 ;; This is like exchange-point-and-mark, but doesn't activate the mark.