]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond...
authorJohn Mandereau <john.mandereau@gmail.com>
Sat, 27 Dec 2008 23:39:17 +0000 (00:39 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Sat, 27 Dec 2008 23:39:17 +0000 (00:39 +0100)
43 files changed:
Documentation/user/rhythms.itely
THANKS
flower/file-cookie.cc
flower/memory-stream.cc
input/new/specifying-context-with-beatgrouping.ly
lily/accidental-engraver.cc
lily/all-font-metrics.cc
lily/auto-beam-engraver.cc
lily/beam.cc
lily/box.cc
lily/context.cc
lily/custos-engraver.cc
lily/engraver.cc
lily/figured-bass-position-engraver.cc
lily/fingering-engraver.cc
lily/font-config-scheme.cc
lily/font-metric.cc
lily/general-scheme.cc
lily/include/all-font-metrics.hh
lily/include/pango-font.hh
lily/key-engraver.cc
lily/ly-module.cc
lily/lyric-combine-music-iterator.cc
lily/melody-engraver.cc
lily/minimal-page-breaking.cc
lily/module-scheme.cc
lily/new-fingering-engraver.cc
lily/optimal-page-breaking.cc
lily/output-def.cc
lily/pango-font-scheme.cc
lily/pango-font.cc
lily/paper-outputter.cc
lily/prob.cc
lily/relative-octave-music.cc
lily/rest.cc
lily/scale.cc
lily/scm-hash.cc
lily/spacing-basic.cc
lily/spring-smob.cc
lily/stem.cc
lily/translator-dispatch-list.cc
scm/framework-ps.scm
tex/texinfo.tex

index 47b83a282f439454ac06a4e10349d20d60fa2d96..7e84e74d16858929c6013ca05f6fe59ea285b085 100644 (file)
@@ -1453,7 +1453,9 @@ particular beam in the time signature in use, its beaming is
 controlled by three context properties:
 @code{measureLength}, @code{beatLength} and @code{beatGrouping}.
 These properties may be set in the @code{Score}, @code{Staff} or
-@code{Voice} contexts to delimit their scope.
+@code{Voice} contexts to delimit their scope.  The default values
+are set while processing @code{\time} commands, so the @code{\set}
+commands must be placed after all @code{\time} commands.
 
 These determine the beaming as follows:
 
diff --git a/THANKS b/THANKS
index 1bd09c6b0c360e89bba946ab231b6c4b9dd3a98a..8a077a16f849f7057d9bdb437d374e9059da98b8 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -40,7 +40,7 @@ Till Rettig        - NR work
 Kurt Kroon         - Glossary Updates, NR work
 Alard de Boer      - Formatting
 Michael Rasmussen  - Formatting
-Trevor Baca        - Inspirational Headwords
+Trevor Bača        - Inspirational Headwords
 Reinhold Kainhofer - Technical Aid
 Neil Puttock       - Snippet Editor, Technical Aid
 
index 49b5518f362264b6740476336b55ca6036a2eba3..bedb100a00b26b4ac246e7948dd4c3166795f8f2 100644 (file)
@@ -15,12 +15,10 @@ extern "C" {
   }
 
   void *
-  lily_fopencookie (void *cookie, char const *modes,
-                   lily_cookie_io_functions_t io_funcs)
+  lily_fopencookie (void *cookie,
+                   char const * /* modes */,
+                   lily_cookie_io_functions_t /* io_funcs */)
   {
-    (void) cookie;
-    (void) modes;
-    (void) io_funcs;
     assert (is_memory_stream (cookie));
     return (FILE *) cookie;
   }
index 270438dcae5257286c808657bea047bb91c8a642..dbf6fd83f29555605f4fe42fc7ca5c8f77d3a86c 100644 (file)
@@ -102,23 +102,19 @@ Memory_out_stream::writer (void *cookie,
 }
 
 ssize_t
-Memory_out_stream::reader (void *cookie,
-                          char *buffer,
-                          size_t size)
+Memory_out_stream::reader (void * /* cookie */,
+                          char * /* buffer */,
+                          size_t /* size */)
 {
-  (void) cookie;
-  (void) buffer;
-  (void) size;
-
   assert (false);
   return 0;
 }
 
 int
-Memory_out_stream::seeker (void *, off64_t *, int whence)
+Memory_out_stream::seeker (void *,
+                          off64_t *,
+                          int)
 {
-  (void) whence;
-
   assert (false);
   return 0;
 }
index f45d4f19042e62634e0851090bc0e9c74c5c0f1e..71ef3530c70577a1fd292fe29c49295cc94afd19 100644 (file)
@@ -5,7 +5,9 @@
   texidoc = "
 By specifying the context, the effect of @code{beatGrouping} can be
 limited to the context specified, and the values which may have
-been set in higher-level contexts can be overridden:
+been set in higher-level contexts can be overridden.  The
+@code{\set} commands must be placed @emph{after} all @code{\time}
+commands:
 "
   doctitle = "Specifying context with beatGrouping"
 }
index 457fd734c4ce87442e83403718b67a2ca94174f5..7fcea1ccfe003a658927816bee7927b495258dce 100644 (file)
@@ -411,13 +411,11 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
 }
 
 Grob *
-Accidental_engraver::make_standard_accidental (Stream_event *note,
+Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
                                               Grob *note_head,
                                               Engraver *trans,
                                               bool cautionary)
 {
-  (void)note;
-
   /*
     We construct the accidentals at the originating Voice
     level, so that we get the property settings for
@@ -455,12 +453,10 @@ Accidental_engraver::make_standard_accidental (Stream_event *note,
 }
 
 Grob *
-Accidental_engraver::make_suggested_accidental (Stream_event *note,
+Accidental_engraver::make_suggested_accidental (Stream_event * /* note */,
                                                Grob *note_head,
                                                Engraver *trans)
 {
-  (void) note;
-
   Grob *a = trans->make_item ("AccidentalSuggestion", note_head->self_scm ());
 
   Side_position_interface::add_support (a, note_head);
index 2deea75cdae8d0bad956c7609b7392c3458c5f27..96d8667c9dad4c18bf3478960a52b88c95745782 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "all-font-metrics.hh"
 
+#include "string-convert.hh"
 #include "international.hh"
 #include "main.hh"
 #include "open-type-font.hh"
 
 
 Index_to_charcode_map const *
-All_font_metrics::get_index_to_charcode_map (string filename, FT_Face face)
+All_font_metrics::get_index_to_charcode_map (string filename,
+                                            int face_index,
+                                            FT_Face face)
 {
-  if (filename_charcode_maps_map_.find (filename)
+  string key = filename + String_convert::int_string (face_index);
+  if (filename_charcode_maps_map_.find (key)
       == filename_charcode_maps_map_.end ())
-    filename_charcode_maps_map_[filename] = make_index_to_charcode_map (face);
+    filename_charcode_maps_map_[key] = make_index_to_charcode_map (face);
 
-  return &filename_charcode_maps_map_[filename];
+  return &filename_charcode_maps_map_[key];
 }
 
 
index f86edaecc88eceddb74e17dea010458a24fa826f..af4f1fc2d9fc6ae4fae6ad689fe39bcb6df0ea80 100644 (file)
@@ -302,27 +302,24 @@ Auto_beam_engraver::finalize ()
 
 
 void
-Auto_beam_engraver::acknowledge_beam (Grob_info info)
+Auto_beam_engraver::acknowledge_beam (Grob_info /* info */)
 {
-  (void)info;
   check_bar_property ();
   if (stems_)
     end_beam ();
 }
 
 void
-Auto_beam_engraver::acknowledge_bar_line (Grob_info info)
+Auto_beam_engraver::acknowledge_bar_line (Grob_info /* info */)
 {
-  (void)info;
   check_bar_property ();
   if (stems_)
     end_beam ();
 }
 
 void
-Auto_beam_engraver::acknowledge_rest (Grob_info info)
+Auto_beam_engraver::acknowledge_rest (Grob_info /* info */)
 {
-  (void)info;
   check_bar_property ();
   if (stems_)
     end_beam ();
index c8adf5694d80f60f8ed2a4121d84d87ada830911..dcca55322795e4b58816788306f646a83f6d8fb2 100644 (file)
@@ -893,10 +893,8 @@ Beam::no_visible_stem_positions (Grob *me, Interval default_value)
 */
 MAKE_SCHEME_CALLBACK (Beam, calc_least_squares_positions, 2);
 SCM
-Beam::calc_least_squares_positions (SCM smob, SCM posns)
+Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
 {
-  (void) posns;
-  
   Grob *me = unsmob_grob (smob);
 
   int count = normal_stem_count (me);
index 5cce139fd4154b28625de8eb571bfb8f64034d4f..5c2af4d317b41f871b215450cd1925e8ce7a064f 100644 (file)
@@ -88,16 +88,14 @@ IMPLEMENT_TYPE_P (Box, "ly:box?");
 IMPLEMENT_DEFAULT_EQUAL_P (Box);
 
 SCM
-Box::mark_smob (SCM x)
+Box::mark_smob (SCM /* x */)
 {
-  (void)x;
   return SCM_EOL;
 }
 
 int
-Box::print_smob (SCM x, SCM p, scm_print_state*)
+Box::print_smob (SCM /* x */, SCM p, scm_print_state*)
 {
-  (void)x;
   scm_puts ("#<Box>", p);
   return 1;
 }
index 36e506cd7e01d88891b57ac5c68f6817183eafc5..a1456a1bbf71924e29b0c46b34e802910718a0d4 100644 (file)
@@ -46,9 +46,8 @@ Context::check_removal ()
     }
 }
 
-Context::Context (Context const &src)
+Context::Context (Context const & /* src */)
 {
-  (void) src;
   assert (false);
 }
 
index 8b5eb08ef816afb86b1469f6254b71578ef4e3f0..578f57266e8b37da7df0e9c65dc4d11836063d4b 100644 (file)
@@ -65,9 +65,8 @@ Custos_engraver::start_translation_timestep ()
 }
 
 void
-Custos_engraver::acknowledge_bar (Grob_info info)
+Custos_engraver::acknowledge_bar (Grob_info /* info */)
 {
-  (void) info;
   custos_permitted_ = true;
 }
 
index dcda3031b4835508dd14b6b5524b2b3d60603792..9ac54f804ecb1bba74fc3db46c6380a44cb5eb4e 100644 (file)
@@ -106,13 +106,19 @@ LY_DEFINE (ly_set_grob_creation_callback, "ly:set-grob-creation-callback",
 #endif
 
 Grob *
-Engraver::internal_make_grob (SCM symbol, SCM cause, char const *name, char const *file, int line, char const *fun)
+Engraver::internal_make_grob (SCM symbol,
+                             SCM cause,
+                             char const * /* name */,
+                             char const *file,
+                             int line,
+                             char const *fun)
 {
-  (void) file;
-  (void) fun;
-  (void) line;
-  (void) name;
-  
+#ifdef NDEBUG
+  (void)file;
+  (void)line;
+  (void)fun;
+#endif
+
   SCM props = updated_grob_properties (context (), symbol);
 
   Grob *grob = 0;
index fadb5f1cb3ccab5f4816a9240c92a6b3a594fdcd..15d1278fbd691846593e3cdfc6e2db5ade8b5ba1 100644 (file)
@@ -115,9 +115,8 @@ Figured_bass_position_engraver::stop_translation_timestep ()
 }
 
 void
-Figured_bass_position_engraver::acknowledge_end_bass_figure_alignment (Grob_info info)
+Figured_bass_position_engraver::acknowledge_end_bass_figure_alignment (Grob_info /* info */)
 {
-  (void)info;
   stop_spanner ();
 }
 
index 1c4107e686294ffd345fb9c572d2342762f7366f..b48f38924f639f8e256254d95394531a03768105 100644 (file)
@@ -45,14 +45,13 @@ Fingering_engraver::listen_fingering (Stream_event *ev)
 
 IMPLEMENT_TRANSLATOR_LISTENER (Fingering_engraver, stroke_finger);
 void
-Fingering_engraver::listen_stroke_finger (Stream_event *ev)
+Fingering_engraver::listen_stroke_finger (Stream_event * /* ev */)
 {
   /*
     FIXME: should do something.
     
     This function is mainly here to shut up a warning
    */
-  (void)ev;
 }
 
 void
index ce4525467a3a82297506708771999723af5e88e5..9de2cd112dd52a39ecd715e077e206fa54c22b73 100644 (file)
@@ -29,6 +29,8 @@ display_fontset (FcFontSet *fs)
       font = FcNameUnparse (fs->fonts[j]);
       if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &str) == FcResultMatch)
        retval += String_convert::form_string ("FILE %s\n", str);
+      if (FcPatternGetString (fs->fonts[j], FC_INDEX, 0, &str) == FcResultMatch)
+       retval += String_convert::form_string ("INDEX %s\n", str);
       if (FcPatternGetString (fs->fonts[j], FC_FAMILY, 0, &str) == FcResultMatch)
        retval += String_convert::form_string ("family %s\n ", str);
       if (FcPatternGetString (fs->fonts[j],
index 9901f4c38292987ab9376ac524d1c2e2e53a8a6c..d9ccecbc91430826aae2eb90db2fdd400ac35217 100644 (file)
@@ -185,9 +185,8 @@ Font_metric::word_stencil (string str) const
 }
 
 Stencil
-Font_metric::text_stencil (string str) const
+Font_metric::text_stencil (string /* str */) const
 {
-  (void) str;
   programming_error("Cannot get a text stencil from this font");
   return Stencil (Box (), SCM_EOL);
 }
index 3e1052aed37cc674e2007464d964188e0ff731ff..94c05ee6073a2ea03cf19b70f0de339f81069bc3 100644 (file)
@@ -345,10 +345,11 @@ LY_DEFINE (ly_stderr_redirect, "ly:stderr-redirect",
 }
 
 static SCM
-accumulate_symbol (void *closure, SCM key, SCM val, SCM result)
+accumulate_symbol (void * /* closure */,
+                  SCM key,
+                  SCM /* val */,
+                  SCM result)
 {
-  (void) closure;
-  (void) val;
   return scm_cons (key, result);
 }
 
index 9c37a1a7d2107d265c55ec809bdf85ff9f474e75..da1437bfacd3c32c0f3b24cc89b7f0ef63a3a4c9 100644 (file)
@@ -39,7 +39,9 @@ class All_font_metrics
   All_font_metrics (All_font_metrics const &);
 public:
 
-  Index_to_charcode_map const *get_index_to_charcode_map (string filename, FT_Face face);
+  Index_to_charcode_map const *get_index_to_charcode_map (string filename,
+                                                         int face_index,
+                                                         FT_Face face);
 
   All_font_metrics (string search_path);
   ~All_font_metrics ();
index 93ac7c11f896629899ef42667625071b3798abcc..dc93324da84c084e4991fd42f70774e1d00fa0b5 100644 (file)
@@ -37,7 +37,7 @@ public:
 
   string description_string () const; 
   SCM font_file_name () const;
-  void register_font_file (string, string);
+  void register_font_file (string, string, int);
   Stencil text_stencil (string, bool tight) const;
 
   Stencil pango_item_string_stencil (PangoItem const *, string, bool tight) const;
index 7997d11c33adb98e655d189691f211afd9714d0d..45300af68628efd9bbcf3c5c4321d2d4a3de07e9 100644 (file)
@@ -119,18 +119,16 @@ Key_engraver::listen_key_change (Stream_event *ev)
 }
 
 void
-Key_engraver::acknowledge_clef (Grob_info info)
+Key_engraver::acknowledge_clef (Grob_info /* info */)
 {
-  (void)info;
   SCM c = get_property ("createKeyOnClefChange");
   if (to_boolean (c))
     create_key (false);
 }
 
 void
-Key_engraver::acknowledge_bar_line (Grob_info info)
+Key_engraver::acknowledge_bar_line (Grob_info /* info */)
 {
-  (void)info;
   if (scm_is_pair (get_property ("keySignature")))
     create_key (true);
 }
index 4d6b0a8f97bbc4cf2c67facd49b02ee5eb18e0ac..eb73cd68cd208babfb4051eec39d6fdcd117335f 100644 (file)
@@ -97,9 +97,11 @@ ly_module_symbols (SCM mod)
 }
 
 static SCM
-entry_to_alist (void *closure, SCM key, SCM val, SCM result)
+entry_to_alist (void * /* closure */,
+               SCM key,
+               SCM val,
+               SCM result)
 {
-  (void) closure;
   if (scm_variable_bound_p (val) == SCM_BOOL_T)
     return scm_cons (scm_cons (key, scm_variable_ref (val)), result);
   programming_error ("unbound variable in module");
@@ -134,9 +136,11 @@ ly_reexport_module (SCM mod)
 
 #ifdef MODULE_GC_KLUDGE
 static SCM
-redefine_keyval (void *closure, SCM key, SCM val, SCM result)
+redefine_keyval (void * /* closure */,
+                SCM key,
+                SCM val,
+                SCM result)
 {
-  (void)closure;
   SCM new_tab = result;
   scm_hashq_set_x (new_tab, key, val);
   return new_tab;
index 26a4dfa5871a2d23cfaa3d6a21ad5e6c49bfd8d2..b75d309f2a7c6c79bf7d66a2e1d5269d45023a69 100644 (file)
@@ -260,10 +260,8 @@ Lyric_combine_music_iterator::find_voice ()
 }
 
 void
-Lyric_combine_music_iterator::process (Moment when)
+Lyric_combine_music_iterator::process (Moment /* when */)
 {
-  (void) when;
-  
   /* see if associatedVoice has been changed */
   Context *new_voice = find_voice ();
   if (new_voice)
index 5189f674b50a29bd6a1f0ea0cc3084982f8a516d..9957185f04d10c6e3a1f9f6b54e97d5072c75b92 100644 (file)
@@ -62,9 +62,8 @@ Melody_engraver::stop_translation_timestep ()
 
 
 void
-Melody_engraver::acknowledge_slur (Grob_info info)
+Melody_engraver::acknowledge_slur (Grob_info /* info */)
 {
-  (void)info;
   melody_item_ = 0;
 }
 
index 1b5fce910dae44ea0449066aa9be06820859643c..f26b4b5886ecb62619d196d7583b909bb5a2311d 100644 (file)
@@ -15,9 +15,8 @@
 #include "paper-book.hh"
 
 static bool
-is_break (Grob *g)
+is_break (Grob *)
 {
-  (void) g; /* shutup warning */
   return false;
 }
 
index 173226ac15e4a99a95ab825b5dc5fb9d340ac400..627504d922c8cfcd65971eca37a625b29abb2e38 100644 (file)
 */
 
 static SCM
-module_define_closure_func (void *closure, SCM key, SCM val, SCM result)
+module_define_closure_func (void *closure,
+                           SCM key,
+                           SCM val,
+                           SCM /* result */)
 {
-  (void) result;
   SCM module = (SCM) closure;
   if (scm_variable_bound_p (val) == SCM_BOOL_T)
     scm_module_define (module, key, scm_variable_ref (val));
index 5078e2d2db9f1bcd11139528f93c469703c80c33..cd9532206dca7892fb4fda3a39d6b52c982d6e22 100644 (file)
@@ -125,10 +125,8 @@ New_fingering_engraver::acknowledge_stem (Grob_info inf)
 void
 New_fingering_engraver::add_script (Grob *head,
                                    Stream_event *event,
-                                   Stream_event *note)
+                                   Stream_event * /* note */)
 {
-  (void) note;
-
   Finger_tuple ft;
 
   Grob *g = make_item ("Script", event->self_scm ());
index f495ab7fa6b6b23d84b21955dfd19598fad3e7ea..c5a61335633c6790f8bbdba7d83238fb5c521c01 100644 (file)
@@ -18,9 +18,8 @@
 #include "system.hh"
 
 static bool
-is_break (Grob *g)
+is_break (Grob *)
 {
-  (void) g; /* shutup warning */
   return false;
 }
 
index 1fcc5f596ed5464f029c6305f803542e6f083027..212731bd5f759193bbbccd8592e2efa3a72aedcc 100644 (file)
@@ -92,8 +92,6 @@ Output_def::print_smob (SCM s, SCM p, scm_print_state *)
   Output_def * def = unsmob_output_def (s);
   scm_puts ("#< ", p);
   scm_puts (def->class_name (), p);
-  
-  (void)def;
   scm_puts (">", p);
   return 1;
 }
index 955b4a8f167888e480dff294340d5d846eb85a7a..2c6f13cc078a0c4c633ee17c961d5d3e2f30c45c 100644 (file)
@@ -30,7 +30,8 @@ LY_DEFINE (ly_pango_font_p, "ly:pango-font?",
 LY_DEFINE (ly_pango_font_physical_fonts, "ly:pango-font-physical-fonts",
           1, 0, 0,
           (SCM f),
-          "Return alist of @code{(PSNAME . FILENAME)} tuples.")
+          "Return alist of @code{(ps-name file-name font-index)} lists"
+          " for Pango font@tie{}@var{f}.")
 {
   Pango_font *pf = dynamic_cast<Pango_font *> (unsmob_metrics (f));
 
index b63520aea4993a4c898c804dd123a7a3bf479b69..f6456dd826a2a6e9280229e392aaadb34a4978d4 100644 (file)
@@ -13,7 +13,7 @@
 #include <map>
 #include <cstdio>
 
-/* Ugh.  */
+// Ugh.
 
 #include "pango-font.hh"
 #include "dimensions.hh"
 #if HAVE_PANGO_FT2
 #include "stencil.hh"
 
-Pango_font::Pango_font (PangoFT2FontMap *fontmap,
+Pango_font::Pango_font (PangoFT2FontMap * /* fontmap */,
                        PangoFontDescription const *description,
                        Real output_scale)
 {
-  (void) fontmap;
-  
   physical_font_tab_ = scm_c_make_hash_table (11);
   PangoDirection pango_dir = PANGO_DIRECTION_LTR;
-  context_
-    = pango_ft2_get_context (PANGO_RESOLUTION, PANGO_RESOLUTION);
+  context_ = pango_ft2_get_context (PANGO_RESOLUTION,
+                                   PANGO_RESOLUTION);
 
   pango_description_ = pango_font_description_copy (description);
   attribute_list_ = pango_attr_list_new ();
 
-  /*
-    urgh. I don't understand this. Why isn't this 1/(scale *
-    resolution * output_scale)
-
-    --hwn
-  */
+  // urgh. I don't understand this. Why isn't this 1/(scale *
+  // resolution * output_scale)
+  //
+  //  --hwn
   output_scale_ = output_scale;
-  scale_ = INCH_TO_BP / (Real (PANGO_SCALE) * Real (PANGO_RESOLUTION) * output_scale);
+  scale_ = INCH_TO_BP
+          / (Real (PANGO_SCALE) * Real (PANGO_RESOLUTION) * output_scale);
 
-  /*
-    ugh. Should make this configurable.
-  */
+  // ugh. Should make this configurable.
   pango_context_set_language (context_, pango_language_from_string ("en_US"));
   pango_context_set_base_dir (context_, pango_dir);
   pango_context_set_font_description (context_, description);
@@ -68,11 +63,14 @@ Pango_font::~Pango_font ()
 }
 
 void
-Pango_font::register_font_file (string filename, string ps_name)
+Pango_font::register_font_file (string filename,
+                               string ps_name,
+                               int face_index)
 {
   scm_hash_set_x (physical_font_tab_,
                  ly_string2scm (ps_name),
-                 ly_string2scm (filename));
+                 scm_list_2 (ly_string2scm (filename),
+                             scm_from_int (face_index)));
 }
 
 void
@@ -81,32 +79,33 @@ Pango_font::derived_mark () const
   scm_gc_mark (physical_font_tab_);
 }
 
-
 void
-get_glyph_index_name (char *s, FT_ULong code)
+get_glyph_index_name (char *s,
+                     FT_ULong code)
 {
   sprintf (s, "glyphIndex%lX", code);
 }
 
 void
-get_unicode_name (char*s, FT_ULong code)
+get_unicode_name (char *s,
+                 FT_ULong code)
 {
   if (code > 0xFFFF)
-    sprintf (s,  "u%lX", code);
+    sprintf (s, "u%lX", code);
   else
-    sprintf (s,  "uni%04lX", code);
+    sprintf (s, "uni%04lX", code);
 }
 
-
 Stencil
-Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
+Pango_font::pango_item_string_stencil (PangoItem const *item,
+                                      string str,
                                       bool tight_bbox) const
 {
   const int GLYPH_NAME_LEN = 256;
   char glyph_name[GLYPH_NAME_LEN];
   PangoAnalysis const *pa = &(item->analysis);
   PangoGlyphString *pgs = pango_glyph_string_new ();
-  
+
   pango_shape (str.c_str () + item->offset,
               item->length, (PangoAnalysis*) pa, pgs);
 
@@ -120,39 +119,44 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
 
   FT_Face ftface = pango_fc_font_lock_face (fcfont);
 
-  PangoRectangle const *which_rect
-    = (tight_bbox)
-    ? &ink_rect
-    : &logical_rect;
-    
+  PangoRectangle const *which_rect = tight_bbox ? &ink_rect
+                                               : &logical_rect;
+
   Box b (Interval (PANGO_LBEARING (logical_rect),
                   PANGO_RBEARING (logical_rect)),
         Interval (-PANGO_DESCENT (*which_rect),
                   PANGO_ASCENT (*which_rect)));
-
   b.scale (scale_);
+
   char const *ps_name_str0 = FT_Get_Postscript_Name (ftface);
   FcPattern *fcpat = fcfont->font_pattern;
+
   FcChar8 *file_name_as_ptr = 0;
   FcPatternGetString (fcpat, FC_FILE, 0, &file_name_as_ptr);
 
+  // due to a bug in FreeType 2.3.7 and earlier we can't use
+  // ftface->face_index; it is always zero for some font formats,
+  // in particular TTCs which we are interested in
+  int face_index = 0;
+  FcPatternGetInteger (fcpat, FC_INDEX, 0, &face_index);
+
   string file_name;
   if (file_name_as_ptr)
-    {
-      /* Normalize file name.  */
-      file_name = File_name ((char const *)file_name_as_ptr).to_string ();
-    }
-  
+    // Normalize file name.
+    file_name = File_name ((char const *)file_name_as_ptr).to_string ();
+
   SCM glyph_exprs = SCM_EOL;
   SCM *tail = &glyph_exprs;
-      
+
   Index_to_charcode_map const *cmap = 0;
   bool has_glyph_names = ftface->face_flags & FT_FACE_FLAG_GLYPH_NAMES;
-  if  (! has_glyph_names)
-    cmap = all_fonts_global->get_index_to_charcode_map (file_name, ftface);
+  if (!has_glyph_names)
+    cmap = all_fonts_global->get_index_to_charcode_map (
+            file_name, face_index, ftface);
 
   bool is_ttf = string (FT_Get_X11_Font_Format (ftface)) == "TrueType";
   bool cid_keyed = false;
+
   for (int i = 0; i < pgs->num_glyphs; i++)
     {
       PangoGlyphInfo *pgi = pgs->glyphs + i;
@@ -163,11 +167,12 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
       glyph_name[0] = '\0';
       if (has_glyph_names)
        {
-         int errorcode = FT_Get_Glyph_Name (ftface, pg, glyph_name, GLYPH_NAME_LEN);
+         int errorcode = FT_Get_Glyph_Name (ftface, pg, glyph_name,
+                                            GLYPH_NAME_LEN);
          if (errorcode)
-           programming_error (_f ("FT_Get_Glyph_Name () error: %s",
-                                  freetype_error_string (errorcode).c_str ()
-                                  ));
+           programming_error (
+             _f ("FT_Get_Glyph_Name () error: %s",
+                 freetype_error_string (errorcode).c_str ()));
        }
 
       SCM char_id = SCM_EOL;
@@ -180,51 +185,44 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
          get_unicode_name (glyph_name, char_code);
        }
 
-      if (glyph_name[0] ==  '\0' && has_glyph_names)
+      if (glyph_name[0] == '\0' && has_glyph_names)
        {
-         programming_error (_f ("Glyph has no name, but font supports glyph naming.\n"
-                                "Skipping glyph U+%0X, file %s",
-                                pg,
-                                file_name.c_str ()));
+         programming_error (
+           _f ("Glyph has no name, but font supports glyph naming.\n"
+               "Skipping glyph U+%0X, file %s",
+               pg, file_name.c_str ()));
          continue;
        }
 
-      
       if (glyph_name == string (".notdef") && is_ttf)
        glyph_name[0] = '\0';
-         
+
       if (glyph_name[0] == '\0' && is_ttf)
-       {
-         // access by glyph index directly.
-         get_glyph_index_name (glyph_name, pg);
-       }
-      
+       // Access by glyph index directly.
+       get_glyph_index_name (glyph_name, pg);
+
       if (glyph_name[0] == '\0')
        {
-         /*
-           CID entry
-         */
+         // CID entry
          cid_keyed = true;
          char_id = scm_from_uint32 (pg);
        }
       else
        char_id = scm_from_locale_string (glyph_name);
-      
+
       *tail = scm_cons (scm_list_4 (scm_from_double (ggeo.width * scale_),
                                    scm_from_double (ggeo.x_offset * scale_),
                                    scm_from_double (ggeo.y_offset * scale_),
-                                   
                                    char_id),
                        SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
 
-  pango_glyph_string_free (pgs);  
+  pango_glyph_string_free (pgs);
   pgs = 0;
   PangoFontDescription *descr = pango_font_describe (pa->font);
   Real size = pango_font_description_get_size (descr)
-    / (Real (PANGO_SCALE));
-
+             / (Real (PANGO_SCALE));
 
   if (!ps_name_str0)
     warning (_f ("no PostScript font name for font `%s'", file_name));
@@ -235,8 +233,7 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
       && (file_name.find (".otf") != NPOS
          || file_name.find (".cff") != NPOS))
     {
-
-      /* UGH: kludge a PS name for OTF/CFF fonts.  */
+      // UGH: kludge a PS name for OTF/CFF fonts.
       string name = file_name;
       ssize idx = file_name.find (".otf");
       if (idx == NPOS)
@@ -247,11 +244,11 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
       ssize slash_idx = name.rfind ('/');
       if (slash_idx != NPOS)
        {
-         slash_idx ++; 
+         slash_idx ++;
          name = name.substr (slash_idx,
                              name.length () - slash_idx);
        }
-      
+
       string initial = name.substr (0, 1);
       initial = String_convert::to_upper (initial);
       name = name.substr (1, name.length () - 1);
@@ -263,7 +260,9 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
 
   if (ps_name.length ())
     {
-      ((Pango_font *) this)->register_font_file (file_name, ps_name);
+      ((Pango_font *) this)->register_font_file (file_name,
+                                                ps_name,
+                                                face_index);
       pango_fc_font_unlock_face (fcfont);
 
       SCM expr = scm_list_5 (ly_symbol2scm ("glyph-string"),
@@ -285,13 +284,12 @@ Pango_font::physical_font_tab () const
   return physical_font_tab_;
 }
 
-
 Stencil
 Pango_font::word_stencil (string str) const
 {
   return text_stencil (str, true);
 }
-  
+
 Stencil
 Pango_font::text_stencil (string str) const
 {
@@ -299,7 +297,8 @@ Pango_font::text_stencil (string str) const
 }
 
 Stencil
-Pango_font::text_stencil (string str, bool tight) const
+Pango_font::text_stencil (string str,
+                         bool tight) const
 {
   GList *items
     = pango_itemize (context_,
@@ -318,7 +317,7 @@ Pango_font::text_stencil (string str, bool tight) const
       if (item->analysis.level == PANGO_DIRECTION_RTL)
        text_dir = LEFT;
     }
+
   for (GList *ptr = items; ptr; ptr = ptr->next)
     {
       PangoItem *item = (PangoItem *) ptr->data;
@@ -331,11 +330,9 @@ Pango_font::text_stencil (string str, bool tight) const
          last_x = item_stencil.extent (X_AXIS)[RIGHT];
        }
       else if (text_dir == LEFT)
-       {
-         dest.translate_axis (item_stencil.extent (X_AXIS)[RIGHT], X_AXIS);
-       }
+       dest.translate_axis (item_stencil.extent (X_AXIS)[RIGHT], X_AXIS);
 
-#if 0 /* Check extents.  */
+#if 0 // Check extents.
       if (!item_stencil.extent_box ()[X_AXIS].is_empty ())
        {
          Stencil frame = Lookup::frame (item_stencil.extent_box (), 0.1, 0.1);
@@ -345,24 +342,19 @@ Pango_font::text_stencil (string str, bool tight) const
          dest.add_stencil (frame);
        }
 #endif
-  
+
       dest.add_stencil (item_stencil);
     }
 
-  /*
-    UGH. Should have flags per output format signifying supported
-    options.
-  */
+  // UGH. Should have flags per output format signifying supported
+  // options.
   string name = get_output_backend_name ();
   if (name != "ps" && name != "eps")
     {
-      /*
-       For Pango based backends, we take a shortcut.
-      */
-      SCM exp
-       = scm_list_3 (ly_symbol2scm ("utf-8-string"),
-                     ly_string2scm (description_string ()),
-                     ly_string2scm (str));
+      // For Pango based backends, we take a shortcut.
+      SCM exp = scm_list_3 (ly_symbol2scm ("utf-8-string"),
+                           ly_string2scm (description_string ()),
+                           ly_string2scm (str));
 
       Box b (Interval (0, 0), Interval (0, 0));
       b.unite (dest.extent_box ());
@@ -383,11 +375,10 @@ Pango_font::description_string () const
   return s;
 }
 
-
 SCM
 Pango_font::font_file_name () const
 {
   return SCM_BOOL_F;
 }
 
-#endif
+#endif // HAVE_PANGO_FT2
index 5f02a7654923572f7e05aafc808a70495a0ceda5..d3b99055e9191d72a3e120d172697173d2acea6c 100644 (file)
@@ -55,9 +55,10 @@ Paper_outputter::mark_smob (SCM x)
 }
 
 int
-Paper_outputter::print_smob (SCM x, SCM p, scm_print_state*)
+Paper_outputter::print_smob (SCM /* x */,
+                            SCM p,
+                            scm_print_state *)
 {
-  (void) x;
   scm_puts ("#<Paper_outputter>", p);
   return 1;
 }
index e55e84afc100debf240b973d814d44a0b6885ba3..9d75d744f381cc45ffb2b02f732ce1ab3e56a325 100644 (file)
@@ -174,10 +174,9 @@ Prob::internal_set_property (SCM sym, SCM val)
 }
 
 void
-Prob::type_check_assignment (SCM sym, SCM val) const
+Prob::type_check_assignment (SCM, SCM) const
 {
-  (void) sym;
-  (void) val;
+  /* empty */
 }
 
 SCM
index bf6116ab17036e8b69ab2c263053320662bf121a..8d677c425b6b30ff3d43d64548fb06fb44e1ebc2 100644 (file)
@@ -19,9 +19,9 @@ public:
 
 MAKE_SCHEME_CALLBACK (Relative_octave_music, no_relative_callback, 2)
   SCM
-Relative_octave_music::no_relative_callback (SCM music, SCM pitch)
+Relative_octave_music::no_relative_callback (SCM /* music */,
+                                            SCM pitch)
 {
-  (void)music;
   return pitch;
 }
 
index da13f6cdbc599cc6ff458380f3890f586fd6010a..9caae1f5e93946030eb0adb2ae8b119932601599 100644 (file)
@@ -193,11 +193,10 @@ Rest::generic_extent_callback (Grob *me, Axis a)
 
 MAKE_SCHEME_CALLBACK (Rest, pure_height, 3);
 SCM
-Rest::pure_height (SCM smob, SCM start, SCM end)
+Rest::pure_height (SCM smob,
+                  SCM /* start */,
+                  SCM /* end */)
 {
-  (void) start;
-  (void) end;
-  
   Grob *me = unsmob_grob (smob);
   SCM m = brew_internal_stencil (me, false);
   return ly_interval2scm (unsmob_stencil (m)->extent (Y_AXIS));
index 9e39d8a99e83fa992a31c1be95fdb37a362c15ac..23490c889084cb2dff8192d1fb53fb939cbbec43 100644 (file)
@@ -121,19 +121,17 @@ Scale::normalize_step (int step) const
 }
 
 int
-Scale::print_smob (SCM x, SCM port, scm_print_state *)
+Scale::print_smob (SCM /* x */,
+                  SCM port,
+                  scm_print_state *)
 {
-  (void) x;
-  
   scm_puts ("#<Scale>", port); 
   return 1;
 }
 
-
 SCM
-Scale::mark_smob (SCM x)
+Scale::mark_smob (SCM)
 {
-  (void) x;
   return SCM_UNSPECIFIED;
 }
 
index ed3345b5acff86c055ef72b404c48e4be8f4c4a9..d3a8d7f9bd474b5bc6072bc17225b0fdcbf72758 100644 (file)
@@ -120,9 +120,11 @@ Scheme_hash_table::remove (SCM k)
 }
 
 static SCM
-collect_handles (void *closure, SCM key, SCM value, SCM result)
+collect_handles (void * /* closure */,
+                SCM key,
+                SCM value,
+                SCM result)
 {
-  (void) closure;
   return scm_acons(key, value, result);
 }
 
index 7545ec4e5b94723f384c94ed9753bcd2d3cbd7b4..40e0a16b4a152122ee3d88dabb7b7983ea9978a5 100644 (file)
@@ -83,11 +83,11 @@ get_measure_length (Grob *column)
 }
 
 Real
-Spacing_spanner::note_spacing (Grob *me, Grob *lc, Grob *rc,
+Spacing_spanner::note_spacing (Grob * /* me */,
+                              Grob *lc,
+                              Grob *rc,
                               Spacing_options const *options)
 {
-  (void) me;
-  
   Moment shortest_playing_len = 0;
   SCM s = lc->get_property ("shortest-playing-duration");
 
index ae4533cc219dc91e398a822c6f6ba93669133557..a50c4bf92f7fde405dd9ddc8eb9f64d060459b6a 100644 (file)
 IMPLEMENT_SIMPLE_SMOBS (Spring);
 
 SCM
-Spring::mark_smob (SCM x)
+Spring::mark_smob (SCM)
 {
-  (void)x;
-
   return SCM_UNSPECIFIED;
 }
 
index 1f8b21e85f51fec72fa86c818b24417dcde43298..3380d0cc17b1b14aec7e5d05b0d878faefc369b5 100644 (file)
@@ -229,11 +229,10 @@ Stem::is_normal_stem (Grob *me)
 
 MAKE_SCHEME_CALLBACK (Stem, pure_height, 3)
 SCM
-Stem::pure_height (SCM smob, SCM start, SCM end)
+Stem::pure_height (SCM smob,
+                  SCM /* start */,
+                  SCM /* end */)
 {
-  (void) start;
-  (void) end;
-
   Grob *me = unsmob_grob (smob);
   Interval iv;
 
index 4298ffedafd9a43be3125c7533347c632fcc81b0..5a6ce4a0a661e78779f293f60d64b64ef21bbb0d 100644 (file)
@@ -63,16 +63,16 @@ Engraver_dispatch_list::create (SCM trans_list,
 }
 
 SCM
-Engraver_dispatch_list::mark_smob (SCM x)
+Engraver_dispatch_list::mark_smob (SCM)
 {
-  (void)x;
   return SCM_BOOL_F;
 }
 
 int
-Engraver_dispatch_list::print_smob (SCM x, SCM p, scm_print_state *)
+Engraver_dispatch_list::print_smob (SCM /* x */,
+                                   SCM p,
+                                   scm_print_state *)
 {
-  (void)x;
   scm_puts ("#<Engraver_dispatch_list>", p);
   return 1;
 }
index 0c7ab8624f13ec4e1d73c0b1fd73439d8a62c457..cfd72cf041be283e68984afdca24bcc1f7f549a1 100644 (file)
   (define (extract-names font)
     (if (ly:pango-font? font)
        (map car (ly:pango-font-physical-fonts font))
-       (list  (ly:font-name font))))
+       (list (ly:font-name font))))
 
   (let* ((fonts (ly:paper-fonts paper))
         (names (apply append (map extract-names fonts))))
               (ly:output-def-lookup paper 'papersizename)
               (if landscape? h w)
               (if landscape? w h)
-              80  ;; weight
+              80   ;; weight
               "()" ;; color
               "()" ;; type
     )))
                (set! file-name (ly:string-substitute (ly:get-option 'datadir)
                                                      "" file-name))
                (format
-                "lilypond-datadir (~a) concatstrings (r) file .loadfont"
+                "lilypond-datadir (~a) concatstrings (r) file .loadfont\n"
                 file-name))
              (format "(~a) (r) file .loadfont\n" file-name))
          (format "% cannot find font file: ~a\n" file-name)))
                (cond
                 ((internal-font? file-name)
                  (ps-load-file (ly:find-file
-                                (format "~a.otf"  file-name))))
+                                (format "~a.otf" file-name))))
                 ((string? bare-file-name)
                  (ps-load-file file-name))
                 (else
     (reverse (dir-helper (opendir dir-name) '())))
 
   (define (handle-mac-font name filename)
-    (let* ((dir-name  (tmpnam))
+    (let* ((dir-name (tmpnam))
           (files '())
           (status 0)
           (embed #f))
                        name filename)))
       embed))
 
-  (define (font-file-as-ps-string name file-name)
+  (define (font-file-as-ps-string name file-name font-index)
     (let* ((downcase-file-name (string-downcase file-name)))
       (cond
        ((and file-name (string-endswith downcase-file-name ".pfa"))
        ((and file-name (string-endswith downcase-file-name ".ttf"))
        (ly:ttf->pfa file-name))
        ((and file-name (string-endswith downcase-file-name ".ttc"))
-       (ly:ttf->pfa file-name))
+       (ly:ttf->pfa file-name font-index))
        ((and file-name (string-endswith downcase-file-name ".otf"))
        (ps-embed-cff (ly:otf->cff file-name) name 0))
        (else
         (or (string-endswith bare-file-name ".dfont")
             (= (stat:size (stat bare-file-name)) 0))))
 
-  (define (load-font font-name-filename)
-    (let* ((font (car font-name-filename))
-          (name (cadr font-name-filename))
-          (file-name (caddr font-name-filename))
+  (define (load-font font-psname-filename-fontindex)
+    (let* ((font (list-ref font-psname-filename-fontindex 0))
+          (name (list-ref font-psname-filename-fontindex 1))
+          (file-name (list-ref font-psname-filename-fontindex 2))
+          (font-index (list-ref font-psname-filename-fontindex 3))
           (bare-file-name (ly:find-file file-name)))
       (cons name
            (cond ((mac-font? bare-file-name)
                                 name
                                 0))
                  (bare-file-name (font-file-as-ps-string
-                                  name bare-file-name))
+                                  name bare-file-name font-index))
                  (else
                   (ly:warning (_ "do not know how to embed font ~s ~s ~s")
                               name file-name font))))))
               (cond ((string? (ly:font-file-name font))
                      (list (list font
                                  (ly:font-name font)
-                                 (ly:font-file-name font))))
+                                 (ly:font-file-name font)
+                                 #f)))
                     ((ly:pango-font? font)
-                     (map (lambda (name-psname-pair)
+                     (map (lambda (psname-filename-fontindex)
                             (list #f
-                                  (car name-psname-pair)
-                                  (cdr name-psname-pair)))
+                                  (list-ref psname-filename-fontindex 0)
+                                  (list-ref psname-filename-fontindex 1)
+                                  (list-ref psname-filename-fontindex 2)))
                           (ly:pango-font-physical-fonts font)))
                     (else
                      (ly:font-sub-fonts font))))
       (for-each (lambda (f)
                  (format port "\n%%BeginFont: ~a\n" (car f))
                  (display (cdr f) port)
-                 (display "\n%%EndFont\n" port))
+                 (display "%%EndFont\n" port))
                (load-fonts paper)))
   (display (setup-variables paper) port)
 
               0.0 x))
 
           ;; the left-overshoot is to make sure that
-          ;; bar numbers  stick out of margin uniformly.
+          ;; bar numbers stick out of margin uniformly.
           ;;
           (list
        
          bbox)
 
         (if do-pdf
-            (postscript->pdf  0 0  (format "~a.eps" filename)))
+            (postscript->pdf 0 0 (format "~a.eps" filename)))
         ))
 
      extents-system-pairs)
 
 
 (define-public (clip-system-EPSes basename paper-book)
-  (define do-pdf (member  "pdf" (ly:output-formats)))
+  (define do-pdf (member "pdf" (ly:output-formats)))
 
   (define (clip-score-systems basename systems)
     (let*
index 434a90f5ae7e52fc1fa97ed856270fdaaff7c58f..c7c92b8de7940f0cafbf0b77ec7da57b370e5016 100644 (file)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2008-11-07.12}
+\def\texinfoversion{2008-12-16.21}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -98,6 +98,8 @@
 \let\ptexstar=\*
 \let\ptext=\t
 \let\ptextop=\top
+{\catcode`\'=\active
+\global\let\ptexquoteright'}% Math-mode def from plain.tex.
 
 % If this character appears in an error message or help string, it
 % starts a new line in the output.
@@ -945,6 +947,8 @@ where each line of input produces a line of output.}
   \catcode`>=\other
   \catcode`+=\other
   \catcode`-=\other
+  \catcode`\`=\other
+  \catcode`\'=\other
 }
 
 \def\pushthisfilestack{%
@@ -1143,11 +1147,13 @@ where each line of input produces a line of output.}
   \catcode`< = \active
   \catcode`> = \active
   \catcode`+ = \active
+  \catcode`' = \active
   \gdef\mathactive{%
     \let^ = \ptexhat
     \let< = \ptexless
     \let> = \ptexgtr
     \let+ = \ptexplus
+    \let' = \ptexquoteright
   }
 }
 
@@ -1329,7 +1335,10 @@ output) for that.)}
   \def\cmykDarkRed{0.28 1 1 0.35}
   \def\cmykBlack{0 0 0 1}
   %
-  \def\pdfsetcolor#1{\pdfliteral{#1 k}}
+  % k sets the color for filling (usual text, etc.);
+  % K sets the color for stroking (thin rules, e.g., normal _'s).
+  \def\pdfsetcolor#1{\pdfliteral{#1 k  #1 K}}
+  %
   % Set color, and create a mark which defines \thiscolor accordingly,
   % so that \makeheadline knows which color to restore.
   \def\setcolor#1{%
@@ -1598,6 +1607,7 @@ output) for that.)}
     \setcolor{\linkcolor}#1\endlink}
   \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
 \else
+  % non-pdf mode
   \let\pdfmkdest = \gobble
   \let\pdfurl = \gobble
   \let\endlink = \relax
@@ -1628,6 +1638,10 @@ output) for that.)}
 \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
 \def\tt{\fam=\ttfam \setfontstyle{tt}}
 
+% Unfortunately, we have to override this for titles and the like, since
+% in those cases "rm" is bold.  Sigh.
+\def\rmisbold{\rm\def\curfontstyle{bf}}
+
 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
 % So we set up a \sf.
 \newfam\sffam
@@ -2025,8 +2039,6 @@ end
 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
 \font\titlei=cmmi12 scaled \magstep3
 \font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
 \def\titleecsize{2074}
 
 % Chapter (and unnumbered) fonts (17.28pt).
@@ -2158,8 +2170,6 @@ end
 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
 \font\titlei=cmmi12 scaled \magstep3
 \font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
 \def\titleecsize{2074}
 
 % Chapter fonts (14.4pt).
@@ -2291,7 +2301,7 @@ end
   \def\curfontsize{title}%
   \def\lsize{chap}\def\lllsize{subsec}%
   \resetmathfonts \setleading{25pt}}
-\def\titlefont#1{{\titlefonts\rm #1}}
+\def\titlefont#1{{\titlefonts\rmisbold #1}}
 \def\chapfonts{%
   \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
   \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
@@ -2342,6 +2352,16 @@ end
   \def\lsize{smaller}\def\lllsize{smaller}%
   \resetmathfonts \setleading{9.5pt}}
 
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+% Define these just so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
 % Set the fonts to use with the @small... environments.
 \let\smallexamplefonts = \smallfonts
 
@@ -2355,28 +2375,128 @@ end
 %
 % By the way, for comparison, here's what fits with @example (10pt):
 %   8.5x11=71  smallbook=60  a4=75  a5=58
-%
-% I wish the USA used A4 paper.
 % --karl, 24jan03.
 
-
 % Set up the default fonts, so we can use them for creating boxes.
 %
 \definetextfontsizexi
 
-% Define these so they can be easily changed for other fonts.
-\def\angleleft{$\langle$}
-\def\angleright{$\rangle$}
+
+\message{markup,}
+
+% Check if we are currently using a typewriter font.  Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Markup style infrastructure.  \defmarkupstylesetup\INITMACRO will
+% define and register \INITMACRO to be called on markup style changes.
+% \INITMACRO can check \currentmarkupstyle for the innermost
+% style and the set of \ifmarkupSTYLE switches for all styles
+% currently in effect.
+\newif\ifmarkupvar
+\newif\ifmarkupsamp
+\newif\ifmarkupkey
+%\newif\ifmarkupfile % @file == @samp.
+%\newif\ifmarkupoption % @option == @samp.
+\newif\ifmarkupcode
+\newif\ifmarkupkbd
+%\newif\ifmarkupenv % @env == @code.
+%\newif\ifmarkupcommand % @command == @code.
+\newif\ifmarkuptex % @tex (and part of @math, for now).
+\newif\ifmarkupexample
+\newif\ifmarkupverb
+\newif\ifmarkupverbatim
+
+\let\currentmarkupstyle\empty
+
+\def\setupmarkupstyle#1{%
+  \csname markup#1true\endcsname
+  \def\currentmarkupstyle{#1}%
+  \markupstylesetup
+}
+
+\let\markupstylesetup\empty
+
+\def\defmarkupstylesetup#1{%
+  \expandafter\def\expandafter\markupstylesetup
+    \expandafter{\markupstylesetup #1}%
+  \def#1%
+}
+
+% Markup style setup for left and right quotes.
+\defmarkupstylesetup\markupsetuplq{%
+  \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
+  \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
+}
+
+\defmarkupstylesetup\markupsetuprq{%
+  \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
+  \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
+}
+
+{
+\catcode`\'=\active
+\catcode`\`=\active
+
+\gdef\markupsetuplqdefault{\let`\lq}
+\gdef\markupsetuprqdefault{\let'\rq}
+
+\gdef\markupsetcodequoteleft{\let`\codequoteleft}
+\gdef\markupsetcodequoteright{\let'\codequoteright}
+
+\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
+}
+
+\let\markupsetuplqcode \markupsetcodequoteleft
+\let\markupsetuprqcode \markupsetcodequoteright
+\let\markupsetuplqexample \markupsetcodequoteleft
+\let\markupsetuprqexample \markupsetcodequoteright
+\let\markupsetuplqverb \markupsetcodequoteleft
+\let\markupsetuprqverb \markupsetcodequoteright
+\let\markupsetuplqverbatim \markupsetcodequoteleft
+\let\markupsetuprqverbatim \markupsetcodequoteright
+
+\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
+\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
+
+% Allow an option to not replace quotes with a regular directed right
+% quote/apostrophe (char 0x27), but instead use the undirected quote
+% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
+% the default, but it works for pasting with more pdf viewers (at least
+% evince), the lilypond developers report.  xpdf does work with the
+% regular 0x27.  
+% 
+\def\codequoteright{%
+  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+      '%
+    \else \char'15 \fi
+  \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+% 
+\def\codequoteleft{%
+  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+      % [Knuth] pp. 380,381,391
+      % \relax disables Spanish ligatures ?` and !` of \tt font.
+      \relax`%
+    \else \char'22 \fi
+  \else \char'22 \fi
+}
+
+% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
+\def\noligaturesquoteleft{\relax\lq}
 
 % Count depth in font-changes, for error checks
 \newcount\fontdepth \fontdepth=0
 
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
-
 %% Add scribe-like font environments, plus @l for inline lisp (usually sans
 %% serif) and @ii for TeX italic
 
@@ -2391,17 +2511,22 @@ end
 % @var is set to this for defun arguments.
 \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
 
-% like \smartslanted except unconditionally use \sl.  We never want
+% @cite is like \smartslanted except unconditionally use \sl.  We never want
 % ttsl for book titles, do we?
 \def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
 
 \let\i=\smartitalic
 \let\slanted=\smartslanted
-\let\var=\smartslanted
+\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
 \let\dfn=\smartslanted
 \let\emph=\smartitalic
 
-% @b, explicit bold.
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}}              % roman font
+\def\sc#1{{\smallcaps#1}}       % smallcaps font
+\def\ii#1{{\it #1}}             % italic font
+
+% @b, explicit bold.  Also @strong.
 \def\b#1{{\bf #1}}
 \let\strong=\b
 
@@ -2433,22 +2558,35 @@ end
 \catcode`@=\other
 \def\endofsentencespacefactor{3000}% default
 
+% @t, explicit typewriter.
 \def\t#1{%
   {\tt \rawbackslash \plainfrenchspacing #1}%
   \null
 }
-\def\samp#1{`\tclose{#1}'\null}
-\setfont\keyrm\rmshape{8}{1000}{OT1}
-\font\keysy=cmsy9
-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-    \vbox{\hrule\kern-0.4pt
-     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-    \kern-0.4pt\hrule}%
-  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-\def\key #1{{\nohyphenation \uppercase{#1}}\null}
-% The old definition, with no lozenge:
-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+
+% @samp.
+\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
+
+% definition of @key that produces a lozenge.  Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+%    \vbox{\hrule\kern-0.4pt
+%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+%    \kern-0.4pt\hrule}%
+%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge.  If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle.  But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}
+  \nohyphenation
+  \ifmonospace\else\tt\fi
+  #1}\null}
+
+% ctrl is no longer a Texinfo command.
 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
 
 % @file, @option are the same as @samp.
@@ -2493,9 +2631,8 @@ end
   \global\let'=\rq \global\let`=\lq  % default definitions
   %
   \global\def\code{\begingroup
-    \catcode\rquoteChar=\active \catcode\lquoteChar=\active
-    \let'\codequoteright \let`\codequoteleft
-    %
+    \setupmarkupstyle{code}%
+    % The following should really be moved into \setupmarkupstyle handlers.
     \catcode\dashChar=\active  \catcode\underChar=\active
     \ifallowcodebreaks
      \let-\codedash
@@ -2547,6 +2684,7 @@ end
 
 % @kbd is like @code, except that if the argument is just one @key command,
 % then @kbd has no effect.
+\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
 
 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
 %   `example' (@kbd uses ttsl only inside of @example and friends),
@@ -2568,14 +2706,14 @@ end
 \def\wordexample{example}
 \def\wordcode{code}
 
-% Default is `distinct.'
+% Default is `distinct'.
 \kbdinputstyle distinct
 
 \def\xkey{\key}
 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
 \ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\look}}\fi
-\else{\tclose{\kbdfont\look}}\fi}
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
 
 % For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
 \let\indicateurl=\code
@@ -2638,30 +2776,16 @@ end
   \let\email=\uref
 \fi
 
-% Check if we are currently using a typewriter font.  Since all the
-% Computer Modern typewriter fonts have zero interword stretch (and
-% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
-
 % Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
 %
 \def\dmn#1{\thinspace #1}
 
-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
-
 % @l was never documented to mean ``switch to the Lisp font'',
 % and it is not used as such in any manual I can find.  We need it for
 % Polish suppressed-l.  --karl, 22sep96.
 %\def\l#1{{\li #1}\null}
 
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}}              % roman font
-\def\sc#1{{\smallcaps#1}}       % smallcaps font
-\def\ii#1{{\it #1}}             % italic font
-
 % @acronym for "FBI", "NATO", and the like.
 % We print this one point size smaller, since it's intended for
 % all-uppercase.
@@ -2687,6 +2811,44 @@ end
   \fi
 }
 
+
+\message{glyphs,}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, they should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+   \advance\hsize by -2\dimen2 % Rules.
+   \vbox{%
+      \hrule height\dimen2
+      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
+         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+         \kern3pt\vrule width\dimen2}% Space to right.
+      \hrule height\dimen2}
+    \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
 %
 \def\pounds{{\it\$}}
@@ -2752,16 +2914,31 @@ end
 \def\quotesinglbase{{\ecfont \char"0D}}
 %
 % This positioning is not perfect (see the ogonek LaTeX package), but
-% we have the precomposed glyphs for the most common cases.
+% we have the precomposed glyphs for the most common cases.  We put the
+% tests to use those glyphs in the single \ogonek macro so we have fewer
+% dummy definitions to worry about for index entries, etc.
+% 
 % ogonek is also used with other letters in Lithuanian (IOU), but using
 % the precomposed glyphs for those is not so easy since they aren't in
 % the same EC font.
-\def\ogonek#1{{\ecfont \setbox0=\hbox{#1}\ifdim\ht0=1ex\accent"0C #1%
-  \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}\fi}}
-\def\Aogonek{{\ecfont \char"81}}
-\def\Eogonek{{\ecfont \char"86}}
-\def\aogonek{{\ecfont \char"A1}}
-\def\eogonek{{\ecfont \char"A6}}
+\def\ogonek#1{{%
+  \def\temp{#1}%
+  \ifx\temp\macrocharA\Aogonek
+  \else\ifx\temp\macrochara\aogonek
+  \else\ifx\temp\macrocharE\Eogonek
+  \else\ifx\temp\macrochare\eogonek
+  \else
+    \ecfont \setbox0=\hbox{#1}%
+    \ifdim\ht0=1ex\accent"0C #1%
+    \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
+    \fi
+  \fi\fi\fi\fi
+  }%
+}
+\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
+\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
+\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
+\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
 %
 \def\ecfont{%
   % We can't distinguish serif/sans and italic/slanted, but this
@@ -2892,12 +3069,9 @@ end
 \let\subtitlerm=\tenrm
 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
 
-\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
-               \let\tt=\authortt}
-
 \parseargdef\title{%
   \checkenv\titlepage
-  \leftline{\titlefonts\rm #1}
+  \leftline{\titlefonts\rmisbold #1}
   % print a rule at the page bottom also.
   \finishedtitlepagefalse
   \vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -2918,7 +3092,7 @@ end
   \else
     \checkenv\titlepage
     \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
-    {\authorfont \leftline{#1}}%
+    {\secfonts\rmisbold \leftline{#1}}%
   \fi
 }
 
@@ -4050,6 +4224,7 @@ end
   \definedummyword\guilsinglright
   \definedummyword\expansion
   \definedummyword\minus
+  \definedummyword\ogonek
   \definedummyword\pounds
   \definedummyword\point
   \definedummyword\print
@@ -4093,6 +4268,7 @@ end
   \definedummyword\v
   \definedummyword\H
   \definedummyword\dotaccent
+  \definedummyword\ogonek
   \definedummyword\ringaccent
   \definedummyword\tieaccent
   \definedummyword\ubaraccent
@@ -5075,7 +5251,6 @@ end
 %       3) Likewise, headings look best if no \parindent is used, and
 %          if justification is not attempted.  Hence \raggedright.
 
-
 \def\majorheading{%
   {\advance\chapheadingskip by 10pt \chapbreak }%
   \parsearg\chapheadingzzz
@@ -5085,7 +5260,7 @@ end
 \def\chapheadingzzz#1{%
   {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
                     \parindent=0pt\raggedright
-                    \rm #1\hfill}}%
+                    \rmisbold #1\hfill}}%
   \bigskip \par\penalty 200\relax
   \suppressfirstparagraphindent
 }
@@ -5204,7 +5379,7 @@ end
   \domark
   %
   {%
-    \chapfonts \rm
+    \chapfonts \rmisbold
     %
     % Have to define \lastsection before calling \donoderef, because the
     % xref code eventually uses it.  On the other hand, it has to be called
@@ -5266,7 +5441,7 @@ end
 \def\unnchfopen #1{%
 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
                        \parindent=0pt\raggedright
-                       \rm #1\hfill}}\bigskip \par\nobreak
+                       \rmisbold #1\hfill}}\bigskip \par\nobreak
 }
 \def\chfopen #1#2{\chapoddpage {\chapfonts
 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
@@ -5275,7 +5450,7 @@ end
 \def\centerchfopen #1{%
 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
                        \parindent=0pt
-                       \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
+                       \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
 }
 \def\CHAPFopen{%
   \global\let\chapmacro=\chfopen
@@ -5308,7 +5483,7 @@ end
 \def\sectionheading#1#2#3#4{%
   {%
     % Switch to the right set of fonts.
-    \csname #2fonts\endcsname \rm
+    \csname #2fonts\endcsname \rmisbold
     %
     \def\sectionlevel{#2}%
     \def\temptype{#3}%
@@ -5344,6 +5519,11 @@ end
       \fi
     \fi\fi\fi
     %
+    % Go into vertical mode.  Usually we'll already be there, but we
+    % don't want the following whatsit to end up in a preceding paragraph
+    % if the document didn't happen to have a blank line.
+    \par
+    %
     % Output the mark.  Pass it through \safewhatsit, to take care of
     % the preceding space.
     \safewhatsit\domark
@@ -5691,46 +5871,12 @@ end
 \message{environments,}
 % @foo ... @end foo.
 
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
-%
-% Since these characters are used in examples, they should be an even number of
-% \tt widths. Each \tt character is 1en, so two makes it 1em.
-%
-\def\point{$\star$}
-\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
-\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
-\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
-
-% The @error{} command.
-% Adapted from the TeXbook's \boxit.
-%
-\newbox\errorbox
-%
-{\tentt \global\dimen0 = 3em}% Width of the box.
-\dimen2 = .55pt % Thickness of rules
-% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
-%
-\setbox\errorbox=\hbox to \dimen0{\hfil
-   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
-   \advance\hsize by -2\dimen2 % Rules.
-   \vbox{%
-      \hrule height\dimen2
-      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
-         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
-         \kern3pt\vrule width\dimen2}% Space to right.
-      \hrule height\dimen2}
-    \hfil}
-%
-\def\error{\leavevmode\lower.7ex\copy\errorbox}
-
 % @tex ... @end tex    escapes into raw Tex temporarily.
 % One exception: @ is still an escape character, so that @end tex works.
 % But \@ or @@ will get a plain tex @ character.
 
 \envdef\tex{%
+  \setupmarkupstyle{tex}%
   \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
   \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
   \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
@@ -5740,6 +5886,8 @@ end
   \catcode `\|=\other
   \catcode `\<=\other
   \catcode `\>=\other
+  \catcode`\`=\other
+  \catcode`\'=\other
   \escapechar=`\\
   %
   \let\b=\ptexb
@@ -5875,6 +6023,7 @@ end
 
 % This macro is called at the beginning of all the @example variants,
 % inside a group.
+\newdimen\nonfillparindent
 \def\nonfillstart{%
   \aboveenvbreak
   \hfuzz = 12pt % Don't be fussy
@@ -5882,7 +6031,12 @@ end
   \let\par = \lisppar % don't ignore blank lines
   \obeylines % each line of input is a line of output
   \parskip = 0pt
+  % Turn off paragraph indentation but redefine \indent to emulate
+  % the normal \indent.
+  \nonfillparindent=\parindent
   \parindent = 0pt
+  \let\indent\nonfillindent
+  %
   \emergencystretch = 0pt % don't try to avoid overfull boxes
   \ifx\nonarrowing\relax
     \advance \leftskip by \lispnarrowing
@@ -5893,6 +6047,24 @@ end
   \let\exdent=\nofillexdent
 }
 
+\begingroup
+\obeyspaces
+% We want to swallow spaces (but not other tokens) after the fake
+% @indent in our nonfill-environments, where spaces are normally
+% active and set to @tie, resulting in them not being ignored after
+% @indent.
+\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
+\gdef\nonfillindentcheck{%
+\ifx\temp %
+\expandafter\nonfillindentgobble%
+\else%
+\leavevmode\nonfillindentbox%
+\fi%
+}%
+\endgroup
+\def\nonfillindentgobble#1{\nonfillindent}
+\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
+
 % If you want all examples etc. small: @set dispenvsize small.
 % If you want even small examples the full size: @set dispenvsize nosmall.
 % This affects the following displayed environments:
@@ -5941,7 +6113,7 @@ end
 %
 \maketwodispenvs {lisp}{example}{%
   \nonfillstart
-  \tt\quoteexpand
+  \tt\setupmarkupstyle{example}%
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
   \gobble       % eat return
 }
@@ -6045,6 +6217,10 @@ end
   \do\ \do\\\do\{\do\}\do\$\do\&%
   \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
   \do\<\do\>\do\|\do\@\do+\do\"%
+  % Don't do the quotes -- if we do, @set txicodequoteundirected and
+  % @set txicodequotebacktick will not have effect on @verb and
+  % @verbatim, and ?` and !` ligatures won't get disabled.
+  %\do\`\do\'%
 }
 %
 % [Knuth] p. 380
@@ -6062,7 +6238,7 @@ end
 \def\setupverb{%
   \tt  % easiest (and conventionally used) font for verbatim
   \def\par{\leavevmode\endgraf}%
-  \catcode`\`=\active
+  \setupmarkupstyle{verb}%
   \tabeightspaces
   % Respect line breaks,
   % print special symbols as themselves, and
@@ -6077,33 +6253,6 @@ end
 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
 %
 \def\starttabbox{\setbox0=\hbox\bgroup}
-
-% Allow an option to not replace quotes with a regular directed right
-% quote/apostrophe (char 0x27), but instead use the undirected quote
-% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
-% the default, but it works for pasting with more pdf viewers (at least
-% evince), the lilypond developers report.  xpdf does work with the
-% regular 0x27.  
-% 
-\def\codequoteright{%
-  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
-    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
-      '%
-    \else \char'15 \fi
-  \else \char'15 \fi
-}
-%
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
-% 
-\def\codequoteleft{%
-  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
-    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
-      \relax`% the \relax disables the `! and `? ligatures
-    \else \char'22 \fi
-  \else \char'22 \fi
-}
 %
 \begingroup
   \catcode`\^^I=\active
@@ -6117,13 +6266,6 @@ end
       \wd0=\dimen0 \box0 \starttabbox
     }%
   }
-  \catcode`\'=\active
-  \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
-  %
-  \catcode`\`=\active
-  \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
-  %
-  \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
 \endgroup
 
 % start the verbatim environment.
@@ -6133,9 +6275,8 @@ end
   % Easiest (and conventionally used) font for verbatim
   \tt
   \def\par{\leavevmode\egroup\box0\endgraf}%
-  \catcode`\`=\active
   \tabexpand
-  \quoteexpand
+  \setupmarkupstyle{verbatim}%
   % Respect line breaks,
   % print special symbols as themselves, and
   % make each space count
@@ -6474,7 +6615,7 @@ end
   %
   % On the other hand, if an argument has two dashes (for instance), we
   % want a way to get ttsl.  Let's try @var for that.
-  \let\var=\ttslanted
+  \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
 }
@@ -7923,7 +8064,7 @@ directory should work if nowhere else does.}
   \gdef^^a8{\"{}} 
   \gdef^^a9{\copyright} 
   \gdef^^aa{\ordf}
-  \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} 
+  \gdef^^ab{\guillemetleft}
   \gdef^^ac{$\lnot$}
   \gdef^^ad{\-} 
   \gdef^^ae{\registeredsymbol} 
@@ -7942,7 +8083,7 @@ directory should work if nowhere else does.}
   \gdef^^b9{$^1$}
   \gdef^^ba{\ordm}
   %
-  \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
+  \gdef^^bb{\guilletright}
   \gdef^^bc{$1\over4$}
   \gdef^^bd{$1\over2$}
   \gdef^^be{$3\over4$}
@@ -8035,7 +8176,7 @@ directory should work if nowhere else does.}
 % Latin2 (ISO-8859-2) character definitions.
 \def\lattwochardefs{%
   \gdef^^a0{~}
-  \gdef^^a1{\Aogonek}
+  \gdef^^a1{\ogonek{A}}
   \gdef^^a2{\u{}}
   \gdef^^a3{\L}
   \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
@@ -8052,7 +8193,7 @@ directory should work if nowhere else does.}
   \gdef^^af{\dotaccent Z}
   %
   \gdef^^b0{\textdegree}
-  \gdef^^b1{\aogonek}
+  \gdef^^b1{\ogonek{a}}
   \gdef^^b2{\ogonek{ }}
   \gdef^^b3{\l}
   \gdef^^b4{\'{}}
@@ -8078,7 +8219,7 @@ directory should work if nowhere else does.}
   \gdef^^c7{\cedilla C}
   \gdef^^c8{\v C}
   \gdef^^c9{\'E}
-  \gdef^^ca{\Eogonek}
+  \gdef^^ca{\ogonek{E}}
   \gdef^^cb{\"E}
   \gdef^^cc{\v E}
   \gdef^^cd{\'I}
@@ -8112,7 +8253,7 @@ directory should work if nowhere else does.}
   \gdef^^e7{\cedilla c}
   \gdef^^e8{\v c}
   \gdef^^e9{\'e}
-  \gdef^^ea{\eogonek}
+  \gdef^^ea{\ogonek{e}}
   \gdef^^eb{\"e}
   \gdef^^ec{\v e}
   \gdef^^ed{\'\i}
@@ -8341,14 +8482,14 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{0101}{\=a}
   \DeclareUnicodeCharacter{0102}{\u{A}}
   \DeclareUnicodeCharacter{0103}{\u{a}}
-  \DeclareUnicodeCharacter{0104}{\Aogonek}
-  \DeclareUnicodeCharacter{0105}{\aogonek}
+  \DeclareUnicodeCharacter{0104}{\ogonek{A}}
+  \DeclareUnicodeCharacter{0105}{\ogonek{a}}
   \DeclareUnicodeCharacter{0106}{\'C}
   \DeclareUnicodeCharacter{0107}{\'c}
   \DeclareUnicodeCharacter{0108}{\^C}
   \DeclareUnicodeCharacter{0109}{\^c}
-  \DeclareUnicodeCharacter{0118}{\Eogonek}
-  \DeclareUnicodeCharacter{0119}{\eogonek}
+  \DeclareUnicodeCharacter{0118}{\ogonek{E}}
+  \DeclareUnicodeCharacter{0119}{\ogonek{e}}
   \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
   \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
   \DeclareUnicodeCharacter{010C}{\v{C}}
@@ -8879,6 +9020,9 @@ directory should work if nowhere else does.}
 
 \message{and turning on texinfo input format.}
 
+% DEL is a comment character, in case @c does not suffice.
+\catcode`\^^? = 14
+
 % Define macros to output various characters with catcode for normal text.
 \catcode`\"=\other
 \catcode`\~=\other
@@ -9000,6 +9144,8 @@ directory should work if nowhere else does.}
   @let>=@normalgreater
   @let+=@normalplus
   @let$=@normaldollar %$ font-lock fix
+  @markupsetuplqdefault
+  @markupsetuprqdefault
   @unsepspaces
 }
 
@@ -9038,9 +9184,10 @@ directory should work if nowhere else does.}
 @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}.  If we
 @c don't make ` and ' active, @code will not get them as active chars.
 @c Do this last of all since we use ` in the previous @catcode assignments.
-@c (not ready yet, sigh)
-@c atcode`@'=@active @let'@rq
-@c atcode`@`=@active @let`@lq
+@catcode`@'=@active
+@catcode`@`=@active
+@markupsetuplqdefault
+@markupsetuprqdefault
  
 @c Local variables:
 @c eval: (add-hook 'write-file-hooks 'time-stamp)