Comments (5)
That would be nice to have in php-mode, as I like the idea a lot. However, I do not believe we should explicitly redefine fixup-whitespace
. It provides the same behavior for modes besides php-mode, but now we have a potential future problem whenever Emacs changes the default behavior of that function; I honestly don't know how likely that is, but I would still prefer to avoid it. A different approach would be to write the PHP-specific logic for fixup-whitespace
into another function and then, inside of php-mode, wrap fixup-whitespace
with a call to defadvice
that uses our specific logic. I am just brainstorming out-loud, so I have not tested that idea, but something like that would give us a cleaner separation between php-mode and something built into Emacs which other modes rely on.
from php-mode.
Yeah, I see how I could do that. I will get on that. I think we can do post advice that checks for the current mode and then looks at the character at point. if it sees `" \(->\|::\)`` then we can delete the added space.
from php-mode.
Here, I think I have an adequate solution, that can be expanded upon when necessary. Do you think this is something that should be defcustom'd?
from php-mode.
Thanks for providing a patch with tests and everything. It works as advertised for me so I merged it as b764847 so other people can start using it. I think whether or not it should be controlled by defcustom
will be determined if anyone raises an issue here with the change. If everyone thinks delete-indentation
is just "Doing the Right Thing" then there is no reason to make it customizable.
from php-mode.
Great!
from php-mode.
Related Issues (20)
- (define-key map [tab] 'indent-for-tab-command) is a bug HOT 2
- Text inside Heredoc breaks indentation.
- Syntax highlighting for SQL strings HOT 2
- Please tag release (prerelease or beta is ok) for Emacs 28 compatibility HOT 1
- Error in ternary operator indentation HOT 1
- Unexpected syntax highlights after "new" in string HOT 1
- Automatic, overly-clever brace-matching is annoying and how to turn it off is non-obvious HOT 2
- Function faces HOT 1
- Commented out array elements break indentation HOT 2
- Drop Emacs 25 Support
- WordPress coding style removing spaces around function args HOT 1
- The last argument of the method is not highlighted
- PEAR method chaining wrong indentation HOT 5
- File mode specification error HOT 5
- Indentation issue with closure/anonymous functions
- Lineup Cascaded Calls doesn't work properly
- emacs master results in error HOT 2
- Drop Emacs 26 Support
- Newline Indentation aligning with equal sign HOT 3
- while keyword says 'At top level' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-mode.