Questions tagged [major-mode]

The mode that determines the editing behavior of Emacs while that buffer is current. The mode line normally shows the name of the current major mode, in parentheses.

30 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
262 views

How to read wikipedia in Emacs

Is there a simple mode for the reading of wikipedia through Emacs?
3
votes
0answers
101 views

Can twittering-mode be used with GNU Social, and if so, how? If not, any alternatives?

I have an account on GNUSocial, and I want to be able to control it from Emacs. However, I haven't found a way to do so yet. I can control my Twitter just fine through twittering-mode, and was ...
2
votes
0answers
69 views

Strange comment indentation results

I am working with a simple major mode. The format has one single line comment delimiter, i.e., %. However, I get strange results when running fill-paragraph on a comment. Specifically, the result I ...
2
votes
0answers
69 views

Recommended use of non-file-visiting revert-buffer-function

Summary I am working on a major mode derived from special-mode, which populates its buffers with formatted lists of items retrieved from a web API. Reverting such a buffer involves refetching and ...
2
votes
0answers
133 views

SMIE default syntax : First level of indentation

When you only do that in your major mode : (require 'smie) (smie-setup nil #'ignore) That means SMIE but no grammar, and no rules. And it's great. It makes the point stay on col0 when you TAB and ...
2
votes
0answers
108 views

Find all modes derived from a mode

Is there any way to easily find all the modes that derive from a mode? The closest I can get is to use M-x apropros and search for -mode$ and manually comb through all defuns with the property ...
1
vote
0answers
24 views

Running logo program (ucblogo) in Emacs

I am trying to run logo programs (ucblogo version 5.5) on my emacs in Debian Linux (26.1). There is a currently a mode for it ( https://www.emacswiki.org/emacs/LogoMode ). I followed the instructions ...
1
vote
0answers
39 views

Change major-mode keymap char-table

I'm trying to write my own major mode, which I want to use under MS Windows. Unfortunately, Windows doesn't have my favourite keyboard layout, so I'm planning to implement this keyboard layout in my ...
1
vote
0answers
199 views

How to add additional comment syntax to a mode?

In general, given a major mode with a defined comment syntax, what do I have to define or change to add a new comment syntax? By "adding", I mean setting some new characters so that they work with ...
1
vote
0answers
71 views

How to disable code folding for coq?

When I do isearch on the buffer having coq mode it somehow executes code folding, something like (... *)... I have tried to use (setq company-coq-disabled-features '(code-folding)) for disabling code ...
1
vote
0answers
309 views

Enabling Company CAPF backend with timer in Major Mode

I've be working on a new major mode for a DSL. I'm planning to use the CAPF backend for company mode and would like to provide the integration. The completion at point functions produce the correct ...
1
vote
0answers
80 views

Keyword as comment ender (and starter)

In my previous question I asked about complex comment-start sequence and I think I figured it out, but now I have another problem. Let say we have this mode: (defconst test-font-lock-keywords '(("\\...
1
vote
0answers
22 views

Cperl font lock regions in here docs

I am having a problem in cperl-mode described in this question. Basically inserting a newline at the start of a line in here doc in cperl-mode is breaking the syntax highlighting. One of the answers ...
1
vote
0answers
90 views

How to save a yasnippet placeholder's final value in an Elisp variable?

In its more recent versions, shell-script mode tailors its behavior in response to the sh-shell variable's value, which indicates the shell variant (zsh, bash, etc.) that the script is for. I've ...
1
vote
0answers
27 views

Specify fallback possibilities for file-local variables?

It is clear from the manual how to set file variables: -*- mode: modename; var: value; … -*- For example, at the top of my ~/.gitconfig file, I have # -*- mode: conf; -*- I recently discovered ...
1
vote
0answers
101 views

Auto-indent problems related to syntax in Haxe-Mode

In the Haxe programming language, you can specify the type of the return value of a function with a colon. function funcName() : ReturnType { } This becomes a problem when using emacs with haxe-mode....
1
vote
0answers
64 views

Is there an existing function to add docstrings, relevant to the current major mode?

In emacs is there a function that I can invoke to add a docstring template based on the current major mode? eg: If I'm working on javascript, insert a javascript docstring template "here", like: /*...
0
votes
1answer
16 views

Whitespace mode settings on per major mode basis

When I open the Linux Kernel code, my default indentation conflicts with the desired formatting of the Kernel. I use Emacs Prelude, so I added the settings from this link to my c-mode-common-hook. I ...
0
votes
0answers
17 views

Disable Flycheck for different file extensions with the same mode

I use verilog-mode for both Verilog (extension .v) and System Verilog (extension .sv). I want to disable flycheck for .v files only. (Because they are typically multi-gigabyte netlists that take lots ...
0
votes
0answers
43 views

Howto define TAB and S-TAB in keymap of custom mode

I'm trying to bind the TAB and shift TAB keys to a custom readonly buffer mode. The skeleton of the mode looks like this: ;; 8< --- exmode.el ------- (defun exmode-i () (interactive) (message ...
0
votes
0answers
16 views

Keybindigs conflict between minor modes

The configuration that I have for python mode implies loading both elpy.el and python.el. The things is that I found the python.el keybindings more natural than the elpy.el ones. And most of the ...
0
votes
0answers
104 views

Spacemacs - python mode

I have some problems with my spacemacs configuration. For instance, it's supposed to be globally set up with emacs editing mode and the line numbers as well dotspacemacs-editing-style 'emacs ...
0
votes
0answers
268 views

Spacemacs user-config error

I'm using Spacemacs to develop a laravel + Vue application and I followed the steps in this configuration example to highlight syntax in Vue, but now every time Spacemacs starts it gives me this error:...
0
votes
0answers
29 views

Get the syntax coloring of another mode for newly defined mode

I am defining a new mode in emacs, but I want to have the same syntax highlighting as Org mode. How can I do this?
0
votes
0answers
24 views

wiki and twiki major modes

Is there an emacs mode for editing and typsetting wiki wiki modes? What I am looking for is something that could help me writing a properly formatted document for wikipedia.
0
votes
0answers
177 views

font-lock problem of c++ mode

I recently notice that there's some strange behaviours of the font-lock of the c++-mode. Let's start emacs by emacs -Q in the terminal, edit a new file test.cpp and save the following contents Then ...
0
votes
0answers
107 views

scss-mode compile not reading config.rb

Just discovered scss-mode and it's concomitant compile-on-save (very cool). However, I keep getting errors because sass it is not reading ../config.rb. I can find no variables in scss-mode nor params ...
0
votes
0answers
59 views

Determine if emacs knows the mode for a file

I'd like to add another system to set the major modes of file visiting buffers. To do so, I need to know if any of the existing major mode setting systems know how to set the mode, and do my thing ...
0
votes
0answers
92 views

Is there a way for a display-buffer-base-action function to know the forthcoming major-mode?

I am writing a mode that implements a persistent horizontal window (very similar to the "persistence compile window" in ECB). While I did study the ECB code it is quite old and endeavored to work ...
-1
votes
1answer
59 views

use a major mode from the internet

After installing emacs on windows 10 and gone through the tutorial and downloaded a major mode mt4.el , Now where to save it and how to use it in emacs? googling did not help me.