diff options
| author | Paul Eggert | 2011-03-01 20:40:07 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-01 20:40:07 -0800 |
| commit | 4a8b879b87962d5f37c05d3650f43cc571b22bc7 (patch) | |
| tree | 781d1cf60e3e49c820ffc7c8121dd5e7f9c86760 | |
| parent | ba46f4d85a6938273f52a8cdf7e09d9afee61d7f (diff) | |
| parent | 8889f4e2c332b0ecedc9e6088252f4cbae301236 (diff) | |
| download | emacs-4a8b879b87962d5f37c05d3650f43cc571b22bc7.tar.gz emacs-4a8b879b87962d5f37c05d3650f43cc571b22bc7.zip | |
Merge from mainline.
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/dired-x.texi | 13 | ||||
| -rw-r--r-- | lisp/ChangeLog | 24 | ||||
| -rw-r--r-- | lisp/calc/calc-math.el | 2 | ||||
| -rw-r--r-- | lisp/calc/calc-units.el | 51 | ||||
| -rw-r--r-- | lisp/dired-x.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/artist.el | 50 |
7 files changed, 117 insertions, 32 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 2ce67bad6cb..47ae7ee3842 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-03-02 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * dired-x.texi (Omitting Variables): Refer to add-dir-local-variable | ||
| 4 | instead of the obsoleted dired-omit-here-always. | ||
| 5 | |||
| 1 | 2011-02-28 Michael Albinus <michael.albinus@gmx.de> | 6 | 2011-02-28 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * tramp.texi (Frequently Asked Questions): Add Emacs 24 to | 8 | * tramp.texi (Frequently Asked Questions): Add Emacs 24 to |
diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index cde39ff6a62..dba99d9c6c7 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi | |||
| @@ -345,17 +345,8 @@ a directory local setting | |||
| 345 | @end example | 345 | @end example |
| 346 | 346 | ||
| 347 | @noindent | 347 | @noindent |
| 348 | to a @file{.dir-locals.el} file in that directory. | 348 | to a @file{.dir-locals.el} file in that directory. You can use the |
| 349 | 349 | command @code{add-dir-local-variable} to do this. | |
| 350 | @table @code | ||
| 351 | @findex dired-omit-here-always | ||
| 352 | @item dired-omit-here-always | ||
| 353 | |||
| 354 | This is an interactive function that creates a local variables file exactly | ||
| 355 | like the example above (if it does not already exist) in the | ||
| 356 | @code{dir-locals-file} file in the current directory and then refreshes | ||
| 357 | the directory listing. | ||
| 358 | @end table | ||
| 359 | 350 | ||
| 360 | @vindex dired-omit-files | 351 | @vindex dired-omit-files |
| 361 | @item dired-omit-files | 352 | @item dired-omit-files |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8d891b22fd0..1f1dbf69fe5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2011-03-02 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * dired-x.el (dired-omit-here-always): Make it obsolete. | ||
| 4 | |||
| 5 | 2011-03-02 Chong Yidong <cyd@stupidchicken.com> | ||
| 6 | |||
| 7 | * textmodes/artist.el (artist-curr-go): Default to pen-line. | ||
| 8 | (artist-select-op-pen-line): New function. | ||
| 9 | (artist-menu-map): New variable. | ||
| 10 | (artist-mode-map): Add a menu to the menu-bar. | ||
| 11 | |||
| 12 | 2011-03-02 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 13 | |||
| 14 | * calc/calc-math.el (calcFunc-log10): Check for symbolic mode | ||
| 15 | when evaluating. | ||
| 16 | |||
| 17 | * calc/calc-units.el (math-conditional-apply, math-conditional-pow): | ||
| 18 | New function. | ||
| 19 | (math-logunits-add, math-logunits-mul, math-logunits-divide): | ||
| 20 | (math-logunits-quant, math-logunits-level): | ||
| 21 | Use `math-conditional-apply' and `math-conditional-pow' to evaluate | ||
| 22 | functions. | ||
| 23 | (math-logunits-level): Extract units from ratio. | ||
| 24 | |||
| 1 | 2011-03-01 Juanma Barranquero <lekktu@gmail.com> | 25 | 2011-03-01 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 26 | ||
| 3 | * emacs-lisp/cl-macs.el (lexical-let*): Fix argument name in docstring. | 27 | * emacs-lisp/cl-macs.el (lexical-let*): Fix argument name in docstring. |
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index 92af9263b28..076dab31fd9 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el | |||
| @@ -1574,7 +1574,7 @@ If this can't be done, return NIL." | |||
| 1574 | (if calc-infinite-mode | 1574 | (if calc-infinite-mode |
| 1575 | '(neg (var inf var-inf)) | 1575 | '(neg (var inf var-inf)) |
| 1576 | (math-reject-arg x "*Logarithm of zero"))) | 1576 | (math-reject-arg x "*Logarithm of zero"))) |
| 1577 | ;;(calc-symbolic-mode (signal 'inexact-result nil)) | 1577 | (calc-symbolic-mode (signal 'inexact-result nil)) |
| 1578 | ((Math-numberp x) | 1578 | ((Math-numberp x) |
| 1579 | (math-with-extra-prec 2 | 1579 | (math-with-extra-prec 2 |
| 1580 | (let ((xf (math-float x))) | 1580 | (let ((xf (math-float x))) |
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 569d5d3dc35..e6a6fb01132 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el | |||
| @@ -1559,6 +1559,20 @@ If EXPR is nil, return nil." | |||
| 1559 | (defvar math-logunits '((var dB var-dB) | 1559 | (defvar math-logunits '((var dB var-dB) |
| 1560 | (var Np var-Np))) | 1560 | (var Np var-Np))) |
| 1561 | 1561 | ||
| 1562 | (defun math-conditional-apply (fn &rest args) | ||
| 1563 | "Evaluate f(args) unless in symbolic mode. | ||
| 1564 | In symbolic mode, return the list (fn args)." | ||
| 1565 | (if calc-symbolic-mode | ||
| 1566 | (cons fn args) | ||
| 1567 | (apply fn args))) | ||
| 1568 | |||
| 1569 | (defun math-conditional-pow (a b) | ||
| 1570 | "Evaluate a^b unless in symbolic mode. | ||
| 1571 | In symbolic mode, return the list (^ a b)." | ||
| 1572 | (if calc-symbolic-mode | ||
| 1573 | (list '^ a b) | ||
| 1574 | (math-pow a b))) | ||
| 1575 | |||
| 1562 | (defun math-extract-logunits (expr) | 1576 | (defun math-extract-logunits (expr) |
| 1563 | (if (memq (car-safe expr) '(* /)) | 1577 | (if (memq (car-safe expr) '(* /)) |
| 1564 | (cons (car expr) | 1578 | (cons (car expr) |
| @@ -1585,24 +1599,24 @@ If EXPR is nil, return nil." | |||
| 1585 | (if (equal aunit '(var dB var-dB)) | 1599 | (if (equal aunit '(var dB var-dB)) |
| 1586 | (let ((coef (if power 10 20))) | 1600 | (let ((coef (if power 10 20))) |
| 1587 | (math-mul coef | 1601 | (math-mul coef |
| 1588 | (calcFunc-log10 | 1602 | (math-conditional-apply 'calcFunc-log10 |
| 1589 | (if neg | 1603 | (if neg |
| 1590 | (math-sub | 1604 | (math-sub |
| 1591 | (math-pow 10 (math-div acoeff coef)) | 1605 | (math-conditional-pow 10 (math-div acoeff coef)) |
| 1592 | (math-pow 10 (math-div bcoeff coef))) | 1606 | (math-conditional-pow 10 (math-div bcoeff coef))) |
| 1593 | (math-add | 1607 | (math-add |
| 1594 | (math-pow 10 (math-div acoeff coef)) | 1608 | (math-conditional-pow 10 (math-div acoeff coef)) |
| 1595 | (math-pow 10 (math-div bcoeff coef))))))) | 1609 | (math-conditional-pow 10 (math-div bcoeff coef))))))) |
| 1596 | (let ((coef (if power 2 1))) | 1610 | (let ((coef (if power 2 1))) |
| 1597 | (math-div | 1611 | (math-div |
| 1598 | (calcFunc-ln | 1612 | (math-conditional-apply 'calcFunc-ln |
| 1599 | (if neg | 1613 | (if neg |
| 1600 | (math-sub | 1614 | (math-sub |
| 1601 | (calcFunc-exp (math-mul coef acoeff)) | 1615 | (math-conditional-apply 'calcFunc-exp (math-mul coef acoeff)) |
| 1602 | (calcFunc-exp (math-mul coef bcoeff))) | 1616 | (math-conditional-apply 'calcFunc-exp (math-mul coef bcoeff))) |
| 1603 | (math-add | 1617 | (math-add |
| 1604 | (calcFunc-exp (math-mul coef acoeff)) | 1618 | (math-conditional-apply 'calcFunc-exp (math-mul coef acoeff)) |
| 1605 | (calcFunc-exp (math-mul coef bcoeff))))) | 1619 | (math-conditional-apply 'calcFunc-exp (math-mul coef bcoeff))))) |
| 1606 | coef))) | 1620 | coef))) |
| 1607 | units))))))) | 1621 | units))))))) |
| 1608 | 1622 | ||
| @@ -1666,14 +1680,14 @@ If EXPR is nil, return nil." | |||
| 1666 | (math-add | 1680 | (math-add |
| 1667 | coef | 1681 | coef |
| 1668 | (math-mul (if power 10 20) | 1682 | (math-mul (if power 10 20) |
| 1669 | (calcFunc-log10 number))) | 1683 | (math-conditional-apply 'calcFunc-log10 number))) |
| 1670 | units))) | 1684 | units))) |
| 1671 | (t | 1685 | (t |
| 1672 | (math-simplify | 1686 | (math-simplify |
| 1673 | (math-mul | 1687 | (math-mul |
| 1674 | (math-add | 1688 | (math-add |
| 1675 | coef | 1689 | coef |
| 1676 | (math-div (calcFunc-ln number) (if power 2 1))) | 1690 | (math-div (math-conditional-apply 'calcFunc-ln number) (if power 2 1))) |
| 1677 | units)))) | 1691 | units)))) |
| 1678 | (calc-record-why "*Improper units" nil)))) | 1692 | (calc-record-why "*Improper units" nil)))) |
| 1679 | 1693 | ||
| @@ -1692,14 +1706,14 @@ If EXPR is nil, return nil." | |||
| 1692 | (math-sub | 1706 | (math-sub |
| 1693 | coef | 1707 | coef |
| 1694 | (math-mul (if power 10 20) | 1708 | (math-mul (if power 10 20) |
| 1695 | (calcFunc-log10 b))) | 1709 | (math-conditional-apply 'calcFunc-log10 b))) |
| 1696 | units))) | 1710 | units))) |
| 1697 | (t | 1711 | (t |
| 1698 | (math-simplify | 1712 | (math-simplify |
| 1699 | (math-mul | 1713 | (math-mul |
| 1700 | (math-sub | 1714 | (math-sub |
| 1701 | coef | 1715 | coef |
| 1702 | (math-div (calcFunc-ln b) (if power 2 1))) | 1716 | (math-div (math-conditional-apply 'calcFunc-ln b) (if power 2 1))) |
| 1703 | units))))))))) | 1717 | units))))))))) |
| 1704 | 1718 | ||
| 1705 | (defun calcFunc-lufieldtimes (a b) | 1719 | (defun calcFunc-lufieldtimes (a b) |
| @@ -1747,14 +1761,14 @@ If EXPR is nil, return nil." | |||
| 1747 | (if (equal lunit '(var dB var-dB)) | 1761 | (if (equal lunit '(var dB var-dB)) |
| 1748 | (math-mul | 1762 | (math-mul |
| 1749 | ref | 1763 | ref |
| 1750 | (math-pow | 1764 | (math-conditional-pow |
| 1751 | 10 | 1765 | 10 |
| 1752 | (math-div | 1766 | (math-div |
| 1753 | coeff | 1767 | coeff |
| 1754 | (if power 10 20)))) | 1768 | (if power 10 20)))) |
| 1755 | (math-mul | 1769 | (math-mul |
| 1756 | ref | 1770 | ref |
| 1757 | (calcFunc-exp | 1771 | (math-conditional-apply 'calcFunc-exp |
| 1758 | (if power | 1772 | (if power |
| 1759 | (math-mul 2 coeff) | 1773 | (math-mul 2 coeff) |
| 1760 | coeff)))) | 1774 | coeff)))) |
| @@ -1787,15 +1801,16 @@ If EXPR is nil, return nil." | |||
| 1787 | (defun math-logunits-level (val ref db power) | 1801 | (defun math-logunits-level (val ref db power) |
| 1788 | "Compute the value of VAL in decibels or nepers." | 1802 | "Compute the value of VAL in decibels or nepers." |
| 1789 | (let* ((ratio (math-simplify-units (math-div val ref))) | 1803 | (let* ((ratio (math-simplify-units (math-div val ref))) |
| 1804 | (ratiou (math-simplify-units (math-remove-units ratio))) | ||
| 1790 | (units (math-simplify (math-extract-units ratio)))) | 1805 | (units (math-simplify (math-extract-units ratio)))) |
| 1791 | (math-mul | 1806 | (math-mul |
| 1792 | (if db | 1807 | (if db |
| 1793 | (math-mul | 1808 | (math-mul |
| 1794 | (math-mul (if power 10 20) | 1809 | (math-mul (if power 10 20) |
| 1795 | (calcFunc-log10 ratio)) | 1810 | (math-conditional-apply 'calcFunc-log10 ratiou)) |
| 1796 | '(var dB var-dB)) | 1811 | '(var dB var-dB)) |
| 1797 | (math-mul | 1812 | (math-mul |
| 1798 | (math-div (calcFunc-ln ratio) (if power 2 1)) | 1813 | (math-div (math-conditional-apply 'calcFunc-ln ratiou) (if power 2 1)) |
| 1799 | '(var Np var-Np))) | 1814 | '(var Np var-Np))) |
| 1800 | units))) | 1815 | units))) |
| 1801 | 1816 | ||
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 9941c7a0db5..81f77b48289 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -785,7 +785,7 @@ See also `dired-enable-local-variables'." | |||
| 785 | (make-obsolete 'dired-hack-local-variables | 785 | (make-obsolete 'dired-hack-local-variables |
| 786 | 'hack-dir-local-variables-non-file-buffer "24.1") | 786 | 'hack-dir-local-variables-non-file-buffer "24.1") |
| 787 | 787 | ||
| 788 | ;; Not sure this is worth having a dedicated command for... | 788 | ;; Does not seem worth a dedicated command. |
| 789 | ;; See the more general features in files-x.el. | 789 | ;; See the more general features in files-x.el. |
| 790 | (defun dired-omit-here-always () | 790 | (defun dired-omit-here-always () |
| 791 | "Create `dir-locals-file' setting `dired-omit-mode' to t in `dired-mode'. | 791 | "Create `dir-locals-file' setting `dired-omit-mode' to t in `dired-mode'. |
| @@ -809,6 +809,8 @@ replace it with a dir-locals-file `./%s'" | |||
| 809 | (dired-extra-startup) | 809 | (dired-extra-startup) |
| 810 | (dired-revert)))) | 810 | (dired-revert)))) |
| 811 | 811 | ||
| 812 | (make-obsolete 'dired-omit-here-always 'add-dir-local-variable "24.1") | ||
| 813 | |||
| 812 | 814 | ||
| 813 | ;;; GUESS SHELL COMMAND. | 815 | ;;; GUESS SHELL COMMAND. |
| 814 | 816 | ||
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index f1e73dcf480..5fbc8a643d8 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el | |||
| @@ -422,7 +422,7 @@ be in `artist-spray-chars', or spraying will behave strangely.") | |||
| 422 | (defvar artist-mode-name " Artist" | 422 | (defvar artist-mode-name " Artist" |
| 423 | "Name of Artist mode beginning with a space (appears in the mode-line).") | 423 | "Name of Artist mode beginning with a space (appears in the mode-line).") |
| 424 | 424 | ||
| 425 | (defvar artist-curr-go 'pen-char | 425 | (defvar artist-curr-go 'pen-line |
| 426 | "Current selected graphics operation.") | 426 | "Current selected graphics operation.") |
| 427 | (make-variable-buffer-local 'artist-curr-go) | 427 | (make-variable-buffer-local 'artist-curr-go) |
| 428 | 428 | ||
| @@ -502,6 +502,49 @@ This variable is initialized by the `artist-make-prev-next-op-alist' function.") | |||
| 502 | (defvar artist-arrow-point-1 nil) | 502 | (defvar artist-arrow-point-1 nil) |
| 503 | (defvar artist-arrow-point-2 nil) | 503 | (defvar artist-arrow-point-2 nil) |
| 504 | 504 | ||
| 505 | (defvar artist-menu-map | ||
| 506 | (let ((map (make-sparse-keymap))) | ||
| 507 | (define-key map [spray-chars] | ||
| 508 | '(menu-item "Characters for Spray" artist-select-spray-chars | ||
| 509 | :help "Choose characters for sprayed by the spray-can")) | ||
| 510 | (define-key map [borders] | ||
| 511 | '(menu-item "Draw Shape Borders" artist-toggle-borderless-shapes | ||
| 512 | :help "Toggle whether shapes are drawn with borders" | ||
| 513 | :button (:toggle . (not artist-borderless-shapes)))) | ||
| 514 | (define-key map [trimming] | ||
| 515 | '(menu-item "Trim Line Endings" artist-toggle-trim-line-endings | ||
| 516 | :help "Toggle trimming of line-endings" | ||
| 517 | :button (:toggle . artist-trim-line-endings))) | ||
| 518 | (define-key map [rubber-band] | ||
| 519 | '(menu-item "Rubber-banding" artist-toggle-rubber-banding | ||
| 520 | :help "Toggle rubber-banding" | ||
| 521 | :button (:toggle . artist-rubber-banding))) | ||
| 522 | (define-key map [set-erase] | ||
| 523 | '(menu-item "Character to Erase..." artist-select-erase-char | ||
| 524 | :help "Choose a specific character to erase")) | ||
| 525 | (define-key map [set-line] | ||
| 526 | '(menu-item "Character for Line..." artist-select-line-char | ||
| 527 | :help "Choose the character to insert when drawing lines")) | ||
| 528 | (define-key map [set-fill] | ||
| 529 | '(menu-item "Character for Fill..." artist-select-fill-char | ||
| 530 | :help "Choose the character to insert when filling in shapes")) | ||
| 531 | (define-key map [artist-separator] '(menu-item "--")) | ||
| 532 | (dolist (op '(("Vaporize" artist-select-op-vaporize-lines vaporize-lines) | ||
| 533 | ("Erase" artist-select-op-erase-rectangle erase-rect) | ||
| 534 | ("Spray-can" artist-select-op-spray-set-size spray-get-size) | ||
| 535 | ("Text" artist-select-op-text-overwrite text-ovwrt) | ||
| 536 | ("Ellipse" artist-select-op-circle circle) | ||
| 537 | ("Poly-line" artist-select-op-straight-poly-line spolyline) | ||
| 538 | ("Rectangle" artist-select-op-square square) | ||
| 539 | ("Line" artist-select-op-straight-line s-line) | ||
| 540 | ("Pen" artist-select-op-pen-line pen-line))) | ||
| 541 | (define-key map (vector (nth 2 op)) | ||
| 542 | `(menu-item ,(nth 0 op) | ||
| 543 | ,(nth 1 op) | ||
| 544 | :help ,(format "Draw using the %s style" (nth 0 op)) | ||
| 545 | :button (:radio . (eq artist-curr-go ',(nth 2 op)))))) | ||
| 546 | map)) | ||
| 547 | |||
| 505 | (defvar artist-mode-map | 548 | (defvar artist-mode-map |
| 506 | (let ((map (make-sparse-keymap))) | 549 | (let ((map (make-sparse-keymap))) |
| 507 | (setq artist-mode-map (make-sparse-keymap)) | 550 | (setq artist-mode-map (make-sparse-keymap)) |
| @@ -554,6 +597,7 @@ This variable is initialized by the `artist-make-prev-next-op-alist' function.") | |||
| 554 | (define-key map "\C-c\C-a\C-y" 'artist-select-op-paste) | 597 | (define-key map "\C-c\C-a\C-y" 'artist-select-op-paste) |
| 555 | (define-key map "\C-c\C-af" 'artist-select-op-flood-fill) | 598 | (define-key map "\C-c\C-af" 'artist-select-op-flood-fill) |
| 556 | (define-key map "\C-c\C-a\C-b" 'artist-submit-bug-report) | 599 | (define-key map "\C-c\C-a\C-b" 'artist-submit-bug-report) |
| 600 | (define-key map [menu-bar artist] (cons "Artist" artist-menu-map)) | ||
| 557 | map) | 601 | map) |
| 558 | "Keymap for `artist-minor-mode'.") | 602 | "Keymap for `artist-minor-mode'.") |
| 559 | 603 | ||
| @@ -4601,6 +4645,10 @@ If optional argument STATE is positive, turn borders on." | |||
| 4601 | 4645 | ||
| 4602 | (artist-arrow-point-set-state artist-arrow-point-2 new-state))))) | 4646 | (artist-arrow-point-set-state artist-arrow-point-2 new-state))))) |
| 4603 | 4647 | ||
| 4648 | (defun artist-select-op-pen-line () | ||
| 4649 | "Select drawing pen lines." | ||
| 4650 | (interactive) | ||
| 4651 | (artist-select-operation "Pen Line")) | ||
| 4604 | 4652 | ||
| 4605 | (defun artist-select-op-line () | 4653 | (defun artist-select-op-line () |
| 4606 | "Select drawing lines." | 4654 | "Select drawing lines." |