Subject: bug#7281: 24.0.50; newline function inserts newline when the optional argument is 0

From: Noorul Islam K M <[email-masked]>
Date: Tue, 26 Oct 2010 10:31:46 +0530

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your report will be posted to the [email-masked] mailing list
and the gnu.emacs.bug news group, and at http://debbugs.gnu.org.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':

On emacs 23 (insert 0) returns nil and cursor stays at the place where
the function is invoked. But in the case of bzr trunk (Emacs 24) the
same function call moves the cursor one line down from the current
position.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/home/noorul/projects/emacs/trunk/etc/DEBUG.

In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
 of 2010-10-25 on noorul
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  erc-spelling-mode: t
  yas/global-mode: t
  yas/minor-mode: t
  global-company-mode: t
  company-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-_ C-_ C-_ C-_ C-_ C-_ C-_ C-_ C-_ C-_ C-_ C-_ C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> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <next> <prior> M-x 
r e p o r t - e m a c s - b u <tab> <tab> <return>

Recent messages:
Redo! [15 times]
Undo! [2 times]
Redo! [5 times]
Undo! [8 times]
undo-more: No further undo information [30 times]
Saving file /home/noorul/projects/emacs/trunk/lisp/simple.el...
Wrote /home/noorul/projects/emacs/trunk/lisp/simple.el
Mark set
Company: An error occurred in post-command
Company: Front-end company-pseudo-tooltip-unless-just-one-frontend error "Wrong type argument: number-or-marker-p, nil" on command post-command

Load-path shadows:
~/emacs.d/ledger-mode/timeclock hides /usr/local/share/emacs/site-lisp/timeclock
~/emacs.d/ledger-mode/ledger hides /usr/local/share/emacs/site-lisp/ledger
~/emacs/emacs-w3m/w3m-antenna hides /usr/local/share/emacs/site-lisp/w3m/w3m-antenna
~/emacs/emacs-w3m/w3m-bug hides /usr/local/share/emacs/site-lisp/w3m/w3m-bug
~/emacs/emacs-w3m/w3m-favicon hides /usr/local/share/emacs/site-lisp/w3m/w3m-favicon
~/emacs/emacs-w3m/w3m hides /usr/local/share/emacs/site-lisp/w3m/w3m
~/emacs/emacs-w3m/w3m-namazu hides /usr/local/share/emacs/site-lisp/w3m/w3m-namazu
~/emacs/emacs-w3m/w3m-cookie hides /usr/local/share/emacs/site-lisp/w3m/w3m-cookie
~/emacs/emacs-w3m/w3m-util hides /usr/local/share/emacs/site-lisp/w3m/w3m-util
~/emacs/emacs-w3m/w3m-proc hides /usr/local/share/emacs/site-lisp/w3m/w3m-proc
~/emacs/emacs-w3m/w3m-ems hides /usr/local/share/emacs/site-lisp/w3m/w3m-ems
~/emacs/emacs-w3m/w3m-weather hides /usr/local/share/emacs/site-lisp/w3m/w3m-weather
~/emacs/emacs-w3m/w3m-image hides /usr/local/share/emacs/site-lisp/w3m/w3m-image
~/emacs/emacs-w3m/w3m-session hides /usr/local/share/emacs/site-lisp/w3m/w3m-session
~/emacs/emacs-w3m/w3m-bookmark hides /usr/local/share/emacs/site-lisp/w3m/w3m-bookmark
~/emacs/emacs-w3m/w3m-fb hides /usr/local/share/emacs/site-lisp/w3m/w3m-fb
~/emacs/emacs-w3m/w3m-lnum hides /usr/local/share/emacs/site-lisp/w3m/w3m-lnum
~/emacs/emacs-w3m/w3m-mail hides /usr/local/share/emacs/site-lisp/w3m/w3m-mail
~/emacs/emacs-w3m/w3m-dtree hides /usr/local/share/emacs/site-lisp/w3m/w3m-dtree
~/emacs/emacs-w3m/w3m-search hides /usr/local/share/emacs/site-lisp/w3m/w3m-search
~/emacs/emacs-w3m/w3m-symbol hides /usr/local/share/emacs/site-lisp/w3m/w3m-symbol
~/emacs/emacs-w3m/w3m-hist hides /usr/local/share/emacs/site-lisp/w3m/w3m-hist
~/emacs/emacs-w3m/w3m-ccl hides /usr/local/share/emacs/site-lisp/w3m/w3m-ccl
~/emacs/emacs-w3m/w3m-filter hides /usr/local/share/emacs/site-lisp/w3m/w3m-filter
~/emacs/emacs-w3m/w3m-tabmenu hides /usr/local/share/emacs/site-lisp/w3m/w3m-tabmenu
~/emacs/emacs-w3m/w3m-perldoc hides /usr/local/share/emacs/site-lisp/w3m/w3m-perldoc
~/emacs/emacs-w3m/w3m-rss hides /usr/local/share/emacs/site-lisp/w3m/w3m-rss
~/emacs/emacs-w3m/mime-w3m hides /usr/local/share/emacs/site-lisp/w3m/mime-w3m
~/emacs/emacs-w3m/w3m-form hides /usr/local/share/emacs/site-lisp/w3m/w3m-form
~/emacs/emacs-w3m/w3m-load hides /usr/local/share/emacs/site-lisp/w3m/w3m-load
~/emacs/emacs-w3m/mew-w3m hides /usr/local/share/emacs/site-lisp/w3m/mew-w3m
~/emacs/emacs-w3m/octet hides /usr/local/share/emacs/site-lisp/w3m/octet
~/emacs/emacs-w3m/w3m-ucs hides /usr/local/share/emacs/site-lisp/w3m/w3m-ucs

Features:
(shadow sort mail-extr message sendmail rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mail-utils gmm-utils mailheader emacsbug whitespace diff-mode vc
multi-isearch vc-bzr sha1 hex-util find-func finder-inf package
emacs-config ledger-config ledger pcomplete esh-arg esh-util w3m-config
w3m browse-url doc-view jka-compr image-mode dired w3m-hist w3m-fb
w3m-ems wid-edit w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util
erc-config erc-spelling erc-goodies erc erc-backend erc-compat thingatpt
pp org-config org-google-weather format-spec google-weather xml
url-cache url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-util url-parse auth-source netrc gnus-util url-vars
mm-util mail-prsvr mailcap org-protocol org-checklist cal-china lunar
solar cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs appt
diary-lib diary-loaddefs vc-dispatcher vc-svn flyspell ispell org-wl
org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs
org-html org-exp ob-exp org-exp-blocks org-info org-gnus org-docview
org-bibtex org-bbdb org-agenda org-clock yasnippet dropdown-list derived
assoc org ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote
org-src ob-comint ob-keys ob org-list org-faces org-compat org-entities
org-macs time-date noutline outline cal-menu calendar cal-loaddefs
bbdb-config bbdb-com warnings mailabbrev bbdb timezone bbdb-autoloads
noorul-completion company-files company-oddmuse company-keywords
company-pysmell pysmell hippie-exp company-dabbrev-code company-dabbrev
company-etags etags company-gtags company-ropemacs ropemacs
company-xcode company-clang company-semantic semantic/analyze
semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base
semantic/ctxt semantic/format ezimage semantic/tag-ls
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw eieio byte-opt bytecomp byte-compile mode-local cedet
company-eclim company-css company-nxml rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
company-elisp help-mode view company easy-mmode noorul-python
anything-ipython ipython python-mode info-look info easymenu ansi-color
executable shell flymake compile comint regexp-opt pymacs noorul-c
noorul-vc-config noorul-config multi-term advice help-fns advice-preload
cl term disp-table ehelp electric ring imenu ido edmacro kmacro tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)