diff options
| author | Miles Bader | 2005-01-24 22:34:31 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-01-24 22:34:31 +0000 |
| commit | 87795686a9e8ea51ec492d01d7dce4698b14f3af (patch) | |
| tree | 737f41796d19fc2dae8a9b77ecf372ae9cca9f01 /lisp | |
| parent | 7ed0a705d1cf6dcf340b3407bbffd21f1cfbc925 (diff) | |
| parent | 6adb6f01302f35954f3b50bbf8ae8d94af268792 (diff) | |
| download | emacs-87795686a9e8ea51ec492d01d7dce4698b14f3af.tar.gz emacs-87795686a9e8ea51ec492d01d7dce4698b14f3af.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-6
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-48
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-51
Update from CVS
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 46 | ||||
| -rw-r--r-- | lisp/calc/calc-store.el | 2 | ||||
| -rw-r--r-- | lisp/files.el | 77 | ||||
| -rw-r--r-- | lisp/international/encoded-kb.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 45 | ||||
| -rw-r--r-- | lisp/simple.el | 10 | ||||
| -rw-r--r-- | lisp/term/w32-win.el | 94 | ||||
| -rw-r--r-- | lisp/textmodes/refill.el | 84 |
8 files changed, 180 insertions, 182 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0be81220340..c70fd38ecd7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,49 @@ | |||
| 1 | 2005-01-24 Jay Belanger <belanger@truman.edu> | ||
| 2 | |||
| 3 | * calc/calc-store.el (calc-declare-variable): Use calc-var-name to | ||
| 4 | display variable name. | ||
| 5 | |||
| 6 | 2005-01-24 Kenichi Handa <handa@m17n.org> | ||
| 7 | |||
| 8 | * international/encoded-kb.el (encoded-kbd-iso2022-single-shift): | ||
| 9 | Fix setting of the element of encoded-kbd-iso2022-invocations. | ||
| 10 | |||
| 11 | 2005-01-24 Nick Roberts <nickrob@snap.net.nz> | ||
| 12 | |||
| 13 | * progmodes/gdb-ui.el (gdb-goto-breakpoint, gdb-frames-select) | ||
| 14 | (gdb-threads-select): Change to also accept mouse events. | ||
| 15 | (gdb-mouse-goto-breakpoint, gdb-frames-mouse-select) | ||
| 16 | (gdb-threads-mouse-select): Delete. | ||
| 17 | |||
| 18 | 2005-01-23 Luc Teirlinck <teirllm@auburn.edu> | ||
| 19 | |||
| 20 | * files.el (insert-directory): Take care of empty directory, | ||
| 21 | listed without -a switch. | ||
| 22 | |||
| 23 | 2005-01-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 24 | |||
| 25 | * textmodes/refill.el (refill-post-command-function): | ||
| 26 | Add `indent-new-comment-line' and `reindent-then-newline-and-indent' | ||
| 27 | to the list of functions that we should be careful not to undo. | ||
| 28 | (refill-late-fill-paragraph-function): Remove. | ||
| 29 | (refill-saved-state): New var. | ||
| 30 | (refill-mode): Use it to save fill-paragraph-function. | ||
| 31 | Save also the value of auto-fill-function. | ||
| 32 | |||
| 33 | * term/w32-win.el: Simplify code. | ||
| 34 | |||
| 35 | 2005-01-23 Kim F. Storm <storm@cua.dk> | ||
| 36 | |||
| 37 | * simple.el (line-move): Adapt to new return value from | ||
| 38 | pos-visible-in-window-p. | ||
| 39 | |||
| 40 | * simple.el (line-move): Fix last change. Check partial | ||
| 41 | visibility at point rather than at window-start. | ||
| 42 | |||
| 43 | 2005-01-22 Jason Rumney <jasonr@gnu.org> | ||
| 44 | |||
| 45 | * term/w32-win.el (xw-defined-colors): Remove debug-message. | ||
| 46 | |||
| 1 | 2005-01-22 David Kastrup <dak@gnu.org> | 47 | 2005-01-22 David Kastrup <dak@gnu.org> |
| 2 | 48 | ||
| 3 | * progmodes/grep.el: Add alias `find-grep' for `grep-find'. | 49 | * progmodes/grep.el: Add alias `find-grep' for `grep-find'. |
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index b2cef4936a0..52f0cc0272d 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el | |||
| @@ -482,7 +482,7 @@ | |||
| 482 | (setq rp nil))) | 482 | (setq rp nil))) |
| 483 | (not rp))))) | 483 | (not rp))))) |
| 484 | (calc-unread-command ?\C-a) | 484 | (calc-unread-command ?\C-a) |
| 485 | (setq decl (read-string (format "Declare: %s to be: " var) | 485 | (setq decl (read-string (format "Declare: %s to be: " (calc-var-name var)) |
| 486 | (and rp | 486 | (and rp |
| 487 | (math-format-flat-expr (nth 2 (car dp)) 0)))) | 487 | (math-format-flat-expr (nth 2 (car dp)) 0)))) |
| 488 | (setq decl (and (string-match "[^ \t]" decl) | 488 | (setq decl (and (string-match "[^ \t]" decl) |
diff --git a/lisp/files.el b/lisp/files.el index cdaa7a5adb8..841332b957a 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4550,45 +4550,54 @@ normally equivalent short `-D' option is just passed on to | |||
| 4550 | (when (if (stringp switches) | 4550 | (when (if (stringp switches) |
| 4551 | (string-match "--dired\\>" switches) | 4551 | (string-match "--dired\\>" switches) |
| 4552 | (member "--dired" switches)) | 4552 | (member "--dired" switches)) |
| 4553 | ;; The following overshoots by one line for an empty | ||
| 4554 | ;; directory listed with "--dired", but without "-a" | ||
| 4555 | ;; switch, where the ls output contains a | ||
| 4556 | ;; "//DIRED-OPTIONS//" line, but no "//DIRED//" line. | ||
| 4557 | ;; We take care of that case later. | ||
| 4553 | (forward-line -2) | 4558 | (forward-line -2) |
| 4554 | (when (looking-at "//SUBDIRED//") | 4559 | (when (looking-at "//SUBDIRED//") |
| 4555 | (delete-region (point) (progn (forward-line 1) (point))) | 4560 | (delete-region (point) (progn (forward-line 1) (point))) |
| 4556 | (forward-line -1)) | 4561 | (forward-line -1)) |
| 4557 | (when (looking-at "//DIRED//") | 4562 | (if (looking-at "//DIRED//") |
| 4558 | (let ((end (line-end-position)) | 4563 | (let ((end (line-end-position)) |
| 4559 | (linebeg (point)) | 4564 | (linebeg (point)) |
| 4560 | error-lines) | 4565 | error-lines) |
| 4561 | ;; Find all the lines that are error messages, | 4566 | ;; Find all the lines that are error messages, |
| 4562 | ;; and record the bounds of each one. | 4567 | ;; and record the bounds of each one. |
| 4563 | (goto-char beg) | 4568 | (goto-char beg) |
| 4564 | (while (< (point) linebeg) | 4569 | (while (< (point) linebeg) |
| 4565 | (or (eql (following-char) ?\s) | 4570 | (or (eql (following-char) ?\s) |
| 4566 | (push (list (point) (line-end-position)) error-lines)) | 4571 | (push (list (point) (line-end-position)) error-lines)) |
| 4567 | (forward-line 1)) | 4572 | (forward-line 1)) |
| 4568 | (setq error-lines (nreverse error-lines)) | 4573 | (setq error-lines (nreverse error-lines)) |
| 4569 | ;; Now read the numeric positions of file names. | 4574 | ;; Now read the numeric positions of file names. |
| 4570 | (goto-char linebeg) | 4575 | (goto-char linebeg) |
| 4571 | (forward-word 1) | 4576 | (forward-word 1) |
| 4572 | (forward-char 3) | 4577 | (forward-char 3) |
| 4573 | (while (< (point) end) | 4578 | (while (< (point) end) |
| 4574 | (let ((start (insert-directory-adj-pos | 4579 | (let ((start (insert-directory-adj-pos |
| 4580 | (+ beg (read (current-buffer))) | ||
| 4581 | error-lines)) | ||
| 4582 | (end (insert-directory-adj-pos | ||
| 4575 | (+ beg (read (current-buffer))) | 4583 | (+ beg (read (current-buffer))) |
| 4576 | error-lines)) | 4584 | error-lines))) |
| 4577 | (end (insert-directory-adj-pos | 4585 | (if (memq (char-after end) '(?\n ?\ )) |
| 4578 | (+ beg (read (current-buffer))) | 4586 | ;; End is followed by \n or by " -> ". |
| 4579 | error-lines))) | 4587 | (put-text-property start end 'dired-filename t) |
| 4580 | (if (memq (char-after end) '(?\n ?\ )) | 4588 | ;; It seems that we can't trust ls's output as to |
| 4581 | ;; End is followed by \n or by " -> ". | 4589 | ;; byte positions of filenames. |
| 4582 | (put-text-property start end 'dired-filename t) | 4590 | (put-text-property beg (point) 'dired-filename nil) |
| 4583 | ;; It seems that we can't trust ls's output as to | 4591 | (end-of-line)))) |
| 4584 | ;; byte positions of filenames. | 4592 | (goto-char end) |
| 4585 | (put-text-property beg (point) 'dired-filename nil) | 4593 | (beginning-of-line) |
| 4586 | (end-of-line)))) | 4594 | (delete-region (point) (progn (forward-line 1) (point)))) |
| 4587 | (goto-char end) | 4595 | ;; Take care of the case where the ls output contains a |
| 4588 | (beginning-of-line) | 4596 | ;; "//DIRED-OPTIONS//"-line, but no "//DIRED//"-line |
| 4589 | (delete-region (point) (progn (forward-line 1) (point)))) | 4597 | ;; and we went one line too far back (see above). |
| 4590 | (if (looking-at "//DIRED-OPTIONS//") | 4598 | (forward-line 1)) |
| 4591 | (delete-region (point) (progn (forward-line 1) (point)))))) | 4599 | (if (looking-at "//DIRED-OPTIONS//") |
| 4600 | (delete-region (point) (progn (forward-line 1) (point))))) | ||
| 4592 | 4601 | ||
| 4593 | ;; Now decode what read if necessary. | 4602 | ;; Now decode what read if necessary. |
| 4594 | (let ((coding (or coding-system-for-read | 4603 | (let ((coding (or coding-system-for-read |
diff --git a/lisp/international/encoded-kb.el b/lisp/international/encoded-kb.el index ad80baecf76..d5452c92c43 100644 --- a/lisp/international/encoded-kb.el +++ b/lisp/international/encoded-kb.el | |||
| @@ -130,9 +130,7 @@ The following key sequence may cause multilingual text insertion." | |||
| 130 | 130 | ||
| 131 | (defun encoded-kbd-iso2022-single-shift (ignore) | 131 | (defun encoded-kbd-iso2022-single-shift (ignore) |
| 132 | (let ((char (encoded-kbd-last-key))) | 132 | (let ((char (encoded-kbd-last-key))) |
| 133 | (aset encoded-kbd-iso2022-invocations 2 | 133 | (aset encoded-kbd-iso2022-invocations 2 (if (= char ?\216) 2 3))) |
| 134 | (aref encoded-kbd-iso2022-designations | ||
| 135 | (if (= char ?\216) 2 3)))) | ||
| 136 | "") | 134 | "") |
| 137 | 135 | ||
| 138 | (defun encoded-kbd-self-insert-iso2022-7bit (ignore) | 136 | (defun encoded-kbd-self-insert-iso2022-7bit (ignore) |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 993d440cd0c..1827589387e 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -1243,7 +1243,7 @@ static char *magick[] = { | |||
| 1243 | (define-key map "d" 'gdb-delete-breakpoint) | 1243 | (define-key map "d" 'gdb-delete-breakpoint) |
| 1244 | (define-key map "q" 'kill-this-buffer) | 1244 | (define-key map "q" 'kill-this-buffer) |
| 1245 | (define-key map "\r" 'gdb-goto-breakpoint) | 1245 | (define-key map "\r" 'gdb-goto-breakpoint) |
| 1246 | (define-key map [mouse-2] 'gdb-mouse-goto-breakpoint) | 1246 | (define-key map [mouse-2] 'gdb-goto-breakpoint) |
| 1247 | map)) | 1247 | map)) |
| 1248 | 1248 | ||
| 1249 | (defun gdb-breakpoints-mode () | 1249 | (defun gdb-breakpoints-mode () |
| @@ -1291,9 +1291,10 @@ static char *magick[] = { | |||
| 1291 | (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) | 1291 | (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) |
| 1292 | (error "Not recognized as break/watchpoint line"))) | 1292 | (error "Not recognized as break/watchpoint line"))) |
| 1293 | 1293 | ||
| 1294 | (defun gdb-goto-breakpoint () | 1294 | (defun gdb-goto-breakpoint (&optional event) |
| 1295 | "Display the breakpoint location specified at current line." | 1295 | "Display the breakpoint location specified at current line." |
| 1296 | (interactive) | 1296 | (interactive (list last-input-event)) |
| 1297 | (if event (mouse-set-point event)) | ||
| 1297 | (save-excursion | 1298 | (save-excursion |
| 1298 | (beginning-of-line 1) | 1299 | (beginning-of-line 1) |
| 1299 | (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 1300 | (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| @@ -1311,14 +1312,8 @@ static char *magick[] = { | |||
| 1311 | (goto-line (string-to-number line)) | 1312 | (goto-line (string-to-number line)) |
| 1312 | (set-window-point window (point)))))) | 1313 | (set-window-point window (point)))))) |
| 1313 | (error "Not recognized as break/watchpoint line")))) | 1314 | (error "Not recognized as break/watchpoint line")))) |
| 1314 | |||
| 1315 | (defun gdb-mouse-goto-breakpoint (event) | ||
| 1316 | "Display the breakpoint location that you click on." | ||
| 1317 | (interactive "e") | ||
| 1318 | (mouse-set-point event) | ||
| 1319 | (gdb-goto-breakpoint)) | ||
| 1320 | 1315 | ||
| 1321 | ;; | 1316 | |
| 1322 | ;; Frames buffer. This displays a perpetually correct bactracktrace | 1317 | ;; Frames buffer. This displays a perpetually correct bactracktrace |
| 1323 | ;; (from the command `where'). | 1318 | ;; (from the command `where'). |
| 1324 | ;; | 1319 | ;; |
| @@ -1372,7 +1367,7 @@ static char *magick[] = { | |||
| 1372 | (suppress-keymap map) | 1367 | (suppress-keymap map) |
| 1373 | (define-key map "q" 'kill-this-buffer) | 1368 | (define-key map "q" 'kill-this-buffer) |
| 1374 | (define-key map "\r" 'gdb-frames-select) | 1369 | (define-key map "\r" 'gdb-frames-select) |
| 1375 | (define-key map [mouse-2] 'gdb-frames-mouse-select) | 1370 | (define-key map [mouse-2] 'gdb-frames-select) |
| 1376 | map)) | 1371 | map)) |
| 1377 | 1372 | ||
| 1378 | (defun gdb-frames-mode () | 1373 | (defun gdb-frames-mode () |
| @@ -1396,20 +1391,15 @@ static char *magick[] = { | |||
| 1396 | (n (or (and pos (match-string-no-properties 1)) "0"))) | 1391 | (n (or (and pos (match-string-no-properties 1)) "0"))) |
| 1397 | n))) | 1392 | n))) |
| 1398 | 1393 | ||
| 1399 | (defun gdb-frames-select () | 1394 | (defun gdb-frames-select (&optional event) |
| 1400 | "Select the frame and display the relevant source." | 1395 | "Select the frame and display the relevant source." |
| 1401 | (interactive) | 1396 | (interactive (list last-input-event)) |
| 1397 | (if event (mouse-set-point event)) | ||
| 1402 | (gdb-enqueue-input | 1398 | (gdb-enqueue-input |
| 1403 | (list (concat gdb-server-prefix "frame " (gdb-get-frame-number) "\n") 'ignore)) | 1399 | (list (concat gdb-server-prefix "frame " (gdb-get-frame-number) "\n") 'ignore)) |
| 1404 | (gud-display-frame)) | 1400 | (gud-display-frame)) |
| 1405 | |||
| 1406 | (defun gdb-frames-mouse-select (event) | ||
| 1407 | "Select the frame you click on and display the relevant source." | ||
| 1408 | (interactive "e") | ||
| 1409 | (mouse-set-point event) | ||
| 1410 | (gdb-frames-select)) | ||
| 1411 | 1401 | ||
| 1412 | ;; | 1402 | |
| 1413 | ;; Threads buffer. This displays a selectable thread list. | 1403 | ;; Threads buffer. This displays a selectable thread list. |
| 1414 | ;; | 1404 | ;; |
| 1415 | (gdb-set-buffer-rules 'gdb-threads-buffer | 1405 | (gdb-set-buffer-rules 'gdb-threads-buffer |
| @@ -1454,7 +1444,7 @@ static char *magick[] = { | |||
| 1454 | (suppress-keymap map) | 1444 | (suppress-keymap map) |
| 1455 | (define-key map "q" 'kill-this-buffer) | 1445 | (define-key map "q" 'kill-this-buffer) |
| 1456 | (define-key map "\r" 'gdb-threads-select) | 1446 | (define-key map "\r" 'gdb-threads-select) |
| 1457 | (define-key map [mouse-2] 'gdb-threads-mouse-select) | 1447 | (define-key map [mouse-2] 'gdb-threads-select) |
| 1458 | map)) | 1448 | map)) |
| 1459 | 1449 | ||
| 1460 | (defun gdb-threads-mode () | 1450 | (defun gdb-threads-mode () |
| @@ -1474,20 +1464,15 @@ static char *magick[] = { | |||
| 1474 | (re-search-backward "^\\s-*\\([0-9]*\\)" nil t) | 1464 | (re-search-backward "^\\s-*\\([0-9]*\\)" nil t) |
| 1475 | (match-string-no-properties 1))) | 1465 | (match-string-no-properties 1))) |
| 1476 | 1466 | ||
| 1477 | (defun gdb-threads-select () | 1467 | (defun gdb-threads-select (&optional event) |
| 1478 | "Select the thread and display the relevant source." | 1468 | "Select the thread and display the relevant source." |
| 1479 | (interactive) | 1469 | (interactive (list last-input-event)) |
| 1470 | (if event (mouse-set-point event)) | ||
| 1480 | (gdb-enqueue-input | 1471 | (gdb-enqueue-input |
| 1481 | (list (concat "thread " (gdb-get-thread-number) "\n") 'ignore)) | 1472 | (list (concat "thread " (gdb-get-thread-number) "\n") 'ignore)) |
| 1482 | (gud-display-frame)) | 1473 | (gud-display-frame)) |
| 1483 | |||
| 1484 | (defun gdb-threads-mouse-select (event) | ||
| 1485 | "Select the thread you click on and display the relevant source." | ||
| 1486 | (interactive "e") | ||
| 1487 | (mouse-set-point event) | ||
| 1488 | (gdb-threads-select)) | ||
| 1489 | 1474 | ||
| 1490 | ;; | 1475 | |
| 1491 | ;; Registers buffer. | 1476 | ;; Registers buffer. |
| 1492 | ;; | 1477 | ;; |
| 1493 | (gdb-set-buffer-rules 'gdb-registers-buffer | 1478 | (gdb-set-buffer-rules 'gdb-registers-buffer |
diff --git a/lisp/simple.el b/lisp/simple.el index c54c67ea8ac..db7ae23bf41 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3183,17 +3183,17 @@ Outline mode sets this." | |||
| 3183 | (defun line-move (arg &optional noerror to-end) | 3183 | (defun line-move (arg &optional noerror to-end) |
| 3184 | (if auto-window-vscroll | 3184 | (if auto-window-vscroll |
| 3185 | (let ((forward (> arg 0)) | 3185 | (let ((forward (> arg 0)) |
| 3186 | (pvis (pos-visible-in-window-p (window-start) nil t))) | 3186 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
| 3187 | (if (and pvis (null (nth 2 pvis)) | 3187 | (if (and (consp part) |
| 3188 | (> (nth (if forward 4 3) pvis) 0)) | 3188 | (> (setq part (if forward (cdr part) (car part))) 0)) |
| 3189 | (set-window-vscroll nil | 3189 | (set-window-vscroll nil |
| 3190 | (if forward | 3190 | (if forward |
| 3191 | (+ (window-vscroll nil t) | 3191 | (+ (window-vscroll nil t) |
| 3192 | (min (nth 4 pvis) | 3192 | (min part |
| 3193 | (* (frame-char-height) arg))) | 3193 | (* (frame-char-height) arg))) |
| 3194 | (max 0 | 3194 | (max 0 |
| 3195 | (- (window-vscroll nil t) | 3195 | (- (window-vscroll nil t) |
| 3196 | (min (nth 3 pvis) | 3196 | (min part |
| 3197 | (* (frame-char-height) (- arg)))))) | 3197 | (* (frame-char-height) (- arg)))))) |
| 3198 | t) | 3198 | t) |
| 3199 | (set-window-vscroll nil 0) | 3199 | (set-window-vscroll nil 0) |
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index b2f2269c558..4646e54b4a0 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; w32-win.el --- parse switches controlling interface with W32 window system | 1 | ;;; w32-win.el --- parse switches controlling interface with W32 window system |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993, 1994, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993, 1994, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Kevin Gallo | 5 | ;; Author: Kevin Gallo |
| 6 | ;; Keywords: terminals | 6 | ;; Keywords: terminals |
| @@ -139,50 +139,26 @@ the last file dropped is selected." | |||
| 139 | "Handle SWITCH of the form \"-switch value\" or \"-switch\"." | 139 | "Handle SWITCH of the form \"-switch value\" or \"-switch\"." |
| 140 | (let ((aelt (assoc switch command-line-x-option-alist))) | 140 | (let ((aelt (assoc switch command-line-x-option-alist))) |
| 141 | (if aelt | 141 | (if aelt |
| 142 | (let ((param (nth 3 aelt)) | 142 | (push (cons (nth 3 aelt) (or (nth 4 aelt) (pop x-invocation-args))) |
| 143 | (value (nth 4 aelt))) | 143 | default-frame-alist)))) |
| 144 | (if value | ||
| 145 | (setq default-frame-alist | ||
| 146 | (cons (cons param value) | ||
| 147 | default-frame-alist)) | ||
| 148 | (setq default-frame-alist | ||
| 149 | (cons (cons param | ||
| 150 | (car x-invocation-args)) | ||
| 151 | default-frame-alist) | ||
| 152 | x-invocation-args (cdr x-invocation-args))))))) | ||
| 153 | 144 | ||
| 154 | (defun x-handle-numeric-switch (switch) | 145 | (defun x-handle-numeric-switch (switch) |
| 155 | "Handle SWITCH of the form \"-switch n\"." | 146 | "Handle SWITCH of the form \"-switch n\"." |
| 156 | (let ((aelt (assoc switch command-line-x-option-alist))) | 147 | (let ((aelt (assoc switch command-line-x-option-alist))) |
| 157 | (if aelt | 148 | (if aelt |
| 158 | (let ((param (nth 3 aelt))) | 149 | (push (cons (nth 3 aelt) (string-to-int (pop x-invocation-args))) |
| 159 | (setq default-frame-alist | 150 | default-frame-alist)))) |
| 160 | (cons (cons param | ||
| 161 | (string-to-int (car x-invocation-args))) | ||
| 162 | default-frame-alist) | ||
| 163 | x-invocation-args | ||
| 164 | (cdr x-invocation-args)))))) | ||
| 165 | 151 | ||
| 166 | ;; Handle options that apply to initial frame only | 152 | ;; Handle options that apply to initial frame only |
| 167 | (defun x-handle-initial-switch (switch) | 153 | (defun x-handle-initial-switch (switch) |
| 168 | (let ((aelt (assoc switch command-line-x-option-alist))) | 154 | (let ((aelt (assoc switch command-line-x-option-alist))) |
| 169 | (if aelt | 155 | (if aelt |
| 170 | (let ((param (nth 3 aelt)) | 156 | (push (cons (nth 3 aelt) (or (nth 4 aelt) (pop x-invocation-args))) |
| 171 | (value (nth 4 aelt))) | 157 | initial-frame-alist)))) |
| 172 | (if value | ||
| 173 | (setq initial-frame-alist | ||
| 174 | (cons (cons param value) | ||
| 175 | initial-frame-alist)) | ||
| 176 | (setq initial-frame-alist | ||
| 177 | (cons (cons param | ||
| 178 | (car x-invocation-args)) | ||
| 179 | initial-frame-alist) | ||
| 180 | x-invocation-args (cdr x-invocation-args))))))) | ||
| 181 | 158 | ||
| 182 | (defun x-handle-iconic (switch) | 159 | (defun x-handle-iconic (switch) |
| 183 | "Make \"-iconic\" SWITCH apply only to the initial frame." | 160 | "Make \"-iconic\" SWITCH apply only to the initial frame." |
| 184 | (setq initial-frame-alist | 161 | (push '(visibility . icon) initial-frame-alist)) |
| 185 | (cons '(visibility . icon) initial-frame-alist))) | ||
| 186 | 162 | ||
| 187 | (defun x-handle-xrm-switch (switch) | 163 | (defun x-handle-xrm-switch (switch) |
| 188 | "Handle the \"-xrm\" SWITCH." | 164 | "Handle the \"-xrm\" SWITCH." |
| @@ -226,18 +202,15 @@ the last file dropped is selected." | |||
| 226 | ;; to the option's operand; set the name of the initial frame, too. | 202 | ;; to the option's operand; set the name of the initial frame, too. |
| 227 | (or (consp x-invocation-args) | 203 | (or (consp x-invocation-args) |
| 228 | (error "%s: missing argument to `%s' option" (invocation-name) switch)) | 204 | (error "%s: missing argument to `%s' option" (invocation-name) switch)) |
| 229 | (setq x-resource-name (car x-invocation-args) | 205 | (setq x-resource-name (pop x-invocation-args)) |
| 230 | x-invocation-args (cdr x-invocation-args)) | 206 | (push (cons 'name x-resource-name) initial-frame-alist)) |
| 231 | (setq initial-frame-alist (cons (cons 'name x-resource-name) | ||
| 232 | initial-frame-alist))) | ||
| 233 | 207 | ||
| 234 | (defvar x-display-name nil | 208 | (defvar x-display-name nil |
| 235 | "The display name specifying server and frame.") | 209 | "The display name specifying server and frame.") |
| 236 | 210 | ||
| 237 | (defun x-handle-display (switch) | 211 | (defun x-handle-display (switch) |
| 238 | "Handle the \"-display\" SWITCH." | 212 | "Handle the \"-display\" SWITCH." |
| 239 | (setq x-display-name (car x-invocation-args) | 213 | (setq x-display-name (pop x-invocation-args))) |
| 240 | x-invocation-args (cdr x-invocation-args))) | ||
| 241 | 214 | ||
| 242 | (defun x-handle-args (args) | 215 | (defun x-handle-args (args) |
| 243 | "Process the X-related command line options in ARGS. | 216 | "Process the X-related command line options in ARGS. |
| @@ -281,7 +254,7 @@ This returns ARGS with the arguments that have been processed removed." | |||
| 281 | (cons argval x-invocation-args))) | 254 | (cons argval x-invocation-args))) |
| 282 | (funcall handler this-switch)) | 255 | (funcall handler this-switch)) |
| 283 | (funcall handler this-switch)) | 256 | (funcall handler this-switch)) |
| 284 | (setq args (cons orig-this-switch args))))) | 257 | (push orig-this-switch args)))) |
| 285 | (nconc (nreverse args) x-invocation-args)) | 258 | (nconc (nreverse args) x-invocation-args)) |
| 286 | 259 | ||
| 287 | ;; | 260 | ;; |
| @@ -1046,16 +1019,10 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") | |||
| 1046 | (defun xw-defined-colors (&optional frame) | 1019 | (defun xw-defined-colors (&optional frame) |
| 1047 | "Internal function called by `defined-colors', which see." | 1020 | "Internal function called by `defined-colors', which see." |
| 1048 | (or frame (setq frame (selected-frame))) | 1021 | (or frame (setq frame (selected-frame))) |
| 1049 | (let* ((color-map-colors (mapcar (lambda (clr) (car clr)) w32-color-map)) | 1022 | (let ((defined-colors nil)) |
| 1050 | (all-colors (or color-map-colors x-colors)) | 1023 | (dolist (this-color (or (mapcar 'car w32-color-map) x-colors)) |
| 1051 | (this-color nil) | ||
| 1052 | (defined-colors nil)) | ||
| 1053 | (message "Defining colors...") | ||
| 1054 | (while all-colors | ||
| 1055 | (setq this-color (car all-colors) | ||
| 1056 | all-colors (cdr all-colors)) | ||
| 1057 | (and (color-supported-p this-color frame t) | 1024 | (and (color-supported-p this-color frame t) |
| 1058 | (setq defined-colors (cons this-color defined-colors)))) | 1025 | (push this-color defined-colors))) |
| 1059 | defined-colors)) | 1026 | defined-colors)) |
| 1060 | 1027 | ||
| 1061 | 1028 | ||
| @@ -1077,13 +1044,10 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") | |||
| 1077 | 1044 | ||
| 1078 | ;;; Make sure we have a valid resource name. | 1045 | ;;; Make sure we have a valid resource name. |
| 1079 | (or (stringp x-resource-name) | 1046 | (or (stringp x-resource-name) |
| 1080 | (let (i) | 1047 | (setq x-resource-name |
| 1081 | (setq x-resource-name (invocation-name)) | 1048 | ;; Change any . or * characters in x-resource-name to hyphens, |
| 1082 | 1049 | ;; so as not to choke when we use it in X resource queries. | |
| 1083 | ;; Change any . or * characters in x-resource-name to hyphens, | 1050 | (replace-regexp-in-string "[.*]" "-" (invocation-name)))) |
| 1084 | ;; so as not to choke when we use it in X resource queries. | ||
| 1085 | (while (setq i (string-match "[.*]" x-resource-name)) | ||
| 1086 | (aset x-resource-name i ?-)))) | ||
| 1087 | 1051 | ||
| 1088 | ;; For the benefit of older Emacses (19.27 and earlier) that are sharing | 1052 | ;; For the benefit of older Emacses (19.27 and earlier) that are sharing |
| 1089 | ;; the same lisp directory, don't pass the third argument unless we seem | 1053 | ;; the same lisp directory, don't pass the third argument unless we seem |
| @@ -1167,21 +1131,17 @@ See the documentation of `create-fontset-from-fontset-spec for the format.") | |||
| 1167 | (setq initial-frame-alist (append initial-frame-alist parsed)) | 1131 | (setq initial-frame-alist (append initial-frame-alist parsed)) |
| 1168 | ;; The size parms apply to all frames. | 1132 | ;; The size parms apply to all frames. |
| 1169 | (if (assq 'height parsed) | 1133 | (if (assq 'height parsed) |
| 1170 | (setq default-frame-alist | 1134 | (push (cons 'height (cdr (assq 'height parsed))) |
| 1171 | (cons (cons 'height (cdr (assq 'height parsed))) | 1135 | default-frame-alist)) |
| 1172 | default-frame-alist))) | ||
| 1173 | (if (assq 'width parsed) | 1136 | (if (assq 'width parsed) |
| 1174 | (setq default-frame-alist | 1137 | (push (cons 'width (cdr (assq 'width parsed))) |
| 1175 | (cons (cons 'width (cdr (assq 'width parsed))) | 1138 | default-frame-alist))))) |
| 1176 | default-frame-alist)))))) | ||
| 1177 | 1139 | ||
| 1178 | ;; Check the reverseVideo resource. | 1140 | ;; Check the reverseVideo resource. |
| 1179 | (let ((case-fold-search t)) | 1141 | (let ((case-fold-search t)) |
| 1180 | (let ((rv (x-get-resource "reverseVideo" "ReverseVideo"))) | 1142 | (let ((rv (x-get-resource "reverseVideo" "ReverseVideo"))) |
| 1181 | (if (and rv | 1143 | (if (and rv (string-match "^\\(true\\|yes\\|on\\)$" rv)) |
| 1182 | (string-match "^\\(true\\|yes\\|on\\)$" rv)) | 1144 | (push '(reverse . t) default-frame-alist)))) |
| 1183 | (setq default-frame-alist | ||
| 1184 | (cons '(reverse . t) default-frame-alist))))) | ||
| 1185 | 1145 | ||
| 1186 | (defun x-win-suspend-error () | 1146 | (defun x-win-suspend-error () |
| 1187 | "Report an error when a suspend is attempted." | 1147 | "Report an error when a suspend is attempted." |
| @@ -1245,7 +1205,7 @@ font dialog to get the matching FONTS. Otherwise use a pop-up menu | |||
| 1245 | (and chosen-font (list chosen-font))) | 1205 | (and chosen-font (list chosen-font))) |
| 1246 | (x-popup-menu | 1206 | (x-popup-menu |
| 1247 | last-nonmenu-event | 1207 | last-nonmenu-event |
| 1248 | ;; Append list of fontsets currently defined. | 1208 | ;; Append list of fontsets currently defined. |
| 1249 | ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles | 1209 | ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles |
| 1250 | (if (fboundp 'new-fontset) | 1210 | (if (fboundp 'new-fontset) |
| 1251 | (append w32-fixed-font-alist (list (generate-fontset-menu))))))) | 1211 | (append w32-fixed-font-alist (list (generate-fontset-menu))))))) |
| @@ -1269,5 +1229,5 @@ font dialog to get the matching FONTS. Otherwise use a pop-up menu | |||
| 1269 | (tiff "libtiff3.dll" "libtiff.dll") | 1229 | (tiff "libtiff3.dll" "libtiff.dll") |
| 1270 | (gif "libungif.dll"))) | 1230 | (gif "libungif.dll"))) |
| 1271 | 1231 | ||
| 1272 | ;;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166 | 1232 | ;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166 |
| 1273 | ;;; w32-win.el ends here | 1233 | ;;; w32-win.el ends here |
diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index 60b64e9a9f2..9979f4a3e27 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; refill.el --- `auto-fill' by refilling paragraphs on changes | 1 | ;;; refill.el --- `auto-fill' by refilling paragraphs on changes |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000, 2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dave Love <fx@gnu.org> | 5 | ;; Author: Dave Love <fx@gnu.org> |
| 6 | ;; Maintainer: Miles Bader <miles@gnu.org> | 6 | ;; Maintainer: Miles Bader <miles@gnu.org> |
| @@ -85,6 +85,8 @@ | |||
| 85 | 85 | ||
| 86 | ;;; Code: | 86 | ;;; Code: |
| 87 | 87 | ||
| 88 | (eval-when-compile (require 'cl)) | ||
| 89 | |||
| 88 | (defgroup refill nil | 90 | (defgroup refill nil |
| 89 | "Refilling paragraphs on changes." | 91 | "Refilling paragraphs on changes." |
| 90 | :group 'fill) | 92 | :group 'fill) |
| @@ -169,40 +171,36 @@ complex processing.") | |||
| 169 | "Post-command function to do refilling (conditionally)." | 171 | "Post-command function to do refilling (conditionally)." |
| 170 | (when refill-doit ; there was a change | 172 | (when refill-doit ; there was a change |
| 171 | ;; There's probably scope for more special cases here... | 173 | ;; There's probably scope for more special cases here... |
| 172 | (if (eq this-command 'self-insert-command) | 174 | (case this-command |
| 173 | ;; Treat self-insertion commands specially, since they don't | 175 | (self-insert-command |
| 174 | ;; always reset `refill-doit' -- for self-insertion commands that | 176 | ;; Treat self-insertion commands specially, since they don't |
| 175 | ;; *don't* cause a refill, we want to leave it turned on so that | 177 | ;; always reset `refill-doit' -- for self-insertion commands that |
| 176 | ;; any subsequent non-modification command will cause a refill. | 178 | ;; *don't* cause a refill, we want to leave it turned on so that |
| 177 | (when (aref auto-fill-chars (char-before)) | 179 | ;; any subsequent non-modification command will cause a refill. |
| 178 | ;; Respond to the same characters as auto-fill (other than | 180 | (when (aref auto-fill-chars (char-before)) |
| 179 | ;; newline, covered below). | 181 | ;; Respond to the same characters as auto-fill (other than |
| 180 | (refill-fill-paragraph-at refill-doit) | 182 | ;; newline, covered below). |
| 181 | (setq refill-doit nil)) | 183 | (refill-fill-paragraph-at refill-doit) |
| 182 | (cond | 184 | (setq refill-doit nil))) |
| 183 | ((or (eq this-command 'quoted-insert) | 185 | ((quoted-insert fill-paragraph fill-region) nil) |
| 184 | (eq this-command 'fill-paragraph) | 186 | ((newline newline-and-indent open-line indent-new-comment-line |
| 185 | (eq this-command 'fill-region)) | 187 | reindent-then-newline-and-indent) |
| 186 | nil) | 188 | ;; Don't zap what was just inserted. |
| 187 | ((or (eq this-command 'newline) | 189 | (save-excursion |
| 188 | (eq this-command 'newline-and-indent) | 190 | (beginning-of-line) ; for newline-and-indent |
| 189 | (eq this-command 'open-line)) | 191 | (skip-chars-backward "\n") |
| 190 | ;; Don't zap what was just inserted. | 192 | (save-restriction |
| 191 | (save-excursion | 193 | (narrow-to-region (point-min) (point)) |
| 192 | (beginning-of-line) ; for newline-and-indent | 194 | (refill-fill-paragraph-at refill-doit))) |
| 193 | (skip-chars-backward "\n") | 195 | (widen) |
| 194 | (save-restriction | 196 | (save-excursion |
| 195 | (narrow-to-region (point-min) (point)) | 197 | (skip-chars-forward "\n") |
| 196 | (refill-fill-paragraph-at refill-doit))) | 198 | (save-restriction |
| 197 | (widen) | 199 | (narrow-to-region (line-beginning-position) (point-max)) |
| 198 | (save-excursion | 200 | (refill-fill-paragraph-at refill-doit)))) |
| 199 | (skip-chars-forward "\n") | 201 | (t |
| 200 | (save-restriction | 202 | (refill-fill-paragraph-at refill-doit))) |
| 201 | (narrow-to-region (line-beginning-position) (point-max)) | 203 | (setq refill-doit nil))) |
| 202 | (refill-fill-paragraph-at refill-doit)))) | ||
| 203 | (t | ||
| 204 | (refill-fill-paragraph-at refill-doit))) | ||
| 205 | (setq refill-doit nil)))) | ||
| 206 | 204 | ||
| 207 | (defun refill-pre-command-function () | 205 | (defun refill-pre-command-function () |
| 208 | "Pre-command function to do refilling (conditionally)." | 206 | "Pre-command function to do refilling (conditionally)." |
| @@ -213,7 +211,7 @@ complex processing.") | |||
| 213 | (refill-fill-paragraph-at refill-doit) | 211 | (refill-fill-paragraph-at refill-doit) |
| 214 | (setq refill-doit nil))) | 212 | (setq refill-doit nil))) |
| 215 | 213 | ||
| 216 | (defvar refill-late-fill-paragraph-function nil) | 214 | (defvar refill-saved-state nil) |
| 217 | 215 | ||
| 218 | ;;;###autoload | 216 | ;;;###autoload |
| 219 | (define-minor-mode refill-mode | 217 | (define-minor-mode refill-mode |
| @@ -228,16 +226,18 @@ refilling if they would cause auto-filling." | |||
| 228 | (when refill-ignorable-overlay | 226 | (when refill-ignorable-overlay |
| 229 | (delete-overlay refill-ignorable-overlay) | 227 | (delete-overlay refill-ignorable-overlay) |
| 230 | (kill-local-variable 'refill-ignorable-overlay)) | 228 | (kill-local-variable 'refill-ignorable-overlay)) |
| 231 | (when (local-variable-p 'refill-late-fill-paragraph-function) | 229 | (when (local-variable-p 'refill-saved-state) |
| 232 | (setq fill-paragraph-function refill-late-fill-paragraph-function) | 230 | (dolist (x refill-saved-state) |
| 233 | (kill-local-variable 'refill-late-fill-paragraph-function)) | 231 | (set (make-local-variable (car x)) (cdr x))) |
| 232 | (kill-local-variable 'refill-saved-state)) | ||
| 234 | (if refill-mode | 233 | (if refill-mode |
| 235 | (progn | 234 | (progn |
| 236 | (add-hook 'after-change-functions 'refill-after-change-function nil t) | 235 | (add-hook 'after-change-functions 'refill-after-change-function nil t) |
| 237 | (add-hook 'post-command-hook 'refill-post-command-function nil t) | 236 | (add-hook 'post-command-hook 'refill-post-command-function nil t) |
| 238 | (add-hook 'pre-command-hook 'refill-pre-command-function nil t) | 237 | (add-hook 'pre-command-hook 'refill-pre-command-function nil t) |
| 239 | (set (make-local-variable 'refill-late-fill-paragraph-function) | 238 | (set (make-local-variable 'refill-saved-state) |
| 240 | fill-paragraph-function) | 239 | (mapcar (lambda (s) (cons s (symbol-value s))) |
| 240 | '(fill-paragraph-function auto-fill-function))) | ||
| 241 | ;; This provides the test for recursive paragraph filling. | 241 | ;; This provides the test for recursive paragraph filling. |
| 242 | (set (make-local-variable 'fill-paragraph-function) | 242 | (set (make-local-variable 'fill-paragraph-function) |
| 243 | 'refill-fill-paragraph) | 243 | 'refill-fill-paragraph) |
| @@ -257,5 +257,5 @@ refilling if they would cause auto-filling." | |||
| 257 | 257 | ||
| 258 | (provide 'refill) | 258 | (provide 'refill) |
| 259 | 259 | ||
| 260 | ;;; arch-tag: 2c4ce9e8-1daa-4a3b-b6f8-fd6ac5bf6138 | 260 | ;; arch-tag: 2c4ce9e8-1daa-4a3b-b6f8-fd6ac5bf6138 |
| 261 | ;;; refill.el ends here | 261 | ;;; refill.el ends here |