summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2004-06-24 07:44:13 +0000
committerKaroly Lorentey <lorentey@elte.hu>2004-06-24 07:44:13 +0000
commit3fa701994755105d1fb4b0b802338fc04e8a6937 (patch)
tree02ec9152f5f6e95bbb0b02265f51b832e712e8b5 /lisp
parent8c8d5f3503a2fb4918414c0b0b9dacd81c50f1a9 (diff)
parentbb72b9d0b5248404a55b599d99c0be5454704e4a (diff)
downloademacs-3fa701994755105d1fb4b0b802338fc04e8a6937.tar.gz
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-409 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410 Make sure image types are initialized for lookup too * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-411 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-412 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-413 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-414 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-415 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-416 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-417 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-418 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-419 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-202
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog109
-rw-r--r--lisp/autorevert.el21
-rw-r--r--lisp/comint.el33
-rw-r--r--lisp/cus-edit.el16
-rw-r--r--lisp/dired-aux.el6
-rw-r--r--lisp/emacs-lisp/ewoc.el51
-rw-r--r--lisp/files.el14
-rw-r--r--lisp/frame.el5
-rw-r--r--lisp/image.el10
-rw-r--r--lisp/isearch.el17
-rw-r--r--lisp/makefile.w32-in22
-rw-r--r--lisp/man.el3
-rw-r--r--lisp/mouse.el2
-rw-r--r--lisp/net/goto-addr.el4
-rw-r--r--lisp/newcomment.el20
-rw-r--r--lisp/progmodes/compile.el2
-rw-r--r--lisp/progmodes/grep.el12
-rw-r--r--lisp/ps-print.el4
-rw-r--r--lisp/replace.el104
19 files changed, 333 insertions, 122 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4ac29e4ddfc..4b7eb38c208 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,112 @@
+2004-06-24 Daniel Pfeiffer <occitan@esperanto.org>
+
+ * progmodes/grep.el (grep-error-screen-columns): New variable.
+ (grep-regexp-alist): Give it the full functionality of gnu style
+ compilation messages with line and column ranges. Ask me for the
+ perl script I'm working on, that uses these.
+
+2004-06-23 Nick Roberts <nickrob@gnu.org>
+
+ * comint.el: (comint-insert-clicked-input, comint-copy-old-input):
+ Remove.
+ (comint-insert-input, comint-mouse-insert-input): New functions
+ based on comint-insert-clicked-input for two bindings but just
+ one functionality.
+
+2004-06-23 Luc Teirlinck <teirllm@auburn.edu>
+
+ * net/goto-addr.el (goto-address-fontify): Fix help-echo text.
+
+2004-06-23 Lars Hansen <larsh@math.ku.dk>
+
+ * files.el (write-contents-functions): Doc fix.
+
+2004-06-21 Juanma Barranquero <lektu@terra.es>
+
+ * image.el (image-library-alist): Rewrite docstring in active
+ voice.
+
+2004-06-20 Richard M. Stallman <rms@gnu.org>
+
+ * mouse.el (mouse-set-region-1): Set transient-mark-mode to `only'.
+
+ * isearch.el (isearch-repeat): Avoid testing old match data.
+ (isearch-message): Display trailing space in special font
+ when search is failing.
+ (isearch-search-fun-function): Doc fix.
+
+ * autorevert.el (global-auto-revert-non-file-buffers): Doc fix.
+
+2004-06-19 Luc Teirlinck <teirllm@auburn.edu>
+
+ * frame.el (show-trailing-whitespace): Doc fix.
+
+ * cus-edit.el (custom-variable-documentation): New function.
+ (custom-variable): Use it.
+
+2004-06-19 Nick Roberts <nickrob@gnu.org>
+
+ * man.el (Man-getpage-in-background): Revert previous change but
+ make cygwin a special case.
+
+2004-06-18 Luc Teirlinck <teirllm@auburn.edu>
+
+ * autorevert.el (global-auto-revert-non-file-buffers): Update
+ docstring.
+
+2004-06-19 Daniel Pfeiffer <occitan@esperanto.org>
+
+ * progmodes/compile.el (compilation-error-properties): Store one
+ more than end-col, if present, so that transient-mark-mode will
+ highlight last char too.
+ * progmodes/grep.el (grep-regexp-alist): Match columns and column
+ ranges, if present.
+
+2004-06-18 Jason Rumney <jasonr@gnu.org>
+
+ * makefile.w32-in: Double percent signs in for loops.
+
+2004-06-17 David Kastrup <dak@gnu.org>
+
+ * replace.el (query-replace-read-args): Only warn about use of \n
+ and \t when we are doing a regexp replacement and the actual
+ escaped character is n or t.
+ (query-replace-regexp): Add \, and \# interpretation to
+ interactive call and document it.
+ (query-replace-regexp-eval, replace-match-string-symbols): add \#
+ as shortkey for replace-count.
+ (replace-quote): New function for doubling backslashes.
+
+2004-06-17 Juanma Barranquero <lektu@terra.es>
+
+ * files.el (parse-colon-path, cd): Mention in docstring that the
+ path separator is colon in GNU-like systems.
+
+ * newcomment.el (comment-region-internal): Fix docstring.
+
+ * emacs-lisp/ewoc.el (ewoc-create, ewoc-map, ewoc-locate)
+ (ewoc-invalidate, ewoc-collect): Doc fixes.
+ (ewoc--create-node, ewoc--delete-node-internal):
+ Fix typos in docstring.
+
+2004-06-15 Luc Teirlinck <teirllm@auburn.edu>
+
+ * files.el (buffer-stale-function): Add hyperlink to emacs-xtra
+ manual to docstring.
+
+2004-06-15 Vinicius Jose Latorre <viniciusjl@ig.com.br>
+
+ * ps-print.el (ps-time-stamp-iso8601): Comment doc string of defalias.
+
+2004-06-15 Luc Teirlinck <teirllm@auburn.edu>
+
+ * dired-aux.el (dired-do-redisplay, dired-maybe-insert-subdir):
+ Add hyperlink to emacs-xtra manual to docstring.
+
+ * autorevert.el (global-auto-revert-non-file-buffers): Add
+ hyperlink to emacs-xtra manual to docstring, as well as an
+ info-link.
+
2004-06-14 Juanma Barranquero <lektu@terra.es>
* image.el (image-library-alist): New variable to map image types
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 7987e880ec1..7b786882cf6 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -174,20 +174,21 @@ would only waste precious space."
:type 'hook)
(defcustom global-auto-revert-non-file-buffers nil
- "When nil only file buffers are reverted by Global Auto-Revert Mode.
+ "When nil, Global Auto-Revert mode operates only on file-visiting buffers.
When non-nil, both file buffers and buffers with a custom
`revert-buffer-function' and a `buffer-stale-function' are
-reverted by Global Auto-Revert Mode.
-
-Use this option with care since it could lead to excessive reverts.
-Note also that for some non-file buffers the check whether the
-buffer needs updating may be imperfect, due to efficiency
-considerations, and may not take all information listed in the
-buffer into account. Hence, a non-nil value for this option does
-not necessarily make manual updates useless for non-file buffers."
+reverted by Global Auto-Revert mode. These include the Buffer
+List buffer, and Dired buffers showing complete local
+directories. Dired buffers do not auto-revert as a result of
+changes in subdirectories or in the contents, size, modes, etc.,
+of files. You may still sometimes want to revert them manually.
+
+Use this option with care since it could lead to excessive auto-reverts.
+For more information, see Info node `(emacs-xtra)Autorevert'."
:group 'auto-revert
- :type 'boolean)
+ :type 'boolean
+ :link '(info-link "(emacs-xtra)Autorevert"))
(defcustom global-auto-revert-ignore-modes '()
"List of major modes Global Auto-Revert Mode should not check."
diff --git a/lisp/comint.el b/lisp/comint.el
index 12d8e1fcbb7..8b5a107c7d7 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -571,7 +571,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
(define-key comint-mode-map "\C-c\C-c" 'comint-interrupt-subjob)
(define-key comint-mode-map "\C-c\C-z" 'comint-stop-subjob)
(define-key comint-mode-map "\C-c\C-\\" 'comint-quit-subjob)
- (define-key comint-mode-map "\C-c\C-m" 'comint-copy-old-input)
+ (define-key comint-mode-map "\C-c\C-m" 'comint-insert-input)
(define-key comint-mode-map "\C-c\C-o" 'comint-delete-output)
(define-key comint-mode-map "\C-c\C-r" 'comint-show-output)
(define-key comint-mode-map "\C-c\C-e" 'comint-show-maximum-output)
@@ -582,7 +582,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
(define-key comint-mode-map "\C-c\C-s" 'comint-write-output)
(define-key comint-mode-map "\C-c." 'comint-insert-previous-argument)
;; Mouse Buttons:
- (define-key comint-mode-map [mouse-2] 'comint-insert-clicked-input)
+ (define-key comint-mode-map [mouse-2] 'comint-mouse-insert-input)
;; Menu bars:
;; completion:
(define-key comint-mode-map [menu-bar completion]
@@ -615,7 +615,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
(define-key comint-mode-map [menu-bar inout kill-input]
'("Kill Current Input" . comint-kill-input))
(define-key comint-mode-map [menu-bar inout copy-input]
- '("Copy Old Input" . comint-copy-old-input))
+ '("Copy Old Input" . comint-insert-input))
(define-key comint-mode-map [menu-bar inout forward-matching-history]
'("Forward Matching Input..." . comint-forward-matching-input))
(define-key comint-mode-map [menu-bar inout backward-matching-history]
@@ -798,11 +798,10 @@ buffer. The hook `comint-exec-hook' is run after each exec."
(set-process-coding-system proc decoding encoding))
proc))
-
-(defun comint-insert-clicked-input (event)
- "In a Comint buffer, set the current input to the clicked-on previous input."
- (interactive "e")
- (let ((pos (posn-point (event-end event))))
+(defun comint-insert-input ()
+ "In a Comint buffer, set the current input to the previous input at point."
+ (interactive)
+ (let ((pos (point)))
(if (not (eq (get-char-property pos 'field) 'input))
;; No input at POS, fall back to the global definition.
(let* ((keys (this-command-keys))
@@ -816,11 +815,16 @@ buffer. The hook `comint-exec-hook' is run after each exec."
(or (marker-position comint-accum-marker)
(process-mark (get-buffer-process (current-buffer))))
(point))
- ;; Insert the clicked-upon input
+ ;; Insert the input at point
(insert (buffer-substring-no-properties
(previous-single-char-property-change (1+ pos) 'field)
(next-single-char-property-change pos 'field))))))
+(defun comint-mouse-insert-input (event)
+ "In a Comint buffer, set the current input to the previous input you click on."
+ (interactive "e")
+ (mouse-set-point event)
+ (comint-insert-input))
;; Input history processing in a buffer
@@ -1858,17 +1862,6 @@ the current line with any initial string matching the regexp
(comint-bol)
(buffer-substring-no-properties (point) (line-end-position)))))
-(defun comint-copy-old-input ()
- "Insert after prompt old input at point as new input to be edited.
-Calls `comint-get-old-input' to get old input."
- (interactive)
- (let ((input (funcall comint-get-old-input))
- (process (get-buffer-process (current-buffer))))
- (if (not process)
- (error "Current buffer has no process")
- (goto-char (process-mark process))
- (insert input))))
-
(defun comint-skip-prompt ()
"Skip past the text matching regexp `comint-prompt-regexp'.
If this takes us past the end of the current line, don't skip at all."
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 5caeb78265e..9e0efc5d3d0 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2074,11 +2074,25 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
:group 'custom-buffer
:version "20.3")
+(defun custom-variable-documentation (variable)
+ "Return documentation of VARIABLE for use in Custom buffer.
+Normally just return the docstring. But if VARIABLE automatically
+becomes buffer local when set, append a message to that effect."
+ (if (and (local-variable-if-set-p variable)
+ (or (not (local-variable-p variable))
+ (with-temp-buffer
+ (local-variable-if-set-p variable))))
+ (concat (documentation-property variable 'variable-documentation)
+ "\n
+This variable automatically becomes buffer-local when set outside Custom.
+However, setting it through Custom sets the default value.")
+ (documentation-property variable 'variable-documentation)))
+
(define-widget 'custom-variable 'custom
"Customize variable."
:format "%v"
:help-echo "Set or reset this variable."
- :documentation-property 'variable-documentation
+ :documentation-property #'custom-variable-documentation
:custom-category 'option
:custom-state nil
:custom-menu 'custom-variable-menu-create
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index a58b62498ca..bf7c9c00d18 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -902,7 +902,8 @@ the buffer will not reset them. However, using `dired-undo' to re-insert
or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
-\\<dired-mode-map>\\[dired-reset-subdir-switches]."
+\\<dired-mode-map>\\[dired-reset-subdir-switches].
+See Info node `(emacs-xtra)Subdir switches' for more details."
;; Moves point if the next ARG files are redisplayed.
(interactive "P\np")
(if (and test-for-subdir (dired-get-subdir))
@@ -1751,7 +1752,8 @@ the buffer will not reset them. However, using `dired-undo' to re-insert
or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
-\\<dired-mode-map>\\[dired-reset-subdir-switches]."
+\\<dired-mode-map>\\[dired-reset-subdir-switches].
+See Info node `(emacs-xtra)Subdir switches' for more details."
(interactive
(list (dired-get-filename)
(if current-prefix-arg
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index a0c2e3c0d70..a2cb4e9fe46 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -1,6 +1,7 @@
;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer
-;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation
+;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 04
+;; Free Software Foundation
;; Author: Per Cederqvist <ceder@lysator.liu.se>
;; Inge Wallin <inge@lysator.liu.se>
@@ -244,7 +245,7 @@ BUT if it is the header or the footer in EWOC return nil instead."
(defun ewoc--create-node (data pretty-printer pos)
"Call PRETTY-PRINTER with point set at POS in current buffer.
-Remember the start position. Create a wrapper containing that
+Remember the start position. Create a wrapper containing that
start position and the element DATA."
(save-excursion
;; Remember the position as a number so that it doesn't move
@@ -263,7 +264,7 @@ start position and the element DATA."
(defun ewoc--delete-node-internal (ewoc node)
"Delete a data string from EWOC.
-Can not be used on the footer. Returns the wrapper that is deleted.
+Can not be used on the footer. Returns the wrapper that is deleted.
The start-marker in the wrapper is set to nil, so that it doesn't
consume any more resources."
(let ((dll (ewoc--dll ewoc))
@@ -303,14 +304,14 @@ The ewoc will be inserted in the current buffer at the current position.
PRETTY-PRINTER should be a function that takes one argument, an
element, and inserts a string representing it in the buffer (at
-point). The string PRETTY-PRINTER inserts may be empty or span
-several linse. A trailing newline will always be inserted
-automatically. The PRETTY-PRINTER should use insert, and not
-insert-before-markers.
-
-Optional third argument HEADER is a string that will always be
-present at the top of the ewoc. HEADER should end with a
-newline. Optionaly fourth argument FOOTER is similar, and will
+point). The string PRETTY-PRINTER inserts may be empty or span
+several lines. A trailing newline will always be inserted
+automatically. The PRETTY-PRINTER should use `insert', and not
+`insert-before-markers'.
+
+Optional second argument HEADER is a string that will always be
+present at the top of the ewoc. HEADER should end with a
+newline. Optional third argument FOOTER is similar, and will
be inserted at the bottom of the ewoc."
(let ((new-ewoc
(ewoc--create (current-buffer)
@@ -394,9 +395,9 @@ MAP-FUNCTION is applied to the first element first.
If MAP-FUNCTION returns non-nil the element will be refreshed (its
pretty-printer will be called once again).
-Note that the buffer for EWOC will be current buffer when MAP-FUNCTION
-is called. MAP-FUNCTION must restore the current buffer to BUFFER before
-it returns, if it changes it.
+Note that the buffer for EWOC will be the current buffer when
+MAP-FUNCTION is called. MAP-FUNCTION must restore the current
+buffer before it returns, if it changes it.
If more than two arguments are given, the remaining
arguments will be passed to MAP-FUNCTION."
@@ -411,9 +412,9 @@ arguments will be passed to MAP-FUNCTION."
(defun ewoc-filter (ewoc predicate &rest args)
"Remove all elements in EWOC for which PREDICATE returns nil.
Note that the buffer for EWOC will be current-buffer when PREDICATE
-is called. PREDICATE must restore the current buffer before it returns
+is called. PREDICATE must restore the current buffer before it returns
if it changes it.
-The PREDICATE is called with the element as its first argument. If any
+The PREDICATE is called with the element as its first argument. If any
ARGS are given they will be passed to the PREDICATE."
(ewoc--set-buffer-bind-dll-let* ewoc
((node (ewoc--node-nth dll 1))
@@ -428,7 +429,7 @@ ARGS are given they will be passed to the PREDICATE."
(defun ewoc-locate (ewoc &optional pos guess)
"Return the node that POS (a buffer position) is within.
POS may be a marker or an integer. It defaults to point.
-GUESS should be a node that it is likely that POS is near.
+GUESS should be a node that it is likely to be near POS.
If POS points before the first element, the first node is returned.
If POS points after the last element, the last node is returned.
@@ -497,7 +498,7 @@ If the EWOC is empty, nil is returned."
(defun ewoc-invalidate (ewoc &rest nodes)
"Refresh some elements.
-The pretty-printer that for EWOC will be called for all NODES."
+The pretty-printer set for EWOC will be called for all NODES."
(ewoc--set-buffer-bind-dll ewoc
(dolist (node nodes)
(ewoc--refresh-node (ewoc--pretty-printer ewoc) node))))
@@ -564,13 +565,13 @@ number of elements needs to be refreshed."
(defun ewoc-collect (ewoc predicate &rest args)
"Select elements from EWOC using PREDICATE.
Return a list of all selected data elements.
-PREDICATE is a function that takes a data element as its first argument.
-The elements on the returned list will appear in the same order as in
-the buffer. You should not rely on in which order PREDICATE is
-called.
-Note that the buffer the EWOC is displayed in is current-buffer
-when PREDICATE is called. If PREDICATE must restore current-buffer if
-it changes it.
+PREDICATE is a function that takes a data element as its first
+argument. The elements on the returned list will appear in the
+same order as in the buffer. You should not rely on the order of
+calls to PREDICATE.
+Note that the buffer the EWOC is displayed in is the current
+buffer when PREDICATE is called. PREDICATE must restore it if it
+changes it.
If more than two arguments are given the
remaining arguments will be passed to PREDICATE."
(ewoc--set-buffer-bind-dll-let* ewoc
diff --git a/lisp/files.el b/lisp/files.el
index dc84c79df84..cd11f07969f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -393,7 +393,8 @@ updates before the buffer is saved, use `before-save-hook' .")
(defvar write-contents-functions nil
"List of functions to be called before writing out a buffer to a file.
If one of them returns non-nil, the file is considered already written
-and the rest are not called.
+and the rest are not called and neither are the functions in
+`write-file-functions'.
This variable is meant to be used for hooks that pertain to the
buffer's contents, not to the particular visited file; thus,
@@ -527,7 +528,8 @@ Not actually set up until the first time you use it.")
(defun parse-colon-path (cd-path)
"Explode a search path into a list of directory names.
-Directories are separated by occurrences of `path-separator'."
+Directories are separated by occurrences of `path-separator'
+\(which is colon in GNU and GNU-like systems)."
;; We could use split-string here.
(and cd-path
(let (cd-list (cd-start 0) cd-colon)
@@ -562,7 +564,8 @@ Directories are separated by occurrences of `path-separator'."
"Make DIR become the current buffer's default directory.
If your environment includes a `CDPATH' variable, try each one of
that list of directories (separated by occurrences of
-`path-separator') when resolving a relative directory name."
+`path-separator') when resolving a relative directory name.
+The path separator is colon in GNU and GNU-like systems."
(interactive
(list (read-directory-name "Change default directory: "
default-directory default-directory
@@ -3480,7 +3483,10 @@ this function is called.
The idea behind the NOCONFIRM argument is that it should be
non-nil if the buffer is going to be reverted without asking the
user. In such situations, one has to be careful with potentially
-time consuming operations.")
+time consuming operations.
+
+For more information on how this variable is used by Auto Revert mode,
+see Info node `(emacs-xtra)Supporting additional buffers'.")
(defvar before-revert-hook nil
"Normal hook for `revert-buffer' to run before reverting.
diff --git a/lisp/frame.el b/lisp/frame.el
index 585d78cdc13..ad88102af65 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1244,9 +1244,8 @@ left untouched. FRAME nil or omitted means use the selected frame."
(make-variable-buffer-local 'show-trailing-whitespace)
(defcustom show-trailing-whitespace nil
- "*Non-nil means highlight trailing whitespace in face `trailing-whitespace'.
-
-Setting this variable makes it local to the current buffer."
+ "*Non-nil means highlight trailing whitespace.
+This is done in the face `trailing-whitespace'."
:tag "Highlight trailing whitespace."
:type 'boolean
:group 'font-lock)
diff --git a/lisp/image.el b/lisp/image.el
index 88e38186d7b..ad8fcafe8de 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -54,10 +54,12 @@ a non-nil value, TYPE is the image's type.")
Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
representing a supported image type, and the rest are strings giving
-alternate filenames for the corresponding external libraries to load.
-They are tried in the order they appear on the list; if none of them can
-be loaded, the running session of Emacs won't display the image type.
-No entries are needed for pbm and xbm images; they're always supported.")
+alternate filenames for the corresponding external libraries.
+
+Emacs tries to load the libraries in the order they appear on the
+list; if none is loaded, the running session of Emacs won't
+support the image type. Types 'pbm and 'xbm don't need to be
+listed; they're always supported.")
;;;###autoload (put 'image-library-alist 'risky-local-variable t)
(defun image-jpeg-p (data)
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 8357527dc8c..3898aa13f61 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -999,7 +999,8 @@ Use `isearch-exit' to quit without signaling."
(if (equal isearch-string "")
(setq isearch-success t)
- (if (and isearch-success (equal (match-end 0) (match-beginning 0))
+ (if (and isearch-success
+ (equal (point) isearch-other-end)
(not isearch-just-started))
;; If repeating a search that found
;; an empty string, ensure we advance.
@@ -1764,7 +1765,13 @@ If there is no completion possible, say so and continue searching."
(let ((cursor-in-echo-area ellipsis)
(m (concat
(isearch-message-prefix c-q-hack ellipsis isearch-nonincremental)
- isearch-message
+ (if (and (not isearch-success)
+ (string-match " +$" isearch-message))
+ (concat
+ (substring isearch-message 0 (match-beginning 0))
+ (propertize (substring isearch-message (match-beginning 0))
+ 'face 'trailing-whitespace))
+ isearch-message)
(isearch-message-suffix c-q-hack ellipsis)
)))
(if c-q-hack
@@ -1811,7 +1818,11 @@ If there is no completion possible, say so and continue searching."
;; Searching
-(defvar isearch-search-fun-function nil "Override `isearch-function-fun'.")
+(defvar isearch-search-fun-function nil
+ "Override `isearch-search-fun'.
+This function should return the search function for isearch to use.
+It will call this function with three arguments
+as if it were `search-forward'.")
(defun isearch-search-fun ()
"Return the function to use for the search.
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in
index 71998d403e4..826cf89bfec 100644
--- a/lisp/makefile.w32-in
+++ b/lisp/makefile.w32-in
@@ -237,7 +237,7 @@ update-subdirs-CMD: doit
echo ;; In load-path, after this directory should come>> subdirs.el
echo ;; certain of its subdirectories. Here we specify them.>> subdirs.el
echo (normal-top-level-add-to-load-path $(SQUOTE)(>> subdirs.el
- @for %d in ($(WINS)) do if not (%d)==(term) echo "%d">> subdirs.el
+ @for %%d in ($(WINS)) do if not (%%d)==(term) echo "%%d">> subdirs.el
echo ))>> subdirs.el
update-subdirs-SH: doit
@@ -282,11 +282,11 @@ $(DONTCOMPILE:.el=.elc):
compile: subdirs.el compile-$(SHELLTYPE) doit
compile-CMD:
-# -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g
- for %f in ($(COMPILE_FIRST)) do \
- $(emacs) -l loaddefs -f batch-byte-compile-if-not-done %f
- for %f in (. $(WINS)) do for %g in (%f/*.el) do \
- $(emacs) -l loaddefs -f batch-byte-compile-if-not-done %f/%g
+# -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
+ for %%f in ($(COMPILE_FIRST)) do \
+ $(emacs) -l loaddefs -f batch-byte-compile-if-not-done %%f
+ for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
+ $(emacs) -l loaddefs -f batch-byte-compile-if-not-done %%f/%%g
compile-SH:
# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
@@ -309,9 +309,9 @@ compile-SH:
compile-always: subdirs.el compile-always-$(SHELLTYPE) doit
compile-always-CMD:
-# -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g
- for %f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %f
- for %f in (. $(WINS)) do for %g in (%f/*.el) do $(emacs) -f batch-byte-compile %f/%g
+# -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
+ for %%f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %%f
+ for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) -f batch-byte-compile %%f/%%g
compile-always-SH:
# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
@@ -329,7 +329,7 @@ compile-always-SH:
compile-calc: compile-calc-$(SHELLTYPE)
compile-calc-CMD:
- for %f in ($(lisp)/calc/*.el) do $(emacs) -f batch-byte-compile %f
+ for %%f in ($(lisp)/calc/*.el) do $(emacs) -f batch-byte-compile %%f
compile-calc-SH:
for el in $(lisp)/calc/*.el; do \
@@ -374,7 +374,7 @@ bootstrap-clean: bootstrap-clean-$(SHELLTYPE) loaddefs.el
bootstrap-clean-CMD:
# if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
if not exist $(lisp)\loaddefs.el cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el
- -for %f in (. $(WINS)) do for %g in (%f\*.elc) do @$(DEL) %g
+ -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
bootstrap-clean-SH:
# if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
diff --git a/lisp/man.el b/lisp/man.el
index 983be4a91cc..5a07045dda9 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -733,7 +733,8 @@ all sections related to a subject, put something appropriate into the
(if (fboundp 'start-process)
(set-process-sentinel
(start-process manual-program buffer
- shell-file-name shell-command-switch
+ (if (eq system-type 'cygwin) shell-file-name "sh")
+ shell-command-switch
(format (Man-build-man-command) man-args))
'Man-bgproc-sentinel)
(let ((exit-status
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 621b517e2fe..7f9d080478a 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -625,7 +625,7 @@ This should be bound to a mouse drag event."
(defun mouse-set-region-1 ()
;; Set transient-mark-mode for a little while.
- (setq transient-mark-mode (or transient-mark-mode 'lambda))
+ (setq transient-mark-mode (or transient-mark-mode 'only))
(setq mouse-last-region-beg (region-beginning))
(setq mouse-last-region-end (region-end))
(setq mouse-last-region-tick (buffer-modified-tick)))
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index b77be84deb3..428da8cbe8a 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -168,7 +168,7 @@ and `goto-address-fontify-p'."
(overlay-put this-overlay
'mouse-face goto-address-url-mouse-face)
(overlay-put this-overlay
- 'help-echo "mouse-2: follow URL")
+ 'help-echo "mouse-2, C-c RET: follow URL")
(overlay-put this-overlay
'keymap goto-address-highlight-keymap)
(overlay-put this-overlay 'goto-address t)))
@@ -182,7 +182,7 @@ and `goto-address-fontify-p'."
(overlay-put this-overlay 'mouse-face
goto-address-mail-mouse-face)
(overlay-put this-overlay
- 'help-echo "mouse-2: mail this address")
+ 'help-echo "mouse-2, C-c RET: mail this address")
(overlay-put this-overlay
'keymap goto-address-highlight-keymap)
(overlay-put this-overlay 'goto-address t))))))))
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 2b9122a8eb9..22713f87a96 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -873,17 +873,17 @@ indentation to be kept as it was before narrowing."
(setq ,bindent (- ,bindent n)))))))))))
(defun comment-region-internal (beg end cs ce
- &optional ccs cce block lines indent)
+ &optional ccs cce block lines indent)
"Comment region BEG .. END.
-CS and CE are the comment start resp end string.
-CCS and CCE are the comment continuation strings for the start resp end
-of lines (default to CS and CE).
-BLOCK indicates that end of lines should be marked with either CCE, CE or CS
-\(if CE is empty) and that those markers should be aligned.
-LINES indicates that an extra lines will be used at the beginning and end
-of the region for CE and CS.
-INDENT indicates to put CS and CCS at the current indentation of the region
-rather than at left margin."
+CS and CE are the comment start string and comment end string,
+respectively. CCS and CCE are the comment continuation strings
+for the start and end of lines, respectively (default to CS and CE).
+BLOCK indicates that end of lines should be marked with either CCE,
+CE or CS \(if CE is empty) and that those markers should be aligned.
+LINES indicates that an extra lines will be used at the beginning
+and end of the region for CE and CS.
+INDENT indicates to put CS and CCS at the current indentation of
+the region rather than at left margin."
;;(assert (< beg end))
(let ((no-empty (not (or (eq comment-empty-lines t)
(and comment-empty-lines (zerop (length ce)))))))
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 3a880a4c9ea..033ce883e5f 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -583,7 +583,7 @@ Faces `compilation-error-face', `compilation-warning-face',
(setq col (match-string-no-properties col))
(setq col (- (string-to-number col) compilation-first-column)))
(if (and end-col (setq end-col (match-string-no-properties end-col)))
- (setq end-col (- (string-to-number end-col) compilation-first-column))
+ (setq end-col (- (string-to-number end-col) compilation-first-column -1))
(if end-line (setq end-col -1)))
(if (consp type) ; not a static type, check what it is.
(setq type (or (and (car type) (match-end (car type)) 1)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index aa81f8aa770..1916bde9ea1 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -146,6 +146,14 @@ The following place holders should be present in the string:
:type 'boolean
:group 'grep)
+(defcustom grep-error-screen-columns nil
+ "*If non-nil, column numbers in grep hits are screen columns.
+See `compilation-error-screen-columns'"
+ :type '(choice (const :tag "Default" nil)
+ integer)
+ :version "21.4"
+ :group 'grep)
+
;;;###autoload
(defcustom grep-setup-hook nil
"List of hook functions run by `grep-process-setup' (see `run-hooks')."
@@ -216,7 +224,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
`complation-last-buffer' rather than `grep-last-buffer'.")
(defvar grep-regexp-alist
- '(("^\\(.+?\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)
+ '(("^\\(.+?\\)[:( \t]+\
+\\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\
+\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6))
("^Binary file \\(.+\\) matches$" 1 nil nil 1))
"Regexp used to match grep hits. See `compilation-error-regexp-alist'.")
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 4f20013c134..72ba4c24eed 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -3737,8 +3737,8 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'."
(format-time-string "%Y-%m-%d"))
-(defalias 'ps-time-stamp-iso8601 'ps-time-stamp-yyyy-mm-dd
- "Alias for `ps-time-stamp-yyyy-mm-dd' (which see).")
+;; Alias for `ps-time-stamp-yyyy-mm-dd' (which see).
+(defalias 'ps-time-stamp-iso8601 'ps-time-stamp-yyyy-mm-dd)
(defun ps-time-stamp-hh:mm:ss ()
diff --git a/lisp/replace.el b/lisp/replace.el
index 014762be53e..89f55c2829e 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1,7 +1,7 @@
;;; replace.el --- replace commands for Emacs
-;; Copyright (C) 1985, 86, 87, 92, 94, 96, 1997, 2000, 2001, 2002
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 86, 87, 92, 94, 96, 1997, 2000, 2001, 2002,
+;; 2003, 2004 Free Software Foundation, Inc.
;; Maintainer: FSF
@@ -81,14 +81,15 @@ strings or patterns."
query-replace-from-history-variable
nil t)))
;; Warn if user types \n or \t, but don't reject the input.
- (if (string-match "\\\\[nt]" from)
- (let ((match (match-string 0 from)))
- (cond
- ((string= match "\\n")
- (message "Note: `\\n' here doesn't match a newline; to do that, type C-q C-j instead"))
- ((string= match "\\t")
- (message "Note: `\\t' here doesn't match a tab; to do that, just type TAB")))
- (sit-for 2))))
+ (and regexp-flag
+ (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from)
+ (let ((match (match-string 3 from)))
+ (cond
+ ((string= match "\\n")
+ (message "Note: `\\n' here doesn't match a newline; to do that, type C-q C-j instead"))
+ ((string= match "\\t")
+ (message "Note: `\\t' here doesn't match a tab; to do that, just type TAB")))
+ (sit-for 2))))
(save-excursion
(setq to (read-from-minibuffer (format "%s %s with: " string from)
@@ -161,20 +162,62 @@ Fourth and fifth arg START and END specify the region to operate on.
In TO-STRING, `\\&' stands for whatever matched the whole of REGEXP,
and `\\=\\N' (where N is a digit) stands for
- whatever what matched the Nth `\\(...\\)' in REGEXP."
+whatever what matched the Nth `\\(...\\)' in REGEXP.
+
+When this function is called interactively, the replacement text
+can also contain `\\,' followed by a Lisp expression. The escaped
+shorthands for `query-replace-regexp-eval' are also valid
+here: within the Lisp expression, you can use `\\&' for the whole
+match string, `\\N' for partial matches, `\\#&' and `\\#N' for
+the respective numeric values, and `\\#' for `replace-count'.
+
+If your Lisp expression is an identifier and the next
+letter in the replacement string would be interpreted as part of it,
+you can wrap it with an expression like `\\,(or \\#)'. Incidentally,
+for this particular case you may also enter `\\#' in the replacement
+text directly.
+
+When you use `\\,' or `\\#' in the replacement, TO-STRING actually
+becomes a list with expanded shorthands.
+Use \\[repeat-complex-command] after this command to see details."
(interactive
(let ((common
(query-replace-read-args "Query replace regexp" t)))
- (list (nth 0 common) (nth 1 common) (nth 2 common)
- ;; These are done separately here
- ;; so that command-history will record these expressions
- ;; rather than the values they had this time.
- (if (and transient-mark-mode mark-active)
- (region-beginning))
- (if (and transient-mark-mode mark-active)
- (region-end)))))
-
+ (list
+ (nth 0 common)
+ (if (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]"
+ (nth 1 common))
+ (let ((to-string (nth 1 common)) pos to-expr char prompt)
+ (while (string-match
+ "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]"
+ to-string)
+ (setq pos (match-end 0))
+ (push (substring to-string 0 (- pos 2)) to-expr)
+ (setq char (aref to-string (1- pos))
+ to-string (substring to-string pos))
+ (cond ((eq char ?\#)
+ (push '(number-to-string replace-count) to-expr))
+ ((eq char ?\,)
+ (setq pos (read-from-string to-string))
+ (push `(replace-quote ,(car pos)) to-expr)
+ (setq to-string (substring to-string (cdr pos))))))
+ (setq to-expr (nreverse (delete "" (cons to-string to-expr))))
+ (replace-match-string-symbols to-expr)
+ (cons 'replace-eval-replacement
+ (if (> (length to-expr) 1)
+ (cons 'concat to-expr)
+ (car to-expr))))
+ (nth 1 common))
+ (nth 2 common)
+ ;; These are done separately here
+ ;; so that command-history will record these expressions
+ ;; rather than the values they had this time.
+ (if (and transient-mark-mode mark-active)
+ (region-beginning))
+ (if (and transient-mark-mode mark-active)
+ (region-end)))))
(perform-replace regexp to-string t t delimited nil nil start end))
+
(define-key esc-map [?\C-%] 'query-replace-regexp)
(defun query-replace-regexp-eval (regexp to-expr &optional delimited start end)
@@ -191,6 +234,7 @@ For convenience, when entering TO-EXPR interactively, you can use `\\&' or
`\\0' to stand for whatever matched the whole of REGEXP, and `\\N' (where
N is a digit) to stand for whatever matched the Nth `\\(...\\)' in REGEXP.
Use `\\#&' or `\\#N' if you want a number instead of a string.
+In interactive use, `\\#' in itself stands for `replace-count'.
In Transient Mark mode, if the mark is active, operate on the contents
of the region. Otherwise, operate from point to the end of the buffer.
@@ -1012,6 +1056,7 @@ N (match-string N) (where N is a string of digits)
#N (string-to-number (match-string N))
& (match-string 0)
#& (string-to-number (match-string 0))
+# replace-count
Note that these symbols must be preceeded by a backslash in order to
type them."
@@ -1031,7 +1076,9 @@ type them."
((string= "&" name)
(setcar n '(match-string 0)))
((string= "#&" name)
- (setcar n '(string-to-number (match-string 0))))))))
+ (setcar n '(string-to-number (match-string 0))))
+ ((string= "#" name)
+ (setcar n 'replace-count))))))
(setq n (cdr n))))
(defun replace-eval-replacement (expression replace-count)
@@ -1040,6 +1087,21 @@ type them."
replacement
(prin1-to-string replacement t))))
+(defun replace-quote (replacement)
+ "Quote a replacement string.
+This just doubles all backslashes in REPLACEMENT and
+returns the resulting string. If REPLACEMENT is not
+a string, it is first passed through `prin1-to-string'
+with the `noescape' argument set.
+
+`match-data' is preserved across the call."
+ (save-match-data
+ (replace-regexp-in-string "\\\\" "\\\\"
+ (if (stringp replacement)
+ replacement
+ (prin1-to-string replacement t))
+ t t)))
+
(defun replace-loop-through-replacements (data replace-count)
;; DATA is a vector contaning the following values:
;; 0 next-rotate-count