Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6528949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:34:59+00:00 2026-05-25T09:34:59+00:00

Alt+f in emacs when writing in tex mode seems to not include the .

  • 0

Alt+f in emacs when writing in tex mode seems to not include the . as part of the word. So how do I modify the alt+f behavior to remain the same exact when going forward if there is punctiation to include that as part of the word.

I have a separate file that loads for when writing in tex so I will just throw it in there so it doesn’t affect normal emacs behavior.

Thanks for any help.

Thought of an addition to this but same related problem is when using Alt+d and deleting. Getting it to delete not only the word but also the punctation following eg.. (,.! etc..).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:35:00+00:00Added an answer on May 25, 2026 at 9:35 am

    The following code should work for you:

    (defun unpunctuate-syntax (str)
      "Make the characters of the given string word characters."
      (let ((st (copy-syntax-table (syntax-table))))
        (dotimes (n (length str))
          (modify-syntax-entry (elt str n) "w" st))
        (set-syntax-table st)))
    
    (defun dots-are-not-punctuation ()
      (unpunctuate-syntax "."))
    
    (add-hook 'TeX-mode-hook 'dots-are-not-punctuation)
    

    The way M-f (the forward-word function) works is that it skips all characters in the buffer that have type “w” (ie word) in the current syntax table.

    This code makes a modified syntax table and gives it to the buffer and the add-hook bit at the bottom sets it to run when you open a file in TeX-mode. (This method avoids you having to do the separate file thing you described).

    You might notice that I make a copy of the syntax table rather than editing the one belonging to the TeX major mode. This is because I always get things wrong when playing with syntax tables and you can mess things up royally… This method means you just have to close the buffer and start again!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using emacs in Ubuntu. How can I remap META to the ALT
I tried to use Alt as meta key for the FSF Emacs 23 Windows
I would like to assign the Alt-Backspace shortcut to pop-global-mark in Emacs (NOX). I
It's common for me to press alt-f10 (in GNU/Linux) after Emacs start up for
there's a lot of noise about super awesome features of Emacs. Be it org-mode
alt text http://barbarosalp.com/questions/list.png Hi, As you can see on the picture above i have
alt text http://home.elka.pw.edu.pl/~pkolodzi/Capture.PNG I have created the IAdder interface with two methods: PassA and
alt text http://www.mattdell.com/hostedfiles/flexchartissue.bmp I am having an issue where the chart labels on my
alt text http://img195.imageshack.us/img195/7845/tabx.jpg i am opening tabs with click event on tree list view.
alt text http://img216.imageshack.us/img216/2288/problem11.png As given in the picture, I have an search bar in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.