unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26089: 25.1; Faulty documentation for skeleton-end-newline
@ 2017-03-13 19:11 David Casperson
  2019-07-26 12:09 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: David Casperson @ 2017-03-13 19:11 UTC (permalink / raw)
  To: 26089

[-- Attachment #1: Type: TEXT/PLAIN, Size: 9065 bytes --]

The documentation for skeleton-end-newline says:

"...This just influences the way the default `skeleton-end-hook' behaves."

but in fact skeleton-end-newline is used in
 	(or (eolp) (not skeleton-end-newline) (newline-and-indent))
in the function `skeleton-insert’ OUTSIDE of skeleton-end-hook (which
is, by default nil).

To witness behaviour contrary to the documentation, run latex-mode and
call M-x latex-insert-block itemize with the cursor at the beginning of
a non empty line.  There will be a blank line after the \end{itemize}.
This differs from previous emacs versions.




In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 
10.9.5 (Build 13F1911))
  of 2016-09-20 built on builder10-9.porkrind.org
Windowing system distributor 'Apple', version 10.3.1265
Configured using:
  'configure --with-ns '--enable-locallisppath=/Library/Application
  Support/Emacs/${version}/site-lisp:/Library/Application
  Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Important settings:
   value of $LANG: en_CA.UTF-8
   locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
   diff-auto-refine-mode: t
   desktop-save-mode: t
   shell-dirtrack-mode: t
   msb-mode: t
   global-auto-complete-mode: t
   auto-complete-mode: t
   global-eclim-mode: t
   server-mode: t
   tooltip-mode: t
   global-eldoc-mode: t
   eldoc-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-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
   temp-buffer-resize-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent messages:
Auto-saving...
Type C-x 1 to delete the help window, C-M-v to scroll help.
  [2 times]
Mark set
Mark saved where search started
Making completion list... [2 times]

Making completion list... [3 times]

Scanning for dabbrevs...done

Load-path shadows:
/Users/casper/Library/emacs/lisp/progmodes/Prolog/bruda/prolog hides 
/Applications/Emacs.app/Contents/Resources/lisp/progmodes/prolog
/Applications/Emacs.app/Contents/Resources/lisp/uniquify hides 
/Users/casper/Library/emacs/lisp/Files/uniquify
/Applications/Emacs.app/Contents/Resources/lisp/files hides 
/Users/casper/Library/emacs/lisp/Files/files
/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/rx hides 
/Users/casper/Library/emacs/lisp/Regexps/rx
/Users/casper/Library/emacs/lisp/Files/temp2 hides 
/Users/casper/Library/emacs/lisp/Scratch Work/temp2
/Users/casper/Library/emacs/lisp/TeX/one-sentence-regions hides 
/Users/casper/Library/emacs/lisp/Tweaks/one-sentence-regions
/Users/casper/Library/emacs/lisp/aldor-hooks hides 
/Users/casper/Library/emacs/lisp/progmodes/aldor-hooks
/Users/casper/Library/emacs/lisp/Dired/dired-smart-view hides 
/Users/casper/Library/emacs/lisp/Dired/in-progress/dired-smart-view
/Users/casper/Library/emacs/lisp/Dired/dired-after-readin-overlay hides 
/Users/casper/Library/emacs/lisp/Dired/in-progress/dired-after-readin-overlay
/Users/casper/Library/emacs/lisp/Dired/dired-hide-dot-files hides 
/Users/casper/Library/emacs/lisp/Dired/obsolete/dired-hide-dot-files
/Users/casper/Library/emacs/lisp/File-Trees/the-start-of-home-everything-2 
hides 
/Users/casper/Library/emacs/lisp/File-Trees/Everything/the-start-of-home-everything-2
/Users/casper/Library/emacs/lisp/progmodes/C/c-cut-region-to-file hides 
/Users/casper/Library/emacs/lisp/progmodes/C++/c-cut-region-to-file
/Users/casper/Library/emacs/lisp/progmodes/eiffel-mode hides 
/Users/casper/Library/emacs/lisp/progmodes/Eiffel/eiffel-mode
/Applications/Emacs.app/Contents/Resources/lisp/progmodes/ruby-mode hides 
/Users/casper/Library/emacs/lisp/progmodes/Ruby/ruby-mode
/Users/casper/Library/emacs/lisp/progmodes/C/c-cut-region-to-file hides 
/Users/casper/Library/emacs/lisp/progmodes/c-common/c-cut-region-to-file

Features:
(shadow mail-extr emacsbug sendmail sort reftex-cite
kill-some-buffers-subtree descr-text warnings vc dired-hide-dot-files
pcmpl-unix conf-mode magit-wash-hunk-fix tar-mode novice haskell-todo
tools haskell-complete-module-name with-file-buffer nxml-uchnm rng-xsd
xsd-regexp rng-cmpct 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 geiser-mode
geiser-xref geiser-racket geiser-guile geiser-repl geiser-image
geiser-doc geiser-compile geiser-debug geiser-menu geiser-company
geiser-autodoc info-look geiser geiser-edit geiser-completion
geiser-eval geiser-connection tq geiser-syntax geiser-log geiser-popup
geiser-impl geiser-custom geiser-base scheme dired-openssl-sha1 linum
apropos change-case reftex-ref dired-enclose ediff-merg ediff-wind
ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff meta-mode
show-default-file-modes arc-mode archive-mode css-mode php-mode cc-langs
doc-view subr-x image-mode html-environment-tools edit-clipboard-mode
dired-file-it sgml-mode man two-column cc-def cc-common-def cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs picture tmm color rect lpr eject-volume make-passwd cal-move
cal-menu calendar cal-loaddefs iso-transl dired-create-directory-fix
magit-visit-item-directory wdired pico-server-done-function
osx-osascript mail-reply-mode derived reftex-sel cursor-sensor
reftex-parse reftex-toc my-zap-to-char tex-find-file rx-let tex-italics
tex-section-tools tex-shift-headings debug pp tabify eieio-opt speedbar
sb-image ezimage dframe dabbrev find-func find-dired thingatpt grep
dired-aux misearch multi-isearch dired-mac-open tex-main-file latexenc
view git-add git-hooks magit-bisect magit-key-mode magit log-edit
message format-spec rfc822 mml mml-sec password-cache epg gnus-util
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log dired-up-directory-and-remove-buffer
vc-dispatcher vc-svn dired-x dired-mac-fix dired-follow-mac-link
dired-delete-file-fix dired-fix dired vc-git diff-mode reftex-dcr reftex
reftex-vars tex-cut-region tex-latex-insert-input tex-usepackage
tex-style-obarray cut-region tex-mods tex-filladapt-mods tex-utf8
tex-greek tex-make-file tex-header skeleton tex-fix-bibtex-file
tex-fix-tex-file tex-mode os-init desktop frameset hard-link-lab
cus-edit ls-lisp filladapt prolog align shell pcomplete jka-compr
sh-script smie executable file-mode-tools buff-menu-aux msb-fix msb
auto-complete-config ac-emacs-eclim-source auto-complete popup
eclim-completion eclimd eclim eclim-problems eclim-maven compile comint
ansi-color eclim-ant eclim-java advice json map eclim-project easy-mmode
etags xref project eieio eieio-core ring paren mic-paren diminish
save-file-name-history cl-seq haskell-write-file-contents-hook
haskell-mode-comment-indent-function insert color-insert swap-volume rx
customized-find-file dired-mac-init cl-macs color-theme wid-edit cl
color-theme-autoloads server cus-start cus-load finder-inf
geiser-autoloads haskell-mode-autoloads edmacro kmacro imenu info
package epg-config seq byte-opt gv bytecomp byte-compile cl-extra
help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 849907 298393)
  (symbols 48 56841 1484)
  (miscs 40 6381 652)
  (strings 32 234666 72699)
  (string-bytes 1 4711324)
  (vectors 16 74846)
  (vector-slots 8 2036052 99506)
  (floats 8 740 1050)
  (intervals 56 16236 2533)
  (buffers 976 90))


-- 
David Casperson, PhD, R.P.,                  |  David.Casperson@unbc.ca
Associate Professor and Chair,               |  (250)   960-6672 Fax 960-5544
Computer Science                             |  3333 University Way
University of Northern British Columbia      |  Prince George, BC   V2N 4Z9
                                              |  CANADA

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#26089: 25.1; Faulty documentation for skeleton-end-newline
  2017-03-13 19:11 bug#26089: 25.1; Faulty documentation for skeleton-end-newline David Casperson
@ 2019-07-26 12:09 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-26 12:09 UTC (permalink / raw)
  To: David Casperson; +Cc: David Casperson, 26089

David Casperson <casper@unbc.ca> writes:

> The documentation for skeleton-end-newline says:
>
> "...This just influences the way the default `skeleton-end-hook' behaves."
>
> but in fact skeleton-end-newline is used in
> 	(or (eolp) (not skeleton-end-newline) (newline-and-indent))
> in the function `skeleton-insert’ OUTSIDE of skeleton-end-hook (which
> is, by default nil).
>
> To witness behaviour contrary to the documentation, run latex-mode and
> call M-x latex-insert-block itemize with the cursor at the beginning of
> a non empty line.  There will be a blank line after the \end{itemize}.
> This differs from previous emacs versions.

Looks like this was fixed for Emacs 26:

commit 88cdf14b37a7344bb266e94512485e3cc738c23d
Author: Noam Postavsky <npostavs@gmail.com>
Date:   Mon Dec 19 19:49:47 2016 -0500

    Improve skeleton docstrings
    
    * lisp/skeleton.el (skeleton-end-newline): Remove mention of
    `skeleton-end-hook', its default code was moved into `skeleton-insert'.
    (skeleton-insert): Mention `skeleton-end-newline' and move reference to
    `skeleton-end-hook' above the explanation of skeleton syntax.


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-26 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13 19:11 bug#26089: 25.1; Faulty documentation for skeleton-end-newline David Casperson
2019-07-26 12:09 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).