diff options
| author | Karoly Lorentey | 2004-08-09 11:05:10 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-08-09 11:05:10 +0000 |
| commit | cd83ec7be76b05014a49f8bb155a84ddd7c323ee (patch) | |
| tree | d8847695cedbde0c1bad8737131e219bfac6ce8a /lisp | |
| parent | 18ad87544445be2584163436bd3c5d6366afa122 (diff) | |
| parent | 30e75a873acbcc4f4d59d0341fb49211d8c6d010 (diff) | |
| download | emacs-cd83ec7be76b05014a49f8bb155a84ddd7c323ee.tar.gz emacs-cd83ec7be76b05014a49f8bb155a84ddd7c323ee.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-482
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-483
Build-in-place tweak
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-484
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-228
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 34 | ||||
| -rw-r--r-- | lisp/emacs-lisp/re-builder.el | 15 | ||||
| -rw-r--r-- | lisp/ibuffer.el | 15 | ||||
| -rw-r--r-- | lisp/novice.el | 14 | ||||
| -rw-r--r-- | lisp/simple.el | 8 | ||||
| -rw-r--r-- | lisp/subr.el | 4 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 2 |
7 files changed, 73 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e12449df8e4..31e414c2a4b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,37 @@ | |||
| 1 | 2004-08-08 John Paul Wallington <jpw@gnu.org> | ||
| 2 | |||
| 3 | * ibuffer.el (define-ibuffer-column size): Use `string-to-number' | ||
| 4 | instead of `string-to-int'. | ||
| 5 | (define-ibuffer-column mode): Fix indentation. | ||
| 6 | |||
| 7 | 2004-08-08 Lars Hansen <larsh@math.ku.dk> | ||
| 8 | |||
| 9 | * wid-edit.el (widget-sexp-validate): Allow whitespace after | ||
| 10 | expression. | ||
| 11 | |||
| 12 | 2004-08-08 Luc Teirlinck <teirllm@auburn.edu> | ||
| 13 | |||
| 14 | * subr.el (global-unset-key, local-unset-key): Doc fixes. | ||
| 15 | |||
| 16 | * novice.el (disabled-command-function): New variable renamed from | ||
| 17 | `disabled-command-hook'. | ||
| 18 | (disabled-command-hook): Keep the _variable_ as alias for | ||
| 19 | `disabled-command-function' and make obsolete. | ||
| 20 | (disabled-command-function): Function renamed from | ||
| 21 | `disabled-command-hook'. Adapt code to name change of the variable. | ||
| 22 | |||
| 23 | 2004-08-07 Satyaki Das <satyaki@theforce.stanford.edu> (tiny change) | ||
| 24 | |||
| 25 | * simple.el (completion-root-regexp): New defvar. | ||
| 26 | (completion-setup-function): Use it instead of a literal string. | ||
| 27 | |||
| 28 | 2004-08-07 John Paul Wallington <jpw@gnu.org> | ||
| 29 | |||
| 30 | * emacs-lisp/re-builder.el (reb-re-syntax): Add `rx' syntax. | ||
| 31 | (reb-lisp-mode): Require `rx' feature when `re-reb-syntax' is `rx'. | ||
| 32 | (reb-lisp-syntax-p, reb-change-syntax): `rx' is a Lisp syntax. | ||
| 33 | (reb-cook-regexp): Call `rx-to-string' when `re-reb-syntax' is `rx'. | ||
| 34 | |||
| 1 | 2004-08-04 Kenichi Handa <handa@m17n.org> | 35 | 2004-08-04 Kenichi Handa <handa@m17n.org> |
| 2 | 36 | ||
| 3 | * international/encoded-kb.el (encoded-kbd-setup-keymap): Fix | 37 | * international/encoded-kb.el (encoded-kbd-setup-keymap): Fix |
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index c6112c4a105..6eb1ffa2e54 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el | |||
| @@ -135,6 +135,7 @@ Can either be `read', `string', `sregex' or `lisp-re'." | |||
| 135 | (const :tag "String syntax" string) | 135 | (const :tag "String syntax" string) |
| 136 | (const :tag "`sregex' syntax" sregex) | 136 | (const :tag "`sregex' syntax" sregex) |
| 137 | (const :tag "`lisp-re' syntax" lisp-re) | 137 | (const :tag "`lisp-re' syntax" lisp-re) |
| 138 | (const :tag "`rx' syntax" rx) | ||
| 138 | (value: string))) | 139 | (value: string))) |
| 139 | 140 | ||
| 140 | (defcustom reb-auto-match-limit 200 | 141 | (defcustom reb-auto-match-limit 200 |
| @@ -261,7 +262,9 @@ Except for Lisp syntax this is the same as `reb-regexp'.") | |||
| 261 | (cond ((eq reb-re-syntax 'lisp-re) ; Pull in packages | 262 | (cond ((eq reb-re-syntax 'lisp-re) ; Pull in packages |
| 262 | (require 'lisp-re)) ; as needed | 263 | (require 'lisp-re)) ; as needed |
| 263 | ((eq reb-re-syntax 'sregex) ; sregex is not autoloaded | 264 | ((eq reb-re-syntax 'sregex) ; sregex is not autoloaded |
| 264 | (require 'sregex))) ; right now.. | 265 | (require 'sregex)) ; right now.. |
| 266 | ((eq reb-re-syntax 'rx) ; rx-to-string is autoloaded | ||
| 267 | (require 'rx))) ; require rx anyway | ||
| 265 | (reb-mode-common)) | 268 | (reb-mode-common)) |
| 266 | 269 | ||
| 267 | ;; Use the same "\C-c" keymap as `reb-mode' and use font-locking from | 270 | ;; Use the same "\C-c" keymap as `reb-mode' and use font-locking from |
| @@ -320,7 +323,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.") | |||
| 320 | 323 | ||
| 321 | (defsubst reb-lisp-syntax-p () | 324 | (defsubst reb-lisp-syntax-p () |
| 322 | "Return non-nil if RE Builder uses a Lisp syntax." | 325 | "Return non-nil if RE Builder uses a Lisp syntax." |
| 323 | (memq reb-re-syntax '(lisp-re sregex))) | 326 | (memq reb-re-syntax '(lisp-re sregex rx))) |
| 324 | 327 | ||
| 325 | (defmacro reb-target-binding (symbol) | 328 | (defmacro reb-target-binding (symbol) |
| 326 | "Return binding for SYMBOL in the RE Builder target buffer." | 329 | "Return binding for SYMBOL in the RE Builder target buffer." |
| @@ -466,10 +469,10 @@ Optional argument SYNTAX must be specified if called non-interactively." | |||
| 466 | (list (intern | 469 | (list (intern |
| 467 | (completing-read "Select syntax: " | 470 | (completing-read "Select syntax: " |
| 468 | (mapcar (lambda (el) (cons (symbol-name el) 1)) | 471 | (mapcar (lambda (el) (cons (symbol-name el) 1)) |
| 469 | '(read string lisp-re sregex)) | 472 | '(read string lisp-re sregex rx)) |
| 470 | nil t (symbol-name reb-re-syntax))))) | 473 | nil t (symbol-name reb-re-syntax))))) |
| 471 | 474 | ||
| 472 | (if (memq syntax '(read string lisp-re sregex)) | 475 | (if (memq syntax '(read string lisp-re sregex rx)) |
| 473 | (let ((buffer (get-buffer reb-buffer))) | 476 | (let ((buffer (get-buffer reb-buffer))) |
| 474 | (setq reb-re-syntax syntax) | 477 | (setq reb-re-syntax syntax) |
| 475 | (if buffer | 478 | (if buffer |
| @@ -604,6 +607,8 @@ optional fourth argument FORCE is non-nil." | |||
| 604 | (lre-compile-string (eval (car (read-from-string re))))) | 607 | (lre-compile-string (eval (car (read-from-string re))))) |
| 605 | ((eq reb-re-syntax 'sregex) | 608 | ((eq reb-re-syntax 'sregex) |
| 606 | (apply 'sregex (eval (car (read-from-string re))))) | 609 | (apply 'sregex (eval (car (read-from-string re))))) |
| 610 | ((eq reb-re-syntax 'rx) | ||
| 611 | (rx-to-string (eval (car (read-from-string re))))) | ||
| 607 | (t re))) | 612 | (t re))) |
| 608 | 613 | ||
| 609 | (defun reb-update-regexp () | 614 | (defun reb-update-regexp () |
| @@ -670,7 +675,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." | |||
| 670 | (overlay-put overlay 'priority i))) | 675 | (overlay-put overlay 'priority i))) |
| 671 | (setq i (1+ i)))))) | 676 | (setq i (1+ i)))))) |
| 672 | (let ((count (if subexp submatches matches))) | 677 | (let ((count (if subexp submatches matches))) |
| 673 | (message"%s %smatch%s%s" | 678 | (message "%s %smatch%s%s" |
| 674 | (if (= 0 count) "No" (int-to-string count)) | 679 | (if (= 0 count) "No" (int-to-string count)) |
| 675 | (if subexp "subexpression " "") | 680 | (if subexp "subexpression " "") |
| 676 | (if (= 1 count) "" "es") | 681 | (if (= 1 count) "" "es") |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 140f2995292..f013f8e3c72 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -1644,16 +1644,17 @@ If point is on a group name, this function operates on that group." | |||
| 1644 | (dolist (string column-strings) | 1644 | (dolist (string column-strings) |
| 1645 | (setq total | 1645 | (setq total |
| 1646 | ;; like, ewww ... | 1646 | ;; like, ewww ... |
| 1647 | (+ (float (string-to-int string)) | 1647 | (+ (float (string-to-number string)) |
| 1648 | total))) | 1648 | total))) |
| 1649 | (format "%.0f" total)))) | 1649 | (format "%.0f" total)))) |
| 1650 | (format "%s" (buffer-size))) | 1650 | (format "%s" (buffer-size))) |
| 1651 | 1651 | ||
| 1652 | (define-ibuffer-column mode (:inline t | 1652 | (define-ibuffer-column mode |
| 1653 | :props | 1653 | (:inline t |
| 1654 | ('mouse-face 'highlight | 1654 | :props |
| 1655 | 'keymap ibuffer-mode-name-map | 1655 | ('mouse-face 'highlight |
| 1656 | 'help-echo "mouse-2: filter by this mode")) | 1656 | 'keymap ibuffer-mode-name-map |
| 1657 | 'help-echo "mouse-2: filter by this mode")) | ||
| 1657 | (format "%s" mode-name)) | 1658 | (format "%s" mode-name)) |
| 1658 | 1659 | ||
| 1659 | (define-ibuffer-column process | 1660 | (define-ibuffer-column process |
| @@ -2198,7 +2199,7 @@ Try to restore the previous window configuration iff | |||
| 2198 | `ibuffer-restore-window-config-on-quit' is non-nil." | 2199 | `ibuffer-restore-window-config-on-quit' is non-nil." |
| 2199 | (interactive) | 2200 | (interactive) |
| 2200 | (if ibuffer-restore-window-config-on-quit | 2201 | (if ibuffer-restore-window-config-on-quit |
| 2201 | (progn | 2202 | (progn |
| 2202 | (bury-buffer) | 2203 | (bury-buffer) |
| 2203 | (unless (= (count-windows) 1) | 2204 | (unless (= (count-windows) 1) |
| 2204 | (set-window-configuration ibuffer-prev-window-config))) | 2205 | (set-window-configuration ibuffer-prev-window-config))) |
diff --git a/lisp/novice.el b/lisp/novice.el index 1cb89066481..ca9a06769d5 100644 --- a/lisp/novice.el +++ b/lisp/novice.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; novice.el --- handling of disabled commands ("novice mode") for Emacs | 1 | ;;; novice.el --- handling of disabled commands ("novice mode") for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1986, 1987, 1994, 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| 6 | ;; Keywords: internal, help | 7 | ;; Keywords: internal, help |
| @@ -36,12 +37,17 @@ | |||
| 36 | ;; and the keys are returned by (this-command-keys). | 37 | ;; and the keys are returned by (this-command-keys). |
| 37 | 38 | ||
| 38 | ;;;###autoload | 39 | ;;;###autoload |
| 39 | (defvar disabled-command-hook 'disabled-command-hook | 40 | (defvar disabled-command-function 'disabled-command-function |
| 40 | "Function to call to handle disabled commands. | 41 | "Function to call to handle disabled commands. |
| 41 | If nil, the feature is disabled, i.e., all commands work normally.") | 42 | If nil, the feature is disabled, i.e., all commands work normally.") |
| 42 | 43 | ||
| 44 | (defvaralias 'disabled-command-hook 'disabled-command-function) | ||
| 45 | (make-obsolete-variable | ||
| 46 | 'disabled-command-hook | ||
| 47 | "use the variable `disabled-command-function' instead." "21.4") | ||
| 48 | |||
| 43 | ;;;###autoload | 49 | ;;;###autoload |
| 44 | (defun disabled-command-hook (&rest ignore) | 50 | (defun disabled-command-function (&rest ignore) |
| 45 | (let (char) | 51 | (let (char) |
| 46 | (save-window-excursion | 52 | (save-window-excursion |
| 47 | (with-output-to-temp-buffer "*Help*" | 53 | (with-output-to-temp-buffer "*Help*" |
| @@ -91,7 +97,7 @@ SPC to try the command just this once, but leave it disabled. | |||
| 91 | (ding) | 97 | (ding) |
| 92 | (message "Please type y, n, ! or SPC (the space bar): ")))) | 98 | (message "Please type y, n, ! or SPC (the space bar): ")))) |
| 93 | (if (= char ?!) | 99 | (if (= char ?!) |
| 94 | (setq disabled-command-hook nil)) | 100 | (setq disabled-command-function nil)) |
| 95 | (if (= char ?y) | 101 | (if (= char ?y) |
| 96 | (if (and user-init-file | 102 | (if (and user-init-file |
| 97 | (not (string= "" user-init-file)) | 103 | (not (string= "" user-init-file)) |
diff --git a/lisp/simple.el b/lisp/simple.el index 9a7b7f245d0..95f6ed864cf 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4308,6 +4308,12 @@ make the common parts less visible than normal, so that the rest | |||
| 4308 | of the differing parts is, by contrast, slightly highlighted." | 4308 | of the differing parts is, by contrast, slightly highlighted." |
| 4309 | :group 'completion) | 4309 | :group 'completion) |
| 4310 | 4310 | ||
| 4311 | ;; This is for packages that need to bind it to a non-default regexp | ||
| 4312 | ;; in order to make the first-differing character highlight work | ||
| 4313 | ;; to their liking | ||
| 4314 | (defvar completion-root-regexp "^/" | ||
| 4315 | "Regexp to use in `completion-setup-function' to find the root directory.") | ||
| 4316 | |||
| 4311 | (defun completion-setup-function () | 4317 | (defun completion-setup-function () |
| 4312 | (let ((mainbuf (current-buffer)) | 4318 | (let ((mainbuf (current-buffer)) |
| 4313 | (mbuf-contents (minibuffer-contents))) | 4319 | (mbuf-contents (minibuffer-contents))) |
| @@ -4336,7 +4342,7 @@ of the differing parts is, by contrast, slightly highlighted." | |||
| 4336 | (with-current-buffer mainbuf | 4342 | (with-current-buffer mainbuf |
| 4337 | (save-excursion | 4343 | (save-excursion |
| 4338 | (goto-char (point-max)) | 4344 | (goto-char (point-max)) |
| 4339 | (skip-chars-backward "^/") | 4345 | (skip-chars-backward completion-root-regexp) |
| 4340 | (- (point) (minibuffer-prompt-end))))) | 4346 | (- (point) (minibuffer-prompt-end))))) |
| 4341 | ;; Otherwise, in minibuffer, the whole input is being completed. | 4347 | ;; Otherwise, in minibuffer, the whole input is being completed. |
| 4342 | (if (minibufferp mainbuf) | 4348 | (if (minibufferp mainbuf) |
diff --git a/lisp/subr.el b/lisp/subr.el index 2b329ef623f..2833dd10611 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2316,13 +2316,13 @@ which in most cases is shared with all other buffers in the same major mode." | |||
| 2316 | 2316 | ||
| 2317 | (defun global-unset-key (key) | 2317 | (defun global-unset-key (key) |
| 2318 | "Remove global binding of KEY. | 2318 | "Remove global binding of KEY. |
| 2319 | KEY is a string representing a sequence of keystrokes." | 2319 | KEY is a string or vector representing a sequence of keystrokes." |
| 2320 | (interactive "kUnset key globally: ") | 2320 | (interactive "kUnset key globally: ") |
| 2321 | (global-set-key key nil)) | 2321 | (global-set-key key nil)) |
| 2322 | 2322 | ||
| 2323 | (defun local-unset-key (key) | 2323 | (defun local-unset-key (key) |
| 2324 | "Remove local binding of KEY. | 2324 | "Remove local binding of KEY. |
| 2325 | KEY is a string representing a sequence of keystrokes." | 2325 | KEY is a string or vector representing a sequence of keystrokes." |
| 2326 | (interactive "kUnset key locally: ") | 2326 | (interactive "kUnset key locally: ") |
| 2327 | (if (current-local-map) | 2327 | (if (current-local-map) |
| 2328 | (local-set-key key nil)) | 2328 | (local-set-key key nil)) |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 8029fb3d5a6..05ef4b95658 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -3153,6 +3153,8 @@ It will read a directory name from the minibuffer when invoked." | |||
| 3153 | (setq err "Empty sexp -- use `nil'?") | 3153 | (setq err "Empty sexp -- use `nil'?") |
| 3154 | (unless (widget-apply widget :match (read (current-buffer))) | 3154 | (unless (widget-apply widget :match (read (current-buffer))) |
| 3155 | (setq err (widget-get widget :type-error)))) | 3155 | (setq err (widget-get widget :type-error)))) |
| 3156 | ;; Allow whitespace after expression. | ||
| 3157 | (skip-syntax-forward "\\s-") | ||
| 3156 | (if (and (not (eobp)) | 3158 | (if (and (not (eobp)) |
| 3157 | (not err)) | 3159 | (not err)) |
| 3158 | (setq err (format "Junk at end of expression: %s" | 3160 | (setq err (format "Junk at end of expression: %s" |