help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Negative zero equals minus one?


From: Marcin Borkowski
Subject: Negative zero equals minus one?
Date: Mon, 09 Feb 2015 19:13:11 +0100

Hi there,

Emacs just made my day.

(defun print-prefix-arg (arg)
  "Print the raw prefix argument and its numeric value in the echo area."
  (interactive "P")
  (message "Raw: %s, numeric: %s." arg (prefix-numeric-value arg)))

C-u - 0 M-x print-prefix-arg

Raw: -, numeric: -1.

:-)

(It is not irrational - see simple.el, function `digit-argument' and the
comment therein.  But it's still funny.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]