Permalink
Browse files

Remove unused code.

--HG--
branch : vim73
  • Loading branch information...
1 parent 94b8990 commit 4348a787c1dc59fda4cbfb106f26ac73ae546262 @brammool brammool committed Aug 8, 2010
Showing with 15 additions and 714 deletions.
  1. +7 −7 runtime/doc/syntax.txt
  2. +0 −2 runtime/doc/todo.txt
  3. +0 −6 src/buffer.c
  4. +0 −36 src/dosinst.c
  5. +0 −36 src/edit.c
  6. +0 −7 src/ex_getln.c
  7. +2 −15 src/getchar.c
  8. +0 −7 src/gui.c
  9. +0 −15 src/gui_athena.c
  10. +0 −46 src/gui_gtk_x11.c
  11. +0 −18 src/gui_motif.c
  12. +0 −62 src/gui_w32.c
  13. +0 −11 src/gui_x11.c
  14. +0 −15 src/hashtab.c
  15. +1 −1 src/if_py_both.h
  16. +0 −7 src/if_tcl.c
  17. +1 −111 src/integration.c
  18. +0 −9 src/integration.h
  19. +0 −4 src/main.c
  20. +0 −20 src/memline.c
  21. +0 −18 src/misc1.c
  22. +0 −21 src/misc2.c
  23. +0 −47 src/move.c
  24. +1 −24 src/netbeans.c
  25. +0 −6 src/os_unix.c
  26. +0 −11 src/popupmnu.c
  27. +3 −8 src/screen.c
  28. +0 −7 src/syntax.c
  29. +0 −58 src/ui.c
  30. +0 −24 src/uninstal.c
  31. +0 −55 src/workshop.c
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.3e. Last change: 2010 Aug 04
+*syntax.txt* For Vim version 7.3e. Last change: 2010 Aug 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -92,12 +92,12 @@ highlighting, include the ":gui" command in the |gvimrc|: >
NOTE: Using ":gui" in the |gvimrc| means that "gvim -f" won't start in the
foreground! Use ":gui -f" then.
-
-You can toggle the syntax on/off with this command >
- :if exists("syntax_on") | syntax off | else | syntax enable | endif
+ *g:syntax_on*
+You can toggle the syntax on/off with this command: >
+ :if exists("g:syntax_on") | syntax off | else | syntax enable | endif
To put this into a mapping, you can use: >
- :map <F7> :if exists("syntax_on") <Bar>
+ :map <F7> :if exists("g:syntax_on") <Bar>
\ syntax off <Bar>
\ else <Bar>
\ syntax enable <Bar>
@@ -925,7 +925,7 @@ Example: >
or >
// vim:syntax=c.doxygen
-It can also be done automatically for c, cpp and idl files by setting the
+It can also be done automatically for C, C++, C# and IDL files by setting the
global or buffer-local variable load_doxygen_syntax. This is done by adding
the following to your .vimrc. >
:let g:load_doxygen_syntax=1
@@ -3168,7 +3168,7 @@ and may be mixed with patterns.
Not all commands accept all arguments. This table shows which arguments
can not be used for all commands:
- *E395* *E396*
+ *E395*
contains oneline fold display extend concealends~
:syntax keyword - - - - - -
:syntax match yes - yes yes yes -
@@ -33,8 +33,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
Before release 7.3:
- Rename vim73 branch to default (hints: Xavier de Gaye, 2010 May 23)
-Should readfile() ignore BOM when not in binary mode?
-
Bug: searching for tags file uses 'suffixesadd', should not happen. (Dominique
Pelle, 2010 June 28)
View
@@ -398,13 +398,7 @@ close_buffer(win, buf, action)
/* Return when a window is displaying the buffer or when it's not
* unloaded. */
if (buf->b_nwindows > 0 || !unload_buf)
- {
-#if 0 /* why was this here? */
- if (buf == curbuf)
- u_sync(); /* sync undo before going to another buffer */
-#endif
return;
- }
/* Always remove the buffer when there is no file name. */
if (buf->b_ffname == NULL)
View
@@ -32,9 +32,6 @@ char *default_bat_dir = NULL; /* when not NULL, use this as the default
directory to write .bat files in */
char *default_vim_dir = NULL; /* when not NULL, use this as the default
install dir for NSIS */
-#if 0
-char homedir[BUFSIZE]; /* home directory or "" */
-#endif
/*
* Structure used for each choice the user can make.
@@ -720,39 +717,6 @@ inspect_system(void)
fclose(fd);
else
*oldvimrc = NUL;
-
-#if 0 /* currently not used */
- /*
- * Get default home directory.
- * Prefer $HOME if it's set. For Win NT use $HOMEDRIVE and $HOMEPATH.
- * Otherwise, if there is a "c:" drive use that.
- */
- p = getenv("HOME");
- if (p != NULL && *p != NUL && strlen(p) < BUFSIZE)
- strcpy(homedir, p);
- else
- {
- p = getenv("HOMEDRIVE");
- if (p != NULL && *p != NUL && strlen(p) + 2 < BUFSIZE)
- {
- strcpy(homedir, p);
- p = getenv("HOMEPATH");
- if (p != NULL && *p != NUL && strlen(homedir) + strlen(p) < BUFSIZE)
- strcat(homedir, p);
- else
- strcat(homedir, "\\");
- }
- else
- {
- struct stat st;
-
- if (stat("c:\\", &st) == 0)
- strcpy(homedir, "c:\\");
- else
- *homedir = NUL;
- }
- }
-#endif
}
/*
View
@@ -192,9 +192,6 @@ static int spell_bad_len = 0; /* length of located bad word */
#endif
static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
static int echeck_abbr __ARGS((int));
-#if 0
-static void replace_push_off __ARGS((int c));
-#endif
static int replace_pop __ARGS((void));
static void replace_join __ARGS((int off));
static void replace_pop_ins __ARGS((void));
@@ -3352,19 +3349,6 @@ ins_compl_new_leader()
compl_restarting = FALSE;
}
-#if 0 /* disabled, made CTRL-L, BS and typing char jump to original text. */
- if (!compl_used_match)
- {
- /* Go to the original text, since none of the matches is inserted. */
- if (compl_first_match->cp_prev != NULL
- && (compl_first_match->cp_prev->cp_flags & ORIGINAL_TEXT))
- compl_shown_match = compl_first_match->cp_prev;
- else
- compl_shown_match = compl_first_match;
- compl_curr_match = compl_shown_match;
- compl_shows_dir = compl_direction;
- }
-#endif
compl_enter_selects = !compl_used_match;
/* Show the popup menu with a different set of matches. */
@@ -7152,26 +7136,6 @@ replace_push_mb(p)
}
#endif
-#if 0
-/*
- * call replace_push(c) with replace_offset set to the first NUL.
- */
- static void
-replace_push_off(c)
- int c;
-{
- char_u *p;
-
- p = replace_stack + replace_stack_nr;
- for (replace_offset = 1; replace_offset < replace_stack_nr;
- ++replace_offset)
- if (*--p == NUL)
- break;
- replace_push(c);
- replace_offset = 0;
-}
-#endif
-
/*
* Pop one item from the replace stack.
* return -1 if stack empty
View
@@ -640,13 +640,6 @@ getcmdline(firstc, count, indent)
c = p_wc;
}
}
-#if 0 /* If enabled <Down> on a file takes you _completely_ out of wildmenu */
- if (p_wmnu
- && (xpc.xp_context == EXPAND_FILES
- || xpc.xp_context == EXPAND_MENUNAMES)
- && (c == K_UP || c == K_DOWN))
- xpc.xp_context = EXPAND_NOTHING;
-#endif
#endif /* FEAT_WILDMENU */
View
@@ -5087,13 +5087,6 @@ static struct initmap
#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
/* Use the Windows (CUA) keybindings. */
# ifdef FEAT_GUI
-# if 0 /* These are now used to move tab pages */
- {(char_u *)"<C-PageUp> H", NORMAL+VIS_SEL},
- {(char_u *)"<C-PageUp> <C-O>H",INSERT},
- {(char_u *)"<C-PageDown> L$", NORMAL+VIS_SEL},
- {(char_u *)"<C-PageDown> <C-O>L<C-O>$", INSERT},
-# endif
-
/* paste, copy and cut */
{(char_u *)"<S-Insert> \"*P", NORMAL},
{(char_u *)"<S-Insert> \"-d\"*P", VIS_SEL},
@@ -5104,12 +5097,6 @@ static struct initmap
{(char_u *)"<C-X> \"*d", VIS_SEL},
/* Missing: CTRL-C (cancel) and CTRL-V (block selection) */
# else
-# if 0 /* These are now used to move tab pages */
- {(char_u *)"\316\204 H", NORMAL+VIS_SEL}, /* CTRL-PageUp is "H" */
- {(char_u *)"\316\204 \017H",INSERT}, /* CTRL-PageUp is "^OH"*/
- {(char_u *)"\316v L$", NORMAL+VIS_SEL}, /* CTRL-PageDown is "L$" */
- {(char_u *)"\316v \017L\017$", INSERT}, /* CTRL-PageDown ="^OL^O$"*/
-# endif
{(char_u *)"\316w <C-Home>", NORMAL+VIS_SEL},
{(char_u *)"\316w <C-Home>", INSERT+CMDLINE},
{(char_u *)"\316u <C-End>", NORMAL+VIS_SEL},
@@ -5119,7 +5106,7 @@ static struct initmap
# ifdef FEAT_CLIPBOARD
# ifdef DJGPP
{(char_u *)"\316\122 \"*P", NORMAL}, /* SHIFT-Insert is "*P */
- {(char_u *)"\316\122 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
+ {(char_u *)"\316\122 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
{(char_u *)"\316\122 \022\017*", INSERT}, /* SHIFT-Insert is ^R^O* */
{(char_u *)"\316\222 \"*y", VIS_SEL}, /* CTRL-Insert is "*y */
# if 0 /* Shift-Del produces the same code as Del */
@@ -5129,7 +5116,7 @@ static struct initmap
{(char_u *)"\030 \"-d", VIS_SEL}, /* CTRL-X is "-d */
# else
{(char_u *)"\316\324 \"*P", NORMAL}, /* SHIFT-Insert is "*P */
- {(char_u *)"\316\324 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
+ {(char_u *)"\316\324 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
{(char_u *)"\316\324 \022\017*", INSERT}, /* SHIFT-Insert is ^R^O* */
{(char_u *)"\316\325 \"*y", VIS_SEL}, /* CTRL-Insert is "*y */
{(char_u *)"\316\327 \"*d", VIS_SEL}, /* SHIFT-Del is "*d */
View
@@ -1571,14 +1571,7 @@ gui_write(s, len)
{
char_u *p;
int arg1 = 0, arg2 = 0;
- /* this doesn't make sense, disabled until someone can explain why it
- * would be needed */
-#if 0 && (defined(RISCOS) || defined(WIN16))
- int force_cursor = TRUE; /* JK230798, stop Vim being smart or
- our redraw speed will suffer */
-#else
int force_cursor = FALSE; /* force cursor update */
-#endif
int force_scrollbar = FALSE;
static win_T *old_curwin = NULL;
View
@@ -236,21 +236,6 @@ gui_x11_create_widgets()
*/
gui.border_offset = gui.border_width;
-#if 0 /* not needed? */
- XtInitializeWidgetClass(formWidgetClass);
- XtInitializeWidgetClass(boxWidgetClass);
- XtInitializeWidgetClass(coreWidgetClass);
-#ifdef FEAT_MENU
- XtInitializeWidgetClass(menuButtonWidgetClass);
-#endif
- XtInitializeWidgetClass(simpleMenuWidgetClass);
-#ifdef FEAT_GUI_NEXTAW
- XtInitializeWidgetClass(scrollbarWidgetClass);
-#else
- XtInitializeWidgetClass(vim_scrollbarWidgetClass);
-#endif
-#endif
-
/* The form containing all the other widgets */
vimForm = XtVaCreateManagedWidget("vimForm",
formWidgetClass, vimShell,
View
@@ -4484,52 +4484,6 @@ gui_mch_get_font(char_u *name, int report_error)
return NULL;
}
- /*
- * The fixed-width check has been disabled for GTK+ 2. Rationale:
- *
- * - The check tends to report false positives, particularly
- * in non-Latin locales or with old X fonts.
- * - Thanks to our fixed-width hack in gui_gtk2_draw_string(),
- * GTK+ 2 Vim is actually capable of displaying variable width
- * fonts. Those will just be spaced out like in AA xterm.
- * - Failing here for the default font causes GUI startup to fail
- * even with wiped out configuration files.
- * - The font dialog displays all fonts unfiltered, and it's rather
- * annoying if 95% of the listed fonts produce an error message.
- */
-#if 0
- {
- /* Check that this is a mono-spaced font. Naturally, this is a bit
- * hackish -- fixed-width isn't really suitable for i18n text :/ */
- PangoLayout *layout;
- unsigned int i;
- int last_width = -1;
- const char test_chars[] = { 'W', 'i', ',', 'x' }; /* arbitrary */
-
- layout = pango_layout_new(gui.text_context);
- pango_layout_set_font_description(layout, font);
-
- for (i = 0; i < G_N_ELEMENTS(test_chars); ++i)
- {
- int width;
-
- pango_layout_set_text(layout, &test_chars[i], 1);
- pango_layout_get_size(layout, &width, NULL);
-
- if (last_width >= 0 && width != last_width)
- {
- pango_font_description_free(font);
- font = NULL;
- break;
- }
-
- last_width = width;
- }
-
- g_object_unref(layout);
- }
-#endif
-
return font;
}
View
@@ -1335,18 +1335,11 @@ gui_mch_add_menu_item(menu, idx)
else
wid = 4;
-#if 0
- /* We better use a FormWidget here, since it's far more
- * flexible in terms of size. */
- type = xmFormWidgetClass;
- XtSetArg(args[n], XmNwidth, wid); n++;
-#else
type = xmSeparatorWidgetClass;
XtSetArg(args[n], XmNwidth, wid); n++;
XtSetArg(args[n], XmNminWidth, wid); n++;
XtSetArg(args[n], XmNorientation, XmVERTICAL); n++;
XtSetArg(args[n], XmNseparatorType, XmSHADOW_ETCHED_IN); n++;
-#endif
}
else
{
@@ -2947,17 +2940,6 @@ gui_mch_compute_footer_height()
return (int) height + top + bottom + (shadow << 1);
}
-#if 0 /* not used */
- void
-gui_mch_set_footer_pos(h)
- int h; /* textArea height */
-{
- XtVaSetValues(footer,
- XmNtopOffset, h + 7,
- NULL);
-}
-#endif
-
void
gui_mch_enable_footer(showit)
int showit;
Oops, something went wrong.

0 comments on commit 4348a78

Please sign in to comment.