Xemacs syntax highlighting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jay Davis

    Xemacs syntax highlighting

    I use xemacs and syntax highlighting for my IDE, but I'm not a big
    fan of the default syntax highlighting colors. For instance,
    in 'def fun():' both 'def' and 'fun' are the same color. I kind of
    like the vim colors, but what would be really useful is to find
    various examples of highlighting that people have used, to see
    which ones just look right. I looked through google groups but
    didn't find any source of highlighting examples. Is there such a
    resource?
  • Greg Ewing (using news.cis.dfn.de)

    #2
    Re: Xemacs syntax highlighting

    Jay Davis wrote:[color=blue]
    > I use xemacs and syntax highlighting for my IDE, but I'm not a big
    > fan of the default syntax highlighting colors. For instance,
    > in 'def fun():' both 'def' and 'fun' are the same color.[/color]

    Funny you should mention this -- just today I set up
    some custom colours for xemacs. I have my keywords set
    to blue and function names to red (which is what it
    used to be like in an earlier version of xemacs, and
    I liked it better that way.)

    My .emacs file currently contains:

    (require 'font-lock)
    (set-face-foreground 'font-lock-function-name-face "red3")
    (set-face-foreground 'font-lock-keyword-face "blue3")
    (set-face-foreground 'font-lock-comment-face "dark green")
    (set-face-foreground 'font-lock-type-face "blue3")

    --
    Greg Ewing, Computer Science Dept,
    University of Canterbury,
    Christchurch, New Zealand


    Comment

    • Skip Montanaro

      #3
      Re: Xemacs syntax highlighting


      Jay> I use xemacs and syntax highlighting for my IDE, but I'm not a big
      Jay> fan of the default syntax highlighting colors. For instance, in
      Jay> 'def fun():' both 'def' and 'fun' are the same color.

      What version of python-mode.el are you using? I use the latest version from
      CVS (4.51). "def" is a purplish color (as are all keywords). The function
      name is a reddish color. Strings are green. Comments are blue. None of
      the colors are too saturated though so even though it sounds garish it's not
      too hard on the eyes. The version which comes with the Python distribution
      (4.41) probably uses the same color scheme. I don't think much has changed
      in that regard recently.

      Skip


      Comment

      • Ville Vainio

        #4
        Re: Xemacs syntax highlighting

        >>>>> "Skip" == Skip Montanaro <skip@pobox.com > writes:

        Skip> name is a reddish color. Strings are green. Comments are
        Skip> blue. None of the colors are too saturated though so even
        Skip> though it sounds garish it's not too hard on the eyes. The

        Aren't the actual, physical colors more of a global emacs issue,
        rather than an issue w/ python-mode.el? I'm using color-theme.el
        myself:



        I urge everyone to check it out, esp. if you spend >= 8 hours a day
        staring at emacs windows :).

        --
        Ville Vainio http://tinyurl.com/2prnb

        Comment

        • Roy Smith

          #5
          Re: Xemacs syntax highlighting

          In article <mailman.294.10 79065597.19534. python-list@python.org >,
          Skip Montanaro <skip@pobox.com > wrote:
          [color=blue]
          > What version of python-mode.el are you using? I use the latest version from
          > CVS (4.51).[/color]

          I just downloaded python-mode.el a couple of days ago from
          www.python.org and got version 4.6, for use with GNU Emacs 21.2.1 on my
          Mac OSX box.
          [color=blue]
          > "def" is a purplish color (as are all keywords). The function
          > name is a reddish color. Strings are green. Comments are blue.[/color]

          I'm getting keywords in teal (sort of a light blue), function names in
          dark blue, strings in green, and comments in red. Everything else in
          black.

          Comment

          • Skip Montanaro

            #6
            Re: Xemacs syntax highlighting

            [color=blue][color=green]
            >> What version of python-mode.el are you using? I use the latest
            >> version from CVS (4.51).[/color][/color]

            Roy> I just downloaded python-mode.el a couple of days ago from
            Roy> www.python.org and got version 4.6, for use with GNU Emacs 21.2.1
            Roy> on my Mac OSX box.

            Hmmm... I'll have to track that down and update it. I don't see
            python-mode.el in the source for the python.org website. Do you have a URL?

            Try the version here instead:

            Download python-mode.el for Emacs and XEmacs for free. python-mode is an Emacs and XEmacs major mode for editing Python source code. Please note that ALL DEVELOPMENT HAS MOVED TO LAUNCHPAD: http://launchpad.net/python-mode


            Although as others have pointed out this may be more of a GNU Emacs config
            issue. Python-mode tries to use the font highlighting capabilities of the
            system it's running on.

            Skip

            Comment

            • Skip Montanaro

              #7
              Re: Xemacs syntax highlighting


              Skip> name is a reddish color. Strings are green. Comments are blue.
              Skip> None of the colors are too saturated though so even though it
              Skip> sounds garish it's not too hard on the eyes. The

              Ville> Aren't the actual, physical colors more of a global emacs issue,
              Ville> rather than an issue w/ python-mode.el?

              Ah, perhaps you're right. In which case the OP probably just needs to
              upgrade to a recent version of XEmacs. ;-)

              Ville> I'm using color-theme.el myself:

              Ville> http://www.emacswiki.org/cgi-bin/wiki/ColorTheme

              Ville> I urge everyone to check it out, esp. if you spend >= 8 hours a
              Ville> day staring at emacs windows :).

              Thanks for the suggestion. Got a favorite theme for Python bufferrs or do
              you rotate through a small set of themes to give your eyes a break?

              Skip

              Comment

              • Skip Montanaro

                #8
                Re: Xemacs syntax highlighting


                Roy> BTW, although Apple ships OSX with both emacs and python
                Roy> pre-installed, they don't include the python-mode.el. Any idea
                Roy> what the best way is to suggest to Apple that they include it?

                Nope. You might ask on pythonmac-sig@python.org. I don't know if Jack
                Jansen channels Steve Jobs or not, but I think Chuq von Rospach keeps an eye
                on that list. I would think if anyone could squeeze python-mode.el into a
                future release he could.

                Roy> They also ship python without gnu readline enabled :-(

                That's the joy of being able to build from source. :-)

                turn-that-frown-upside-down-ly, y'rs,

                Skip


                Comment

                • Roy Smith

                  #9
                  Re: Xemacs syntax highlighting


                  On Mar 12, 2004, at 9:53 AM, Skip Montanaro wrote:
                  [color=blue]
                  >[color=green][color=darkred]
                  >>> What version of python-mode.el are you using? I use the latest
                  >>> version from CVS (4.51).[/color][/color]
                  >
                  > Roy> I just downloaded python-mode.el a couple of days ago from
                  > Roy> www.python.org and got version 4.6, for use with GNU Emacs
                  > 21.2.1
                  > Roy> on my Mac OSX box.
                  >
                  > Hmmm... I'll have to track that down and update it. I don't see
                  > python-mode.el in the source for the python.org website. Do you have
                  > a URL?[/color]

                  It's at http://www.python.org/emacs/python-mode/. This also happens to
                  be google hit #1 for "python emacs mode" :-)
                  [color=blue]
                  >
                  > Try the version here instead:
                  >
                  > http://cvs.sourceforge.net/viewcvs.p...e/python-mode/[/color]

                  I'll give that a shot, thanks.

                  BTW, although Apple ships OSX with both emacs and python pre-installed,
                  they don't include the python-mode.el. Any idea what the best way is
                  to suggest to Apple that they include it?

                  They also ship python without gnu readline enabled :-(


                  Comment

                  • Ville Vainio

                    #10
                    Re: Xemacs syntax highlighting

                    >>>>> "Skip" == Skip Montanaro <skip@pobox.com > writes:

                    Ville> I'm using color-theme.el myself:

                    Ville> http://www.emacswiki.org/cgi-bin/wiki/ColorTheme

                    Ville> I urge everyone to check it out, esp. if you spend >= 8
                    Ville> hours a day staring at emacs windows :).

                    Skip> Thanks for the suggestion. Got a favorite theme for Python
                    Skip> bufferrs or do you rotate through a small set of themes to
                    Skip> give your eyes a break?

                    Actually, I mostly stare C++ code, and use the same color theme for
                    all my emacsing. I use color-theme-midnight at work (LCD) because of
                    the peaceful contrast, and color-theme-clarity at home on my low end
                    CRT. Both have a black background. Some day I should find the energy
                    to go through all the color themes :).

                    --
                    Ville Vainio http://tinyurl.com/2prnb

                    Comment

                    Working...