3.4.2 Bluffing through PceEmacs
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Initialising and Managing a Prolog Project
        • Using the PceEmacs built-in editor
          • Bluffing through PceEmacs
            • Edit modes
            • Frequently used editor commands
    • Packages

3.4.2.1 Edit modes

Modes are the heart of (Pce)Emacs. Modes define dedicated editing support for a particular kind of (source) text. For our purpose we want Prolog mode. There are various ways to make PceEmacs use Prolog mode for a file.

  • Using the proper extension
    If the file ends in .pl or the selected alternative (e.g. .pro) extension, Prolog mode is selected.

  • Using #!/path/to/.../swipl
    If the file is a Prolog Script file, starting with the line #!/path/to/swipl options, Prolog mode is selected regardless of the extension.

  • Using -*- Prolog -*-
    If the above sequence appears in the first line of the file (inside a Prolog comment) Prolog mode is selected.

  • Explicit selection
    Finally, using File/Mode/Prolog you can switch to Prolog mode explicitly.