Patch for runtime/doc/ada.txt: Fix incorrect option in the modelines

6 views
Skip to first unread message

Kana Natsuno

unread,
Jun 16, 2008, 8:11:13 AM6/16/08
to vim...@googlegroups.com
Hello, Vimmers.
I noticed that runtime/doc/ada.txt contains "encoding=latin1" in its modelines.
It must change 'fileencoding' instead of 'encoding', because changing 'encoding'
is troublesome for most users who don't use Vim with encoding=latin1.
The following is a simple patch to fix the problem.


*** ../vim-7.1.315/runtime/doc/ada.txt Mon Jun 16 18:38:38 2008
--- runtime/doc/ada.txt Mon Jun 16 20:47:52 2008
***************
*** 512,515 ****

==============================================================================
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
! vim: filetype=help encoding=latin1
--- 512,515 ----

==============================================================================
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
! vim: filetype=help fileencoding=latin1


--
To Vim, or not to Vim.
kana <http://whileimautomaton.net/>

sc

unread,
Jun 16, 2008, 11:04:02 AM6/16/08
to vim...@googlegroups.com

if this patch is applied will that mean we can take the

au BufReadPost ada.txt setl nomodeline ft=help

out of our .vimrcs that tony had us add?

well -- i *think* it was tony...

sc


Bram Moolenaar

unread,
Jun 16, 2008, 2:49:19 PM6/16/08
to Kana Natsuno, vim...@googlegroups.com

Kana Natsuno wrote:

> Hello, Vimmers.
> I noticed that runtime/doc/ada.txt contains "encoding=latin1" in its
> modelines.
> It must change 'fileencoding' instead of 'encoding', because changing
> 'encoding'
> is troublesome for most users who don't use Vim with encoding=latin1.
> The following is a simple patch to fix the problem.

The current version of this file doesn't set 'encoding' at all. Should
work fine.

--
hundred-and-one symptoms of being an internet addict:
33. You name your children Eudora, Mozilla and Dotcom.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Kana Natsuno

unread,
Jun 16, 2008, 11:44:14 PM6/16/08
to vim...@googlegroups.com
On Tue, 17 Jun 2008 03:49:19 +0900, Bram Moolenaar wrote:
> The current version of this file doesn't set 'encoding' at all.
> Should work fine.
Really? I checked with the following steps and environment, it
does set 'encoding' to latin1.

$ vim -u NONE -U NONE --noplugin
:set nocompatible
:set encoding=utf-8
:help ada.txt
:set encoding? "==> latin1
:qall

$ vim --version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun 13 2008 12:01:49)
Included patches: 1-314
Compiled by kana@colinux
Normal version without GUI. Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv -cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +folding
-footer +fork() -gettext -hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession
+modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme -netbeans_intg -osfiletype
+path_extra -perl +postscript +printer -profile -python +quickfix +reltime -rightleft -ruby +scrollbind -signs +smartindent -sniff +statusline -sun_workshop
+syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/local/apps/vim/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O3
Linking: gcc -L/usr/local/lib -o vim -lncurses

Ben Schmidt

unread,
Jun 17, 2008, 12:17:11 AM6/17/08
to vim...@googlegroups.com
Kana Natsuno wrote:
> On Tue, 17 Jun 2008 03:49:19 +0900, Bram Moolenaar wrote:
>> The current version of this file doesn't set 'encoding' at all.
>> Should work fine.
> Really? I checked with the following steps and environment, it
> does set 'encoding' to latin1.
>
> $ vim -u NONE -U NONE --noplugin
> :set nocompatible
> :set encoding=utf-8
> :help ada.txt
> :set encoding? "==> latin1
> :qall
>
> $ vim --version
> VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun 13 2008 12:01:49)
> Included patches: 1-314

The runtime files are not included in the source patches. You need to
download them separately to get the latest version. See

http://www.vim.org/runtime.php

Cheers,

Ben.

Tony Mechelynck

unread,
Jun 17, 2008, 12:10:53 PM6/17/08
to vim...@googlegroups.com

Here are the top and bottom lines from the latest
$VIMRUNTIME/doc/ada.txt (and I know it's the latest because I updated my
runtime files a few minutes ago):

*ada.txt* For Vim version 7.1. Last change: 2007 Sep 06

==============================================================================
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab

vim: filetype=help


As you (Kata Natsuno) can see, it doesn't set 'encoding'.


Best regards,
Tony.
--
Democracy means simply the bludgeoning of the people by the people for
the people.
-- Oscar Wilde

Kana Natsuno

unread,
Jun 17, 2008, 2:20:02 PM6/17/08
to vim_dev
On Jun 17, 1:17 pm, Ben Schmidt wrote:
> The runtime files are not included in the source patches. You need to
> download them separately to get the latest version. See
>
> http://www.vim.org/runtime.php

Oops, I didn't know that.
Thanks for your information.
Reply all
Reply to author
Forward
0 new messages