Open
Bug 1464949
Opened 6 years ago
Updated 2 years ago
Emacs "file variables" initial line dysfunctional in many files
Categories
(Toolkit :: General, defect, P5)
Toolkit
General
Tracking
()
UNCONFIRMED
People
(Reporter: plaice.adam+persona, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180517113820 Steps to reproduce: Open toolkit/components/extensions/Schemas.jsm (https://dxr.mozilla.org/mozilla-central/source/toolkit/components/extensions/Schemas.jsm#1) in Emacs (e.g. version 24.5.1 or 26.1, without any customisations). Any file with the initial line: /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ would also be affected. Actual results: The file was opened, but the specified file variables (indent-tabs-mode: nil, etc.) are not loaded and the following error messages are displayed: Ignoring unknown mode ‘indent-tabs-mode: nil-mode’ Ignoring unknown mode ‘indent-tabs-mode:-mode’ Malformed mode-line: "nil; js-indent-level: 2" Expected results: The file is opened without any error messages and the specified file variables are loaded (indent-tabs-mode is set to nil, etc.) This is obviously a very minor issue, only affecting developers/contributors using Emacs. OTOH the line: /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ is at the start of a couple of hundred files (≳ 200), while doing absolutely nothing (it does doesn't help Emacs users, nor users of other editors). It could be either removed (see also: https://bugzilla.mozilla.org/show_bug.cgi?id=1023839) or fixed, by changing it to: /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ or /* -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- */ (The latter, specifying the mode, is probably unnecessarily verbose, since Emacs is perfectly capable of determining the mode from the file extension.)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•