Commit 4a8b879b authored by Paul Eggert's avatar Paul Eggert
Browse files

Merge from mainline.

parents ba46f4d8 8889f4e2
2011-03-02 Glenn Morris <rgm@gnu.org>
* dired-x.texi (Omitting Variables): Refer to add-dir-local-variable
instead of the obsoleted dired-omit-here-always.
2011-02-28 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (Frequently Asked Questions): Add Emacs 24 to
......
......@@ -345,17 +345,8 @@ a directory local setting
@end example
@noindent
to a @file{.dir-locals.el} file in that directory.
@table @code
@findex dired-omit-here-always
@item dired-omit-here-always
This is an interactive function that creates a local variables file exactly
like the example above (if it does not already exist) in the
@code{dir-locals-file} file in the current directory and then refreshes
the directory listing.
@end table
to a @file{.dir-locals.el} file in that directory. You can use the
command @code{add-dir-local-variable} to do this.
@vindex dired-omit-files
@item dired-omit-files
......
2011-03-02 Glenn Morris <rgm@gnu.org>
* dired-x.el (dired-omit-here-always): Make it obsolete.
2011-03-02 Chong Yidong <cyd@stupidchicken.com>
* textmodes/artist.el (artist-curr-go): Default to pen-line.
(artist-select-op-pen-line): New function.
(artist-menu-map): New variable.
(artist-mode-map): Add a menu to the menu-bar.
2011-03-02 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-math.el (calcFunc-log10): Check for symbolic mode
when evaluating.
* calc/calc-units.el (math-conditional-apply, math-conditional-pow):
New function.
(math-logunits-add, math-logunits-mul, math-logunits-divide):
(math-logunits-quant, math-logunits-level):
Use `math-conditional-apply' and `math-conditional-pow' to evaluate
functions.
(math-logunits-level): Extract units from ratio.
2011-03-01 Juanma Barranquero <lekktu@gmail.com>
 
* emacs-lisp/cl-macs.el (lexical-let*): Fix argument name in docstring.
......
......@@ -1574,7 +1574,7 @@ If this can't be done, return NIL."
(if calc-infinite-mode
'(neg (var inf var-inf))
(math-reject-arg x "*Logarithm of zero")))
;;(calc-symbolic-mode (signal 'inexact-result nil))
(calc-symbolic-mode (signal 'inexact-result nil))
((Math-numberp x)
(math-with-extra-prec 2
(let ((xf (math-float x)))
......
......@@ -1559,6 +1559,20 @@ If EXPR is nil, return nil."
(defvar math-logunits '((var dB var-dB)
(var Np var-Np)))
(defun math-conditional-apply (fn &rest args)
"Evaluate f(args) unless in symbolic mode.
In symbolic mode, return the list (fn args)."
(if calc-symbolic-mode
(cons fn args)
(apply fn args)))
(defun math-conditional-pow (a b)
"Evaluate a^b unless in symbolic mode.
In symbolic mode, return the list (^ a b)."
(if calc-symbolic-mode
(list '^ a b)
(math-pow a b)))
(defun math-extract-logunits (expr)
(if (memq (car-safe expr) '(* /))
(cons (car expr)
......@@ -1585,24 +1599,24 @@ If EXPR is nil, return nil."
(if (equal aunit '(var dB var-dB))
(let ((coef (if power 10 20)))
(math-mul coef
(calcFunc-log10
(math-conditional-apply 'calcFunc-log10
(if neg
(math-sub
(math-pow 10 (math-div acoeff coef))
(math-pow 10 (math-div bcoeff coef)))
(math-conditional-pow 10 (math-div acoeff coef))
(math-conditional-pow 10 (math-div bcoeff coef)))
(math-add
(math-pow 10 (math-div acoeff coef))
(math-pow 10 (math-div bcoeff coef)))))))
(math-conditional-pow 10 (math-div acoeff coef))
(math-conditional-pow 10 (math-div bcoeff coef)))))))
(let ((coef (if power 2 1)))
(math-div
(calcFunc-ln
(math-conditional-apply 'calcFunc-ln
(if neg
(math-sub
(calcFunc-exp (math-mul coef acoeff))
(calcFunc-exp (math-mul coef bcoeff)))
(math-conditional-apply 'calcFunc-exp (math-mul coef acoeff))
(math-conditional-apply 'calcFunc-exp (math-mul coef bcoeff)))
(math-add
(calcFunc-exp (math-mul coef acoeff))
(calcFunc-exp (math-mul coef bcoeff)))))
(math-conditional-apply 'calcFunc-exp (math-mul coef acoeff))
(math-conditional-apply 'calcFunc-exp (math-mul coef bcoeff)))))
coef)))
units)))))))
......@@ -1666,14 +1680,14 @@ If EXPR is nil, return nil."
(math-add
coef
(math-mul (if power 10 20)
(calcFunc-log10 number)))
(math-conditional-apply 'calcFunc-log10 number)))
units)))
(t
(math-simplify
(math-mul
(math-add
coef
(math-div (calcFunc-ln number) (if power 2 1)))
(math-div (math-conditional-apply 'calcFunc-ln number) (if power 2 1)))
units))))
(calc-record-why "*Improper units" nil))))
......@@ -1692,14 +1706,14 @@ If EXPR is nil, return nil."
(math-sub
coef
(math-mul (if power 10 20)
(calcFunc-log10 b)))
(math-conditional-apply 'calcFunc-log10 b)))
units)))
(t
(math-simplify
(math-mul
(math-sub
coef
(math-div (calcFunc-ln b) (if power 2 1)))
(math-div (math-conditional-apply 'calcFunc-ln b) (if power 2 1)))
units)))))))))
(defun calcFunc-lufieldtimes (a b)
......@@ -1747,14 +1761,14 @@ If EXPR is nil, return nil."
(if (equal lunit '(var dB var-dB))
(math-mul
ref
(math-pow
(math-conditional-pow
10
(math-div
coeff
(if power 10 20))))
(math-mul
ref
(calcFunc-exp
(math-conditional-apply 'calcFunc-exp
(if power
(math-mul 2 coeff)
coeff))))
......@@ -1787,15 +1801,16 @@ If EXPR is nil, return nil."
(defun math-logunits-level (val ref db power)
"Compute the value of VAL in decibels or nepers."
(let* ((ratio (math-simplify-units (math-div val ref)))
(ratiou (math-simplify-units (math-remove-units ratio)))
(units (math-simplify (math-extract-units ratio))))
(math-mul
(if db
(math-mul
(math-mul (if power 10 20)
(calcFunc-log10 ratio))
(math-conditional-apply 'calcFunc-log10 ratiou))
'(var dB var-dB))
(math-mul
(math-div (calcFunc-ln ratio) (if power 2 1))
(math-div (math-conditional-apply 'calcFunc-ln ratiou) (if power 2 1))
'(var Np var-Np)))
units)))
......
......@@ -785,7 +785,7 @@ See also `dired-enable-local-variables'."
(make-obsolete 'dired-hack-local-variables
'hack-dir-local-variables-non-file-buffer "24.1")
;; Not sure this is worth having a dedicated command for...
;; Does not seem worth a dedicated command.
;; See the more general features in files-x.el.
(defun dired-omit-here-always ()
"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'"
(dired-extra-startup)
(dired-revert))))
(make-obsolete 'dired-omit-here-always 'add-dir-local-variable "24.1")
;;; GUESS SHELL COMMAND.
......
......@@ -422,7 +422,7 @@ be in `artist-spray-chars', or spraying will behave strangely.")
(defvar artist-mode-name " Artist"
"Name of Artist mode beginning with a space (appears in the mode-line).")
(defvar artist-curr-go 'pen-char
(defvar artist-curr-go 'pen-line
"Current selected graphics operation.")
(make-variable-buffer-local 'artist-curr-go)
......@@ -502,6 +502,49 @@ This variable is initialized by the `artist-make-prev-next-op-alist' function.")
(defvar artist-arrow-point-1 nil)
(defvar artist-arrow-point-2 nil)
(defvar artist-menu-map
(let ((map (make-sparse-keymap)))
(define-key map [spray-chars]
'(menu-item "Characters for Spray" artist-select-spray-chars
:help "Choose characters for sprayed by the spray-can"))
(define-key map [borders]
'(menu-item "Draw Shape Borders" artist-toggle-borderless-shapes
:help "Toggle whether shapes are drawn with borders"
:button (:toggle . (not artist-borderless-shapes))))
(define-key map [trimming]
'(menu-item "Trim Line Endings" artist-toggle-trim-line-endings
:help "Toggle trimming of line-endings"
:button (:toggle . artist-trim-line-endings)))
(define-key map [rubber-band]
'(menu-item "Rubber-banding" artist-toggle-rubber-banding
:help "Toggle rubber-banding"
:button (:toggle . artist-rubber-banding)))
(define-key map [set-erase]
'(menu-item "Character to Erase..." artist-select-erase-char
:help "Choose a specific character to erase"))
(define-key map [set-line]
'(menu-item "Character for Line..." artist-select-line-char
:help "Choose the character to insert when drawing lines"))
(define-key map [set-fill]
'(menu-item "Character for Fill..." artist-select-fill-char
:help "Choose the character to insert when filling in shapes"))
(define-key map [artist-separator] '(menu-item "--"))
(dolist (op '(("Vaporize" artist-select-op-vaporize-lines vaporize-lines)
("Erase" artist-select-op-erase-rectangle erase-rect)
("Spray-can" artist-select-op-spray-set-size spray-get-size)
("Text" artist-select-op-text-overwrite text-ovwrt)
("Ellipse" artist-select-op-circle circle)
("Poly-line" artist-select-op-straight-poly-line spolyline)
("Rectangle" artist-select-op-square square)
("Line" artist-select-op-straight-line s-line)
("Pen" artist-select-op-pen-line pen-line)))
(define-key map (vector (nth 2 op))
`(menu-item ,(nth 0 op)
,(nth 1 op)
:help ,(format "Draw using the %s style" (nth 0 op))
:button (:radio . (eq artist-curr-go ',(nth 2 op))))))
map))
(defvar artist-mode-map
(let ((map (make-sparse-keymap)))
(setq artist-mode-map (make-sparse-keymap))
......@@ -554,6 +597,7 @@ This variable is initialized by the `artist-make-prev-next-op-alist' function.")
(define-key map "\C-c\C-a\C-y" 'artist-select-op-paste)
(define-key map "\C-c\C-af" 'artist-select-op-flood-fill)
(define-key map "\C-c\C-a\C-b" 'artist-submit-bug-report)
(define-key map [menu-bar artist] (cons "Artist" artist-menu-map))
map)
"Keymap for `artist-minor-mode'.")
......@@ -4601,6 +4645,10 @@ If optional argument STATE is positive, turn borders on."
(artist-arrow-point-set-state artist-arrow-point-2 new-state)))))
(defun artist-select-op-pen-line ()
"Select drawing pen lines."
(interactive)
(artist-select-operation "Pen Line"))
(defun artist-select-op-line ()
"Select drawing lines."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment